openoffice-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ariel Constenla-Haile <>
Subject Re: How to set menu/toolbar icons and string for UNO command
Date Wed, 01 Apr 2015 10:25:14 GMT
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

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

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

The images must go in main/default_images/res/commandimagelist/
See revision 1486380 for an example of how to add an image to

Ariel Constenla-Haile
La Plata, Argentina

View raw message