summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--remotebridges/source/unourl_resolver/unourl_resolver.cxx28
-rw-r--r--stoc/source/corereflection/crefl.cxx27
-rw-r--r--stoc/source/defaultregistry/defaultregistry.cxx27
-rw-r--r--stoc/source/implementationregistration/implreg.cxx15
-rw-r--r--stoc/source/invocation/invocation.cxx27
-rw-r--r--stoc/source/invocation_adapterfactory/iafactory.cxx29
-rw-r--r--stoc/source/javaloader/javaloader.cxx35
-rw-r--r--stoc/source/loader/dllcomponentloader.cxx27
-rw-r--r--stoc/source/namingservice/namingservice.cxx27
-rw-r--r--stoc/source/registry_tdprovider/tdprovider.cxx27
-rw-r--r--stoc/source/security/access_controller.cxx6
-rw-r--r--stoc/source/security/file_policy.cxx6
-rw-r--r--stoc/source/tdmanager/tdmgr.cxx27
-rw-r--r--stoc/source/typeconv/convert.cxx27
14 files changed, 58 insertions, 277 deletions
diff --git a/remotebridges/source/unourl_resolver/unourl_resolver.cxx b/remotebridges/source/unourl_resolver/unourl_resolver.cxx
index 5de6e0478ac7..422241e6dbe5 100644
--- a/remotebridges/source/unourl_resolver/unourl_resolver.cxx
+++ b/remotebridges/source/unourl_resolver/unourl_resolver.cxx
@@ -63,34 +63,14 @@ namespace unourl_resolver
//--------------------------------------------------------------------------------------------------
Sequence< OUString > resolver_getSupportedServiceNames()
{
- static Sequence < OUString > *pNames = 0;
- if( ! pNames )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( !pNames )
- {
- static Sequence< OUString > seqNames(1);
- seqNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM(SERVICENAME));
- pNames = &seqNames;
- }
- }
- return *pNames;
+ Sequence< OUString > seqNames(1);
+ seqNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM(SERVICENAME));
+ return seqNames;
}
OUString resolver_getImplementationName()
{
- static OUString *pImplName = 0;
- if( ! pImplName )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( ! pImplName )
- {
- static OUString implName(
- RTL_CONSTASCII_USTRINGPARAM( IMPLNAME ) );
- pImplName = &implName;
- }
- }
- return *pImplName;
+ return OUString(RTL_CONSTASCII_USTRINGPARAM(IMPLNAME));
}
//==================================================================================================
diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx
index 87f7c1de6fff..361b611e93d2 100644
--- a/stoc/source/corereflection/crefl.cxx
+++ b/stoc/source/corereflection/crefl.cxx
@@ -62,33 +62,14 @@ static rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
static Sequence< OUString > core_getSupportedServiceNames()
{
- static Sequence < OUString > *pNames = 0;
- if( ! pNames )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( !pNames )
- {
- static Sequence< OUString > seqNames(1);
- seqNames.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM(SERVICENAME) );
- pNames = &seqNames;
- }
- }
- return *pNames;
+ Sequence< OUString > seqNames(1);
+ seqNames.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM(SERVICENAME) );
+ return seqNames;
}
static OUString core_getImplementationName()
{
- static OUString *pImplName = 0;
- if( ! pImplName )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( ! pImplName )
- {
- static OUString implName( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME ) );
- pImplName = &implName;
- }
- }
- return *pImplName;
+ return OUString(RTL_CONSTASCII_USTRINGPARAM(IMPLNAME));
}
//__________________________________________________________________________________________________
IdlReflectionServiceImpl::IdlReflectionServiceImpl(
diff --git a/stoc/source/defaultregistry/defaultregistry.cxx b/stoc/source/defaultregistry/defaultregistry.cxx
index f36b2f172aa7..2dae9012cbab 100644
--- a/stoc/source/defaultregistry/defaultregistry.cxx
+++ b/stoc/source/defaultregistry/defaultregistry.cxx
@@ -66,33 +66,14 @@ namespace stoc_bootstrap
{
Sequence< OUString > defreg_getSupportedServiceNames()
{
- static Sequence < OUString > *pNames = 0;
- if( ! pNames )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( !pNames )
- {
- static Sequence< OUString > seqNames(1);
- seqNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM(SERVICENAME));
- pNames = &seqNames;
- }
- }
- return *pNames;
+ Sequence< OUString > seqNames(1);
+ seqNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM(SERVICENAME));
+ return seqNames;
}
OUString defreg_getImplementationName()
{
- static OUString *pImplName = 0;
- if( ! pImplName )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( ! pImplName )
- {
- static OUString implName( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME ) );
- pImplName = &implName;
- }
- }
- return *pImplName;
+ return OUString(RTL_CONSTASCII_USTRINGPARAM(IMPLNAME));
}
}
diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx
index 51ce0cb9a19d..b6e2baf6be78 100644
--- a/stoc/source/implementationregistration/implreg.cxx
+++ b/stoc/source/implementationregistration/implreg.cxx
@@ -141,18 +141,9 @@ namespace stoc_bootstrap
{
Sequence< OUString > impreg_getSupportedServiceNames()
{
- static Sequence < OUString > *pNames = 0;
- if( ! pNames )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( !pNames )
- {
- static Sequence< OUString > seqNames(1);
- seqNames.getArray()[0] = stoc_impreg::spool().sServiceName;
- pNames = &seqNames;
- }
- }
- return *pNames;
+ Sequence< OUString > seqNames(1);
+ seqNames.getArray()[0] = stoc_impreg::spool().sServiceName;
+ return seqNames;
}
OUString impreg_getImplementationName()
diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx
index dc578c1a76f6..1f76914e672e 100644
--- a/stoc/source/invocation/invocation.cxx
+++ b/stoc/source/invocation/invocation.cxx
@@ -82,33 +82,14 @@ static rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
static Sequence< OUString > inv_getSupportedServiceNames()
{
- static Sequence < OUString > *pNames = 0;
- if( ! pNames )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( !pNames )
- {
- static Sequence< OUString > seqNames(1);
- seqNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM(SERVICENAME));
- pNames = &seqNames;
- }
- }
- return *pNames;
+ Sequence< OUString > seqNames(1);
+ seqNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM(SERVICENAME));
+ return seqNames;
}
static OUString inv_getImplementationName()
{
- static OUString *pImplName = 0;
- if( ! pImplName )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( ! pImplName )
- {
- static OUString implName( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME ) );
- pImplName = &implName;
- }
- }
- return *pImplName;
+ return OUString(RTL_CONSTASCII_USTRINGPARAM(IMPLNAME));
}
// TODO: Zentral implementieren
diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx
index 4b9b03bec845..b8d3939928d8 100644
--- a/stoc/source/invocation_adapterfactory/iafactory.cxx
+++ b/stoc/source/invocation_adapterfactory/iafactory.cxx
@@ -76,34 +76,15 @@ static rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
static Sequence< OUString > invadp_getSupportedServiceNames()
{
- static Sequence < OUString > *pNames = 0;
- if( ! pNames )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( !pNames )
- {
- static Sequence< OUString > seqNames(1);
- seqNames.getArray()[0] =
- OUString(RTL_CONSTASCII_USTRINGPARAM(SERVICENAME));
- pNames = &seqNames;
- }
- }
- return *pNames;
+ Sequence< OUString > seqNames(1);
+ seqNames.getArray()[0] =
+ OUString(RTL_CONSTASCII_USTRINGPARAM(SERVICENAME));
+ return seqNames;
}
static OUString invadp_getImplementationName()
{
- static OUString *pImplName = 0;
- if( ! pImplName )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( ! pImplName )
- {
- static OUString implName( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME ) );
- pImplName = &implName;
- }
- }
- return *pImplName;
+ return OUString(RTL_CONSTASCII_USTRINGPARAM(IMPLNAME));
}
struct hash_ptr
diff --git a/stoc/source/javaloader/javaloader.cxx b/stoc/source/javaloader/javaloader.cxx
index ddc96363c6f2..a14481994e6a 100644
--- a/stoc/source/javaloader/javaloader.cxx
+++ b/stoc/source/javaloader/javaloader.cxx
@@ -86,37 +86,18 @@ static Mutex & getInitMutex();
static Sequence< OUString > loader_getSupportedServiceNames()
{
- static Sequence < OUString > *pNames = 0;
- if( ! pNames )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( !pNames )
- {
- static Sequence< OUString > seqNames(2);
- seqNames.getArray()[0] = OUString(
- RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.loader.Java") );
- seqNames.getArray()[1] = OUString(
- RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.loader.Java2") );
- pNames = &seqNames;
- }
- }
- return *pNames;
+ Sequence< OUString > seqNames(2);
+ seqNames.getArray()[0] = OUString(
+ RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.loader.Java") );
+ seqNames.getArray()[1] = OUString(
+ RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.loader.Java2") );
+ return seqNames;
}
static OUString loader_getImplementationName()
{
- static OUString *pImplName = 0;
- if( ! pImplName )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( ! pImplName )
- {
- static OUString implName(
- RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.stoc.JavaComponentLoader" ) );
- pImplName = &implName;
- }
- }
- return *pImplName;
+ return OUString(
+ RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.stoc.JavaComponentLoader" ) );
}
class JavaComponentLoader : public WeakImplHelper2<XImplementationLoader, XServiceInfo>
diff --git a/stoc/source/loader/dllcomponentloader.cxx b/stoc/source/loader/dllcomponentloader.cxx
index e326b980909f..86d96a76ce3a 100644
--- a/stoc/source/loader/dllcomponentloader.cxx
+++ b/stoc/source/loader/dllcomponentloader.cxx
@@ -73,33 +73,14 @@ namespace stoc_bootstrap
{
Sequence< OUString > loader_getSupportedServiceNames()
{
- static Sequence < OUString > *pNames = 0;
- if( ! pNames )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( !pNames )
- {
- static Sequence< OUString > seqNames(1);
- seqNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM(SERVICENAME));
- pNames = &seqNames;
- }
- }
- return *pNames;
+ Sequence< OUString > seqNames(1);
+ seqNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM(SERVICENAME));
+ return seqNames;
}
OUString loader_getImplementationName()
{
- static OUString *pImplName = 0;
- if( ! pImplName )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( ! pImplName )
- {
- static OUString implName( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME ) );
- pImplName = &implName;
- }
- }
- return *pImplName;
+ return OUString(RTL_CONSTASCII_USTRINGPARAM(IMPLNAME));
}
}
diff --git a/stoc/source/namingservice/namingservice.cxx b/stoc/source/namingservice/namingservice.cxx
index ed6af13030df..8aaee2ced7e9 100644
--- a/stoc/source/namingservice/namingservice.cxx
+++ b/stoc/source/namingservice/namingservice.cxx
@@ -63,33 +63,14 @@ static rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT;
static Sequence< OUString > ns_getSupportedServiceNames()
{
- static Sequence < OUString > *pNames = 0;
- if( ! pNames )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( !pNames )
- {
- static Sequence< OUString > seqNames(1);
- seqNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM(SERVICENAME));
- pNames = &seqNames;
- }
- }
- return *pNames;
+ Sequence< OUString > seqNames(1);
+ seqNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM(SERVICENAME));
+ return seqNames;
}
static OUString ns_getImplementationName()
{
- static OUString *pImplName = 0;
- if( ! pImplName )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( ! pImplName )
- {
- static OUString implName( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME ) );
- pImplName = &implName;
- }
- }
- return *pImplName;
+ return OUString(RTL_CONSTASCII_USTRINGPARAM(IMPLNAME));
}
struct equalOWString_Impl
diff --git a/stoc/source/registry_tdprovider/tdprovider.cxx b/stoc/source/registry_tdprovider/tdprovider.cxx
index bcebd85ffd44..726760d816d6 100644
--- a/stoc/source/registry_tdprovider/tdprovider.cxx
+++ b/stoc/source/registry_tdprovider/tdprovider.cxx
@@ -68,33 +68,14 @@ namespace stoc_bootstrap
{
uno::Sequence< OUString > rdbtdp_getSupportedServiceNames()
{
- static Sequence < OUString > *pNames = 0;
- if( ! pNames )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( !pNames )
- {
- static Sequence< OUString > seqNames(1);
- seqNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM(SERVICENAME));
- pNames = &seqNames;
- }
- }
- return *pNames;
+ Sequence< OUString > seqNames(1);
+ seqNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM(SERVICENAME));
+ return seqNames;
}
OUString rdbtdp_getImplementationName()
{
- static OUString *pImplName = 0;
- if( ! pImplName )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( ! pImplName )
- {
- static OUString implName( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME ) );
- pImplName = &implName;
- }
- }
- return *pImplName;
+ return OUString(RTL_CONSTASCII_USTRINGPARAM(IMPLNAME));
}
}
diff --git a/stoc/source/security/access_controller.cxx b/stoc/source/security/access_controller.cxx
index 18ddc87b6425..133d13c7b521 100644
--- a/stoc/source/security/access_controller.cxx
+++ b/stoc/source/security/access_controller.cxx
@@ -1043,9 +1043,9 @@ Reference< XInterface > SAL_CALL ac_create(
//--------------------------------------------------------------------------------------------------
Sequence< OUString > ac_getSupportedServiceNames() SAL_THROW( () )
{
- static OUString s_serviceName = OUSTR(SERVICE_NAME);
- static Sequence< OUString > s_serviceNames = Sequence< OUString >( &s_serviceName, 1 );
- return s_serviceNames;
+ Sequence< OUString > aSNS( 1 );
+ aSNS.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM(SERVICE_NAME));
+ return aSNS;
}
//--------------------------------------------------------------------------------------------------
OUString ac_getImplementationName() SAL_THROW( () )
diff --git a/stoc/source/security/file_policy.cxx b/stoc/source/security/file_policy.cxx
index aad4b7cfc37b..068f63a62f31 100644
--- a/stoc/source/security/file_policy.cxx
+++ b/stoc/source/security/file_policy.cxx
@@ -589,9 +589,9 @@ Reference< XInterface > SAL_CALL filepolicy_create(
//--------------------------------------------------------------------------------------------------
Sequence< OUString > filepolicy_getSupportedServiceNames() SAL_THROW( () )
{
- static OUString s_serviceName = OUSTR(SERVICE_NAME);
- static Sequence< OUString > s_serviceNames = Sequence< OUString >( &s_serviceName, 1 );
- return s_serviceNames;
+ Sequence< OUString > aSNS( 1 );
+ aSNS.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM(SERVICE_NAME));
+ return aSNS;
}
//--------------------------------------------------------------------------------------------------
OUString filepolicy_getImplementationName() SAL_THROW( () )
diff --git a/stoc/source/tdmanager/tdmgr.cxx b/stoc/source/tdmanager/tdmgr.cxx
index 98f98ca26efd..6c6e89700f4d 100644
--- a/stoc/source/tdmanager/tdmgr.cxx
+++ b/stoc/source/tdmanager/tdmgr.cxx
@@ -86,33 +86,14 @@ namespace stoc_bootstrap
{
Sequence< OUString > SAL_CALL tdmgr_getSupportedServiceNames()
{
- static Sequence < OUString > *pNames = 0;
- if( ! pNames )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( !pNames )
- {
- static Sequence< OUString > seqNames(1);
- seqNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM(SERVICENAME));
- pNames = &seqNames;
- }
- }
- return *pNames;
+ Sequence< OUString > seqNames(1);
+ seqNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM(SERVICENAME));
+ return seqNames;
}
OUString SAL_CALL tdmgr_getImplementationName()
{
- static OUString *pImplName = 0;
- if( ! pImplName )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( ! pImplName )
- {
- static OUString implName( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME ) );
- pImplName = &implName;
- }
- }
- return *pImplName;
+ return OUString(RTL_CONSTASCII_USTRINGPARAM(IMPLNAME));
}
}
diff --git a/stoc/source/typeconv/convert.cxx b/stoc/source/typeconv/convert.cxx
index 4538ff7c58ec..9cb7ecea82b4 100644
--- a/stoc/source/typeconv/convert.cxx
+++ b/stoc/source/typeconv/convert.cxx
@@ -68,33 +68,14 @@ namespace stoc_services
{
Sequence< OUString > tcv_getSupportedServiceNames()
{
- static Sequence < OUString > *pNames = 0;
- if( ! pNames )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( !pNames )
- {
- static Sequence< OUString > seqNames(1);
- seqNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM(SERVICENAME));
- pNames = &seqNames;
- }
- }
- return *pNames;
+ Sequence< OUString > seqNames(1);
+ seqNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM(SERVICENAME));
+ return seqNames;
}
OUString tcv_getImplementationName()
{
- static OUString *pImplName = 0;
- if( ! pImplName )
- {
- MutexGuard guard( Mutex::getGlobalMutex() );
- if( ! pImplName )
- {
- static OUString implName( RTL_CONSTASCII_USTRINGPARAM( IMPLNAME ) );
- pImplName = &implName;
- }
- }
- return *pImplName;
+ return OUString(RTL_CONSTASCII_USTRINGPARAM(IMPLNAME));
}
}