[Libreoffice-commits] core.git: extensions/source
Tor Lillqvist
tml at collabora.com
Fri May 25 05:35:38 UTC 2018
extensions/source/ole/servprov.cxx | 8 ++++----
extensions/source/ole/servprov.hxx | 35 ++++++-----------------------------
2 files changed, 10 insertions(+), 33 deletions(-)
New commits:
commit e7cefdfc83ce17f11ea6277f579a4d8434a97ce4
Author: Tor Lillqvist <tml at collabora.com>
Date: Tue Feb 13 00:34:30 2018 +0200
IClassFactoryWrapper can go away now
Change-Id: I7633648dc0398d2c1b6f04e6db9b18638a7451f5
Reviewed-on: https://gerrit.libreoffice.org/54781
Reviewed-by: Tor Lillqvist <tml at collabora.com>
Tested-by: Tor Lillqvist <tml at collabora.com>
diff --git a/extensions/source/ole/servprov.cxx b/extensions/source/ole/servprov.cxx
index e7fcbb9823ef..72e5944fb5ba 100644
--- a/extensions/source/ole/servprov.cxx
+++ b/extensions/source/ole/servprov.cxx
@@ -488,12 +488,12 @@ css::uno::Sequence<OUString> OleServer::getSupportedServiceNames()
bool OleServer::provideInstance(const Reference<XInterface>& xInst, GUID const * guid)
{
- IClassFactoryWrapper* pFac = new OneInstanceOleWrapper( m_smgr, xInst );
+ OneInstanceOleWrapper* pWrapper = new OneInstanceOleWrapper( m_smgr, xInst );
- pFac->AddRef();
- m_wrapperList.push_back(pFac);
+ pWrapper->AddRef();
+ m_wrapperList.push_back(pWrapper);
- return pFac->registerClass(guid);
+ return pWrapper->registerClass(guid);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/extensions/source/ole/servprov.hxx b/extensions/source/ole/servprov.hxx
index 2f4b8446f815..8d128b4c48e3 100644
--- a/extensions/source/ole/servprov.hxx
+++ b/extensions/source/ole/servprov.hxx
@@ -39,41 +39,19 @@ Reference< XInterface> ConverterProvider_CreateInstanceVar1( const Reference<X
Reference<XInterface> OleClient_CreateInstance( const Reference<XMultiServiceFactory> & xSMgr);
/// @throws Exception
Reference<XInterface> OleServer_CreateInstance( const Reference<XMultiServiceFactory> & xSMgr);
-/*****************************************************************************
-
- IClassFactoryWrapper
-
- Specify abstract helper methods on class factories, which provide
- UNO objects. These methods are used by objects of class OleServer,
- to handle the OLE registration of different class factories.
-
-*****************************************************************************/
-
-class IClassFactoryWrapper : public IClassFactory
-{
-public:
-
- virtual bool registerClass(GUID const * pGuid) = 0;
- virtual bool deregisterClass() = 0;
-
-protected:
- ~IClassFactoryWrapper() {}
-};
/*****************************************************************************
OneInstanceOleWrapper
- Provides an single UNO object as OLE object. Handle the
- OLE registration by overriding the abstract methods from
- IClassFactoryWrapper.
+ Provides an single UNO object as OLE object.
- Acts as a COM class factory. When IClassFactory::CreateInstance is being called
+ Acts as a COM class factory. When IClassFactory::CreateInstance is being called
then it maps the XInstance member it to a COM object.
*****************************************************************************/
-class OneInstanceOleWrapper : public IClassFactoryWrapper
+class OneInstanceOleWrapper : public IClassFactory
{
public:
@@ -81,8 +59,8 @@ public:
const Reference<XInterface>& xInst );
virtual ~OneInstanceOleWrapper();
- bool registerClass(GUID const * pGuid) override;
- bool deregisterClass() override;
+ bool registerClass(GUID const * pGuid);
+ bool deregisterClass();
/* IUnknown methods */
STDMETHOD(QueryInterface)(REFIID riid, LPVOID FAR * ppvObj) override;
@@ -94,7 +72,6 @@ public:
STDMETHOD(LockServer)(int fLock) override;
protected:
-
oslInterlockedCount m_refCount;
Reference<XInterface> m_xInst;
DWORD m_factoryHandle;
@@ -198,7 +175,7 @@ public:
protected:
bool provideInstance(const Reference<XInterface>& xInst, GUID const * guid);
- list< IClassFactoryWrapper* > m_wrapperList;
+ list< OneInstanceOleWrapper* > m_wrapperList;
Reference< XBridgeSupplier2 > m_bridgeSupplier;
Reference<XMultiServiceFactory> m_smgr;
More information about the Libreoffice-commits
mailing list