diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-30 08:40:11 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-10-30 08:59:59 +0000 |
commit | 3bc5df7f32501075149e4b41f6e98ea8dd2cfcbd (patch) | |
tree | 6e7f5d288cf65935b3ed1f0b88200d32d2f016f0 /stoc | |
parent | 2e528df76b168a221c6d251d9b076bce5ba051a3 (diff) |
UNO: no need to use OUString constructor when calling createInstance
Change-Id: I37da28539b94706574116d0fff5f008aabfb5526
Reviewed-on: https://gerrit.libreoffice.org/19682
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/source/invocation/invocation.cxx | 4 | ||||
-rw-r--r-- | stoc/source/invocation_adapterfactory/iafactory.cxx | 2 | ||||
-rw-r--r-- | stoc/source/javavm/javavm.cxx | 11 | ||||
-rw-r--r-- | stoc/source/servicemanager/servicemanager.cxx | 2 | ||||
-rw-r--r-- | stoc/test/registry_tdprovider/testregistrytdprovider.cxx | 2 | ||||
-rw-r--r-- | stoc/test/tdmanager/testtdmanager.cxx | 5 | ||||
-rw-r--r-- | stoc/test/testconv.cxx | 3 | ||||
-rw-r--r-- | stoc/test/testiadapter.cxx | 3 | ||||
-rw-r--r-- | stoc/test/testintrosp.cxx | 2 | ||||
-rw-r--r-- | stoc/test/testproxyfac.cxx | 4 |
10 files changed, 15 insertions, 23 deletions
diff --git a/stoc/source/invocation/invocation.cxx b/stoc/source/invocation/invocation.cxx index 2f893e6246a4..42657baa9f5c 100644 --- a/stoc/source/invocation/invocation.cxx +++ b/stoc/source/invocation/invocation.cxx @@ -1115,9 +1115,7 @@ InvocationService::InvocationService( const Reference<XComponentContext> & xCtx , xCoreReflection( css::reflection::theCoreReflection::get(mxCtx) ) { xTypeConverter = Reference<XTypeConverter>( - mxSMgr->createInstanceWithContext( - OUString("com.sun.star.script.Converter"), - xCtx ), + mxSMgr->createInstanceWithContext( "com.sun.star.script.Converter", xCtx ), UNO_QUERY ); xIntrospection = theIntrospection::get(xCtx); } diff --git a/stoc/source/invocation_adapterfactory/iafactory.cxx b/stoc/source/invocation_adapterfactory/iafactory.cxx index 2b953e9a6199..2702b6aa24af 100644 --- a/stoc/source/invocation_adapterfactory/iafactory.cxx +++ b/stoc/source/invocation_adapterfactory/iafactory.cxx @@ -700,7 +700,7 @@ FactoryImpl::FactoryImpl( Reference< XComponentContext > const & xContext ) // type converter Reference< script::XTypeConverter > xConverter( xContext->getServiceManager()->createInstanceWithContext( - OUString("com.sun.star.script.Converter"), + "com.sun.star.script.Converter", xContext ), UNO_QUERY_THROW ); m_pConverter = static_cast<uno_Interface *>(m_aCpp2Uno.mapInterface( diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx index 30755663a8c2..c3ec2516c932 100644 --- a/stoc/source/javavm/javavm.cxx +++ b/stoc/source/javavm/javavm.cxx @@ -272,7 +272,7 @@ void getINetPropsFromConfig(stoc_javavm::JVM * pjvm, const css::uno::Reference<css::uno::XComponentContext> &xCtx ) throw (css::uno::Exception) { css::uno::Reference<css::uno::XInterface> xConfRegistry = xSMgr->createInstanceWithContext( - OUString("com.sun.star.configuration.ConfigurationRegistry"), + "com.sun.star.configuration.ConfigurationRegistry", xCtx ); if(!xConfRegistry.is()) throw css::uno::RuntimeException("javavm.cxx: couldn't get ConfigurationRegistry", 0); @@ -362,8 +362,7 @@ void getDefaultLocaleFromConfig( const css::uno::Reference<css::uno::XComponentContext> &xCtx ) throw(css::uno::Exception) { css::uno::Reference<css::uno::XInterface> xConfRegistry = - xSMgr->createInstanceWithContext( - OUString("com.sun.star.configuration.ConfigurationRegistry"), xCtx ); + xSMgr->createInstanceWithContext( "com.sun.star.configuration.ConfigurationRegistry", xCtx ); if(!xConfRegistry.is()) throw css::uno::RuntimeException( OUString("javavm.cxx: couldn't get ConfigurationRegistry"), 0); @@ -417,7 +416,7 @@ void getJavaPropsFromSafetySettings( { css::uno::Reference<css::uno::XInterface> xConfRegistry = xSMgr->createInstanceWithContext( - OUString("com.sun.star.configuration.ConfigurationRegistry"), + "com.sun.star.configuration.ConfigurationRegistry", xCtx); if(!xConfRegistry.is()) throw css::uno::RuntimeException( @@ -1353,7 +1352,7 @@ void JavaVirtualMachine::registerConfigChangesListener() m_xInetConfiguration = css::uno::Reference< css::container::XContainer >( xConfigProvider->createInstanceWithArguments( - OUString("com.sun.star.configuration.ConfigurationAccess"), + "com.sun.star.configuration.ConfigurationAccess", aArguments), css::uno::UNO_QUERY); @@ -1377,7 +1376,7 @@ void JavaVirtualMachine::registerConfigChangesListener() m_xJavaConfiguration = css::uno::Reference< css::container::XContainer >( xConfigProvider->createInstanceWithArguments( - OUString("com.sun.star.configuration.ConfigurationAccess"), + "com.sun.star.configuration.ConfigurationAccess", aArguments2), css::uno::UNO_QUERY); diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx index 92589f967284..4d10bd44e99d 100644 --- a/stoc/source/servicemanager/servicemanager.cxx +++ b/stoc/source/servicemanager/servicemanager.cxx @@ -1410,7 +1410,7 @@ Reference<XRegistryKey > ORegistryServiceManager::getRootKey() m_xRegistry.set( createInstanceWithContext( - OUString("com.sun.star.registry.DefaultRegistry"), + "com.sun.star.registry.DefaultRegistry", m_xContext ), UNO_QUERY ); } diff --git a/stoc/test/registry_tdprovider/testregistrytdprovider.cxx b/stoc/test/registry_tdprovider/testregistrytdprovider.cxx index e62b80b9128c..f6fd89843b19 100644 --- a/stoc/test/registry_tdprovider/testregistrytdprovider.cxx +++ b/stoc/test/registry_tdprovider/testregistrytdprovider.cxx @@ -127,7 +127,7 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const &) OUString("Registry")); css::uno::Reference< css::container::XHierarchicalNameAccess > provider( factory->createInstanceWithArgumentsAndContext( - OUString( "com.sun.star.comp.stoc.RegistryTypeDescriptionProvider"), + "com.sun.star.comp.stoc.RegistryTypeDescriptionProvider", args, m_context), css::uno::UNO_QUERY_THROW); diff --git a/stoc/test/tdmanager/testtdmanager.cxx b/stoc/test/tdmanager/testtdmanager.cxx index 434d6fe52ff4..e466904b4314 100644 --- a/stoc/test/tdmanager/testtdmanager.cxx +++ b/stoc/test/tdmanager/testtdmanager.cxx @@ -141,15 +141,14 @@ sal_Int32 Service::run(css::uno::Sequence< OUString > const & arguments) css::uno::Reference<css::registry::XSimpleRegistry> xReg( m_context->getServiceManager()->createInstanceWithContext( - OUString( "com.sun.star.registry.SimpleRegistry" ), + "com.sun.star.registry.SimpleRegistry", m_context ), css::uno::UNO_QUERY_THROW ); xReg->open( url, true /* read-only */, false /* ! create */ ); css::uno::Any arg( css::uno::makeAny(xReg) ); css::uno::Reference<css::container::XHierarchicalNameAccess> xTDprov( m_context->getServiceManager()-> createInstanceWithArgumentsAndContext( - OUString( "com.sun.star.comp.stoc." - "RegistryTypeDescriptionProvider" ), + "com.sun.star.comp.stoc.RegistryTypeDescriptionProvider", css::uno::Sequence<css::uno::Any>( &arg, 1 ), m_context ), css::uno::UNO_QUERY_THROW ); try { diff --git a/stoc/test/testconv.cxx b/stoc/test/testconv.cxx index 950a9129f59b..786e8d35966c 100644 --- a/stoc/test/testconv.cxx +++ b/stoc/test/testconv.cxx @@ -606,8 +606,7 @@ static void test_Conversion( const Reference< XMultiServiceFactory > & xMgr ) { printf( "test_Conversion(): start...\n" ); - Reference< XTypeConverter > xConverter( xMgr->createInstance( - OUString("com.sun.star.script.Converter") ), UNO_QUERY ); + Reference< XTypeConverter > xConverter( xMgr->createInstance( "com.sun.star.script.Converter" ), UNO_QUERY ); ConvBlock * pTestBlocks = new ConvBlock[256]; sal_Int32 nPos = initBlocks( pTestBlocks ); diff --git a/stoc/test/testiadapter.cxx b/stoc/test/testiadapter.cxx index a540a6b3dd32..3452e68bc393 100644 --- a/stoc/test/testiadapter.cxx +++ b/stoc/test/testiadapter.cxx @@ -1004,8 +1004,7 @@ SAL_IMPLEMENT_MAIN() try { Reference< XImplementationRegistration > xImplReg( - xMgr->createInstance( - OUString( "com.sun.star.registry.ImplementationRegistration" ) ), + xMgr->createInstance( "com.sun.star.registry.ImplementationRegistration" ), UNO_QUERY ); OSL_ENSURE( xImplReg.is(), "### no impl reg!" ); diff --git a/stoc/test/testintrosp.cxx b/stoc/test/testintrosp.cxx index 1b0735968def..2aedac97cf5f 100644 --- a/stoc/test/testintrosp.cxx +++ b/stoc/test/testintrosp.cxx @@ -71,7 +71,7 @@ Reference<XIdlClass> TypeToIdlClass( const Type& rType, const Reference< XMultiS if( !xRefl.is() ) { xRefl = Reference< XIdlReflection >( xMgr->createInstance( - OUString("com.sun.star.reflection.CoreReflection") ), UNO_QUERY ); + "com.sun.star.reflection.CoreReflection" ), UNO_QUERY ); OSL_ENSURE( xRefl.is(), "### no corereflection!" ); } xRetClass = xRefl->forName( sOWName ); diff --git a/stoc/test/testproxyfac.cxx b/stoc/test/testproxyfac.cxx index 20fb2597e7b2..b171dda44a9b 100644 --- a/stoc/test/testproxyfac.cxx +++ b/stoc/test/testproxyfac.cxx @@ -252,9 +252,7 @@ SAL_IMPLEMENT_MAIN() try { Reference< registry::XImplementationRegistration > xImplReg( - xMgr->createInstance( - OUString( "com.sun.star.registry.ImplementationRegistration" - ) ), + xMgr->createInstance( "com.sun.star.registry.ImplementationRegistration" ), UNO_QUERY ); OSL_ENSURE( xImplReg.is(), "### no impl reg!" ); |