From c89d682d94386495da324644f96cc6cd0887e46e Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Mon, 8 Aug 2011 14:09:57 +0300 Subject: [PATCH] Factor out "bootstrap.uno" repeated for all bootstrap services --- cppuhelper/source/servicefactory.cxx | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/cppuhelper/source/servicefactory.cxx b/cppuhelper/source/servicefactory.cxx index 1e40cf30f277..da9f89d0753e 100644 --- a/cppuhelper/source/servicefactory.cxx +++ b/cppuhelper/source/servicefactory.cxx @@ -316,7 +316,7 @@ static void add_access_control_entries( namespace { void addFactories( - char const * const * ppNames /* lib, implname, ..., 0 */, + char const * const * ppNames /* implname, ..., 0 */, OUString const & bootstrapPath, Reference< lang::XMultiComponentFactory > const & xMgr, Reference< registry::XRegistryKey > const & xKey ) @@ -328,11 +328,11 @@ void addFactories( while (*ppNames) { - OUString lib( OUString::createFromAscii( *ppNames++ ) ); OUString implName( OUString::createFromAscii( *ppNames++ ) ); Any aFac( makeAny( loadSharedLibComponentFactory( - lib, bootstrapPath, implName, xSF, xKey ) ) ); + OUSTR("bootstrap.uno" SAL_DLLEXTENSION), + bootstrapPath, implName, xSF, xKey ) ) ); xSet->insert( aFac ); #if OSL_DEBUG_LEVEL > 1 if (xSet->has( aFac )) @@ -365,7 +365,7 @@ void addFactories( { OStringBuffer buf( 64 ); buf.append( "### failed inserting shared lib \"" ); - buf.append( ppNames[ -2 ] ); + buf.append( "bootstrap.uno" SAL_DLLEXTENSION ); buf.append( "\"!!!" ); OString str( buf.makeStringAndClear() ); OSL_FAIL( str.getStr() ); @@ -394,21 +394,13 @@ Reference< lang::XMultiComponentFactory > bootstrapInitialSF( // add initial bootstrap services static char const * ar[] = { - "bootstrap.uno" SAL_DLLEXTENSION, "com.sun.star.comp.stoc.OServiceManagerWrapper", - "bootstrap.uno" SAL_DLLEXTENSION, "com.sun.star.comp.stoc.DLLComponentLoader", - "bootstrap.uno" SAL_DLLEXTENSION, "com.sun.star.comp.stoc.SimpleRegistry", - "bootstrap.uno" SAL_DLLEXTENSION, "com.sun.star.comp.stoc.NestedRegistry", - "bootstrap.uno" SAL_DLLEXTENSION, "com.sun.star.comp.stoc.TypeDescriptionManager", - "bootstrap.uno" SAL_DLLEXTENSION, "com.sun.star.comp.stoc.ImplementationRegistration", - "bootstrap.uno" SAL_DLLEXTENSION, "com.sun.star.security.comp.stoc.AccessController", - "bootstrap.uno" SAL_DLLEXTENSION, "com.sun.star.security.comp.stoc.FilePolicy", 0 };