summaryrefslogtreecommitdiff
path: root/scripting/source/provider
diff options
context:
space:
mode:
Diffstat (limited to 'scripting/source/provider')
-rw-r--r--scripting/source/provider/ActiveMSPList.cxx3
-rw-r--r--scripting/source/provider/ProviderCache.cxx10
2 files changed, 5 insertions, 8 deletions
diff --git a/scripting/source/provider/ActiveMSPList.cxx b/scripting/source/provider/ActiveMSPList.cxx
index b5d083353f0f..3699af968a8f 100644
--- a/scripting/source/provider/ActiveMSPList.cxx
+++ b/scripting/source/provider/ActiveMSPList.cxx
@@ -53,12 +53,11 @@ ActiveMSPList::~ActiveMSPList()
Reference< provider::XScriptProvider >
ActiveMSPList::createNewMSP( const uno::Any& context )
{
- OUString serviceName("com.sun.star.script.provider.MasterScriptProvider");
Sequence< Any > args( &context, 1 );
Reference< provider::XScriptProvider > msp(
m_xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
- serviceName, args, m_xContext ), UNO_QUERY );
+ "com.sun.star.script.provider.MasterScriptProvider", args, m_xContext ), UNO_QUERY );
return msp;
}
diff --git a/scripting/source/provider/ProviderCache.cxx b/scripting/source/provider/ProviderCache.cxx
index 65b4fa4f5f02..f4ad90358785 100644
--- a/scripting/source/provider/ProviderCache.cxx
+++ b/scripting/source/provider/ProviderCache.cxx
@@ -136,7 +136,7 @@ ProviderCache::populateCache()
::osl::Guard< osl::Mutex > aGuard( m_mutex );
try
{
- OUString languageProviderName( "com.sun.star.script.provider.LanguageScriptProvider" );
+ OUString const languageProviderName( "com.sun.star.script.provider.LanguageScriptProvider" );
Reference< container::XContentEnumerationAccess > xEnumAccess( m_xMgr, UNO_QUERY_THROW );
Reference< container::XEnumeration > xEnum = xEnumAccess->createContentEnumeration ( languageProviderName );
@@ -151,11 +151,10 @@ ProviderCache::populateCache()
if ( serviceNames.getLength() > 0 )
{
- OUString searchString( "com.sun.star.script.provider.ScriptProviderFor" );
-
for ( sal_Int32 index = 0; index < serviceNames.getLength(); index++ )
{
- if ( serviceNames[ index ].startsWith( searchString ) && !isInBlackList( serviceNames[ index ] ) )
+ if ( serviceNames[ index ].startsWith( "com.sun.star.script.provider.ScriptProviderFor" )
+ && !isInBlackList( serviceNames[ index ] ) )
{
serviceName = serviceNames[ index ];
ProviderDetails details;
@@ -186,8 +185,7 @@ ProviderCache::createProvider( ProviderDetails& details )
}
catch ( const Exception& e )
{
- OUString temp("ProviderCache::createProvider() Error creating provider from factory!!!\n");
- throw RuntimeException( temp.concat( e.Message ) );
+ throw RuntimeException( "ProviderCache::createProvider() Error creating provider from factory. " + e.Message );
}
return details.provider;