Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


On 12/07/2011 06:11 PM, Caolán McNamara wrote:
On Wed, 2011-12-07 at 17:07 +0100, Miklos Vajna wrote:
In short, it checks if there is a funcion named "g_ImplementationHelper"
in "actual python-module-name".

g_ImplementationHelper can be googled for, or opengroked. Its the "magic
smoke" which pyuno queries to find out what services a python component
provides, here's the bit from the mailmerge.py, which I think is the
only working python component we have in-tree.

# pythonloader looks for a static g_ImplementationHelper variable
g_ImplementationHelper = unohelper.ImplementationHelper()
g_ImplementationHelper.addImplementation( \
         PyMailServiceProvider,
"org.openoffice.pyuno.MailServiceProvider",
                 ("com.sun.star.mail.MailServiceProvider",),)
g_ImplementationHelper.addImplementation( \
         PyMailMessage, "org.openoffice.pyuno.MailMessage",
                 ("com.sun.star.mail.MailMessage",),)

I've no idea what's the right way that passive registration supersedes
this "classic" pyuno "active" registration.

See desktop/test/deployment/{active,passive}/ for working Python UNO components (as well as C++ and Java ones) using both active (deprecated) and passive registration (and all wrapped into ready-to-install extensions).

Stephan

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.