diff options
Diffstat (limited to 'stoc')
35 files changed, 184 insertions, 500 deletions
diff --git a/stoc/prj/build.lst b/stoc/prj/build.lst index 256f09474..c7a1fe693 100644 --- a/stoc/prj/build.lst +++ b/stoc/prj/build.lst @@ -1,4 +1,4 @@ -tc stoc : rdbmaker cppuhelper cppu jvmaccess sal salhelper jvmfwk xmlreader LIBXSTL:libxslt NULL +tc stoc : DESKTOP:rdbmaker cppuhelper cppu jvmaccess sal salhelper jvmfwk xmlreader LIBXSTL:libxslt registry NULL tc stoc usr1 - all tc_mkout NULL tc stoc\inc nmake - all tc_inc NULL tc stoc\source\defaultregistry nmake - all tc_defr tc_boot tc_inc NULL diff --git a/stoc/prj/d.lst b/stoc/prj/d.lst index 79b2d7734..35863e7e9 100644 --- a/stoc/prj/d.lst +++ b/stoc/prj/d.lst @@ -1,28 +1,28 @@ -mkdir: %_DEST%\inc%_EXT%\stoc +mkdir: %_DEST%\inc\stoc -..\%__SRC%\bin\*.dll %_DEST%\bin%_EXT%\* -..\%__SRC%\lib\*.so %_DEST%\lib%_EXT%\* -..\%__SRC%\lib\*.dylib %_DEST%\lib%_EXT%\*.dylib -..\%__SRC%\bin\*.rdb %_DEST%\rdb%_EXT%\* -..\%__SRC%\misc\bootstrap.component %_DEST%\xml%_EXT%\bootstrap.component -..\%__SRC%\misc\introspection.component %_DEST%\xml%_EXT%\introspection.component -..\%__SRC%\misc\invocadapt.component %_DEST%\xml%_EXT%\invocadapt.component -..\%__SRC%\misc\invocation.component %_DEST%\xml%_EXT%\invocation.component -..\%__SRC%\misc\javaloader.component %_DEST%\xml%_EXT%\javaloader.component -..\%__SRC%\misc\javavm.component %_DEST%\xml%_EXT%\javavm.component -..\%__SRC%\misc\namingservice.component %_DEST%\xml%_EXT%\namingservice.component -..\%__SRC%\misc\proxyfac.component %_DEST%\xml%_EXT%\proxyfac.component -..\%__SRC%\misc\reflection.component %_DEST%\xml%_EXT%\reflection.component -..\%__SRC%\misc\stocservices.component %_DEST%\xml%_EXT%\stocservices.component +..\%__SRC%\bin\*.dll %_DEST%\bin\* +..\%__SRC%\lib\*.so %_DEST%\lib\* +..\%__SRC%\lib\*.dylib %_DEST%\lib\*.dylib +..\%__SRC%\bin\*.rdb %_DEST%\rdb\* +..\%__SRC%\misc\bootstrap.component %_DEST%\xml\bootstrap.component +..\%__SRC%\misc\introspection.component %_DEST%\xml\introspection.component +..\%__SRC%\misc\invocadapt.component %_DEST%\xml\invocadapt.component +..\%__SRC%\misc\invocation.component %_DEST%\xml\invocation.component +..\%__SRC%\misc\javaloader.component %_DEST%\xml\javaloader.component +..\%__SRC%\misc\javavm.component %_DEST%\xml\javavm.component +..\%__SRC%\misc\namingservice.component %_DEST%\xml\namingservice.component +..\%__SRC%\misc\proxyfac.component %_DEST%\xml\proxyfac.component +..\%__SRC%\misc\reflection.component %_DEST%\xml\reflection.component +..\%__SRC%\misc\stocservices.component %_DEST%\xml\stocservices.component -..\source\module-description.dtd %_DEST%\xml%_EXT%\module-description.dtd -..\source\corereflection\corefl.xml %_DEST%\xml%_EXT%\reflection.uno.xml -..\source\inspect\insp.xml %_DEST%\xml%_EXT%\introspection.uno.xml -..\source\invocation\inv.xml %_DEST%\xml%_EXT%\invocation.uno.xml -..\source\invocation_adapterfactory\invadp.xml %_DEST%\xml%_EXT%\invocadapt.uno.xml -..\source\javavm\jen.xml %_DEST%\xml%_EXT%\javavm.uno.xml -..\source\javaloader\javaloader.xml %_DEST%\xml%_EXT%\javaloader.uno.xml -..\source\namingservice\namingservice.xml %_DEST%\xml%_EXT%\namingservice.uno.xml -..\source\proxy_factory\proxyfac.xml %_DEST%\xml%_EXT%\proxyfac.uno.xml -..\source\bootstrap\bootstrap.xml %_DEST%\xml%_EXT%\bootstrap.uno.xml -..\source\typeconv\stocserv.xml %_DEST%\xml%_EXT%\stocserv.uno.xml +..\source\module-description.dtd %_DEST%\xml\module-description.dtd +..\source\corereflection\corefl.xml %_DEST%\xml\reflection.uno.xml +..\source\inspect\insp.xml %_DEST%\xml\introspection.uno.xml +..\source\invocation\inv.xml %_DEST%\xml\invocation.uno.xml +..\source\invocation_adapterfactory\invadp.xml %_DEST%\xml\invocadapt.uno.xml +..\source\javavm\jen.xml %_DEST%\xml\javavm.uno.xml +..\source\javaloader\javaloader.xml %_DEST%\xml\javaloader.uno.xml +..\source\namingservice\namingservice.xml %_DEST%\xml\namingservice.uno.xml +..\source\proxy_factory\proxyfac.xml %_DEST%\xml\proxyfac.uno.xml +..\source\bootstrap\bootstrap.xml %_DEST%\xml\bootstrap.uno.xml +..\source\typeconv\stocserv.xml %_DEST%\xml\stocserv.uno.xml diff --git a/stoc/source/bootstrap/services.cxx b/stoc/source/bootstrap/services.cxx index 49a1ad020..32f7a401b 100644 --- a/stoc/source/bootstrap/services.cxx +++ b/stoc/source/bootstrap/services.cxx @@ -126,13 +126,7 @@ sal_Bool SAL_CALL component_canUnload( TimeValue *pTime ) } //================================================================================================== -void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} -//================================================================================================== -void * SAL_CALL component_getFactory( +SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) { return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries ); diff --git a/stoc/source/corereflection/crefl.cxx b/stoc/source/corereflection/crefl.cxx index b45d12fe8..4d242471f 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( @@ -500,13 +481,7 @@ sal_Bool SAL_CALL component_canUnload( TimeValue *pTime ) } //================================================================================================== -void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} -//================================================================================================== -void * SAL_CALL component_getFactory( +SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) { return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries ); diff --git a/stoc/source/corereflection/criface.cxx b/stoc/source/corereflection/criface.cxx index cc96158d1..692e45ae1 100644 --- a/stoc/source/corereflection/criface.cxx +++ b/stoc/source/corereflection/criface.cxx @@ -33,7 +33,7 @@ #ifdef SAL_UNX #include <sal/alloca.h> #endif -#if !(defined(MACOSX) || defined(FREEBSD)) +#if !(defined(MACOSX) || defined(IOS) || defined(FREEBSD)) #include <malloc.h> #endif #include <rtl/alloc.h> diff --git a/stoc/source/defaultregistry/defaultregistry.cxx b/stoc/source/defaultregistry/defaultregistry.cxx index 6bb90285a..5ab668405 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 d9ff9ec02..485b9c293 100644 --- a/stoc/source/implementationregistration/implreg.cxx +++ b/stoc/source/implementationregistration/implreg.cxx @@ -59,7 +59,7 @@ #include "mergekeys.hxx" -#if defined(SAL_W32) || defined(SAL_OS2) +#if defined(SAL_W32) #include <io.h> #endif @@ -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/inspect/introspection.cxx b/stoc/source/inspect/introspection.cxx index ba170a1fe..5ada829be 100644 --- a/stoc/source/inspect/introspection.cxx +++ b/stoc/source/inspect/introspection.cxx @@ -32,9 +32,7 @@ #include <string.h> // Schalter fuer Introspection-Caching -#ifndef OS2 #define USE_INTROSPECTION_CACHE -#endif #ifdef USE_INTROSPECTION_CACHE #define INTROSPECTION_CACHE_MAX_SIZE 100 @@ -3046,14 +3044,7 @@ Reference< XInterface > SAL_CALL ImplIntrospection_CreateInstance( const Referen extern "C" { -//================================================================================================== -void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} -//================================================================================================== -void * SAL_CALL component_getFactory( +SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * ) { void * pRet = 0; diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx index 6528ea8e2..e5b05d09c 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 @@ -1241,13 +1222,7 @@ sal_Bool SAL_CALL component_canUnload( TimeValue *pTime ) } //================================================================================================== -void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} -//================================================================================================== -void * SAL_CALL component_getFactory( +SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) { return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries ); diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx index 3d5c0168d..f011c137a 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 @@ -1010,14 +991,7 @@ sal_Bool SAL_CALL component_canUnload( } //============================================================================== -void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - -//============================================================================== -void * SAL_CALL component_getFactory( +SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) { return ::cppu::component_getFactoryHelper( diff --git a/stoc/source/javaloader/javaloader.cxx b/stoc/source/javaloader/javaloader.cxx index a097c00c7..b28b766d5 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> @@ -464,16 +445,7 @@ static struct ImplementationEntry g_entries[] = extern "C" { -// NOTE: component_canUnload is not exported, as the library cannot be unloaded. - -//================================================================================================== -void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} -//================================================================================================== -void * SAL_CALL component_getFactory( +SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) { return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries ); diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index c85ae3aef..93c21e174 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -609,14 +609,7 @@ private: } -extern "C" void SAL_CALL -component_getImplementationEnvironment(sal_Char const ** pEnvTypeName, - uno_Environment **) -{ - *pEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - -extern "C" void * SAL_CALL component_getFactory(sal_Char const * pImplName, +extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(sal_Char const * pImplName, void * pServiceManager, void * pRegistryKey) { diff --git a/stoc/source/loader/dllcomponentloader.cxx b/stoc/source/loader/dllcomponentloader.cxx index 215b0a99a..9c27a1f1b 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)); } } @@ -221,8 +202,26 @@ Reference<XInterface> SAL_CALL DllComponentLoader::activate( throw(CannotActivateFactoryException, RuntimeException) { + rtl::OUString aPrefix; + if( xKey.is() ) + { + Reference<XRegistryKey > xActivatorKey = xKey->openKey( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/ACTIVATOR") ) ); + if (xActivatorKey.is() && xActivatorKey->getValueType() == RegistryValueType_ASCII ) + { + Reference<XRegistryKey > xPrefixKey = xActivatorKey->openKey( + rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/UNO/PREFIX") ) ); + if( xPrefixKey.is() && xPrefixKey->getValueType() == RegistryValueType_ASCII ) + { + aPrefix = xPrefixKey->getAsciiValue(); + if( aPrefix.getLength() != 0 ) + aPrefix = aPrefix + OUSTR("_"); + } + } + } + return loadSharedLibComponentFactory( - expand_url( rLibName ), OUString(), rImplName, m_xSMgr, xKey ); + expand_url( rLibName ), OUString(), rImplName, m_xSMgr, xKey, aPrefix ); } diff --git a/stoc/source/namingservice/namingservice.cxx b/stoc/source/namingservice/namingservice.cxx index 701a1774d..c93269578 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 @@ -232,13 +213,7 @@ sal_Bool SAL_CALL component_canUnload( TimeValue *pTime ) } //================================================================================================== -void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} -//================================================================================================== -void * SAL_CALL component_getFactory( +SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) { return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries ); diff --git a/stoc/source/proxy_factory/proxyfac.cxx b/stoc/source/proxy_factory/proxyfac.cxx index 227485e50..84833f379 100644 --- a/stoc/source/proxy_factory/proxyfac.cxx +++ b/stoc/source/proxy_factory/proxyfac.cxx @@ -521,13 +521,7 @@ sal_Bool SAL_CALL component_canUnload( TimeValue * pTime ) return g_moduleCount.canUnload( &g_moduleCount, pTime ); } -void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - -void * SAL_CALL component_getFactory( +SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) { return ::cppu::component_getFactoryHelper( diff --git a/stoc/source/registry_tdprovider/tdprovider.cxx b/stoc/source/registry_tdprovider/tdprovider.cxx index 0f7908101..6c0ef2cc0 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 405546c84..b42ab0efb 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 1288881a9..109fecc0b 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/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx index 3dd3148c8..5c20e952c 100644 --- a/stoc/source/servicemanager/servicemanager.cxx +++ b/stoc/source/servicemanager/servicemanager.cxx @@ -95,102 +95,44 @@ namespace stoc_bootstrap { Sequence< OUString > smgr_wrapper_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("com.sun.star.lang.MultiServiceFactory") ); - pNames = &seqNames; - } - } - return *pNames; + Sequence< OUString > seqNames(1); + seqNames.getArray()[0] = OUString( + RTL_CONSTASCII_USTRINGPARAM("com.sun.star.lang.MultiServiceFactory") ); + return seqNames; } OUString smgr_wrapper_getImplementationName() { - static OUString *pImplName = 0; - if( ! pImplName ) - { - MutexGuard guard( Mutex::getGlobalMutex() ); - if( ! pImplName ) - { - static OUString implName( - RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.stoc.OServiceManagerWrapper" ) ); - pImplName = &implName; - } - } - return *pImplName; + return OUString( + RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.stoc.OServiceManagerWrapper")); } Sequence< OUString > smgr_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.lang.MultiServiceFactory") ); - seqNames.getArray()[1] = OUString( - RTL_CONSTASCII_USTRINGPARAM("com.sun.star.lang.ServiceManager") ); - pNames = &seqNames; - } - } - return *pNames; + Sequence< OUString > seqNames(2); + seqNames.getArray()[0] = OUString( + RTL_CONSTASCII_USTRINGPARAM("com.sun.star.lang.MultiServiceFactory") ); + seqNames.getArray()[1] = OUString( + RTL_CONSTASCII_USTRINGPARAM("com.sun.star.lang.ServiceManager") ); + return seqNames; } OUString smgr_getImplementationName() { - static OUString *pImplName = 0; - if( ! pImplName ) - { - MutexGuard guard( Mutex::getGlobalMutex() ); - if( ! pImplName ) - { - static OUString implName( - RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.stoc.OServiceManager" ) ); - pImplName = &implName; - } - } - return *pImplName; + return OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.stoc.OServiceManager")); } Sequence< OUString > regsmgr_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.lang.MultiServiceFactory")); - seqNames.getArray()[1] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.lang.RegistryServiceManager")); - pNames = &seqNames; - } - } - return *pNames; + Sequence< OUString > seqNames(2); + seqNames.getArray()[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.lang.MultiServiceFactory")); + seqNames.getArray()[1] = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.lang.RegistryServiceManager")); + return seqNames; } OUString regsmgr_getImplementationName() { - static OUString *pImplName = 0; - if( ! pImplName ) - { - MutexGuard guard( Mutex::getGlobalMutex() ); - if( ! pImplName ) - { - static OUString implName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.stoc.ORegistryServiceManager" ) ); - pImplName = &implName; - } - } - return *pImplName; + return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.stoc.ORegistryServiceManager" ) ); } } @@ -506,11 +448,11 @@ void OServiceManager_Listener::disposing(const EventObject & rEvt ) } catch( const IllegalArgumentException & ) { - OSL_FAIL( "IllegalArgumentException catched" ); + OSL_FAIL( "IllegalArgumentException caught" ); } catch( const NoSuchElementException & ) { - OSL_FAIL( "NoSuchElementException catched" ); + OSL_FAIL( "NoSuchElementException caught" ); } } } diff --git a/stoc/source/simpleregistry/textualservices.cxx b/stoc/source/simpleregistry/textualservices.cxx index 5a50a5aa6..a5dd8f5fa 100644 --- a/stoc/source/simpleregistry/textualservices.cxx +++ b/stoc/source/simpleregistry/textualservices.cxx @@ -63,6 +63,7 @@ namespace css = com::sun::star; struct Implementation { rtl::OUString uri; rtl::OUString loader; + rtl::OUString prefix; std::vector< rtl::OUString > services; std::vector< rtl::OUString > singletons; }; @@ -103,6 +104,7 @@ private: rtl::Reference< Data > data_; rtl::OUString attrUri_; rtl::OUString attrLoader_; + rtl::OUString attrPrefix_; rtl::OUString attrImplementation_; }; @@ -238,6 +240,7 @@ Parser::Parser(rtl::OUString const & uri, rtl::Reference< Data > const & data): void Parser::handleComponent() { attrUri_ = rtl::OUString(); attrLoader_ = rtl::OUString(); + attrPrefix_ = rtl::OUString(); xmlreader::Span name; int nsId; while (reader_.nextAttribute(&nsId, &name)) { @@ -282,14 +285,29 @@ void Parser::handleComponent() { ": <component> has empty \"loader\" attribute"))), css::uno::Reference< css::uno::XInterface >()); } + } else if (nsId == xmlreader::XmlReader::NAMESPACE_NONE && + name.equals(RTL_CONSTASCII_STRINGPARAM("prefix"))) + { + if (attrPrefix_.getLength() != 0) { + throw css::registry::InvalidRegistryException( + (reader_.getUrl() + + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + ": <component> has multiple \"prefix\"" + " attributes"))), + css::uno::Reference< css::uno::XInterface >()); + } + attrPrefix_ = reader_.getAttributeValue(false).convertFromUtf8(); + if (attrPrefix_.getLength() == 0) { + throw css::registry::InvalidRegistryException( + (reader_.getUrl() + + rtl::OUString( + RTL_CONSTASCII_USTRINGPARAM( + ": <component> has empty \"prefix\" attribute"))), + css::uno::Reference< css::uno::XInterface >()); + } } else { - throw css::registry::InvalidRegistryException( - (reader_.getUrl() + - rtl::OUString( - RTL_CONSTASCII_USTRINGPARAM( - ": expected <component> attribute \"uri\" or" - " \"loader\""))), - css::uno::Reference< css::uno::XInterface >()); + OSL_FAIL ("unexpected component attribute, expected 'uri' or 'loader' or 'prefix'"); } } if (attrUri_.getLength() == 0) { @@ -336,6 +354,7 @@ void Parser::handleImplementation() { } data_->implementations[attrImplementation_].uri = attrUri_; data_->implementations[attrImplementation_].loader = attrLoader_; + data_->implementations[attrImplementation_].prefix = attrPrefix_; } void Parser::handleService() { @@ -425,6 +444,7 @@ private: UNO LOCATION utf-8 ACTIVATOR utf-8 + PREFIX utf-8 SERVICES <service> ... @@ -442,7 +462,7 @@ private: */ enum State { STATE_ROOT, STATE_IMPLEMENTATIONS, STATE_IMPLEMENTATION, STATE_UNO, - STATE_LOCATION, STATE_ACTIVATOR, STATE_IMPLEMENTATION_SERVICES, + STATE_LOCATION, STATE_ACTIVATOR, STATE_PREFIX, STATE_IMPLEMENTATION_SERVICES, STATE_IMPLEMENTATION_SERVICE, STATE_IMPLEMENTATION_SINGLETONS, STATE_IMPLEMENTATION_SINGLETON, STATE_SERVICES, STATE_SERVICE, STATE_SINGLETONS, STATE_SINGLETON, STATE_REGISTEREDBY }; @@ -674,6 +694,8 @@ rtl::OUString Key::getAsciiValue() throw ( return data_->implementations[path_[1]].uri; case STATE_ACTIVATOR: return data_->implementations[path_[1]].loader; + case STATE_PREFIX: + return data_->implementations[path_[1]].prefix; default: throw css::registry::InvalidValueException( rtl::OUString( @@ -954,7 +976,7 @@ bool Key::find( if (path != 0) { *path = p; } - std::size_t const MAX_TRANSITIONS = 4; + std::size_t const MAX_TRANSITIONS = 5; struct StateInfo { css::registry::RegistryValueType type; std::size_t count; @@ -974,15 +996,18 @@ bool Key::find( { css::registry::RegistryValueType_NOT_DEFINED, 1, { { "UNO", STATE_UNO } } }, // STATE_UNO: - { css::registry::RegistryValueType_NOT_DEFINED, 4, + { css::registry::RegistryValueType_NOT_DEFINED, 5, { { "LOCATION", STATE_LOCATION }, { "ACTIVATOR", STATE_ACTIVATOR }, + { "PREFIX", STATE_PREFIX }, { "SERVICES", STATE_IMPLEMENTATION_SERVICES }, { "SINGLETONS", STATE_IMPLEMENTATION_SINGLETONS } } }, // STATE_LOCATION: { css::registry::RegistryValueType_ASCII, 0, {} }, // STATE_ACTIVATOR: { css::registry::RegistryValueType_ASCII, 0, {} }, + // STATE_PREFIX: + { css::registry::RegistryValueType_ASCII, 0, {} }, // STATE_IMPLEMENTATION_SERVICES: { css::registry::RegistryValueType_NOT_DEFINED, 1, { { 0, STATE_IMPLEMENTATION_SERVICE } } }, @@ -1090,15 +1115,17 @@ css::uno::Sequence< rtl::OUString > Key::getChildren() { } case STATE_UNO: { - css::uno::Sequence< rtl::OUString > seq(4); + css::uno::Sequence< rtl::OUString > seq(5); seq[0] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("LOCATION")); seq[1] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ACTIVATOR")); - seq[2] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SERVICES")); - seq[3] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SINGLETONS")); + seq[2] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PREFIX")); + seq[3] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SERVICES")); + seq[4] = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SINGLETONS")); return seq; } case STATE_LOCATION: case STATE_ACTIVATOR: + case STATE_PREFIX: case STATE_IMPLEMENTATION_SERVICE: case STATE_IMPLEMENTATION_SINGLETON: case STATE_SERVICE: diff --git a/stoc/source/stocservices/stocservices.cxx b/stoc/source/stocservices/stocservices.cxx index f4e7e5371..0a9e96c71 100644 --- a/stoc/source/stocservices/stocservices.cxx +++ b/stoc/source/stocservices/stocservices.cxx @@ -96,13 +96,7 @@ sal_Bool SAL_CALL component_canUnload( TimeValue *pTime ) } //================================================================================================== -void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} -//================================================================================================== -void * SAL_CALL component_getFactory( +SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) { return component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey , g_entries ); diff --git a/stoc/source/tdmanager/tdmgr.cxx b/stoc/source/tdmanager/tdmgr.cxx index 235175143..6366818fe 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 b57208604..92ef7f1e6 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)); } } @@ -901,7 +882,9 @@ Any TypeConverter_Impl::convertToSimpleType( const Any& rVal, TypeClass aDestina } case TypeClass_BOOLEAN: - aRet <<= OUString::createFromAscii( (*(sal_Bool *)rVal.getValue() ? "true" : "false") ); + aRet <<= (*(sal_Bool *)rVal.getValue()) ? + OUString(RTL_CONSTASCII_USTRINGPARAM("true")) : + OUString(RTL_CONSTASCII_USTRINGPARAM("false")); break; case TypeClass_CHAR: aRet <<= OUString( (sal_Unicode *)rVal.getValue(), 1 ); diff --git a/stoc/test/excomp/excomp.cxx b/stoc/test/excomp/excomp.cxx index 12706dd28..e184b9a94 100644 --- a/stoc/test/excomp/excomp.cxx +++ b/stoc/test/excomp/excomp.cxx @@ -67,7 +67,7 @@ OUString getExePath() OSL_VERIFY(osl_getExecutableFile( &exe.pData) == osl_Process_E_None); -#if defined(WIN32) || defined(__OS2__) || defined(WNT) +#if defined(WIN32) || defined(WNT) exe = exe.copy(0, exe.getLength() - 10); #else exe = exe.copy(0, exe.getLength() - 6); diff --git a/stoc/test/excomp/excomp1.cxx b/stoc/test/excomp/excomp1.cxx index bcc985a6c..84c075d41 100644 --- a/stoc/test/excomp/excomp1.cxx +++ b/stoc/test/excomp/excomp1.cxx @@ -155,12 +155,6 @@ Reference<XInterface> SAL_CALL ExampleComponent1_CreateInstance( const Reference extern "C" { //================================================================================================== -void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** /* ppEnv */ ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} -//================================================================================================== sal_Bool SAL_CALL component_writeInfo( void * /* pServiceManager */ , void * pRegistryKey ) { @@ -189,7 +183,7 @@ sal_Bool SAL_CALL component_writeInfo( return sal_False; } //================================================================================================== -void * SAL_CALL component_getFactory( +SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ ) { void * pRet = 0; diff --git a/stoc/test/excomp/excomp2.cxx b/stoc/test/excomp/excomp2.cxx index 907fd2afd..f9e84eaa9 100644 --- a/stoc/test/excomp/excomp2.cxx +++ b/stoc/test/excomp/excomp2.cxx @@ -226,12 +226,6 @@ Reference<XInterface> SAL_CALL ExampleComponent2_CreateInstance( const Reference extern "C" { //================================================================================================== -void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** /* ppEnv */ ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} -//================================================================================================== sal_Bool SAL_CALL component_writeInfo( void * /* pServiceManager */, void * pRegistryKey ) { @@ -260,7 +254,7 @@ sal_Bool SAL_CALL component_writeInfo( return sal_False; } //================================================================================================== -void * SAL_CALL component_getFactory( +SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ ) { void * pRet = 0; diff --git a/stoc/test/excomp/exports.dxp b/stoc/test/excomp/exports.dxp index 9630d7e06..51703a046 100644 --- a/stoc/test/excomp/exports.dxp +++ b/stoc/test/excomp/exports.dxp @@ -1,3 +1,2 @@ -component_getImplementationEnvironment component_writeInfo component_getFactory diff --git a/stoc/test/makefile.mk b/stoc/test/makefile.mk index 2f24634da..d4be0a9ec 100644 --- a/stoc/test/makefile.mk +++ b/stoc/test/makefile.mk @@ -98,7 +98,7 @@ APP3STDLIBS= \ .IF "$(GUI)"=="UNX" APP3STDLIBS+= -l$(SHL1TARGET) .ENDIF -.IF "$(GUI)"=="WNT" || "$(GUI)"=="OS2" +.IF "$(GUI)"=="WNT" APP3STDLIBS+= i$(SHL1TARGET).lib .ENDIF diff --git a/stoc/test/registry_tdprovider/testregistrytdprovider.cxx b/stoc/test/registry_tdprovider/testregistrytdprovider.cxx index f76be27be..bf395f1e7 100644 --- a/stoc/test/registry_tdprovider/testregistrytdprovider.cxx +++ b/stoc/test/registry_tdprovider/testregistrytdprovider.cxx @@ -882,15 +882,7 @@ css::uno::Reference< css::uno::XInterface > Service::createInstance( return static_cast< cppu::OWeakObject * >(new Service(context)); } -extern "C" void SAL_CALL component_getImplementationEnvironment( - char const ** envTypeName, uno_Environment **) -{ - if (envTypeName != 0) { - *envTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; - } -} - -extern "C" void * SAL_CALL component_getFactory(char const * implName, +extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(char const * implName, void * serviceManager, void *) { void * p = 0; if (serviceManager != 0) { diff --git a/stoc/test/tdmanager/testtdmanager.cxx b/stoc/test/tdmanager/testtdmanager.cxx index 3ce88df03..81353ae5c 100644 --- a/stoc/test/tdmanager/testtdmanager.cxx +++ b/stoc/test/tdmanager/testtdmanager.cxx @@ -313,15 +313,7 @@ css::uno::Reference< css::uno::XInterface > Service::createInstance( return static_cast< cppu::OWeakObject * >(new Service(context)); } -extern "C" void SAL_CALL component_getImplementationEnvironment( - char const ** envTypeName, uno_Environment **) -{ - if (envTypeName != 0) { - *envTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; - } -} - -extern "C" void * SAL_CALL component_getFactory(char const * implName, +extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(char const * implName, void * serviceManager, void *) { void * p = 0; if (serviceManager != 0) { diff --git a/stoc/test/testconv.cxx b/stoc/test/testconv.cxx index aee32df6a..b59030161 100644 --- a/stoc/test/testconv.cxx +++ b/stoc/test/testconv.cxx @@ -525,10 +525,8 @@ static sal_Int32 initBlocks( ConvBlock * pTestBlocks ) // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa aVal <<= OUString(RTL_CONSTASCII_USTRINGPARAM("0x100000000")); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ); -#ifndef OS2 aVal <<= (double)( SAL_CONST_INT64(0x100000000) ); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 ); -#endif // st,do,fl,u3,i3,u1,i1,by,bo,ch,tc,si,sa aVal <<= (double)( 5 ); pTestBlocks[nElems++] = ConvBlock( aVal, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0 ); diff --git a/stoc/test/testregistry.cxx b/stoc/test/testregistry.cxx index bb74c4a21..5db6c0301 100644 --- a/stoc/test/testregistry.cxx +++ b/stoc/test/testregistry.cxx @@ -113,7 +113,7 @@ OUString getExePath() { OUString exe; OSL_VERIFY( osl_getExecutableFile( &exe.pData ) == osl_Process_E_None); -#if defined(WIN32) || defined(__OS2__) || defined(WNT) +#if defined(WIN32) || defined(WNT) exe = exe.copy(0, exe.getLength() - 16); #else exe = exe.copy(0, exe.getLength() - 12); diff --git a/stoc/test/testsmgr.cxx b/stoc/test/testsmgr.cxx index f168e56db..d22f59fce 100644 --- a/stoc/test/testsmgr.cxx +++ b/stoc/test/testsmgr.cxx @@ -65,7 +65,7 @@ OUString getExePath() OSL_VERIFY( osl_getExecutableFile( &exe.pData) == osl_Process_E_None); -#if defined(WIN32) || defined(__OS2__) || defined(WNT) +#if defined(WIN32) || defined(WNT) exe = exe.copy(0, exe.getLength() - 16); #else exe = exe.copy(0, exe.getLength() - 12); diff --git a/stoc/test/testsmgr_cpnt.cxx b/stoc/test/testsmgr_cpnt.cxx index ac5436372..a16c5e016 100644 --- a/stoc/test/testsmgr_cpnt.cxx +++ b/stoc/test/testsmgr_cpnt.cxx @@ -292,12 +292,6 @@ extern "C" void SAL_CALL test_ServiceManager() extern "C" { //================================================================================================== -void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} -//================================================================================================== sal_Bool SAL_CALL component_writeInfo( void * /*pServiceManager*/, void * pRegistryKey ) { @@ -325,7 +319,7 @@ sal_Bool SAL_CALL component_writeInfo( return sal_False; } //================================================================================================== -void * SAL_CALL component_getFactory( +SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ ) { void * pRet = 0; diff --git a/stoc/test/testsmgr_cpnt.map b/stoc/test/testsmgr_cpnt.map index ab5ed357b..3cfb43578 100644 --- a/stoc/test/testsmgr_cpnt.map +++ b/stoc/test/testsmgr_cpnt.map @@ -1,6 +1,5 @@ UDK_3_0_0 { global: - component_getImplementationEnvironment; component_writeInfo; component_getFactory; test_ServiceManager; |