Schuster Gerhard schrieb:

Hi Gerhard,

See my comments inline.
I think Ariel is right

The obvious way to set an image in a context menu item is to set an
image for the command URL in the Addons.xcu config. file, but as the API
ref. for http://api.openoffice.org/docs/common/ref/com/sun/star/ui/ActionTrigger.html#Image says that the value for this property is an XBitmap, we should (in theory) be able to get it and set it.

I think, if a context menu has a icon or a submenu, this has to show in
the corresponding XPropertySet

Don't mix the Addons.xcu and context menu interception. Context menu interception is not influenced by any Addons.xcu entry. You can only change the context menu with a context menu interceptor via UNO interfaces.



I have the feeling that the property "SubContainer" is empty if the
submenu was created via a *.xcu configuration file.
That means, one can not add items to existing submenues at runtime using source
code.
Am I right?
No, the xcu configuration doesn't influence any context menu. The "SubContainer" property is only used by the context menu interceptor UNO API.


If so, maybe that is the exact intension of the API-developers in order to
keep the system consistent.
The menu items added to the main menu via Addons.xcu configuration file(s) are not visible using the user interface configuration API. The reason is to keep the system consistent. Otherwise developers would be able to store add-on entries persistently which don't work in other environments.


But someone might want to implement his very
special "Line Spaceing" or "Allignment".

How would he do that?
There are sub menus which are filled at runtime. These items are called "Popup Menu Controllers" and are associated with a command URL. The configuration file Controller.xcu contains the "Popup Menu Controllers". You have to create your own "Popup Menu Controller" if you want to exchange the implementation. You can find more information about "Popup Menu Controllers" here:
http://wiki.services.openoffice.org/wiki/Framework/Tutorial/Popup_Menu_Controller

Up to now there is only the possiblity to insert menue items into the
main manu and the Add-Ons-Menu via *.xcu file.

You can use the context menu interceptor to modify an existing context menu item including sub menus. The Addons.xcu configuration lets you add new menus and menu items into the main menu bar.

Regards,
Carsten

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to