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 | |
parent | b98617b3c86863fe5b4e3d9a96519707ae8cf58c (diff) |
Further clean-up related to removed library unloading feature
Change-Id: I1ec2aa4d0ed0940e7c0a26a18c78f2df4693d278
Diffstat (limited to 'cppuhelper')
-rw-r--r-- | cppuhelper/inc/cppuhelper/factory.hxx | 12 | ||||
-rw-r--r-- | cppuhelper/inc/cppuhelper/implementationentry.hxx | 7 | ||||
-rw-r--r-- | cppuhelper/source/factory.cxx | 57 |
3 files changed, 21 insertions, 55 deletions
diff --git a/cppuhelper/inc/cppuhelper/factory.hxx b/cppuhelper/inc/cppuhelper/factory.hxx index 0c4f7665ce3f..8dfda840d51c 100644 --- a/cppuhelper/inc/cppuhelper/factory.hxx +++ b/cppuhelper/inc/cppuhelper/factory.hxx @@ -133,7 +133,8 @@ typedef ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >( @param fptr function pointer for instanciating the object @param rImplementationName implementation name of service @param rServiceNames supported services - @param pModCount for future extension (library unloading concept). + @param pModCount a backwards-compatibility remainder of a removed library + unloading feature; always set to null */ CPPUHELPER_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleComponentFactory > SAL_CALL createSingleComponentFactory( @@ -148,7 +149,8 @@ SAL_CALL createSingleComponentFactory( @param fptr function pointer for instanciating the object @param rImplementationName implementation name of service @param rServiceNames supported services - @param pModCount for future extension (library unloading concept). + @param pModCount a backwards-compatibility remainder of a removed library + unloading feature; always set to null @see createSingleComponentFactory */ @@ -175,7 +177,8 @@ typedef ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(SA @param rImplementationName the implementation name. An empty string is possible. @param pCreateFunction the function pointer to create an object. @param rServiceNames the service supported by the implementation. - @param pModCount for future extension (library unloading concept). + @param pModCount a backwards-compatibility remainder of a removed library + unloading feature; always set to null. @return a factory that support the interfaces XServiceProvider, XServiceInfo XSingleServiceFactory and XComponent. @@ -217,7 +220,8 @@ createFactoryProxy( @param rComponentName the implementation name. An empty string is possible. @param pCreateFunction the function pointer to create an object. @param rServiceNames the service supported by the implementation. - @param pModCount for future extension (library unloading concept). + @param pModCount a backwards-compatibility remainder of a removed library + unloading feature; always set to null. @return a factory that support the interfaces XServiceProvider, XServiceInfo XSingleServiceFactory and XComponent. diff --git a/cppuhelper/inc/cppuhelper/implementationentry.hxx b/cppuhelper/inc/cppuhelper/implementationentry.hxx index f8d8f936f174..298c0dc9e9ba 100644 --- a/cppuhelper/inc/cppuhelper/implementationentry.hxx +++ b/cppuhelper/inc/cppuhelper/implementationentry.hxx @@ -54,6 +54,9 @@ struct ImplementationEntry com::sun::star::uno::Sequence< rtl::OUString > MY_FN_PTR( getSupportedServiceNames ) (); /** Function that creates a SingleComponentFactory. + + The pModCount parameter is a backwards-compatibility remainder of a + removed library unloading feature; always set to null. */ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleComponentFactory > MY_FN_PTR( createFactory )( @@ -62,8 +65,8 @@ struct ImplementationEntry ::com::sun::star::uno::Sequence< ::rtl::OUString > const & rServiceNames, rtl_ModuleCount * pModCount ); - /** The shared-library module-counter of the implementation. Maybe 0. The module-counter - is used during by the createFactory()-function. + /** Backwards-compatibility remainder of a removed library unloading + feature; always set to null. */ rtl_ModuleCount * moduleCounter; 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 ); } } |