Kaydet (Commit) c1abc2ec authored tarafından Caolán McNamara's avatar Caolán McNamara

fix up

üst 91cbb7b7
......@@ -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));
}
//==================================================================================================
......
......@@ -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(
......
......@@ -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));
}
}
......
......@@ -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()
......
......@@ -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
......
......@@ -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
......
......@@ -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>
......
......@@ -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));
}
}
......
......@@ -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
......
......@@ -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));
}
}
......
......@@ -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( () )
......
......@@ -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( () )
......
......@@ -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));
}
}
......
......@@ -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));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment