summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-04 12:26:31 +0200
committerNoel Grandin <noel@peralex.com>2013-11-11 11:21:24 +0200
commit3e70dda33548a5392baaf99a3c4675285de7da46 (patch)
tree4146f3c0155dd31b0a01403e9ceeb716961790e8 /desktop
parent7e441ef078c31796c5944a160793458f0bcbc2c4 (diff)
remove unnecessary use of OUString constructor in DESKTOP module
Change-Id: I467334094a621f4bab0ff251267412fb3a0fb4b7
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/app.cxx29
-rw-r--r--desktop/source/deployment/misc/dp_descriptioninfoset.cxx2
-rw-r--r--desktop/source/deployment/misc/dp_misc.cxx8
-rw-r--r--desktop/source/deployment/registry/component/dp_component.cxx6
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configuration.cxx4
-rw-r--r--desktop/source/deployment/registry/help/dp_help.cxx2
-rw-r--r--desktop/source/deployment/registry/package/dp_package.cxx7
-rw-r--r--desktop/source/deployment/registry/script/dp_script.cxx8
-rw-r--r--desktop/source/deployment/registry/sfwk/dp_sfwk.cxx4
9 files changed, 34 insertions, 36 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index e17ed30713c5..0eb71db1d44e 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -846,8 +846,7 @@ OUString Desktop::CreateErrorMsgString(
case ::utl::Bootstrap::INVALID_VERSION_FILE_ENTRY:
{
// This needs to be improved, see #i67575#:
- aMsg = OUString(
- "Invalid version file entry" );
+ aMsg = "Invalid version file entry";
bFileInfo = sal_False;
}
break;
@@ -1548,7 +1547,7 @@ int Desktop::Main()
pExecGlobals->pLanguageOptions.reset( new SvtLanguageOptions(sal_True));
css::document::EventObject aEvent;
- aEvent.EventName = OUString("OnStartApp");
+ aEvent.EventName = "OnStartApp";
pExecGlobals->xGlobalBroadcaster->notifyEvent(aEvent);
SetSplashScreenProgress(50);
@@ -1766,7 +1765,7 @@ int Desktop::doShutdown()
if (pExecGlobals->xGlobalBroadcaster.is())
{
css::document::EventObject aEvent;
- aEvent.EventName = OUString("OnCloseApp");
+ aEvent.EventName = "OnCloseApp";
pExecGlobals->xGlobalBroadcaster->notifyEvent(aEvent);
}
@@ -2049,7 +2048,7 @@ void Desktop::EnableOleAutomation()
void Desktop::PreloadModuleData( const CommandLineArgs& rArgs )
{
Sequence < com::sun::star::beans::PropertyValue > args(1);
- args[0].Name = OUString("Hidden");
+ args[0].Name = "Hidden";
args[0].Value <<= sal_True;
Reference < XDesktop2 > xDesktop = css::frame::Desktop::create( ::comphelper::getProcessComponentContext() );
@@ -2362,7 +2361,7 @@ void Desktop::OpenClients()
Reference< css::util::XURLTransformer > xParser = css::util::URLTransformer::create( ::comphelper::getProcessComponentContext() );
css::util::URL aCmd;
- aCmd.Complete = OUString("vnd.sun.star.autorecovery:/disableRecovery");
+ aCmd.Complete = "vnd.sun.star.autorecovery:/disableRecovery";
xParser->parseStrict(aCmd);
xRecovery->dispatch(aCmd, css::uno::Sequence< css::beans::PropertyValue >());
@@ -2796,26 +2795,26 @@ void Desktop::OpenSplashScreen()
// Determine application name from command line parameters
OUString aAppName;
if ( rCmdLine.IsWriter() )
- aAppName = OUString( "writer" );
+ aAppName = "writer";
else if ( rCmdLine.IsCalc() )
- aAppName = OUString( "calc" );
+ aAppName = "calc";
else if ( rCmdLine.IsDraw() )
- aAppName = OUString( "draw" );
+ aAppName = "draw";
else if ( rCmdLine.IsImpress() )
- aAppName = OUString( "impress" );
+ aAppName = "impress";
else if ( rCmdLine.IsBase() )
- aAppName = OUString( "base" );
+ aAppName = "base";
else if ( rCmdLine.IsGlobal() )
- aAppName = OUString( "global" );
+ aAppName = "global";
else if ( rCmdLine.IsMath() )
- aAppName = OUString( "math" );
+ aAppName = "math";
else if ( rCmdLine.IsWeb() )
- aAppName = OUString( "web" );
+ aAppName = "web";
// Which splash to use
OUString aSplashService( "com.sun.star.office.SplashScreen" );
if ( rCmdLine.HasSplashPipe() )
- aSplashService = OUString("com.sun.star.office.PipeSplashScreen");
+ aSplashService = "com.sun.star.office.PipeSplashScreen";
bVisible = sal_True;
Sequence< Any > aSeq( 2 );
diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
index 8b00b5543898..212669103f8f 100644
--- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
+++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
@@ -390,7 +390,7 @@ void DescriptionInfoset::checkBlacklist() const
css::uno::Sequence< css::uno::Any > args = css::uno::Sequence< css::uno::Any >(1);
css::beans::PropertyValue prop;
- prop.Name = OUString("nodepath");
+ prop.Name = "nodepath";
prop.Value <<= OUString("/org.openoffice.Office.ExtensionDependencies/Extensions");
args[0] <<= prop;
diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx
index 3dfb355d313b..b7720e130a17 100644
--- a/desktop/source/deployment/misc/dp_misc.cxx
+++ b/desktop/source/deployment/misc/dp_misc.cxx
@@ -210,13 +210,13 @@ bool needToSyncRepository(OUString const & name)
OUString file;
if ( name == "bundled" )
{
- folder = OUString("$BUNDLED_EXTENSIONS");
- file = OUString ("$BUNDLED_EXTENSIONS_USER/lastsynchronized");
+ folder = "$BUNDLED_EXTENSIONS";
+ file = "$BUNDLED_EXTENSIONS_USER/lastsynchronized";
}
else if ( name == "shared" )
{
- folder = OUString("$UNO_SHARED_PACKAGES_CACHE/uno_packages");
- file = OUString("$SHARED_EXTENSIONS_USER/lastsynchronized");
+ folder = "$UNO_SHARED_PACKAGES_CACHE/uno_packages";
+ file = "$SHARED_EXTENSIONS_USER/lastsynchronized";
}
else
{
diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx
index 74d7884ea2d2..f148d4cfbb0c 100644
--- a/desktop/source/deployment/registry/component/dp_component.cxx
+++ b/desktop/source/deployment/registry/component/dp_component.cxx
@@ -1708,9 +1708,9 @@ void BackendImpl::ComponentsPackageImpl::processPackage_(
// This relies on the root component context's service manager
// supporting the extended XSet semantics:
css::uno::Sequence< css::beans::NamedValue > args(2);
- args[0].Name = OUString("uri");
+ args[0].Name = "uri";
args[0].Value <<= expandUnoRcUrl(url);
- args[1].Name = OUString("component-context");
+ args[1].Name = "component-context";
args[1].Value <<= context;
css::uno::Reference< css::container::XSet > smgr(
that->getRootContext()->getServiceManager(),
@@ -1724,7 +1724,7 @@ void BackendImpl::ComponentsPackageImpl::processPackage_(
// This relies on the root component context's service manager
// supporting the extended XSet semantics:
css::uno::Sequence< css::beans::NamedValue > args(1);
- args[0].Name = OUString("uri");
+ args[0].Name = "uri";
args[0].Value <<= expandUnoRcUrl(url);
css::uno::Reference< css::container::XSet > smgr(
that->getRootContext()->getServiceManager(),
diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
index 9254a7c9ef6f..17b0f161a595 100644
--- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx
+++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
@@ -314,10 +314,10 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
{
const OUString title( StrTitle::getTitle( ucbContent ) );
if (title.endsWithIgnoreAsciiCase( ".xcu" )) {
- mediaType = OUString("application/vnd.sun.star.configuration-data");
+ mediaType = "application/vnd.sun.star.configuration-data";
}
if (title.endsWithIgnoreAsciiCase( ".xcs" )) {
- mediaType = OUString("application/vnd.sun.star.configuration-schema");
+ mediaType = "application/vnd.sun.star.configuration-schema";
}
}
if (mediaType.isEmpty())
diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx
index 1ad0b8f8cbbb..b7978bf7d598 100644
--- a/desktop/source/deployment/registry/help/dp_help.cxx
+++ b/desktop/source/deployment/registry/help/dp_help.cxx
@@ -490,7 +490,7 @@ void BackendImpl::implProcessHelp(
if( nLastSlash != -1 )
aLang = aLangURL.copy( nLastSlash + 1 );
else
- aLang = OUString("en" );
+ aLang = "en";
OUString aMod("help");
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index b116378d481f..8c721c5afde4 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -389,7 +389,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
&metaInfContent, makeURL( url, "META-INF" ),
xCmdEnv, false /* no throw */ ))
{
- mediaType = OUString("application/vnd.sun.star.package-bundle");
+ mediaType = "application/vnd.sun.star.package-bundle";
}
//No support of legacy bundles, because every folder could be one.
}
@@ -398,10 +398,9 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
const OUString title( StrTitle::getTitle( ucbContent ) );
if (title.endsWithIgnoreAsciiCase(".oxt") ||
title.endsWithIgnoreAsciiCase(".uno.pkg"))
- mediaType = OUString("application/vnd.sun.star.package-bundle");
+ mediaType = "application/vnd.sun.star.package-bundle";
else if (title.endsWithIgnoreAsciiCase(".zip"))
- mediaType =
- OUString("application/vnd.sun.star.legacy-package-bundle");
+ mediaType = "application/vnd.sun.star.legacy-package-bundle";
}
}
if (mediaType.isEmpty())
diff --git a/desktop/source/deployment/registry/script/dp_script.cxx b/desktop/source/deployment/registry/script/dp_script.cxx
index 6f2db680a8bb..5bd7239b61c8 100644
--- a/desktop/source/deployment/registry/script/dp_script.cxx
+++ b/desktop/source/deployment/registry/script/dp_script.cxx
@@ -228,12 +228,12 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
if (create_ucb_content(
0, makeURL( url, "script.xlb" ),
xCmdEnv, false /* no throw */ ))
- mediaType = OUString("application/vnd.sun.star.basic-library");
+ mediaType = "application/vnd.sun.star.basic-library";
// probe for dialog.xlb:
else if (create_ucb_content(
0, makeURL( url, "dialog.xlb" ),
xCmdEnv, false /* no throw */ ))
- mediaType = OUString("application/vnd.sun.star.dialog-library");
+ mediaType = "application/vnd.sun.star.dialog-library";
}
if (mediaType.isEmpty())
throw lang::IllegalArgumentException(
@@ -250,7 +250,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
OUString dialogURL( makeURL( url, "dialog.xlb" ) );
if (! create_ucb_content(
0, dialogURL, xCmdEnv, false /* no throw */ )) {
- dialogURL = OUString();
+ dialogURL = "";
}
if (subType.equalsIgnoreAsciiCase("vnd.sun.star.basic-library"))
@@ -258,7 +258,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
OUString scriptURL( makeURL( url, "script.xlb"));
if (! create_ucb_content(
0, scriptURL, xCmdEnv, false /* no throw */ )) {
- scriptURL = OUString();
+ scriptURL = "";
}
return new PackageImpl(
diff --git a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
index 5c8b97d79021..9af1ef1c3094 100644
--- a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
+++ b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
@@ -208,7 +208,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
0, makeURL( url, "parcel-descriptor.xml" ),
xCmdEnv, false /* no throw */ ))
{
- mediaType = OUString("application/vnd.sun.star.framework-script");
+ mediaType = "application/vnd.sun.star.framework-script";
}
}
if (mediaType.isEmpty())
@@ -225,7 +225,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
{
if (subType.equalsIgnoreAsciiCase("vnd.sun.star.framework-script"))
{
- OUString lang = OUString("Script");
+ OUString lang = "Script";
OUString sParcelDescURL = makeURL(
url, "parcel-descriptor.xml" );