Hello, Ariel 2015-04-01 19:25 GMT+09:00 Ariel Constenla-Haile <arie...@apache.org>:
> Hello Shoichiro Yanagida, > > On Wed, Apr 01, 2015 at 09:16:12AM +0900, Shoichiro Yanagida wrote: > > Hello, > > > > I've added new command into > > /uiconfig/menubar/menubar.xml > > and /uiconfig/toolbar/toolbar.xml. > > And its UNO command is .uno:ShowVBIDE, for example. > > > > I can handle the command properly with > > define Slot id SID_SHOW_VBIDE in *.hrc > > and register UNO command and Slot id as supported feature in controller > > class > > and trap Slot id in Exec method of controller class. > > > > But the menu item is empty, toolbar button is too. > > > > How to define icons and string for menu item ? > > Or how to define icons and string for uno command ? > > > > I've read documentations about UNO under DevGuide, > > and grep*10^10 source code with existing UNO command, > > but I can't figure out. > > > > Any hint, link or information would be highly appreciated. > > Strings are bound to UNO commands in configuration files, under > main/officecfg/registry/data/org/openoffice/Office/UI/ > > Look the files with the pattern XxxComnands.xcu. If the command is in > more than one module and the string is the same in all modules, it > should go in GenericCommands.xcu, otherwise it should go in the > respective module's XxxCommands.xcu. > > The configuration file follows the schema defined in > main/officecfg/registry/schema/org/openoffice/Office/UI/Commands.xcs > > A command that is not meant for a submenu, should go into the node > "Commands", not "Popups". > A command that has an image bound to it must have a property named > "Properties", see for example > > https://svn.apache.org/viewvc/openoffice/trunk/main/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu?revision=1656166&view=markup#l5707 > > The images must go in main/default_images/res/commandimagelist/ > See revision 1486380 for an example of how to add an image to > ".uno:AutoPilotMenu" > https://svn.apache.org/viewvc?view=revision&revision=1486380 > > > > Regards > -- > Ariel Constenla-Haile > La Plata, Argentina > Thank you for your answer. It's very practical and helpful. I've solved my problem as follows: * add new node under "Command" node in XxxCommands.xcu <node oor:name=".uno:ShowVBIDE" oor:op="replace"> <prop oor:name="Label" oor:type="xs:string"> <value xml:lang="en-US">Show Basic IDE...</value> </prop> <prop oor:name="Properties" oor:type="xs:int"> <value>1</value> </prop> </node> * add 4 images into default_images/res/commandimagelist named as "showvbide" (same as UNO command) with prefix (lc_, lch_, sc_, sch_) * re-build and deliver target component, packimages and postprocess * re-build installer and re-install Thanks again! Regards, Shoichiro Yanagida