diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-06-26 13:54:29 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-06-26 13:55:35 +0200 |
commit | 7f8500191f24571d70fe6a8b8273102d65fd86e1 (patch) | |
tree | 0dd0e08aa2f6edecbee17fbabb0bd14b5c372ced /unotools | |
parent | 647d7b0cd52603769c8d9ee15f0556291adb63c4 (diff) |
loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: Ia9386f30413950b42fdbc9849e41e958f9282693
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/config/cmdoptions.cxx | 19 | ||||
-rw-r--r-- | unotools/source/config/dynamicmenuoptions.cxx | 26 | ||||
-rw-r--r-- | unotools/source/ucbhelper/tempfile.cxx | 3 |
3 files changed, 13 insertions, 35 deletions
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<lDisabledItems.getLength(); ++i ) { - OUStringBuffer aBuffer( 32 ); - aBuffer.append( aSetNode ); - aBuffer.append( lDisabledItems[i] ); - aBuffer.append( aCommandKey ); - lDisabledItems[i] = aBuffer.makeStringAndClear(); + lDisabledItems[i] = SETNODE_DISABLED PATHDELIMITER + lDisabledItems[i] + + PATHDELIMITER PROPERTYNAME_CMD; } // Return result. diff --git a/unotools/source/config/dynamicmenuoptions.cxx b/unotools/source/config/dynamicmenuoptions.cxx index 6a8659ebeef6..c8ba910f9710 100644 --- a/unotools/source/config/dynamicmenuoptions.cxx +++ b/unotools/source/config/dynamicmenuoptions.cxx @@ -41,7 +41,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; #define ROOTNODE_MENUS OUString("Office.Common/Menus/") -#define PATHDELIMITER OUString("/") +#define PATHDELIMITER "/" #define SETNODE_NEWMENU OUString("New") #define SETNODE_WIZARDMENU OUString("Wizard") @@ -538,7 +538,6 @@ void SvtDynamicMenuOptions_Impl::impl_SortAndExpandPropertyNames( const Sequence Sequence< OUString >& 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() ) |