[Libreoffice] [GSOC] how to call python code from the menu

Caolán McNamara caolanm at redhat.com
Tue Aug 16 09:08:30 PDT 2011

On Mon, 2011-08-15 at 19:02 +0200, Xisco Faulí wrote:
> Hello everybody,
> before I merge the gsoc branch into master I'd like to integrate the
> python code into libo and get rid of the java code.
> I know i have to edit this file
> http://opengrok.libreoffice.org/xref/core/officecfg/registry/data/org/openoffice/Office/Common.xcu but i can't figure out how to call the python code.  I've tried to call this file http://opengrok.libreoffice.org/xref/core/pyuno/demo/hello_world_comp.py using this value: <value>service:org.openoffice.comp.pyuno.demo.HelloWorld?insert</value> but it doesn't work. Any idea ?

Perhaps hello_world_comp.py isn't registered as a service ?

Did you look at how the mailmerge.py example is installed ?, i.e.
http://opengrok.libreoffice.org/search?q=mailmerge.py for a python
component which is bundled into LibreOffice.

You may have to do pretty much the same thing for it be available via
service:...?foo out-of-the-box. There's some preamble at the top of
mailmerge.py about how to manually register that component for testing
purposes, which is probably the archaic way to do it these-days, but
probably still works.


More information about the LibreOffice mailing list