diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-12-18 13:22:29 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-12-18 14:12:25 +0100 |
commit | 1322c22412f1d444184fae9d0673bf9220658d23 (patch) | |
tree | 88a46f567141bf93e0515fb4ad6fe969a7b95b7d | |
parent | 17fe6b54cdc6a71e324bf83421f22eb2954089a1 (diff) |
desktop: Use appropriate OUString functions on string constants
Change-Id: Ie35b3ab2695d9bbfc221b63b6913e21386344a33
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_extlistbox.cxx | 2 | ||||
-rw-r--r-- | desktop/source/deployment/gui/dp_gui_service.cxx | 2 | ||||
-rw-r--r-- | desktop/source/deployment/inc/lockfile.hxx | 1 | ||||
-rw-r--r-- | desktop/source/deployment/misc/lockfile.cxx | 2 | ||||
-rw-r--r-- | desktop/source/deployment/registry/component/dp_component.cxx | 2 | ||||
-rw-r--r-- | desktop/source/deployment/registry/script/dp_script.cxx | 4 | ||||
-rw-r--r-- | desktop/source/migration/migration.cxx | 6 | ||||
-rw-r--r-- | desktop/source/pkgchk/unopkg/unopkg_app.cxx | 6 | ||||
-rw-r--r-- | desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx | 4 | ||||
-rw-r--r-- | desktop/source/pkgchk/unopkg/unopkg_misc.cxx | 2 | ||||
-rw-r--r-- | desktop/source/splash/splash.cxx | 2 |
11 files changed, 16 insertions, 17 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index ce629ed6e2e8..a75d2c4c5d4e 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -1073,7 +1073,7 @@ void ExtensionBox_Impl::updateEntry( const uno::Reference< deployment::XPackage if ( eState == AMBIGUOUS ) (*iIndex)->m_sErrorText = DialogHelper::getResourceString( RID_STR_ERROR_UNKNOWN_STATUS ); else if ( ! (*iIndex)->m_bMissingLic ) - (*iIndex)->m_sErrorText = ""; + (*iIndex)->m_sErrorText.clear(); if ( IsReallyVisible() ) Invalidate(); diff --git a/desktop/source/deployment/gui/dp_gui_service.cxx b/desktop/source/deployment/gui/dp_gui_service.cxx index d64fe67bfe1d..1063f7c56e60 100644 --- a/desktop/source/deployment/gui/dp_gui_service.cxx +++ b/desktop/source/deployment/gui/dp_gui_service.cxx @@ -242,7 +242,7 @@ void ServiceImpl::startExecuteModal( Application::SetSettings( as ); Application::SetDisplayName( utl::ConfigManager::getProductName() + - OUString(" ") + + " " + utl::ConfigManager::getProductVersion()); ExtensionCmdQueue::syncRepositories( m_xComponentContext ); } diff --git a/desktop/source/deployment/inc/lockfile.hxx b/desktop/source/deployment/inc/lockfile.hxx index e9e7cb5a4412..890c98eee0ac 100644 --- a/desktop/source/deployment/inc/lockfile.hxx +++ b/desktop/source/deployment/inc/lockfile.hxx @@ -41,7 +41,6 @@ #include "dp_misc_api.hxx" -#define LOCKFILE_SUFFIX OUString( "/.lock" ) #define LOCKFILE_GROUP OString( "Lockdata" ) #define LOCKFILE_USERKEY OString( "User" ) #define LOCKFILE_HOSTKEY OString( "Host" ) diff --git a/desktop/source/deployment/misc/lockfile.cxx b/desktop/source/deployment/misc/lockfile.cxx index a95e58eaf19a..3e191a5ef417 100644 --- a/desktop/source/deployment/misc/lockfile.cxx +++ b/desktop/source/deployment/misc/lockfile.cxx @@ -79,7 +79,7 @@ namespace desktop { // build the file-url to use for the lock OUString aUserPath; utl::Bootstrap::locateUserInstallation( aUserPath ); - m_aLockname = aUserPath + LOCKFILE_SUFFIX; + m_aLockname = aUserPath + "/.lock"; // generate ID const int nIdBytes = 16; diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx index 26018f42caac..4b69637413b0 100644 --- a/desktop/source/deployment/registry/component/dp_component.cxx +++ b/desktop/source/deployment/registry/component/dp_component.cxx @@ -511,7 +511,7 @@ BackendImpl::BackendImpl( m_xDynComponentTypeInfo( new Package::TypeInfo( "application/vnd.sun.star.uno-component;type=native;platform=" + getPlatformString(), - OUString("*") + OUString(SAL_DLLEXTENSION), + "*" SAL_DLLEXTENSION, getResourceString(RID_STR_DYN_COMPONENT), RID_IMG_COMPONENT) ), m_xJavaComponentTypeInfo( new Package::TypeInfo( diff --git a/desktop/source/deployment/registry/script/dp_script.cxx b/desktop/source/deployment/registry/script/dp_script.cxx index 9fee2525eb58..c2f66d8548eb 100644 --- a/desktop/source/deployment/registry/script/dp_script.cxx +++ b/desktop/source/deployment/registry/script/dp_script.cxx @@ -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 = ""; + dialogURL.clear(); } 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 = ""; + scriptURL.clear(); } return new PackageImpl( diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx index 78b5a71ec1d9..553138e922d9 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -1238,11 +1238,11 @@ void MigrationImpl::mergeOldToNewVersion(const uno::Reference< ui::XUIConfigurat { uno::Sequence< beans::PropertyValue > aPropSeq(3); - aPropSeq[0].Name = OUString(ITEM_DESCRIPTOR_COMMANDURL); + aPropSeq[0].Name = ITEM_DESCRIPTOR_COMMANDURL; aPropSeq[0].Value <<= it->m_sCommandURL; - aPropSeq[1].Name = OUString(ITEM_DESCRIPTOR_LABEL); + aPropSeq[1].Name = ITEM_DESCRIPTOR_LABEL; aPropSeq[1].Value <<= retrieveLabelFromCommand(it->m_sCommandURL, sModuleIdentifier); - aPropSeq[2].Name = OUString(ITEM_DESCRIPTOR_CONTAINER); + aPropSeq[2].Name = ITEM_DESCRIPTOR_CONTAINER; aPropSeq[2].Value <<= it->m_xPopupMenu; if (it->m_sPrevSibling.isEmpty()) diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx index 5bef9ed301ec..649f382a3644 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx @@ -301,8 +301,8 @@ extern "C" DESKTOP_DLLPUBLIC int unopkg_main() } else if (option_shared) { dp_misc::writeConsoleError( - OUString("WARNING: explicit context given! ") + - "Ignoring option " + toString( info_shared ) + "!\n" ); + "WARNING: explicit context given! Ignoring option " + + toString( info_shared ) + "!\n" ); } } @@ -425,7 +425,7 @@ extern "C" DESKTOP_DLLPUBLIC int unopkg_main() vec_packages.size(), false); dp_misc::writeConsole( - OUString("All deployed ") + repository + " extensions:\n\n"); + "All deployed " + repository + " extensions:\n\n"); } else { diff --git a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx index 6ea1e679fccb..c75e8fc46eb4 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx @@ -270,7 +270,7 @@ void CommandEnvironmentImpl::handle( { OUString sMsg(ResId(RID_STR_UNSUPPORTED_PLATFORM, *dp_gui::DeploymentGuiResMgr::get()).toString()); sMsg = sMsg.replaceAll("%Name", platExc.package->getDisplayName()); - dp_misc::writeConsole(OUString("\n") + sMsg + "\n\n"); + dp_misc::writeConsole("\n" + sMsg + "\n\n"); approve = true; } else { @@ -290,7 +290,7 @@ void CommandEnvironmentImpl::handle( if (abort && m_option_verbose && !bLicenseException) { OUString msg = ::comphelper::anyToString(request); - dp_misc::writeConsoleError(OUString("\nERROR: ") + msg + "\n"); + dp_misc::writeConsoleError("\nERROR: " + msg + "\n"); } // select: diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx index 68b3321cb90e..b4ab62a5a309 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx @@ -152,7 +152,7 @@ bool readArgument( { OSL_ASSERT( pValue != 0 ); osl_getCommandArg( *pIndex, &pValue->pData ); - dp_misc::TRACE(OUString( __FILE__) + ": argument value: " + dp_misc::TRACE(__FILE__ ": argument value: " + *pValue + "\n"); ++(*pIndex); return true; diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx index 38ec781f3bd3..c406da931d08 100644 --- a/desktop/source/splash/splash.cxx +++ b/desktop/source/splash/splash.cxx @@ -370,7 +370,7 @@ void SplashScreen::loadConfig() // Determine full screen splash mode _bFullScreenSplash = (( !sFullScreenSplash.isEmpty() ) && - ( !sFullScreenSplash.equals( "0" ))); + ( sFullScreenSplash != "0" )); // Try to retrieve the relative values for the progress bar. The current // schema uses the screen ratio to retrieve the associated values. |