Re: Are there changes to the resourceURL 's ?
Ariel Constenla-Haile <[email protected]> Tue, 21 Dec 2010 17:15:08 -0300
| Newsgroups | gmane.comp.openoffice.devel.api |
|---|---|
| Message-ID | <[email protected]> |
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
signature.asc
(application/pgp-signature, 836 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) iQIcBAABCAAGBQJNEQrTAAoJEMjP1bm45QNWH94P/1mm6kTKuN5ndk9fja5KT2S0 H1By8KcZIcpKWu+mw8rkKSMbYyziP/4lyefPkv1nI8C3u0LDbF+xPQhqnPOYWuN7 BnkLS0mqse5ZdGTJvS13wjYQOjtaPKiWLRynQcLs0ftRWKeD9D2DesVhoqZoH4QV yR+ma2hwzx6bBmi0G8qusvJtooB9dmNXKMDeds1QOt4ZxnwHSB88SKfmczwnAx40 1CVzyMvRiUQrlNSnUqIpbUl8F3jD5nHkDIEP5/ALJ3x0XCdplHtJ1nmeYwI7KIQN gD0rGAa6GQVtgKseqd+7OW96S2rLpCVUo4eYWcUNJB6mzWfQqU1ml+Na9kC1oOuK i4H8GlktiJrUTVcB+gzAJRR6nfReNTr0D/ZJZDxInmILY2qriEJQbSubyZUBlIGU JWHmXrowiC+6Aay4xaIdo8P0DRQ3bmnMHSfNnvtZRVjwqbsERTYP636rjDjAwqab Rt5ypnzHhnF7t18KhnK/eCFMU1aS7ttyo67LoWyOncEOk9KCb8pG51WSfsXSLpTU 7J8FT0JtlIQLctmaZELnrxsXY9h1jcJN5T2CAA/yH3fhSpb2Jxy3QV0wju/7PUV8 zRHU/+CBGupFSPwNXp7BqjZeUMn+VM/Zt8hgJZ8gUjOmSKUvcQooNgSpZreezNSL 8vpVDxO3FddPMtvtPWQa =9qoI -----END PGP SIGNATURE-----