OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Custom Toolbar URL ?

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
maxime.labelle
General User
General User


Joined: 30 Mar 2005
Posts: 30

PostPosted: Mon Nov 07, 2005 9:06 am    Post subject: Custom Toolbar URL ? Reply with quote

Hello,

Does anybody know what is the URL of a custom toolbar, as stored under the user settings in '\user\config\soffice.cfg\modules\swriter\toolbar'.

I used to refer to custom toolbars in a document with "private:resource/toolbar/custom_toolbar_name.xml", but now, my toolbar is stored at the application level.

Thanks for any help.
Cheers.
Back to top
View user's profile Send private message
maxime.labelle
General User
General User


Joined: 30 Mar 2005
Posts: 30

PostPosted: Tue Nov 08, 2005 12:14 am    Post subject: Reply with quote

OK,

The URL is indeed "private:resource/toolbar/my_toolbar".

Found it using the ModuleUIConfigurationManager using the following code :

Code:

Public Sub GetToolbarNames

   Dim oCursor As Object
   Set oCursor = ThisComponent.Text.CreateTextCursor()

   Dim UISupplier As Object
   Set UISupplier = createUnoService("com.sun.star.ui.ModuleUIConfigurationManagerSupplier")

   Dim UIElements As Object
   Set UIElements = UISupplier.getUIConfigurationManager("com.sun.star.text.TextDocument" )

   Dim Elements()
   Let Elements = UIElements.getUIElementsInfo(3)
   
   Dim nIndex As Integer
   For nIndex = LBound(Elements) To UBound(Elements)
      Dim Items()
      Let Items = Elements(nIndex)
      Dim mIndex As Integer
      For mIndex = LBound(Items) To UBound(Items)
         ThisComponent.Text.InsertString oCursor, Items(mIndex).Name & ": " & Items(mIndex).Value, False
         ThisComponent.Text.InsertControlCharacter oCursor, com.sun.star.text.ControlCharacter.PARAGRAPH_BREAK, False
      Next
   Next

End Sub


Thanks.[/code]
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group