diff options
author | Fakabbir Amin <fakabbir@gmail.com> | 2017-02-15 15:47:31 +0530 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-02-16 08:51:29 +0000 |
commit | 9d8c206ee4a5c130e11a4e786b4286f3362f9ca1 (patch) | |
tree | 45db907c9dd26bf029d3469166c96b8bdcfac2de /framework/source | |
parent | 5986bafea98228fc2552a5d71777ae199d223a2a (diff) |
tdf#100726 Improved readability of OUString concatenations
Cleanup in filter, framework and svtools directory.
Change-Id: Icf4f04cff1207e58ce55ea3dc8c21b0635c3b6ec
Reviewed-on: https://gerrit.libreoffice.org/34298
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'framework/source')
-rw-r--r-- | framework/source/fwe/xml/xmlnamespaces.cxx | 7 | ||||
-rw-r--r-- | framework/source/helper/titlebarupdate.cxx | 7 | ||||
-rw-r--r-- | framework/source/uielement/generictoolbarcontroller.cxx | 3 | ||||
-rw-r--r-- | framework/source/uielement/menubarmanager.cxx | 3 |
4 files changed, 6 insertions, 14 deletions
diff --git a/framework/source/fwe/xml/xmlnamespaces.cxx b/framework/source/fwe/xml/xmlnamespaces.cxx index 7b103eae24c5..0562d56c2191 100644 --- a/framework/source/fwe/xml/xmlnamespaces.cxx +++ b/framework/source/fwe/xml/xmlnamespaces.cxx @@ -102,9 +102,7 @@ OUString XMLNamespaces::applyNSToAttributeName( const OUString& aName ) const { if ( aName.getLength() > index+1 ) { - OUString aAttributeName = getNamespaceValue( aName.copy( 0, index ) ); - aAttributeName += "^"; - aAttributeName += aName.copy( index+1 ); + OUString aAttributeName = getNamespaceValue( aName.copy( 0, index )) + "^" + aName.copy( index+1); return aAttributeName; } else @@ -133,8 +131,7 @@ OUString XMLNamespaces::applyNSToElementName( const OUString& aName ) const if ( !aNamespace.isEmpty() ) { - aElementName = aNamespace; - aElementName += "^"; + aElementName = aNamespace + "^"; } else return aName; diff --git a/framework/source/helper/titlebarupdate.cxx b/framework/source/helper/titlebarupdate.cxx index edacb2777581..2b10d69972f1 100644 --- a/framework/source/helper/titlebarupdate.cxx +++ b/framework/source/helper/titlebarupdate.cxx @@ -149,12 +149,9 @@ void TitleBarUpdate::impl_updateApplicationID(const css::uno::Reference< css::fr sDesktopName = "Startcenter"; #if defined(_WIN32) // We use a hardcoded product name matching the registry keys so applications can be associated with file types - sApplicationID = "TheDocumentFoundation.LibreOffice."; - sApplicationID += sDesktopName; + sApplicationID = "TheDocumentFoundation.LibreOffice." + sDesktopName; #else - sApplicationID = utl::ConfigManager::getProductName().toAsciiLowerCase(); - sApplicationID += "-"; - sApplicationID += sDesktopName.toAsciiLowerCase(); + sApplicationID = utl::ConfigManager::getProductName().toAsciiLowerCase() + "-" + sDesktopName.toAsciiLowerCase(); #endif } catch(const css::uno::Exception&) diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx index 2d8205f6fdcd..9460afbcacfd 100644 --- a/framework/source/uielement/generictoolbarcontroller.cxx +++ b/framework/source/uielement/generictoolbarcontroller.cxx @@ -219,8 +219,7 @@ void GenericToolbarController::statusChanged( const FeatureStateEvent& Event ) if ( aStrValue.startsWith("($1)") ) { OUString aTmp(FwkResId(STR_UPDATEDOC)); - aTmp += " "; - aTmp += aStrValue.copy( 4 ); + aTmp += " " + aStrValue.copy( 4 ); aStrValue = aTmp; } else if ( aStrValue.startsWith("($2)") ) diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index ef329031a8b3..e1a1653647e8 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -445,8 +445,7 @@ void SAL_CALL MenuBarManager::statusChanged( const FeatureStateEvent& Event ) if ( aItemText.startsWith("($1)") ) { OUString aTmp(FWK_RESSTR(STR_UPDATEDOC)); - aTmp += " "; - aTmp += aItemText.copy( 4 ); + aTmp += " " + aItemText.copy( 4 ); aItemText = aTmp; } else if ( aItemText.startsWith("($2)") ) |