remove unnecessary use of OUString constructor in DESKTOP module
Change-Id: I467334094a621f4bab0ff251267412fb3a0fb4b7
This commit is contained in:
@@ -846,8 +846,7 @@ OUString Desktop::CreateErrorMsgString(
|
|||||||
case ::utl::Bootstrap::INVALID_VERSION_FILE_ENTRY:
|
case ::utl::Bootstrap::INVALID_VERSION_FILE_ENTRY:
|
||||||
{
|
{
|
||||||
// This needs to be improved, see #i67575#:
|
// This needs to be improved, see #i67575#:
|
||||||
aMsg = OUString(
|
aMsg = "Invalid version file entry";
|
||||||
"Invalid version file entry" );
|
|
||||||
bFileInfo = sal_False;
|
bFileInfo = sal_False;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -1548,7 +1547,7 @@ int Desktop::Main()
|
|||||||
pExecGlobals->pLanguageOptions.reset( new SvtLanguageOptions(sal_True));
|
pExecGlobals->pLanguageOptions.reset( new SvtLanguageOptions(sal_True));
|
||||||
|
|
||||||
css::document::EventObject aEvent;
|
css::document::EventObject aEvent;
|
||||||
aEvent.EventName = OUString("OnStartApp");
|
aEvent.EventName = "OnStartApp";
|
||||||
pExecGlobals->xGlobalBroadcaster->notifyEvent(aEvent);
|
pExecGlobals->xGlobalBroadcaster->notifyEvent(aEvent);
|
||||||
|
|
||||||
SetSplashScreenProgress(50);
|
SetSplashScreenProgress(50);
|
||||||
@@ -1766,7 +1765,7 @@ int Desktop::doShutdown()
|
|||||||
if (pExecGlobals->xGlobalBroadcaster.is())
|
if (pExecGlobals->xGlobalBroadcaster.is())
|
||||||
{
|
{
|
||||||
css::document::EventObject aEvent;
|
css::document::EventObject aEvent;
|
||||||
aEvent.EventName = OUString("OnCloseApp");
|
aEvent.EventName = "OnCloseApp";
|
||||||
pExecGlobals->xGlobalBroadcaster->notifyEvent(aEvent);
|
pExecGlobals->xGlobalBroadcaster->notifyEvent(aEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2049,7 +2048,7 @@ void Desktop::EnableOleAutomation()
|
|||||||
void Desktop::PreloadModuleData( const CommandLineArgs& rArgs )
|
void Desktop::PreloadModuleData( const CommandLineArgs& rArgs )
|
||||||
{
|
{
|
||||||
Sequence < com::sun::star::beans::PropertyValue > args(1);
|
Sequence < com::sun::star::beans::PropertyValue > args(1);
|
||||||
args[0].Name = OUString("Hidden");
|
args[0].Name = "Hidden";
|
||||||
args[0].Value <<= sal_True;
|
args[0].Value <<= sal_True;
|
||||||
Reference < XDesktop2 > xDesktop = css::frame::Desktop::create( ::comphelper::getProcessComponentContext() );
|
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() );
|
Reference< css::util::XURLTransformer > xParser = css::util::URLTransformer::create( ::comphelper::getProcessComponentContext() );
|
||||||
|
|
||||||
css::util::URL aCmd;
|
css::util::URL aCmd;
|
||||||
aCmd.Complete = OUString("vnd.sun.star.autorecovery:/disableRecovery");
|
aCmd.Complete = "vnd.sun.star.autorecovery:/disableRecovery";
|
||||||
xParser->parseStrict(aCmd);
|
xParser->parseStrict(aCmd);
|
||||||
|
|
||||||
xRecovery->dispatch(aCmd, css::uno::Sequence< css::beans::PropertyValue >());
|
xRecovery->dispatch(aCmd, css::uno::Sequence< css::beans::PropertyValue >());
|
||||||
@@ -2796,26 +2795,26 @@ void Desktop::OpenSplashScreen()
|
|||||||
// Determine application name from command line parameters
|
// Determine application name from command line parameters
|
||||||
OUString aAppName;
|
OUString aAppName;
|
||||||
if ( rCmdLine.IsWriter() )
|
if ( rCmdLine.IsWriter() )
|
||||||
aAppName = OUString( "writer" );
|
aAppName = "writer";
|
||||||
else if ( rCmdLine.IsCalc() )
|
else if ( rCmdLine.IsCalc() )
|
||||||
aAppName = OUString( "calc" );
|
aAppName = "calc";
|
||||||
else if ( rCmdLine.IsDraw() )
|
else if ( rCmdLine.IsDraw() )
|
||||||
aAppName = OUString( "draw" );
|
aAppName = "draw";
|
||||||
else if ( rCmdLine.IsImpress() )
|
else if ( rCmdLine.IsImpress() )
|
||||||
aAppName = OUString( "impress" );
|
aAppName = "impress";
|
||||||
else if ( rCmdLine.IsBase() )
|
else if ( rCmdLine.IsBase() )
|
||||||
aAppName = OUString( "base" );
|
aAppName = "base";
|
||||||
else if ( rCmdLine.IsGlobal() )
|
else if ( rCmdLine.IsGlobal() )
|
||||||
aAppName = OUString( "global" );
|
aAppName = "global";
|
||||||
else if ( rCmdLine.IsMath() )
|
else if ( rCmdLine.IsMath() )
|
||||||
aAppName = OUString( "math" );
|
aAppName = "math";
|
||||||
else if ( rCmdLine.IsWeb() )
|
else if ( rCmdLine.IsWeb() )
|
||||||
aAppName = OUString( "web" );
|
aAppName = "web";
|
||||||
|
|
||||||
// Which splash to use
|
// Which splash to use
|
||||||
OUString aSplashService( "com.sun.star.office.SplashScreen" );
|
OUString aSplashService( "com.sun.star.office.SplashScreen" );
|
||||||
if ( rCmdLine.HasSplashPipe() )
|
if ( rCmdLine.HasSplashPipe() )
|
||||||
aSplashService = OUString("com.sun.star.office.PipeSplashScreen");
|
aSplashService = "com.sun.star.office.PipeSplashScreen";
|
||||||
|
|
||||||
bVisible = sal_True;
|
bVisible = sal_True;
|
||||||
Sequence< Any > aSeq( 2 );
|
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::uno::Sequence< css::uno::Any > args = css::uno::Sequence< css::uno::Any >(1);
|
||||||
css::beans::PropertyValue prop;
|
css::beans::PropertyValue prop;
|
||||||
prop.Name = OUString("nodepath");
|
prop.Name = "nodepath";
|
||||||
prop.Value <<= OUString("/org.openoffice.Office.ExtensionDependencies/Extensions");
|
prop.Value <<= OUString("/org.openoffice.Office.ExtensionDependencies/Extensions");
|
||||||
args[0] <<= prop;
|
args[0] <<= prop;
|
||||||
|
|
||||||
|
@@ -210,13 +210,13 @@ bool needToSyncRepository(OUString const & name)
|
|||||||
OUString file;
|
OUString file;
|
||||||
if ( name == "bundled" )
|
if ( name == "bundled" )
|
||||||
{
|
{
|
||||||
folder = OUString("$BUNDLED_EXTENSIONS");
|
folder = "$BUNDLED_EXTENSIONS";
|
||||||
file = OUString ("$BUNDLED_EXTENSIONS_USER/lastsynchronized");
|
file = "$BUNDLED_EXTENSIONS_USER/lastsynchronized";
|
||||||
}
|
}
|
||||||
else if ( name == "shared" )
|
else if ( name == "shared" )
|
||||||
{
|
{
|
||||||
folder = OUString("$UNO_SHARED_PACKAGES_CACHE/uno_packages");
|
folder = "$UNO_SHARED_PACKAGES_CACHE/uno_packages";
|
||||||
file = OUString("$SHARED_EXTENSIONS_USER/lastsynchronized");
|
file = "$SHARED_EXTENSIONS_USER/lastsynchronized";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@@ -1708,9 +1708,9 @@ void BackendImpl::ComponentsPackageImpl::processPackage_(
|
|||||||
// This relies on the root component context's service manager
|
// This relies on the root component context's service manager
|
||||||
// supporting the extended XSet semantics:
|
// supporting the extended XSet semantics:
|
||||||
css::uno::Sequence< css::beans::NamedValue > args(2);
|
css::uno::Sequence< css::beans::NamedValue > args(2);
|
||||||
args[0].Name = OUString("uri");
|
args[0].Name = "uri";
|
||||||
args[0].Value <<= expandUnoRcUrl(url);
|
args[0].Value <<= expandUnoRcUrl(url);
|
||||||
args[1].Name = OUString("component-context");
|
args[1].Name = "component-context";
|
||||||
args[1].Value <<= context;
|
args[1].Value <<= context;
|
||||||
css::uno::Reference< css::container::XSet > smgr(
|
css::uno::Reference< css::container::XSet > smgr(
|
||||||
that->getRootContext()->getServiceManager(),
|
that->getRootContext()->getServiceManager(),
|
||||||
@@ -1724,7 +1724,7 @@ void BackendImpl::ComponentsPackageImpl::processPackage_(
|
|||||||
// This relies on the root component context's service manager
|
// This relies on the root component context's service manager
|
||||||
// supporting the extended XSet semantics:
|
// supporting the extended XSet semantics:
|
||||||
css::uno::Sequence< css::beans::NamedValue > args(1);
|
css::uno::Sequence< css::beans::NamedValue > args(1);
|
||||||
args[0].Name = OUString("uri");
|
args[0].Name = "uri";
|
||||||
args[0].Value <<= expandUnoRcUrl(url);
|
args[0].Value <<= expandUnoRcUrl(url);
|
||||||
css::uno::Reference< css::container::XSet > smgr(
|
css::uno::Reference< css::container::XSet > smgr(
|
||||||
that->getRootContext()->getServiceManager(),
|
that->getRootContext()->getServiceManager(),
|
||||||
|
@@ -314,10 +314,10 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
|
|||||||
{
|
{
|
||||||
const OUString title( StrTitle::getTitle( ucbContent ) );
|
const OUString title( StrTitle::getTitle( ucbContent ) );
|
||||||
if (title.endsWithIgnoreAsciiCase( ".xcu" )) {
|
if (title.endsWithIgnoreAsciiCase( ".xcu" )) {
|
||||||
mediaType = OUString("application/vnd.sun.star.configuration-data");
|
mediaType = "application/vnd.sun.star.configuration-data";
|
||||||
}
|
}
|
||||||
if (title.endsWithIgnoreAsciiCase( ".xcs" )) {
|
if (title.endsWithIgnoreAsciiCase( ".xcs" )) {
|
||||||
mediaType = OUString("application/vnd.sun.star.configuration-schema");
|
mediaType = "application/vnd.sun.star.configuration-schema";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mediaType.isEmpty())
|
if (mediaType.isEmpty())
|
||||||
|
@@ -490,7 +490,7 @@ void BackendImpl::implProcessHelp(
|
|||||||
if( nLastSlash != -1 )
|
if( nLastSlash != -1 )
|
||||||
aLang = aLangURL.copy( nLastSlash + 1 );
|
aLang = aLangURL.copy( nLastSlash + 1 );
|
||||||
else
|
else
|
||||||
aLang = OUString("en" );
|
aLang = "en";
|
||||||
|
|
||||||
OUString aMod("help");
|
OUString aMod("help");
|
||||||
|
|
||||||
|
@@ -389,7 +389,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
|
|||||||
&metaInfContent, makeURL( url, "META-INF" ),
|
&metaInfContent, makeURL( url, "META-INF" ),
|
||||||
xCmdEnv, false /* no throw */ ))
|
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.
|
//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 ) );
|
const OUString title( StrTitle::getTitle( ucbContent ) );
|
||||||
if (title.endsWithIgnoreAsciiCase(".oxt") ||
|
if (title.endsWithIgnoreAsciiCase(".oxt") ||
|
||||||
title.endsWithIgnoreAsciiCase(".uno.pkg"))
|
title.endsWithIgnoreAsciiCase(".uno.pkg"))
|
||||||
mediaType = OUString("application/vnd.sun.star.package-bundle");
|
mediaType = "application/vnd.sun.star.package-bundle";
|
||||||
else if (title.endsWithIgnoreAsciiCase(".zip"))
|
else if (title.endsWithIgnoreAsciiCase(".zip"))
|
||||||
mediaType =
|
mediaType = "application/vnd.sun.star.legacy-package-bundle";
|
||||||
OUString("application/vnd.sun.star.legacy-package-bundle");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mediaType.isEmpty())
|
if (mediaType.isEmpty())
|
||||||
|
@@ -228,12 +228,12 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
|
|||||||
if (create_ucb_content(
|
if (create_ucb_content(
|
||||||
0, makeURL( url, "script.xlb" ),
|
0, makeURL( url, "script.xlb" ),
|
||||||
xCmdEnv, false /* no throw */ ))
|
xCmdEnv, false /* no throw */ ))
|
||||||
mediaType = OUString("application/vnd.sun.star.basic-library");
|
mediaType = "application/vnd.sun.star.basic-library";
|
||||||
// probe for dialog.xlb:
|
// probe for dialog.xlb:
|
||||||
else if (create_ucb_content(
|
else if (create_ucb_content(
|
||||||
0, makeURL( url, "dialog.xlb" ),
|
0, makeURL( url, "dialog.xlb" ),
|
||||||
xCmdEnv, false /* no throw */ ))
|
xCmdEnv, false /* no throw */ ))
|
||||||
mediaType = OUString("application/vnd.sun.star.dialog-library");
|
mediaType = "application/vnd.sun.star.dialog-library";
|
||||||
}
|
}
|
||||||
if (mediaType.isEmpty())
|
if (mediaType.isEmpty())
|
||||||
throw lang::IllegalArgumentException(
|
throw lang::IllegalArgumentException(
|
||||||
@@ -250,7 +250,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
|
|||||||
OUString dialogURL( makeURL( url, "dialog.xlb" ) );
|
OUString dialogURL( makeURL( url, "dialog.xlb" ) );
|
||||||
if (! create_ucb_content(
|
if (! create_ucb_content(
|
||||||
0, dialogURL, xCmdEnv, false /* no throw */ )) {
|
0, dialogURL, xCmdEnv, false /* no throw */ )) {
|
||||||
dialogURL = OUString();
|
dialogURL = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (subType.equalsIgnoreAsciiCase("vnd.sun.star.basic-library"))
|
if (subType.equalsIgnoreAsciiCase("vnd.sun.star.basic-library"))
|
||||||
@@ -258,7 +258,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
|
|||||||
OUString scriptURL( makeURL( url, "script.xlb"));
|
OUString scriptURL( makeURL( url, "script.xlb"));
|
||||||
if (! create_ucb_content(
|
if (! create_ucb_content(
|
||||||
0, scriptURL, xCmdEnv, false /* no throw */ )) {
|
0, scriptURL, xCmdEnv, false /* no throw */ )) {
|
||||||
scriptURL = OUString();
|
scriptURL = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
return new PackageImpl(
|
return new PackageImpl(
|
||||||
|
@@ -208,7 +208,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
|
|||||||
0, makeURL( url, "parcel-descriptor.xml" ),
|
0, makeURL( url, "parcel-descriptor.xml" ),
|
||||||
xCmdEnv, false /* no throw */ ))
|
xCmdEnv, false /* no throw */ ))
|
||||||
{
|
{
|
||||||
mediaType = OUString("application/vnd.sun.star.framework-script");
|
mediaType = "application/vnd.sun.star.framework-script";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mediaType.isEmpty())
|
if (mediaType.isEmpty())
|
||||||
@@ -225,7 +225,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
|
|||||||
{
|
{
|
||||||
if (subType.equalsIgnoreAsciiCase("vnd.sun.star.framework-script"))
|
if (subType.equalsIgnoreAsciiCase("vnd.sun.star.framework-script"))
|
||||||
{
|
{
|
||||||
OUString lang = OUString("Script");
|
OUString lang = "Script";
|
||||||
OUString sParcelDescURL = makeURL(
|
OUString sParcelDescURL = makeURL(
|
||||||
url, "parcel-descriptor.xml" );
|
url, "parcel-descriptor.xml" );
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user