diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-04-16 15:34:41 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-04-16 17:52:37 +0200 |
commit | 1268326e814837e111eaf320f72661f288393839 (patch) | |
tree | 5518044c0fc0c952ae365560c287e7b3d5162929 /cppuhelper/source/factory.cxx | |
parent | b98617b3c86863fe5b4e3d9a96519707ae8cf58c (diff) |
Further clean-up related to removed library unloading feature
Change-Id: I1ec2aa4d0ed0940e7c0a26a18c78f2df4693d278
Diffstat (limited to 'cppuhelper/source/factory.cxx')
-rw-r--r-- | cppuhelper/source/factory.cxx | 57 |
1 files changed, 8 insertions, 49 deletions
diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx index dc5cf91a0fee..160a17ace576 100644 --- a/cppuhelper/source/factory.cxx +++ b/cppuhelper/source/factory.cxx @@ -280,49 +280,9 @@ public: : OComponentHelper( aMutex ) , OSingleFactoryHelper( rServiceManager, rImplementationName_, pCreateFunction_, fptr, pServiceNames_ ) , bOneInstance( bOneInstance_ ) - , pModuleCount(0) { } - // Used by the createXXXFactory functions. The argument pModCount is used to prevent the unloading of the module - // which contains pCreateFunction_ - OFactoryComponentHelper( - const Reference<XMultiServiceFactory > & rServiceManager, - const OUString & rImplementationName_, - ComponentInstantiation pCreateFunction_, - ComponentFactoryFunc fptr, - const Sequence< OUString > * pServiceNames_, - rtl_ModuleCount * pModCount, - sal_Bool bOneInstance_ = sal_False ) - SAL_THROW(()) - : OComponentHelper( aMutex ) - , OSingleFactoryHelper( rServiceManager, rImplementationName_, pCreateFunction_, fptr, pServiceNames_ ) - , bOneInstance( bOneInstance_ ) - , pModuleCount(pModCount) - { - if(pModuleCount) - pModuleCount->acquire( pModuleCount); - } - - // old function, only for backward compatibility - OFactoryComponentHelper( - const Reference<XMultiServiceFactory > & rServiceManager, - const OUString & rImplementationName_, - sal_Bool bOneInstance_ = sal_False ) - SAL_THROW(()) - : OComponentHelper( aMutex ) - , OSingleFactoryHelper( rServiceManager, rImplementationName_ ) - , bOneInstance( bOneInstance_ ) - , pModuleCount(0) - { - } - - ~OFactoryComponentHelper() - { - if(pModuleCount) - pModuleCount->release( pModuleCount); - } - // XInterface Any SAL_CALL queryInterface( const Type & rType ) throw(::com::sun::star::uno::RuntimeException); @@ -363,7 +323,6 @@ public: private: Reference<XInterface > xTheInstance; sal_Bool bOneInstance; - rtl_ModuleCount * pModuleCount; protected: // needed for implementing XUnloadingPreference in inheriting classes sal_Bool isOneInstance() {return bOneInstance;} @@ -1024,11 +983,11 @@ Reference<XSingleServiceFactory > SAL_CALL createSingleFactory( const OUString & rImplementationName, ComponentInstantiation pCreateFunction, const Sequence< OUString > & rServiceNames, - rtl_ModuleCount *pModCount ) + rtl_ModuleCount * ) SAL_THROW(()) { return new OFactoryComponentHelper( - rServiceManager, rImplementationName, pCreateFunction, 0, &rServiceNames, pModCount, sal_False ); + rServiceManager, rImplementationName, pCreateFunction, 0, &rServiceNames, sal_False ); } // global function @@ -1046,11 +1005,11 @@ Reference<XSingleServiceFactory > SAL_CALL createOneInstanceFactory( const OUString & rImplementationName, ComponentInstantiation pCreateFunction, const Sequence< OUString > & rServiceNames, - rtl_ModuleCount *pModCount ) + rtl_ModuleCount * ) SAL_THROW(()) { return new OFactoryComponentHelper( - rServiceManager, rImplementationName, pCreateFunction, 0, &rServiceNames, pModCount, sal_True ); + rServiceManager, rImplementationName, pCreateFunction, 0, &rServiceNames, sal_True ); } // global function @@ -1080,22 +1039,22 @@ Reference< lang::XSingleComponentFactory > SAL_CALL createSingleComponentFactory ComponentFactoryFunc fptr, OUString const & rImplementationName, Sequence< OUString > const & rServiceNames, - rtl_ModuleCount * pModCount) + rtl_ModuleCount *) SAL_THROW(()) { return new OFactoryComponentHelper( - Reference< XMultiServiceFactory >(), rImplementationName, 0, fptr, &rServiceNames, pModCount, sal_False ); + Reference< XMultiServiceFactory >(), rImplementationName, 0, fptr, &rServiceNames, sal_False ); } Reference< lang::XSingleComponentFactory > SAL_CALL createOneInstanceComponentFactory( ComponentFactoryFunc fptr, OUString const & rImplementationName, Sequence< OUString > const & rServiceNames, - rtl_ModuleCount * pModCount) + rtl_ModuleCount *) SAL_THROW(()) { return new OFactoryComponentHelper( - Reference< XMultiServiceFactory >(), rImplementationName, 0, fptr, &rServiceNames, pModCount, sal_True ); + Reference< XMultiServiceFactory >(), rImplementationName, 0, fptr, &rServiceNames, sal_True ); } } |