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

Create Menu

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
gigabert
General User
General User


Joined: 13 Sep 2009
Posts: 13

PostPosted: Fri Oct 09, 2009 4:54 am    Post subject: Create Menu Reply with quote

Hello,

i have some code in a macro that creates a menu in a form (OOo Base 3.1.1). The code works. The most of this code is clear but can please somebody explain for me in easy words (i'm beginner), what the ItemDescriptorContainer is and how it works. Also for the ModuleUIConfigurationManagerSupplier, because i get an object from that an give it to the ItemDescriptorContainer.

Code:
Function CreateMenu( Command as String, Label as String ) as Variant

   Dim aMenu(3) as new com.sun.star.beans.PropertyValue
   Dim oModuleCfgMgrSupplier As Object, oModuleCfgMgr As Object, oContainer As Object
   
   oModuleCfgMgrSupplier = createUnoService("com.sun.star.ui.ModuleUIConfigurationManagerSupplier")
   oModuleCfgMgr = oModuleCfgMgrSupplier.getUIConfigurationManager( "com.sun.star.sheet.SpreadsheetDocument" )
   oContainer = oModuleCfgMgr.createSettings()
   aMenu(0).Name = "CommandURL"
   aMenu(0).Value = Command
   aMenu(1).Name = "Label"
   aMenu(1).Value = Label
   aMenu(2).Name = "Type"
   aMenu(2).Value = 0
   aMenu(3).Name = "ItemDescriptorContainer"
   aMenu(3).Value = oContainer
   CreateMenu = aMenu()
End Function


Thanks a lot
Bert
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 Macros and API 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