From 7405145605923123a09738829ead507fe6078e0c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 21 Jul 2020 17:02:32 +0200 Subject: embeddedobj/msole: create instances with uno constructors See tdf#74608 for motivation. Change-Id: I11ad7cf96d65332e418f1854803d62a30bacc7e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99163 Tested-by: Jenkins Reviewed-by: Noel Grandin --- embeddedobj/source/inc/oleembobj.hxx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'embeddedobj/source/inc') diff --git a/embeddedobj/source/inc/oleembobj.hxx b/embeddedobj/source/inc/oleembobj.hxx index 051d63294af4..9739402c6a27 100644 --- a/embeddedobj/source/inc/oleembobj.hxx +++ b/embeddedobj/source/inc/oleembobj.hxx @@ -34,6 +34,7 @@ #include #include #include +#include #include #include @@ -132,7 +133,7 @@ class OleEmbeddedObject : public ::cppu::WeakImplHelper sal_Int32 m_nTargetState; sal_Int32 m_nUpdateMode; - css::uno::Reference< css::lang::XMultiServiceFactory > m_xFactory; + css::uno::Reference< css::uno::XComponentContext > m_xContext; css::uno::Sequence< sal_Int8 > m_aClassID; OUString m_aClassName; @@ -291,17 +292,17 @@ protected: public: // in case a new object must be created the class ID must be specified - OleEmbeddedObject( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory, + OleEmbeddedObject( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Sequence< sal_Int8 >& aClassID, const OUString& aClassName ); // in case object will be loaded from a persistent entry or from a file the class ID will be detected on loading // factory can do it for OOo objects, but for OLE objects OS dependent code is required - OleEmbeddedObject( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory, + OleEmbeddedObject( const css::uno::Reference< css::uno::XComponentContext >& xContext, bool bLink ); #ifdef _WIN32 // this constructor let object be initialized from clipboard - OleEmbeddedObject( const css::uno::Reference< css::lang::XMultiServiceFactory >& xFactory ); + OleEmbeddedObject( const css::uno::Reference< css::uno::XComponentContext >& xContext ); #endif virtual ~OleEmbeddedObject() override; -- cgit