summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-15 11:05:19 +0200
committerNoel Grandin <noel@peralex.com>2013-11-19 10:29:31 +0200
commit610b2b94b33b0fc2d79cd515f9e293ca1c2610e8 (patch)
tree6eab2639cb8104ca54daa3f7a2ebd83ef1566cf0 /scripting
parent2c35fff7eca3a143d28dc75e6a73fe1101d2af77 (diff)
remove unnecessary use of OUString constructor when assigning
change code like aStr = OUString("xxxx"); to aStr = "xxxx"; Change-Id: Ib981a5cc735677ec5dba76ef9279a107d22e99d4
Diffstat (limited to 'scripting')
-rw-r--r--scripting/source/basprov/basprov.cxx8
-rw-r--r--scripting/source/protocolhandler/scripthandler.cxx2
-rw-r--r--scripting/source/provider/MasterScriptProvider.cxx12
-rw-r--r--scripting/source/provider/URIHelper.cxx21
-rw-r--r--scripting/source/vbaevents/eventhelper.cxx2
5 files changed, 22 insertions, 23 deletions
diff --git a/scripting/source/basprov/basprov.cxx b/scripting/source/basprov/basprov.cxx
index fc482c45f55e..89d7df8a1e3e 100644
--- a/scripting/source/basprov/basprov.cxx
+++ b/scripting/source/basprov/basprov.cxx
@@ -93,10 +93,10 @@ namespace basprov
if ( !pNames )
{
static Sequence< OUString > aNames(4);
- aNames.getArray()[0] = OUString( "com.sun.star.script.provider.ScriptProviderForBasic" );
- aNames.getArray()[1] = OUString( "com.sun.star.script.provider.LanguageScriptProvider" );
- aNames.getArray()[2] = OUString( "com.sun.star.script.provider.ScriptProvider" );
- aNames.getArray()[3] = OUString( "com.sun.star.script.browse.BrowseNode" );
+ aNames.getArray()[0] = "com.sun.star.script.provider.ScriptProviderForBasic";
+ aNames.getArray()[1] = "com.sun.star.script.provider.LanguageScriptProvider";
+ aNames.getArray()[2] = "com.sun.star.script.provider.ScriptProvider";
+ aNames.getArray()[3] = "com.sun.star.script.browse.BrowseNode";
pNames = &aNames;
}
}
diff --git a/scripting/source/protocolhandler/scripthandler.cxx b/scripting/source/protocolhandler/scripthandler.cxx
index 391a97baa896..a613d9787f7d 100644
--- a/scripting/source/protocolhandler/scripthandler.cxx
+++ b/scripting/source/protocolhandler/scripthandler.cxx
@@ -230,7 +230,7 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification(
{
aException = ::cppu::getCaughtException();
- OUString reason = OUString( "ScriptProtocolHandler::dispatch: caught " );
+ OUString reason = "ScriptProtocolHandler::dispatch: caught ";
invokeResult <<= reason.concat( aException.getValueTypeName() ).concat( e.Message );
diff --git a/scripting/source/provider/MasterScriptProvider.cxx b/scripting/source/provider/MasterScriptProvider.cxx
index f93aca5e3387..e5c540b35bf1 100644
--- a/scripting/source/provider/MasterScriptProvider.cxx
+++ b/scripting/source/provider/MasterScriptProvider.cxx
@@ -820,9 +820,9 @@ throw( RuntimeException )
{
OUString names[3];
- names[0] = OUString( "com.sun.star.script.provider.MasterScriptProvider" );
- names[1] = OUString( "com.sun.star.script.browse.BrowseNode" );
- names[2] = OUString( "com.sun.star.script.provider.ScriptProvider" );
+ names[0] = "com.sun.star.script.provider.MasterScriptProvider";
+ names[1] = "com.sun.star.script.browse.BrowseNode";
+ names[2] = "com.sun.star.script.provider.ScriptProvider";
return Sequence< OUString >( names, 3 );
}
@@ -852,9 +852,9 @@ Sequence< OUString > sp_getSupportedServiceNames( )
{
OUString names[3];
- names[0] = OUString( "com.sun.star.script.provider.MasterScriptProvider" );
- names[1] = OUString( "com.sun.star.script.browse.BrowseNode" );
- names[2] = OUString( "com.sun.star.script.provider.ScriptProvider" );
+ names[0] = "com.sun.star.script.provider.MasterScriptProvider";
+ names[1] = "com.sun.star.script.browse.BrowseNode";
+ names[2] = "com.sun.star.script.provider.ScriptProvider";
return Sequence< OUString >( names, 3 );
}
diff --git a/scripting/source/provider/URIHelper.cxx b/scripting/source/provider/URIHelper.cxx
index 0763901957c3..4d5a7a54a9a3 100644
--- a/scripting/source/provider/URIHelper.cxx
+++ b/scripting/source/provider/URIHelper.cxx
@@ -101,7 +101,7 @@ throw ( uno::Exception, uno::RuntimeException )
uno::Reference< uno::XInterface >() );
}
- SCRIPTS_PART = OUString("/Scripts/");
+ SCRIPTS_PART = "/Scripts/";
SCRIPTS_PART = SCRIPTS_PART.concat( m_sLanguage.toAsciiLowerCase() );
if ( !initBaseURI() )
@@ -120,31 +120,30 @@ ScriptingFrameworkURIHelper::initBaseURI()
if ( m_sLocation.equalsAscii(USER))
{
- test = OUString(USER);
- uri = OUString(USER_URI);
+ test = USER;
+ uri = USER_URI;
bAppendScriptsPart = true;
}
else if ( m_sLocation.equalsAscii(USER_UNO_PACKAGES))
{
- test = OUString("uno_packages");
- uri = OUString(USER_URI);
- uri = uri.concat(OUString(USER_UNO_PACKAGES_DIR));
+ test = "uno_packages";
+ uri = OUString( USER_URI ) + USER_UNO_PACKAGES_DIR;
}
else if (m_sLocation.equalsAscii(SHARE))
{
- test = OUString(SHARE);
- uri = OUString(SHARE_URI);
+ test = SHARE;
+ uri = SHARE_URI;
bAppendScriptsPart = true;
}
else if (m_sLocation.equalsAscii(SHARE_UNO_PACKAGES))
{
- test = OUString("uno_packages");
- uri = OUString(SHARE_UNO_PACKAGES_URI);
+ test = "uno_packages";
+ uri = SHARE_UNO_PACKAGES_URI;
}
else if (m_sLocation.startsWith(TDOC_SCHEME))
{
m_sBaseURI = m_sLocation.concat( SCRIPTS_PART );
- m_sLocation = OUString(DOCUMENT );
+ m_sLocation = DOCUMENT;
return true;
}
else
diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx
index 69971f8b8efc..bbc3ab39b769 100644
--- a/scripting/source/vbaevents/eventhelper.cxx
+++ b/scripting/source/vbaevents/eventhelper.cxx
@@ -356,7 +356,7 @@ eventMethodToDescriptor( const OUString& rEventMethod, ScriptEventDescriptor& ev
// set this it VBAInterop, ensures that it doesn't
// get persisted or shown in property editors
- evtDesc.ScriptType = OUString( "VBAInterop" );
+ evtDesc.ScriptType = "VBAInterop";
return true;
}
return false;