diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-04-19 16:50:50 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-04-19 16:52:03 +0200 |
commit | e8ff469da51904a2ddafd59b2dcf45539370e08e (patch) | |
tree | bf35796d9eca312ec3f06bbaa67abc70cdc42393 /stoc | |
parent | eeaa2ecd1e1f6e0f468854b891de0caa28c470e6 (diff) |
Remove any remaining remnants of unused component_canUnload feature
Change-Id: I635fd006b5ba9f5fb0091748ee2ff9bc3c1a2d2a
Diffstat (limited to 'stoc')
28 files changed, 75 insertions, 289 deletions
diff --git a/stoc/source/bootstrap/services.cxx b/stoc/source/bootstrap/services.cxx index c66aeea7f61c..3157d2556f00 100644 --- a/stoc/source/bootstrap/services.cxx +++ b/stoc/source/bootstrap/services.cxx @@ -33,8 +33,6 @@ using namespace com::sun::star::uno; using namespace cppu; using namespace osl; -extern rtl_StandardModuleCount g_moduleCount; - using namespace stoc_bootstrap; static struct ImplementationEntry g_entries[] = @@ -43,64 +41,64 @@ static struct ImplementationEntry g_entries[] = { OServiceManager_CreateInstance, smgr_getImplementationName, smgr_getSupportedServiceNames, createSingleComponentFactory, - &g_moduleCount.modCnt , 0 + 0, 0 }, { ORegistryServiceManager_CreateInstance, regsmgr_getImplementationName, regsmgr_getSupportedServiceNames, createSingleComponentFactory, - &g_moduleCount.modCnt , 0 + 0, 0 }, { OServiceManagerWrapper_CreateInstance, smgr_wrapper_getImplementationName, smgr_wrapper_getSupportedServiceNames, createSingleComponentFactory, - &g_moduleCount.modCnt , 0 + 0, 0 }, //security { ac_create, ac_getImplementationName, ac_getSupportedServiceNames, createSingleComponentFactory, - &g_moduleCount.modCnt, 0 + 0, 0 }, { filepolicy_create, filepolicy_getImplementationName, filepolicy_getSupportedServiceNames, createSingleComponentFactory, - &g_moduleCount.modCnt, 0 + 0, 0 }, //simpleregistry { SimpleRegistry_CreateInstance, simreg_getImplementationName, simreg_getSupportedServiceNames, createSingleComponentFactory, - &g_moduleCount.modCnt , 0 + 0, 0 }, //defaultregistry { NestedRegistry_CreateInstance, defreg_getImplementationName, defreg_getSupportedServiceNames, createSingleComponentFactory, - &g_moduleCount.modCnt , 0 + 0, 0 }, //implementationregistry { ImplementationRegistration_CreateInstance, impreg_getImplementationName, impreg_getSupportedServiceNames, createSingleComponentFactory, - &g_moduleCount.modCnt , 0 + 0, 0 }, //loader { DllComponentLoader_CreateInstance, loader_getImplementationName, loader_getSupportedServiceNames, createSingleComponentFactory, - &g_moduleCount.modCnt , 0 + 0, 0 }, //registry_tdprovider { ProviderImpl_create, rdbtdp_getImplementationName, rdbtdp_getSupportedServiceNames, createSingleComponentFactory, - &g_moduleCount.modCnt , 0 + 0, 0 }, //tdmanager { ManagerImpl_create, tdmgr_getImplementationName, tdmgr_getSupportedServiceNames, createSingleComponentFactory, - &g_moduleCount.modCnt , 0 + 0, 0 }, //end { 0, 0, 0, 0, 0, 0 } diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx index 23867573e567..eec2d87a9cbc 100644 --- a/stoc/source/corereflection/crefl.cxx +++ b/stoc/source/corereflection/crefl.cxx @@ -43,10 +43,6 @@ static const sal_Int32 CACHE_SIZE = 256; #define SERVICENAME "com.sun.star.reflection.CoreReflection" #define IMPLNAME "com.sun.star.comp.stoc.CoreReflection" -// can be static, as every client of the core reflection keeps a reference to the -// core reflection, so refcounting can be done here. -static rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT; - static Sequence< OUString > core_getSupportedServiceNames() { Sequence< OUString > seqNames(1); @@ -65,16 +61,12 @@ IdlReflectionServiceImpl::IdlReflectionServiceImpl( , _xMgr( xContext->getServiceManager(), UNO_QUERY ) , _aElements( CACHE_SIZE ) { - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); xContext->getValueByName( OUString( "/singletons/com.sun.star.reflection.theTypeDescriptionManager") ) >>= _xTDMgr; OSL_ENSURE( _xTDMgr.is(), "### cannot get singleton \"TypeDescriptionManager\" from context!" ); } //__________________________________________________________________________________________________ -IdlReflectionServiceImpl::~IdlReflectionServiceImpl() -{ - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -} +IdlReflectionServiceImpl::~IdlReflectionServiceImpl() {} // XInterface //__________________________________________________________________________________________________ @@ -458,7 +450,7 @@ static struct ImplementationEntry g_entries[] = { IdlReflectionServiceImpl_create, core_getImplementationName, core_getSupportedServiceNames, createSingleComponentFactory, - &g_moduleCount.modCnt , 0 + 0, 0 }, { 0, 0, 0, 0, 0, 0 } }; diff --git a/stoc/source/defaultregistry/defaultregistry.cxx b/stoc/source/defaultregistry/defaultregistry.cxx index 198b90b85254..0f39a0553219 100644 --- a/stoc/source/defaultregistry/defaultregistry.cxx +++ b/stoc/source/defaultregistry/defaultregistry.cxx @@ -48,8 +48,6 @@ using namespace osl; #define SERVICENAME "com.sun.star.registry.NestedRegistry" #define IMPLNAME "com.sun.star.comp.stoc.NestedRegistry" -extern rtl_StandardModuleCount g_moduleCount; - namespace stoc_bootstrap { Sequence< OUString > defreg_getSupportedServiceNames() @@ -1139,16 +1137,10 @@ OUString SAL_CALL NestedKeyImpl::getResolvedName( const OUString& aKeyName ) //************************************************************************* NestedRegistryImpl::NestedRegistryImpl( ) : m_state(0) -{ - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); -} +{} //************************************************************************* -NestedRegistryImpl::~NestedRegistryImpl() -{ - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -} - +NestedRegistryImpl::~NestedRegistryImpl() {} class RegistryEnumueration : public WeakImplHelper1< XEnumeration > { diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx index ccdfd90cf97a..c2fdac4d32d3 100644 --- a/stoc/source/implementationregistration/implreg.cxx +++ b/stoc/source/implementationregistration/implreg.cxx @@ -119,8 +119,6 @@ const StringPool &spool() } } -extern rtl_StandardModuleCount g_moduleCount; - namespace stoc_bootstrap { Sequence< OUString > impreg_getSupportedServiceNames() @@ -1319,18 +1317,12 @@ private: // members ImplementationRegistration::ImplementationRegistration( const Reference < XComponentContext > & xCtx ) : m_xSMgr( xCtx->getServiceManager() ) , m_xCtx( xCtx ) -{ - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); -} +{} //************************************************************************* // ~ImplementationRegistration() // -ImplementationRegistration::~ImplementationRegistration() -{ - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -} - +ImplementationRegistration::~ImplementationRegistration() {} // XServiceInfo OUString ImplementationRegistration::getImplementationName() throw(RuntimeException) diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx index 429b361715c7..8ec0c9ae00c9 100644 --- a/stoc/source/invocation/invocation.cxx +++ b/stoc/source/invocation/invocation.cxx @@ -66,8 +66,6 @@ using namespace osl; namespace stoc_inv { -static rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT; - static Sequence< OUString > inv_getSupportedServiceNames() { Sequence< OUString > seqNames(1); @@ -249,14 +247,10 @@ Invocation_Impl::Invocation_Impl , xIntrospection( rI ) , xCoreReflection( rCR ) { - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); setMaterial( rAdapted ); } -Invocation_Impl::~Invocation_Impl() -{ - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -} +Invocation_Impl::~Invocation_Impl() {} //################################################################################################## //### INTERFACE IMPLEMENTATIONS #################################################################### @@ -1099,7 +1093,6 @@ InvocationService::InvocationService( const Reference<XComponentContext> & xCtx : mxCtx( xCtx ) , mxSMgr( xCtx->getServiceManager() ) { - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); xTypeConverter = Reference<XTypeConverter>( mxSMgr->createInstanceWithContext( OUString("com.sun.star.script.Converter"), @@ -1123,10 +1116,7 @@ InvocationService::InvocationService( const Reference<XComponentContext> & xCtx // UNO_QUERY); } -InvocationService::~InvocationService() -{ - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -} +InvocationService::~InvocationService() {} // XServiceInfo OUString InvocationService::getImplementationName() throw( RuntimeException ) @@ -1192,7 +1182,7 @@ static struct ImplementationEntry g_entries[] = { InvocationService_CreateInstance, inv_getImplementationName, inv_getSupportedServiceNames, createSingleComponentFactory, - &g_moduleCount.modCnt , 0 + 0, 0 }, { 0, 0, 0, 0, 0, 0 } }; diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx index b1b5904f8bc2..f0f23d14cc0a 100644 --- a/stoc/source/invocation_adapterfactory/iafactory.cxx +++ b/stoc/source/invocation_adapterfactory/iafactory.cxx @@ -59,8 +59,6 @@ using namespace ::com::sun::star::uno; namespace stoc_invadp { -static rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT; - static Sequence< OUString > invadp_getSupportedServiceNames() { Sequence< OUString > seqNames(1); @@ -762,8 +760,6 @@ FactoryImpl::FactoryImpl( Reference< XComponentContext > const & xContext ) throw RuntimeException( "missing type descriptions!", Reference< XInterface >() ); } - - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); } //______________________________________________________________________________ FactoryImpl::~FactoryImpl() SAL_THROW(()) @@ -780,7 +776,6 @@ FactoryImpl::~FactoryImpl() SAL_THROW(()) #if OSL_DEBUG_LEVEL > 1 OSL_ENSURE( m_receiver2adapters.empty(), "### still adapters out there!?" ); #endif - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); } //------------------------------------------------------------------------------ @@ -949,7 +944,7 @@ static struct ::cppu::ImplementationEntry g_entries[] = ::stoc_invadp::invadp_getImplementationName, ::stoc_invadp::invadp_getSupportedServiceNames, ::cppu::createOneInstanceComponentFactory, - &::stoc_invadp::g_moduleCount.modCnt , 0 + 0, 0 }, { 0, 0, 0, 0, 0, 0 } }; diff --git a/stoc/source/loader/dllcomponentloader.cxx b/stoc/source/loader/dllcomponentloader.cxx index 45f9959b3bce..fb9ad064ffbf 100644 --- a/stoc/source/loader/dllcomponentloader.cxx +++ b/stoc/source/loader/dllcomponentloader.cxx @@ -53,7 +53,6 @@ using namespace com::sun::star::lang; using namespace com::sun::star::registry; using namespace cppu; using namespace osl; -extern rtl_StandardModuleCount g_moduleCount; namespace stoc_bootstrap { @@ -106,15 +105,11 @@ private: //************************************************************************* DllComponentLoader::DllComponentLoader( const Reference<XComponentContext> & xCtx ) { - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); m_xSMgr.set( xCtx->getServiceManager(), UNO_QUERY ); } //************************************************************************* -DllComponentLoader::~DllComponentLoader() -{ - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -} +DllComponentLoader::~DllComponentLoader() {} //************************************************************************* OUString SAL_CALL DllComponentLoader::getImplementationName( ) diff --git a/stoc/source/namingservice/namingservice.cxx b/stoc/source/namingservice/namingservice.cxx index 3f666af96c52..ed3ec3194676 100644 --- a/stoc/source/namingservice/namingservice.cxx +++ b/stoc/source/namingservice/namingservice.cxx @@ -47,7 +47,6 @@ using namespace com::sun::star::registry; namespace stoc_namingservice { -static rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT; static Sequence< OUString > ns_getSupportedServiceNames() { @@ -117,16 +116,10 @@ static Reference<XInterface> SAL_CALL NamingService_Impl_create( } //================================================================================================== -NamingService_Impl::NamingService_Impl() -{ - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); -} +NamingService_Impl::NamingService_Impl() {} //================================================================================================== -NamingService_Impl::~NamingService_Impl() -{ - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -} +NamingService_Impl::~NamingService_Impl() {} // XServiceInfo OUString NamingService_Impl::getImplementationName() @@ -189,7 +182,7 @@ static struct ImplementationEntry g_entries[] = { NamingService_Impl_create, ns_getImplementationName, ns_getSupportedServiceNames, createSingleComponentFactory, - &g_moduleCount.modCnt , 0 + 0, 0 }, { 0, 0, 0, 0, 0, 0 } }; diff --git a/stoc/source/proxy_factory/proxyfac.cxx b/stoc/source/proxy_factory/proxyfac.cxx index 590e855b7f73..2b5209675268 100644 --- a/stoc/source/proxy_factory/proxyfac.cxx +++ b/stoc/source/proxy_factory/proxyfac.cxx @@ -48,8 +48,6 @@ using namespace ::com::sun::star::uno; namespace { -static rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT; - static OUString proxyfac_getImplementationName() { return OUString(IMPL_NAME); @@ -420,15 +418,10 @@ FactoryImpl::FactoryImpl() reinterpret_cast< uno_Mapping ** >( &m_cpp2uno ), m_cpp_env.get(), m_uno_env.get(), 0 ); OSL_ENSURE( m_cpp2uno.is(), "### cannot get bridge C++ <-> uno!" ); - - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); } //______________________________________________________________________________ -FactoryImpl::~FactoryImpl() -{ - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -} +FactoryImpl::~FactoryImpl() {} // XProxyFactory //______________________________________________________________________________ @@ -493,7 +486,7 @@ static ::cppu::ImplementationEntry g_entries [] = { proxyfac_create, proxyfac_getImplementationName, proxyfac_getSupportedServiceNames, ::cppu::createSingleComponentFactory, - &g_moduleCount.modCnt, 0 + 0, 0 }, { 0, 0, 0, 0, 0, 0 } }; diff --git a/stoc/source/registry_tdprovider/base.hxx b/stoc/source/registry_tdprovider/base.hxx index 8c68646fd3df..a4328b7fe6a0 100644 --- a/stoc/source/registry_tdprovider/base.hxx +++ b/stoc/source/registry_tdprovider/base.hxx @@ -62,8 +62,6 @@ using namespace com::sun::star::reflection; //-------------------------------------------------------------------------------------------------- -extern rtl_StandardModuleCount g_moduleCount; - namespace stoc_rdbtdp { @@ -174,9 +172,7 @@ public: TypeDescriptionImpl( TypeClass eTypeClass, const OUString & rName ) : _eTypeClass( eTypeClass ) , _aName( rName ) - { - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); - } + {} virtual ~TypeDescriptionImpl(); // XTypeDescription @@ -276,9 +272,7 @@ public: , _pMembers( 0 ) , _pMemberNames( 0 ) , _published( published ) - { - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); - } + {} virtual ~CompoundTypeDescriptionImpl(); // XTypeDescription @@ -325,9 +319,7 @@ public: , _pEnumNames( 0 ) , _pEnumValues( 0 ) , _published( published ) - { - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); - } + {} virtual ~EnumTypeDescriptionImpl(); // XTypeDescription @@ -365,9 +357,7 @@ public: , _aName( rName ) , _aRefName( rRefName ) , _published( published ) - { - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); - } + {} virtual ~TypedefTypeDescriptionImpl(); // XTypeDescription @@ -419,9 +409,7 @@ public: bool published) : _aName( rName ), _aBytes( rBytes ), _xTDMgr( xTDMgr ), _bInitReferences( false ), _published( published ) - { - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); - } + {} virtual ~ServiceTypeDescriptionImpl(); // XTypeDescription @@ -493,9 +481,7 @@ public: XTypeDescriptionEnumerationAccess > & xTDMgr, const OUString & rName ) : _aName( rName ), _xTDMgr( xTDMgr ), _pMembers( 0 ) - { - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); - } + {} virtual ~ModuleTypeDescriptionImpl(); // XTypeDescription @@ -524,9 +510,7 @@ public: ConstantTypeDescriptionImpl( const OUString & rName, const Any & rValue ) : _aName( rName ), _aValue( rValue ) - { - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); - } + {} virtual ~ConstantTypeDescriptionImpl(); // XTypeDescription @@ -559,9 +543,7 @@ public: const Sequence< sal_Int8 > & rBytes, bool published ) : _aName( rName ), _aBytes( rBytes), _pMembers( 0 ), _published( published ) - { - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); - } + {} virtual ~ConstantsTypeDescriptionImpl(); // XTypeDescription @@ -603,9 +585,7 @@ public: const OUString & rName, const OUString & rBaseName, bool published ) : _aName( rName ), _aBaseName( rBaseName), _xTDMgr( xTDMgr ), _published( published ) - { - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); - } + {} virtual ~SingletonTypeDescriptionImpl(); // XTypeDescription diff --git a/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx b/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx index 9af018d9736b..8b68aee345ef 100644 --- a/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx +++ b/stoc/source/registry_tdprovider/rdbtdp_tdenumeration.cxx @@ -177,9 +177,7 @@ TypeDescriptionEnumerationImpl::TypeDescriptionEnumerationImpl( m_aTypes( rTypes ), m_eDepth( eDepth ), m_xTDMgr( xTDMgr ) -{ - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); -} +{} //========================================================================= // virtual @@ -227,8 +225,6 @@ TypeDescriptionEnumerationImpl::~TypeDescriptionEnumerationImpl() ++it; } - - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); } //========================================================================= diff --git a/stoc/source/registry_tdprovider/td.cxx b/stoc/source/registry_tdprovider/td.cxx index f56a0f01f05b..6ae85de8a142 100644 --- a/stoc/source/registry_tdprovider/td.cxx +++ b/stoc/source/registry_tdprovider/td.cxx @@ -45,11 +45,7 @@ namespace stoc_rdbtdp return *s_pmutex; } - -TypeDescriptionImpl::~TypeDescriptionImpl() -{ - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -} +TypeDescriptionImpl::~TypeDescriptionImpl() {} // XTypeDescription //__________________________________________________________________________________________________ diff --git a/stoc/source/registry_tdprovider/tdcomp.cxx b/stoc/source/registry_tdprovider/tdcomp.cxx index e85791d5aa7e..cb1284b48c15 100644 --- a/stoc/source/registry_tdprovider/tdcomp.cxx +++ b/stoc/source/registry_tdprovider/tdcomp.cxx @@ -30,7 +30,6 @@ CompoundTypeDescriptionImpl::~CompoundTypeDescriptionImpl() { delete _pMembers; delete _pMemberNames; - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); } // XTypeDescription diff --git a/stoc/source/registry_tdprovider/tdconsts.cxx b/stoc/source/registry_tdprovider/tdconsts.cxx index e0a91bf57e8d..7b6e0cbf70e0 100644 --- a/stoc/source/registry_tdprovider/tdconsts.cxx +++ b/stoc/source/registry_tdprovider/tdconsts.cxx @@ -31,8 +31,6 @@ namespace stoc_rdbtdp ConstantsTypeDescriptionImpl::~ConstantsTypeDescriptionImpl() { delete _pMembers; - - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); } // XTypeDescription diff --git a/stoc/source/registry_tdprovider/tdef.cxx b/stoc/source/registry_tdprovider/tdef.cxx index 7b902c6235f8..34ac11827e4f 100644 --- a/stoc/source/registry_tdprovider/tdef.cxx +++ b/stoc/source/registry_tdprovider/tdef.cxx @@ -21,10 +21,7 @@ namespace stoc_rdbtdp { -TypedefTypeDescriptionImpl::~TypedefTypeDescriptionImpl() -{ - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -} +TypedefTypeDescriptionImpl::~TypedefTypeDescriptionImpl() {} // XTypeDescription //__________________________________________________________________________________________________ diff --git a/stoc/source/registry_tdprovider/tdenum.cxx b/stoc/source/registry_tdprovider/tdenum.cxx index be212e08a6ed..65c1ecef1a16 100644 --- a/stoc/source/registry_tdprovider/tdenum.cxx +++ b/stoc/source/registry_tdprovider/tdenum.cxx @@ -30,7 +30,6 @@ EnumTypeDescriptionImpl::~EnumTypeDescriptionImpl() { delete _pEnumNames; delete _pEnumValues; - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); } // XTypeDescription diff --git a/stoc/source/registry_tdprovider/tdiface.cxx b/stoc/source/registry_tdprovider/tdiface.cxx index c558042b3661..d9a46c42282e 100644 --- a/stoc/source/registry_tdprovider/tdiface.cxx +++ b/stoc/source/registry_tdprovider/tdiface.cxx @@ -68,9 +68,7 @@ public: , _aReturnType( rReturnType ) , _bIsOneWay( bIsOneWay ) , _nPosition( nPosition ) - { - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); - } + {} virtual ~InterfaceMethodImpl(); // XTypeDescription @@ -89,10 +87,7 @@ public: virtual Sequence< Reference< XTypeDescription > > SAL_CALL getExceptions() throw(::com::sun::star::uno::RuntimeException); }; //__________________________________________________________________________________________________ -InterfaceMethodImpl::~InterfaceMethodImpl() -{ - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -} +InterfaceMethodImpl::~InterfaceMethodImpl() {} // XTypeDescription //__________________________________________________________________________________________________ @@ -221,9 +216,7 @@ public: , _nPosition( nPosition ) , _getter( getter ) , _setter( setter ) - { - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); - } + {} SAL_WNODEPRECATED_DECLARATIONS_POP virtual ~InterfaceAttributeImpl(); @@ -263,10 +256,7 @@ public: } }; -InterfaceAttributeImpl::~InterfaceAttributeImpl() -{ - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -} +InterfaceAttributeImpl::~InterfaceAttributeImpl() {} // XTypeDescription //__________________________________________________________________________________________________ TypeClass InterfaceAttributeImpl::getTypeClass() @@ -400,14 +390,9 @@ InterfaceTypeDescriptionImpl::InterfaceTypeDescriptionImpl( , _aOptionalBaseTypes( rOptionalBaseTypes ) , _membersInit( false ) , _published( published ) -{ - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); -} +{} //__________________________________________________________________________________________________ -InterfaceTypeDescriptionImpl::~InterfaceTypeDescriptionImpl() -{ - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -} +InterfaceTypeDescriptionImpl::~InterfaceTypeDescriptionImpl() {} // XTypeDescription //__________________________________________________________________________________________________ diff --git a/stoc/source/registry_tdprovider/tdmodule.cxx b/stoc/source/registry_tdprovider/tdmodule.cxx index 0413715faf58..0cd6d29da233 100644 --- a/stoc/source/registry_tdprovider/tdmodule.cxx +++ b/stoc/source/registry_tdprovider/tdmodule.cxx @@ -30,8 +30,6 @@ namespace stoc_rdbtdp ModuleTypeDescriptionImpl::~ModuleTypeDescriptionImpl() { delete _pMembers; - - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); } // XTypeDescription diff --git a/stoc/source/registry_tdprovider/tdprop.cxx b/stoc/source/registry_tdprovider/tdprop.cxx index 8d3b9b2a5ba9..9f7ff2f4aff0 100644 --- a/stoc/source/registry_tdprovider/tdprop.cxx +++ b/stoc/source/registry_tdprovider/tdprop.cxx @@ -25,10 +25,7 @@ namespace stoc_rdbtdp //__________________________________________________________________________________________________ // virtual -ConstantTypeDescriptionImpl::~ConstantTypeDescriptionImpl() -{ - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -} +ConstantTypeDescriptionImpl::~ConstantTypeDescriptionImpl() {} // XTypeDescription //__________________________________________________________________________________________________ diff --git a/stoc/source/registry_tdprovider/tdprovider.cxx b/stoc/source/registry_tdprovider/tdprovider.cxx index b99eefc2a726..a0a6ba6309cc 100644 --- a/stoc/source/registry_tdprovider/tdprovider.cxx +++ b/stoc/source/registry_tdprovider/tdprovider.cxx @@ -51,8 +51,6 @@ using namespace com::sun::star; using namespace com::sun::star::beans; using namespace com::sun::star::registry; -extern rtl_StandardModuleCount g_moduleCount; - namespace stoc_bootstrap { uno::Sequence< OUString > rdbtdp_getSupportedServiceNames() @@ -166,14 +164,9 @@ ProviderImpl::ProviderImpl( const com::sun::star::uno::Reference< XComponentCont XServiceInfo, XHierarchicalNameAccess, XTypeDescriptionEnumerationAccess, XInitialization >( _aComponentMutex ) , _xContext( xContext ) -{ - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); -} +{} //__________________________________________________________________________________________________ -ProviderImpl::~ProviderImpl() -{ - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -} +ProviderImpl::~ProviderImpl() {} //______________________________________________________________________________ Any ProviderImpl::TypeDescriptionManagerWrapper::getByHierarchicalName( diff --git a/stoc/source/registry_tdprovider/tdservice.cxx b/stoc/source/registry_tdprovider/tdservice.cxx index de7795672938..9dda6bd54d08 100644 --- a/stoc/source/registry_tdprovider/tdservice.cxx +++ b/stoc/source/registry_tdprovider/tdservice.cxx @@ -87,9 +87,7 @@ public: const Reference< XTypeDescription > & xTD, sal_Int16 nFlags ) : _aName( rName ), _xTD( xTD ), _nFlags( nFlags ) - { - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); - } + {} virtual ~PropertyTypeDescriptionImpl(); // XTypeDescription @@ -107,10 +105,7 @@ public: //__________________________________________________________________________________________________ // virtual -PropertyTypeDescriptionImpl::~PropertyTypeDescriptionImpl() -{ - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -} +PropertyTypeDescriptionImpl::~PropertyTypeDescriptionImpl() {} // XTypeDescription //__________________________________________________________________________________________________ @@ -154,10 +149,7 @@ PropertyTypeDescriptionImpl::getPropertyTypeDescription() //__________________________________________________________________________________________________ // virtual -ServiceTypeDescriptionImpl::~ServiceTypeDescriptionImpl() -{ - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -} +ServiceTypeDescriptionImpl::~ServiceTypeDescriptionImpl() {} // XTypeDescription //__________________________________________________________________________________________________ diff --git a/stoc/source/registry_tdprovider/tdsingleton.cxx b/stoc/source/registry_tdprovider/tdsingleton.cxx index b777974049d7..d91a8c4bb16a 100644 --- a/stoc/source/registry_tdprovider/tdsingleton.cxx +++ b/stoc/source/registry_tdprovider/tdsingleton.cxx @@ -64,10 +64,7 @@ void SingletonTypeDescriptionImpl::init() { //__________________________________________________________________________________________________ // virtual -SingletonTypeDescriptionImpl::~SingletonTypeDescriptionImpl() -{ - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -} +SingletonTypeDescriptionImpl::~SingletonTypeDescriptionImpl() {} // XTypeDescription //__________________________________________________________________________________________________ diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx index 10e3bdabbcda..9486b7cd9e83 100644 --- a/stoc/source/security/access_controller.cxx +++ b/stoc/source/security/access_controller.cxx @@ -61,8 +61,6 @@ using namespace ::cppu; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; -extern ::rtl_StandardModuleCount g_moduleCount; - namespace stoc_sec { // static stuff initialized when loading lib @@ -104,15 +102,11 @@ inline acc_Intersection::acc_Intersection( SAL_THROW(()) : m_x1( x1 ) , m_x2( x2 ) -{ - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); -} +{} //__________________________________________________________________________________________________ acc_Intersection::~acc_Intersection() SAL_THROW(()) -{ - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -} +{} //-------------------------------------------------------------------------------------------------- inline Reference< security::XAccessControlContext > acc_Intersection::create( Reference< security::XAccessControlContext > const & x1, @@ -167,15 +161,11 @@ inline acc_Union::acc_Union( SAL_THROW(()) : m_x1( x1 ) , m_x2( x2 ) -{ - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); -} +{} //__________________________________________________________________________________________________ acc_Union::~acc_Union() SAL_THROW(()) -{ - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -} +{} //-------------------------------------------------------------------------------------------------- inline Reference< security::XAccessControlContext > acc_Union::create( Reference< security::XAccessControlContext > const & x1, @@ -227,15 +217,11 @@ inline acc_Policy::acc_Policy( PermissionCollection const & permissions ) SAL_THROW(()) : m_permissions( permissions ) -{ - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); -} +{} //__________________________________________________________________________________________________ acc_Policy::~acc_Policy() SAL_THROW(()) -{ - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -} +{} //__________________________________________________________________________________________________ void acc_Policy::checkPermission( Any const & perm ) @@ -279,8 +265,6 @@ inline acc_CurrentContext::acc_CurrentContext( : m_refcount( 0 ) , m_xDelegate( xDelegate ) { - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); - if (xRestriction.is()) { m_restriction = makeAny( xRestriction ); @@ -290,9 +274,7 @@ inline acc_CurrentContext::acc_CurrentContext( //__________________________________________________________________________________________________ acc_CurrentContext::~acc_CurrentContext() SAL_THROW(()) -{ - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -} +{} //__________________________________________________________________________________________________ void acc_CurrentContext::acquire() throw () @@ -466,8 +448,6 @@ AccessController::AccessController( Reference< XComponentContext > const & xComp , m_singleUser_init( false ) , m_rec( 0 ) { - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); - // The .../mode value had originally been set in // cppu::add_access_control_entries (cppuhelper/source/servicefactory.cxx) // to something other than "off" depending on various UNO_AC* bootstrap @@ -524,9 +504,7 @@ AccessController::AccessController( Reference< XComponentContext > const & xComp //__________________________________________________________________________________________________ AccessController::~AccessController() SAL_THROW(()) -{ - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -} +{} //__________________________________________________________________________________________________ void AccessController::disposing() { diff --git a/stoc/source/security/file_policy.cxx b/stoc/source/security/file_policy.cxx index c05bd884733c..5050d27cef91 100644 --- a/stoc/source/security/file_policy.cxx +++ b/stoc/source/security/file_policy.cxx @@ -49,8 +49,6 @@ using namespace ::cppu; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; -extern ::rtl_StandardModuleCount g_moduleCount; - namespace stoc_sec { //-------------------------------------------------------------------------------------------------- @@ -118,15 +116,11 @@ FilePolicy::FilePolicy( Reference< XComponentContext > const & xComponentContext , m_xComponentContext( xComponentContext ) , m_ac( xComponentContext ) , m_init( false ) -{ - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); -} +{} //__________________________________________________________________________________________________ FilePolicy::~FilePolicy() SAL_THROW(()) -{ - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -} +{} //__________________________________________________________________________________________________ void FilePolicy::disposing() { diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx index 9c53da99135e..5caa90e95645 100644 --- a/stoc/source/servicemanager/servicemanager.cxx +++ b/stoc/source/servicemanager/servicemanager.cxx @@ -68,9 +68,6 @@ using namespace cppu; using namespace osl; using namespace std; - -rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT; - namespace stoc_bootstrap { Sequence< OUString > smgr_wrapper_getSupportedServiceNames() @@ -204,9 +201,8 @@ public: ServiceEnumeration_Impl( const Sequence< Reference<XInterface > > & rFactories ) : aFactories( rFactories ) , nIt( 0 ) - { g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); } - virtual ~ServiceEnumeration_Impl() - { g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); } + {} + virtual ~ServiceEnumeration_Impl() {} // XEnumeration sal_Bool SAL_CALL hasMoreElements() @@ -297,9 +293,7 @@ public: ImplementationEnumeration_Impl( const HashSet_Ref & rImplementationMap ) : aImplementationMap( rImplementationMap ) , aIt( aImplementationMap.begin() ) - { - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); - } + {} virtual ~ImplementationEnumeration_Impl(); // XEnumeration @@ -315,10 +309,7 @@ private: Reference<XInterface > xNext; }; -ImplementationEnumeration_Impl::~ImplementationEnumeration_Impl() -{ - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -} +ImplementationEnumeration_Impl::~ImplementationEnumeration_Impl() {} // XEnumeration sal_Bool ImplementationEnumeration_Impl::hasMoreElements() @@ -718,10 +709,7 @@ void OServiceManagerWrapper::disposing() m_root.clear(); } //__________________________________________________________________________________________________ -OServiceManagerWrapper::~OServiceManagerWrapper() SAL_THROW(()) -{ - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -} +OServiceManagerWrapper::~OServiceManagerWrapper() SAL_THROW(()) {} //__________________________________________________________________________________________________ OServiceManagerWrapper::OServiceManagerWrapper( Reference< XComponentContext > const & xContext ) @@ -730,8 +718,6 @@ OServiceManagerWrapper::OServiceManagerWrapper( , m_xContext( xContext ) , m_root( xContext->getServiceManager() ) { - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); - if (! m_root.is()) { throw RuntimeException( @@ -751,17 +737,12 @@ OServiceManager::OServiceManager( Reference< XComponentContext > const & xContex : t_OServiceManager_impl( m_mutex ) , m_xContext( xContext ) , m_bInDisposing( false ) -{ - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); -} +{} /** * Destroy the ServiceManager */ -OServiceManager::~OServiceManager() -{ - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -} +OServiceManager::~OServiceManager() {} // XComponent void OServiceManager::dispose() diff --git a/stoc/source/stocservices/stocservices.cxx b/stoc/source/stocservices/stocservices.cxx index 81810a937783..3594b1b8051e 100644 --- a/stoc/source/stocservices/stocservices.cxx +++ b/stoc/source/stocservices/stocservices.cxx @@ -32,26 +32,13 @@ using namespace cppu; using namespace osl; using namespace stoc_services; -#ifdef DISABLE_DYNLOADING - -// Do we really to have non-static global variable with the same name -// g_moduleCount in *all* (more or less, it seems) modules even in the -// normal dynamic loading case? Weird. Anyway, in the DISABLE_DYNLOADING -// case we have no use for these, and they can't be the same name. - -#define g_moduleCount g_stocservices_moduleCount - -#endif - -rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT; - static struct ImplementationEntry g_entries[] = { // typeconv { TypeConverter_Impl_CreateInstance, tcv_getImplementationName, tcv_getSupportedServiceNames, createSingleComponentFactory, - &g_moduleCount.modCnt , 0 + 0, 0 }, // uriproc { diff --git a/stoc/source/tdmanager/tdmgr.cxx b/stoc/source/tdmanager/tdmgr.cxx index f8904c97fa8a..d7242910ac0b 100644 --- a/stoc/source/tdmanager/tdmgr.cxx +++ b/stoc/source/tdmanager/tdmgr.cxx @@ -65,10 +65,6 @@ static const sal_Int32 CACHE_SIZE = 512; #define SERVICENAME "com.sun.star.reflection.TypeDescriptionManager" #define IMPLNAME "com.sun.star.comp.stoc.TypeDescriptionManager" -//-------------------------------------------------------------------------------------------------- -// exported via tdmgr_common.hxx -extern rtl_StandardModuleCount g_moduleCount; - namespace stoc_bootstrap { Sequence< OUString > SAL_CALL tdmgr_getSupportedServiceNames() @@ -99,9 +95,7 @@ class EventListenerImpl : public ImplHelper1< XEventListener > public: EventListenerImpl( ManagerImpl * pMgr ) : _pMgr( pMgr ) - { - ::g_moduleCount.modCnt.acquire( &::g_moduleCount.modCnt ); - } + {} virtual ~EventListenerImpl(); // lifetime delegated to manager @@ -112,10 +106,7 @@ public: virtual void SAL_CALL disposing( const EventObject & rEvt ) throw(::com::sun::star::uno::RuntimeException); }; -EventListenerImpl::~EventListenerImpl() -{ - ::g_moduleCount.modCnt.release( &::g_moduleCount.modCnt ); -} +EventListenerImpl::~EventListenerImpl() {} //================================================================================================== class ManagerImpl @@ -273,15 +264,12 @@ ManagerImpl::ManagerImpl( , _aEventListener( this ) , _bCaching( sal_True ) , _aElements( nCacheSize ) -{ - ::g_moduleCount.modCnt.acquire( &::g_moduleCount.modCnt ); -} +{} //__________________________________________________________________________________________________ ManagerImpl::~ManagerImpl() { OSL_ENSURE( _aProviders.empty(), "### still providers left!" ); OSL_TRACE( "> TypeDescriptionManager shut down. <" ); - ::g_moduleCount.modCnt.release( &::g_moduleCount.modCnt ); } //__________________________________________________________________________________________________ void ManagerImpl::disposing() diff --git a/stoc/source/typeconv/convert.cxx b/stoc/source/typeconv/convert.cxx index 09dd9142ef78..bc8b3cac5d4f 100644 --- a/stoc/source/typeconv/convert.cxx +++ b/stoc/source/typeconv/convert.cxx @@ -49,9 +49,6 @@ using namespace osl; #define SERVICENAME "com.sun.star.script.Converter" #define IMPLNAME "com.sun.star.comp.stoc.TypeConverter" - -extern rtl_StandardModuleCount g_moduleCount; - namespace stoc_services { Sequence< OUString > tcv_getSupportedServiceNames() @@ -282,15 +279,9 @@ public: throw( IllegalArgumentException, CannotConvertException, RuntimeException); }; -TypeConverter_Impl::TypeConverter_Impl() -{ - g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); -} +TypeConverter_Impl::TypeConverter_Impl() {} -TypeConverter_Impl::~TypeConverter_Impl() -{ - g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); -} +TypeConverter_Impl::~TypeConverter_Impl() {} // XServiceInfo OUString TypeConverter_Impl::getImplementationName() throw( RuntimeException ) |