Kaydet (Commit) 3e70dda3 authored tarafından Noel Grandin's avatar Noel Grandin

remove unnecessary use of OUString constructor in DESKTOP module

Change-Id: I467334094a621f4bab0ff251267412fb3a0fb4b7
üst 7e441ef0
......@@ -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 );
......
......@@ -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;
......
......@@ -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
{
......
......@@ -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(),
......
......@@ -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())
......
......@@ -490,7 +490,7 @@ void BackendImpl::implProcessHelp(
if( nLastSlash != -1 )
aLang = aLangURL.copy( nLastSlash + 1 );
else
aLang = OUString("en" );
aLang = "en";
OUString aMod("help");
......
......@@ -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())
......
......@@ -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(
......
......@@ -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" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment