unused XLinkFactory stuff

Stephan Bergmann sbergman at redhat.com
Mon Feb 2 04:42:50 PST 2015


On 02/02/2015 12:37 PM, Caolán McNamara wrote:
> unusedcode.easy has an
> OooEmbeddedObjectFactory::createInstanceLinkUserInit after the recent
> devirtualization allowed callcatcher to determine that its unused. On
> investigation the embeddedobj/source/commonembedding/xfactory.hxx used
> to explicitly list implementing XLinkFactory until
>
> 251f1b0b38be7d1267339898e44e320f05849e22
> Date:   Tue Jan 8 14:29:06 2013 +0200
>      fdo#46808, Adapt embed::*EmbeddedObjectCreator UNO services to new
> style
>
> interface XEmbeddedObjectCreator
> {
>      interface XEmbedObjectCreator;
>      interface XEmbedObjectFactory;
>      interface XLinkCreator;
>      [optional] interface XLinkFactory;
> };
>
> so I assume the problem here is the [optional] thing. What's the right
> way to fix this within the new style uno foo ?

I guess it was a plain oversight in 
embeddedobj/source/commonembedding/xfactory.hxx to go from

> class OOoEmbeddedObjectFactory : public ::cppu::WeakImplHelper5<
>                                                 ::com::sun::star::embed::XEmbedObjectCreator,
>                                                 ::com::sun::star::embed::XEmbedObjectFactory,
>                                                 ::com::sun::star::embed::XLinkCreator,
>                                                 ::com::sun::star::embed::XLinkFactory,
>                                                 ::com::sun::star::lang::XServiceInfo >

to

> class OOoEmbeddedObjectFactory : public ::cppu::WeakImplHelper2<
>                                                 ::com::sun::star::embed::XEmbeddedObjectCreator,
>                                                 ::com::sun::star::lang::XServiceInfo >

instead of

> class OOoEmbeddedObjectFactory : public ::cppu::WeakImplHelper3<
>                                                 ::com::sun::star::embed::XEmbeddedObjectCreator,
>                                                 ::com::sun::star::embed::XLinkFactory,
>                                                 ::com::sun::star::lang::XServiceInfo >

as optional UNOIDL superinterfaces are simply erased in the C++ language 
binding.  Fixed now with 
<http://cgit.freedesktop.org/libreoffice/core/commit/?id=c33c309f13dee335d81eb0e00363d4ae2d7c911a> 
"OOoEmbeddedObjectFactory does implement optional XLinkFactory."


More information about the LibreOffice mailing list