Hello Fernand,

On Tuesday 21 December 2010, 16:42, Fernand Vanrie wrote:
>   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 ??

you can not take for granted that the standard toolbar is named standardbar in 
every module.
For example, in OOo Base it's named toolbar


> where can i find the right resourceURL's ?

you have to look at the basis layer of your office installation:
<ROOT>/openoffice.org/basis3.4/share/config/soffice.cfg/modules/
there you have a folder for each module.
Inside every folder, you have another folder for each UIElelemt type (well, 
only menubar, statusbar and toolbar at the moment).

For example,
<ROOT>/openoffice.org/basis3.4/share/config/soffice.cfg/modules/dbapp/toolbar/toolbar.xml
has for resource URL "private:resource/toolbar/toolbar"
The resource URL is formed following the pattern
private:resource/TYPE/file_name_no_xml_extension

Another example:
<ROOT>/openoffice.org/basis3.4/share/config/soffice.cfg/modules/dbapp/toolbar/reportobjectbar.xml
is "private:resource/toolbar/reportobjectbar"


Regards
-- 
Ariel Constenla-Haile
La Plata, Argentina

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to