On Thu, Jun 5, 2025 at 7:33 PM Damjan Jovanovic <dam...@apache.org> wrote:

> Hi
>
> As is documented in our development guide (
> https://wiki.openoffice.org/wiki/Documentation/DevGuide/ProUNO/Component_Context),
> OpenOffice has 2 APIs for factories for creating components, the older
> service manager (XMultiServiceFactory) and the newer component context
> (XComponentContext and its XMultiComponentFactory).
>
> Most OpenOffice code (possibly as much as 73%) still uses the older
> service manager API, which is undesirable as it breaks context propagation.
>
> I tried to convert some components to use the component context API
> instead of service manager. It went well. The component context related
> helper functions like ::cppu::component_getFactoryHelper() are simpler and
> easier to use than the long manual implementation of component_getFactory()
> functions. I also noticed another unexpected benefit: the new way made the
> components slightly smaller :-)
>
> main/fileacc: libfileacc.so 101576 -> 100384 (1192 bytes / 1.17% smaller).
> main/linguistic: liblng.so 776088 -> 774792 (1296 bytes / 0.17% smaller).
> main/unotools: libutl.so 1741992 -> 1741544 (448 bytes / 0.026% smaller).
>
> I've pushed my changes into trunk in these commits:
> b823e66d3f46b17ae64960345c492805b7c32775
> cc5439b6c91921c2f20d49d36a9f2cf6bb387039
> b823e66d3f46b17ae64960345c492805b7c32775
>

Sorry that's actually:
7e7d909f7b346ca319119ba7253c8eae03fb7764
cde5ecdaa53a1689dbdb9e55f18eebac44065c1b
1890034f73947872dc88f59af6226fed5174e2b5

Reply via email to