Re: Are there changes to the resourceURL 's ?
Fernand Vanrie <[email protected]> Tue, 21 Dec 2010 20:42:01 +0100
| Newsgroups | gmane.comp.openoffice.devel.api |
|---|---|
| Message-ID | <[email protected]> |
Ariel ,
Stupit me :-)
not a typo, just the wrong copy of one of my tests
The problem is still there
oFrame = oDoc.getCurrentController().getFrame()
oCfgManager = oDoc.getUIConfigurationManager()
oToolInfo = oCfgManager.getUIElementsInfo( iToolType )
sToolbar = "private:resource/toolbar/standardbar"
For Each x in oFrame.LayoutManager.getElements()
if x.ResourceURL = sToolBar Then
rem the Resource is here
oImageMgr = oCfgManager.getImageManager()
oToolbarSettings = oCfgManager.getSettings(sToolbar, true)
but no settings for "private:resource/toolbar/standardbar"
i get a error error: com.sun.star.container.NosuchElement exception
when not starting with "private:resource/toolbar/" then is get a
iIlegalArgumentexception so it must start with private:resource/toolbar/
but why is "standardbar" not present ??
where can i find the right resourceURL's ?
fernand
> Hello Fernand,
>
> On Tuesday 21 December 2010, 14:42, Fernand Vanrie wrote:
>> I trie to remove some buttons on the standard Toolbar
>>
>> I found some BASIC code made by Andrew Pitonyack, but i run in a error,
>> saying that "private:resource/toolbar/standardbar" is no valid element
>> for settings in the UIConfigurationManager
> your code below checks for "private:resource/menubar/menubar"
> Obviously, if you ask for info about com.sun.star.ui.UIElementType.TOOLBAR,
> there won't be MenuBar info!
>
>> Please try this simple code from in a writerdoc
>>
>> oDoc = ThisComponent
>>
>> iToolType = com.sun.star.ui.UIElementType.TOOLBAR
>>
>> oFrame = oDoc.getCurrentController().getFrame()
>> oCfgManager = oDoc.getUIConfigurationManager()
>> oToolInfo = oCfgManager.getUIElementsInfo( iToolType )
>> For Each x in oFrame.LayoutManager.getElements()
>> print x.ResourceURL
>> REM private:resource/toolbar/standardbar" is prentent
>> stoolbar = "private:resource/menubar/menubar"
> this is the resource URL for the MenuBar!
> May be a copy& paste mistake.
>
>
> Regards