diff options
Diffstat (limited to 'stoc/source/loader')
-rw-r--r-- | stoc/source/loader/dllcomponentloader.cxx | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/stoc/source/loader/dllcomponentloader.cxx b/stoc/source/loader/dllcomponentloader.cxx index c10d8b3d2099..402ed4a110af 100644 --- a/stoc/source/loader/dllcomponentloader.cxx +++ b/stoc/source/loader/dllcomponentloader.cxx @@ -54,26 +54,15 @@ using namespace com::sun::star::registry; using namespace cppu; using namespace osl; -namespace stoc_bootstrap -{ -Sequence< OUString > loader_getSupportedServiceNames() +namespace { + +static Sequence< OUString > DllComponentLoader_getSupportedServiceNames() { Sequence< OUString > seqNames(1); seqNames.getArray()[0] = OUString(SERVICENAME); return seqNames; } -OUString loader_getImplementationName() -{ - return OUString(IMPLNAME); -} -} - -namespace stoc_loader -{ -//************************************************************************* -// DllComponentLoader -//************************************************************************* class DllComponentLoader : public WeakImplHelper3< XImplementationLoader, XInitialization, @@ -112,7 +101,7 @@ DllComponentLoader::~DllComponentLoader() {} OUString SAL_CALL DllComponentLoader::getImplementationName( ) throw(::com::sun::star::uno::RuntimeException) { - return stoc_bootstrap::loader_getImplementationName(); + return OUString(IMPLNAME); } sal_Bool SAL_CALL DllComponentLoader::supportsService( const OUString& ServiceName ) @@ -124,7 +113,7 @@ sal_Bool SAL_CALL DllComponentLoader::supportsService( const OUString& ServiceNa Sequence<OUString> SAL_CALL DllComponentLoader::getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException) { - return stoc_bootstrap::loader_getSupportedServiceNames(); + return DllComponentLoader_getSupportedServiceNames(); } //************************************************************************* @@ -182,16 +171,15 @@ sal_Bool SAL_CALL DllComponentLoader::writeRegistryInfo( return sal_True; #endif } + } -namespace stoc_bootstrap -{ -//************************************************************************* -Reference<XInterface> SAL_CALL DllComponentLoader_CreateInstance( const Reference<XComponentContext> & xCtx ) throw(Exception) +static Reference<XInterface> DllComponentLoader_CreateInstance( + const Reference<XComponentContext> & xCtx ) throw(Exception) { Reference<XInterface> xRet; - XImplementationLoader *pXLoader = (XImplementationLoader *)new stoc_loader::DllComponentLoader(xCtx); + XImplementationLoader *pXLoader = (XImplementationLoader *)new DllComponentLoader(xCtx); if (pXLoader) { @@ -201,6 +189,17 @@ Reference<XInterface> SAL_CALL DllComponentLoader_CreateInstance( const Referenc return xRet; } +extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL +com_sun_star_comp_stoc_DLLComponentLoader_component_getFactory( + const char * , void * , void * ) +{ + Reference< css::lang::XSingleComponentFactory > xFactory; + xFactory = createSingleComponentFactory( + DllComponentLoader_CreateInstance, + IMPLNAME, + DllComponentLoader_getSupportedServiceNames() ); + xFactory->acquire(); + return xFactory.get(); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |