Hi Mathias, On 10/13/06, Mathias Bauer <[EMAIL PROTECTED]> wrote:
Kohei, can you tell us more about the way how your component integrates with Calc?
Sure. :-) Sorry about the delay.
And how are they bound to the menu items you want to add? Are you using a protocol handler?
Yes, I'm using a protocol handler to have Calc find my component by modifying two xcu files within the 'officecfg' module. Here is the actual modification I made (well, actually Michel Meeks did this one for me). Index: registry/data/org/openoffice/Office/ProtocolHandler.xcu =================================================================== RCS file: /cvs/util/officecfg/registry/data/org/openoffice/Office/ProtocolHandler.xcu,v retrieving revision 1.8 retrieving revision 1.8.238.1 diff -u -r1.8 -r1.8.238.1 --- registry/data/org/openoffice/Office/ProtocolHandler.xcu 8 Sep 2005 14:50:16 -0000 1.8 +++ registry/data/org/openoffice/Office/ProtocolHandler.xcu 21 Sep 2006 03:01:25 -0000 1.8.238.1 @@ -64,6 +64,12 @@ <node oor:name="com.sun.star.comp.ScriptProtocolHandler" oor:op="replace"> <prop oor:name="Protocols"> <value>vnd.sun.star.script:*</value> + </prop> + </node> + <!-- this is an ugly hack for a built-in component but ... --> + <node oor:name="scsolver.SolverImpl" oor:op="replace"> + <prop oor:name="Protocols" oor:type="oor:string-list"> + <value>scsolver.SolverImpl:*</value> </prop> </node> </node> Index: registry/data/org/openoffice/Office/UI/CalcCommands.xcu =================================================================== RCS file: /cvs/util/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu,v retrieving revision 1.17 diff -u -r1.17 CalcCommands.xcu --- registry/data/org/openoffice/Office/UI/CalcCommands.xcu 10 Jul 2006 12:28:04 -0000 1.17 +++ registry/data/org/openoffice/Office/UI/CalcCommands.xcu 15 Oct 2006 21:34:36 -0000 @@ -1774,6 +1774,12 @@ <value xml:lang="en-US">Graph~ic</value> </prop> </node> + <node oor:name="scsolver.SolverImpl:execute" oor:op="replace"> + <prop oor:name="Label" oor:type="xs:string"> + <value xml:lang="de">Solve~r...</value> + <value xml:lang="en-US">Solve~r...</value> + </prop> + </node> </node> </node> </oor:component-data> Then, inside the 'sc' module all I did was add a corresponding menu item in the menubar.xml file. There is no other modifications made besides this change. As you can see in Michael's comment in ProtocolHandler.xcu, there may be a better way to handle this, but at least it works. Kohei --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]