Files
loeclipse/python
prrvchr 842cc81bea Fix #156 Passive registration fix (#157)
This passive registration registers all UNO services that are present in
a component's Java or Python implementation. This fixes issue #156.

To be considered as a UNO service a Java Class must have:
- An ctor with `com.sun.star.uno.XComponentContext` as unique parameter.
- A **static final** field `m_serviceNames` of type `String[]` (ie: an
array of String) and having as values the name of the UNO service. This
field can be private, protected or public, it doesn't matter.

For a Python class to be considered a UNO service it must:

- Exist a global variable `g_ImplementationHelper` declared as follows:
`g_ImplementationHelper = unohelper.ImplementationHelper()`.
- Exist a global variable `g_ImplementationName` declared as follows:
`g_ImplementationName = 'com.sun.star.MyServiceName'`.
- Exist a global variable `g_ServiceNames` declared as follows:
`g_ServiceNames = ('com.sun.star.task.JobExecutor', )`.
- Although this is not controlled, it will also be necessary for it to
have the following code:

```
g_ImplementationHelper.addImplementation(YourPythonClass,         # UNO object class
     g_ImplementationName,                                        # Implementation name
     g_ServiceNames)                                              # List of implemented services
```
2025-04-14 11:27:35 +02:00
..
2025-02-17 09:07:42 +01:00
2025-01-13 07:50:50 +01:00
2020-06-15 12:31:18 +02:00