[Libreoffice] [GSoC] library merging

Matúš Kukan matus.kukan at gmail.com
Sat Jun 25 07:21:31 PDT 2011

On 24 June 2011 17:57, Michael Meeks <michael.meeks at novell.com> wrote:
> On Fri, 2011-06-24 at 16:08 +0100, Caolán McNamara wrote:
>> I never really bothered to look at
>> component_getImplementationEnvironment but I wonder if that could be
>> elided in 90% of cases. i.e. that all merged libraries are going to have
>> the same body there anyway.
Well, that seems to be true. I haven't look at all yet. There is about
240 of them.

>        AFAICS it is a total waste of breath :-) Matus - this is another task
> worth looking at - can you do an audit of all
> component_getImplementationEnvironment calls and see if any do anything
> interesting ? [ and what the default is if it is not there ] :-) one fun
> cleanup may be just binning all of them.
Mostly there is just: *ppEnvTypeName =
CPPU_CURRENT_LANGUAGE_BINDING_NAME; (this was in all I have renamed)
with occasional test: if( ppEnvTypeName != 0 )
But sometimes there also exist things like in:
That doesn't seem interesting to me, but I don't know, maybe it
actually does something relevant.

And default is: throw loader::CannotActivateFactoryException.
There always has to be some function.
But it's only used to set one variable in shlib.cxx.
So, if CPPU_CURRENT_LANGUAGE_BINDING_NAME can be also defined in
shlib, we could use that directly to set the variable.

I may be missing something but if not I'd just remove
component_getImplementationEnvironment if it is not doing something
special and set the variable directly in shlib.


More information about the LibreOffice mailing list