summaryrefslogtreecommitdiff
path: root/scripting/source/provider
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-07-11 13:49:02 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-07-11 21:42:16 +0200
commitf9b104abc1185d4f9f3af66f49ec9e39f85a1c36 (patch)
tree972b288a471d03dded89e7d55040eef0ac65d2ee /scripting/source/provider
parent36e92f38c98e5cb21aecf07434df34b3ad75272a (diff)
simplify some OUString::concat usage
Change-Id: Ifa150dc9d694981ffe03c254ea8c3fd820c99795 Reviewed-on: https://gerrit.libreoffice.org/39812 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'scripting/source/provider')
-rw-r--r--scripting/source/provider/MasterScriptProvider.cxx23
-rw-r--r--scripting/source/provider/URIHelper.cxx3
2 files changed, 9 insertions, 17 deletions
diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx
index 63a2685c48ee..972097da4fb1 100644
--- a/scripting/source/provider/MasterScriptProvider.cxx
+++ b/scripting/source/provider/MasterScriptProvider.cxx
@@ -197,8 +197,7 @@ void MasterScriptProvider::createPkgProvider()
try
{
Any location;
- OUString sPkgCtx = m_sCtxString.concat( ":uno_packages" );
- location <<= sPkgCtx;
+ location <<= m_sCtxString + ":uno_packages";
Reference< provider::XScriptProviderFactory > xFac =
provider::theMasterScriptProviderFactory::get( m_xContext );
@@ -237,10 +236,9 @@ MasterScriptProvider::getScript( const OUString& scriptURI )
if ( !uriRef.is() || !sfUri.is() )
{
- OUString errorMsg = "Incorrect format for Script URI: ";
- errorMsg = errorMsg.concat( scriptURI );
throw provider::ScriptFrameworkErrorException(
- errorMsg, Reference< XInterface >(),
+ "Incorrect format for Script URI: " + scriptURI,
+ Reference< XInterface >(),
scriptURI, "",
provider::ScriptFrameworkErrorType::UNKNOWN );
}
@@ -252,10 +250,9 @@ MasterScriptProvider::getScript( const OUString& scriptURI )
!sfUri->hasParameter( locKey ) ||
( sfUri->getName().isEmpty() ) )
{
- OUString errorMsg = "Incorrect format for Script URI: ";
- errorMsg = errorMsg.concat( scriptURI );
throw provider::ScriptFrameworkErrorException(
- errorMsg, Reference< XInterface >(),
+ "Incorrect format for Script URI: " + scriptURI,
+ Reference< XInterface >(),
scriptURI, "",
provider::ScriptFrameworkErrorType::UNKNOWN );
}
@@ -519,9 +516,7 @@ MasterScriptProvider::insertByName( const OUString& aName, const Any& aElement )
if ( index == xSProviders.getLength() )
{
// No script providers could process the package
- OUString message = "Failed to register package for ";
- message = message.concat( aName );
- throw lang::IllegalArgumentException( message,
+ throw lang::IllegalArgumentException( "Failed to register package for " + aName,
Reference < XInterface > (), 2 );
}
}
@@ -585,10 +580,8 @@ MasterScriptProvider::removeByName( const OUString& Name )
if ( index == xSProviders.getLength() )
{
// No script providers could process the package
- OUString message = "Failed to revoke package for ";
- message = message.concat( Name );
- throw lang::IllegalArgumentException( message,
- Reference < XInterface > (), 1 );
+ throw lang::IllegalArgumentException( "Failed to revoke package for " + Name,
+ Reference < XInterface > (), 1 );
}
}
diff --git a/scripting/source/provider/URIHelper.cxx b/scripting/source/provider/URIHelper.cxx
index d043d3f0b5de..fb74cba6ab6b 100644
--- a/scripting/source/provider/URIHelper.cxx
+++ b/scripting/source/provider/URIHelper.cxx
@@ -88,8 +88,7 @@ ScriptingFrameworkURIHelper::initialize(
throw uno::RuntimeException( "ScriptingFrameworkURIHelper error parsing args" );
}
- SCRIPTS_PART = "/Scripts/";
- SCRIPTS_PART = SCRIPTS_PART.concat( m_sLanguage.toAsciiLowerCase() );
+ SCRIPTS_PART = "/Scripts/" + m_sLanguage.toAsciiLowerCase();
if ( !initBaseURI() )
{