From 7f8500191f24571d70fe6a8b8273102d65fd86e1 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 26 Jun 2015 13:54:29 +0200 Subject: loplugin:stringconstant: handle OUString+=OUString(literal) Change-Id: Ia9386f30413950b42fdbc9849e41e958f9282693 --- unotools/source/config/cmdoptions.cxx | 19 +++++-------------- unotools/source/config/dynamicmenuoptions.cxx | 26 +++++++------------------- unotools/source/ucbhelper/tempfile.cxx | 3 +-- 3 files changed, 13 insertions(+), 35 deletions(-) (limited to 'unotools') diff --git a/unotools/source/config/cmdoptions.cxx b/unotools/source/config/cmdoptions.cxx index 17aca7fbf3a4..7683fe9235c4 100644 --- a/unotools/source/config/cmdoptions.cxx +++ b/unotools/source/config/cmdoptions.cxx @@ -43,11 +43,11 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; #define ROOTNODE_CMDOPTIONS OUString("Office.Commands/Execute") -#define PATHDELIMITER OUString("/") +#define PATHDELIMITER "/" -#define SETNODE_DISABLED OUString("Disabled") +#define SETNODE_DISABLED "Disabled" -#define PROPERTYNAME_CMD OUString("Command") +#define PROPERTYNAME_CMD "Command" /*-**************************************************************************************************************** @descr support simple command option structures and operations on it @@ -276,20 +276,11 @@ Sequence< OUString > SvtCommandOptions_Impl::impl_GetPropertyNames() // First get ALL names of current existing list items in configuration! Sequence< OUString > lDisabledItems = GetNodeNames( SETNODE_DISABLED, utl::CONFIG_NAME_LOCAL_PATH ); - OUString aSetNode( SETNODE_DISABLED ); - aSetNode += PATHDELIMITER; - - OUString aCommandKey( PATHDELIMITER ); - aCommandKey += PROPERTYNAME_CMD; - // Expand all keys for (sal_Int32 i=0; i& lDestination , const OUString& sSetNode ) { - OUString sFixPath; vector< OUString > lTemp; sal_Int32 nSourceCount = lSource.getLength(); sal_Int32 nDestinationStep = lDestination.getLength(); // start on end of current list ...! @@ -560,23 +559,12 @@ void SvtDynamicMenuOptions_Impl::impl_SortAndExpandPropertyNames( const Sequence pItem!=lTemp.end(); ++pItem ) { - sFixPath = sSetNode; - sFixPath += PATHDELIMITER; - sFixPath += *pItem; - sFixPath += PATHDELIMITER; - - lDestination[nDestinationStep] = sFixPath; - lDestination[nDestinationStep] += PROPERTYNAME_URL; - ++nDestinationStep; - lDestination[nDestinationStep] = sFixPath; - lDestination[nDestinationStep] += PROPERTYNAME_TITLE; - ++nDestinationStep; - lDestination[nDestinationStep] = sFixPath; - lDestination[nDestinationStep] += PROPERTYNAME_IMAGEIDENTIFIER; - ++nDestinationStep; - lDestination[nDestinationStep] = sFixPath; - lDestination[nDestinationStep] += PROPERTYNAME_TARGETNAME; - ++nDestinationStep; + OUString sFixPath(sSetNode + PATHDELIMITER + *pItem + PATHDELIMITER); + lDestination[nDestinationStep++] = sFixPath + PROPERTYNAME_URL; + lDestination[nDestinationStep++] = sFixPath + PROPERTYNAME_TITLE; + lDestination[nDestinationStep++] = sFixPath + + PROPERTYNAME_IMAGEIDENTIFIER; + lDestination[nDestinationStep++] = sFixPath + PROPERTYNAME_TARGETNAME; } } diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx index 0dbd0d6a2a6e..acd15e5443e9 100644 --- a/unotools/source/ucbhelper/tempfile.cxx +++ b/unotools/source/ucbhelper/tempfile.cxx @@ -427,8 +427,7 @@ OUString TempFile::SetTempNameBaseDirectory( const OUString &rBaseName ) // append own internal directory bRet = true; OUString &rTempNameBase_Impl = TempNameBase_Impl::get(); - rTempNameBase_Impl = rBaseName; - rTempNameBase_Impl += OUString('/'); + rTempNameBase_Impl = rBaseName + "/"; TempFile aBase( NULL, true ); if ( aBase.IsValid() ) -- cgit