Hello ,
* I'm using Java, to access openOffice 2 UNO component. I'm trying to
add items to the contextMenu inside OpenOffice - I used the example from
sdk for that.
*Then the user choses the Item "Search Word" from the contextMenu, I
want my own function to be called. The problem is : I don't know how to
do that.
As I understand it, I have to use
xMenuEntry.setPropertyValue("CommandURL", String). But which String to
pass? Do I have to make an UNO component to call my own function from
OpenOffice?
Thanks in advance ,
Daniel
*this is the example I took from sdk. It calls the help navigator. How
to modify it, to call my own function, e.g. void foo() ?
/******************CODE****************************/
// intialize help/content menu entry
XPropertySet xMenuEntry = (XPropertySet) UnoRuntime.queryInterface(
XPropertySet.class,
xMenuElementFactory.createInstance(
"com.sun.star.ui.ActionTrigger"));
xMenuEntry.setPropertyValue("Text", "Search Word");
xMenuEntry.setPropertyValue("CommandURL", "slot:5401");
xMenuEntry.setPropertyValue("HelpURL", "5401");
/****************END OF CODE************************/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]