diff options
author | Gökhan Gurbetoğlu <gokhan.gurbetoglu@pardus.org.tr> | 2016-08-24 14:43:05 +0300 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-08-26 07:15:34 +0000 |
commit | 674e0f0b43392a7e7fa515dad8427ccc901f7a01 (patch) | |
tree | bc2544d497b2dca7b2f5f8f1fbc704ed5f098b61 | |
parent | ea9a90d83d92076d41abfd31a1fd3a5d84b6ba92 (diff) |
tdf#100726 - Improve readability of OUString concatanations
Change-Id: I3099818283a9801976288d0efa67a8711106f376
Reviewed-on: https://gerrit.libreoffice.org/28360
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r-- | desktop/source/migration/migration.cxx | 13 | ||||
-rw-r--r-- | extensions/source/propctrlr/formcomponenthandler.cxx | 8 | ||||
-rw-r--r-- | extensions/source/propctrlr/newdatatype.cxx | 3 | ||||
-rw-r--r-- | filter/source/svg/svgwriter.cxx | 3 | ||||
-rw-r--r-- | forms/source/xforms/submission/replace.cxx | 4 | ||||
-rw-r--r-- | framework/source/uiconfiguration/uicategorydescription.cxx | 4 | ||||
-rw-r--r-- | framework/source/uiconfiguration/windowstateconfiguration.cxx | 4 | ||||
-rw-r--r-- | framework/source/uielement/uicommanddescription.cxx | 8 | ||||
-rw-r--r-- | rsc/source/rsc/rsc.cxx | 6 |
9 files changed, 26 insertions, 27 deletions
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx index db40b4dfec45..3d1383d616cc 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -900,14 +900,15 @@ void MigrationImpl::runServices() } catch (const Exception& e) { - OString aMsg("Execution of migration service failed (Exception caught).\nService: "); - aMsg += OUStringToOString(i_mig->service, RTL_TEXTENCODING_ASCII_US) + "\nMessage: "; - aMsg += OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US); + OString aMsg = "Execution of migration service failed (Exception caught).\nService: " + + OUStringToOString(i_mig->service, RTL_TEXTENCODING_ASCII_US) + + "\nMessage: " + + OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US); OSL_FAIL(aMsg.getStr()); } catch (...) { - OString aMsg("Execution of migration service failed (Exception caught).\nService: "); - aMsg += OUStringToOString(i_mig->service, RTL_TEXTENCODING_ASCII_US) + - "\nNo message available"; + OString aMsg = "Execution of migration service failed (Exception caught).\nService: " + + OUStringToOString(i_mig->service, RTL_TEXTENCODING_ASCII_US) + + "\nNo message available"; OSL_FAIL(aMsg.getStr()); } diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx index 4f9f9ebb5147..e3322ae5e16b 100644 --- a/extensions/source/propctrlr/formcomponenthandler.cxx +++ b/extensions/source/propctrlr/formcomponenthandler.cxx @@ -384,13 +384,13 @@ namespace pcr // Create new Ids std::unique_ptr<OUString[]> pNewPureIds(new OUString[nNewCount]); - OUString aIdStrBase = aDot; Any aNameAny = m_xComponent->getPropertyValue(PROPERTY_NAME); OUString sControlName; aNameAny >>= sControlName; - aIdStrBase += sControlName; - aIdStrBase += aDot; - aIdStrBase += _rPropertyName; + OUString aIdStrBase = aDot + + sControlName + + aDot + + _rPropertyName; sal_Int32 i; OUString aDummyStr; for ( i = 0; i < nNewCount; ++i ) diff --git a/extensions/source/propctrlr/newdatatype.cxx b/extensions/source/propctrlr/newdatatype.cxx index d7c6d2041971..f2905002eea7 100644 --- a/extensions/source/propctrlr/newdatatype.cxx +++ b/extensions/source/propctrlr/newdatatype.cxx @@ -52,8 +52,7 @@ namespace pcr } } - OUString sNameBase( _rNameBase.copy( 0, nStripUntil ? nStripUntil + 1 : 0 ) ); - sNameBase += " "; + OUString sNameBase = _rNameBase.copy( 0, nStripUntil ? nStripUntil + 1 : 0 ) + " "; OUString sInitialName; sal_Int32 nPostfixNumber = 1; do diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index af83e28ca970..0aaa3050f436 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -1222,8 +1222,7 @@ bool SVGTextWriter::nextTextPortion() const OUString& rTextPortionId = implGetValidIDFromInterface( Reference<XInterface>(xPortionTextRange, UNO_QUERY) ); if( !rTextPortionId.isEmpty() ) { - msHyperlinkIdList += rTextPortionId; - msHyperlinkIdList += " "; + msHyperlinkIdList += rTextPortionId + " "; } } } diff --git a/forms/source/xforms/submission/replace.cxx b/forms/source/xforms/submission/replace.cxx index 5b568480c2c4..fa39715b0a1c 100644 --- a/forms/source/xforms/submission/replace.cxx +++ b/forms/source/xforms/submission/replace.cxx @@ -101,8 +101,8 @@ CSubmission::SubmissionResult CSubmission::replace(const OUString& aReplace, con return CSubmission::SUCCESS; } } catch (const Exception& e) { - OString aMsg("Exception during replace:\n"); - aMsg += OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8); + OString aMsg = "Exception during replace:\n" + + OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8); OSL_FAIL(aMsg.getStr()); } return CSubmission::UNKNOWN_ERROR; diff --git a/framework/source/uiconfiguration/uicategorydescription.cxx b/framework/source/uiconfiguration/uicategorydescription.cxx index d97b0fbdf7de..d82c24224ea6 100644 --- a/framework/source/uiconfiguration/uicategorydescription.cxx +++ b/framework/source/uiconfiguration/uicategorydescription.cxx @@ -122,8 +122,8 @@ ConfigurationAccess_UICategory::ConfigurationAccess_UICategory( const OUString& m_bCacheFilled( false ) { // Create configuration hierarchical access name - m_aConfigCategoryAccess += aModuleName; - m_aConfigCategoryAccess += CONFIGURATION_CATEGORY_ELEMENT_ACCESS; + m_aConfigCategoryAccess += aModuleName + + CONFIGURATION_CATEGORY_ELEMENT_ACCESS; m_xConfigProvider = theDefaultProvider::get( rxContext ); } diff --git a/framework/source/uiconfiguration/windowstateconfiguration.cxx b/framework/source/uiconfiguration/windowstateconfiguration.cxx index 966bdd7f3c70..1e6463996949 100644 --- a/framework/source/uiconfiguration/windowstateconfiguration.cxx +++ b/framework/source/uiconfiguration/windowstateconfiguration.cxx @@ -227,8 +227,8 @@ ConfigurationAccess_WindowState::ConfigurationAccess_WindowState( const OUString m_bModified( false ) { // Create configuration hierarchical access name - m_aConfigWindowAccess += aModuleName; - m_aConfigWindowAccess += "/UIElements/States"; + m_aConfigWindowAccess += aModuleName + + "/UIElements/States"; m_xConfigProvider = theDefaultProvider::get( rxContext ); // Initialize access array with property names. diff --git a/framework/source/uielement/uicommanddescription.cxx b/framework/source/uielement/uicommanddescription.cxx index 2dd10988f7a3..5d5b44732e87 100644 --- a/framework/source/uielement/uicommanddescription.cxx +++ b/framework/source/uielement/uicommanddescription.cxx @@ -203,13 +203,13 @@ ConfigurationAccess_UICommand::ConfigurationAccess_UICommand( const OUString& aM m_bGenericDataRetrieved( false ) { // Create configuration hierarchical access name - m_aConfigCmdAccess += aModuleName; - m_aConfigCmdAccess += CONFIGURATION_CMD_ELEMENT_ACCESS; + m_aConfigCmdAccess += aModuleName + + CONFIGURATION_CMD_ELEMENT_ACCESS; m_xConfigProvider = theDefaultProvider::get( rxContext ); - m_aConfigPopupAccess += aModuleName; - m_aConfigPopupAccess += CONFIGURATION_POP_ELEMENT_ACCESS; + m_aConfigPopupAccess += aModuleName + + CONFIGURATION_POP_ELEMENT_ACCESS; } ConfigurationAccess_UICommand::~ConfigurationAccess_UICommand() diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx index 962616780452..a26084b16e3a 100644 --- a/rsc/source/rsc/rsc.cxx +++ b/rsc/source/rsc/rsc.cxx @@ -622,9 +622,9 @@ ERRTYPE RscCompiler::Link() catch (RscIoError&) { OString sMsg("Error with paths:\n"); - sMsg += "temporary rc file: " + aRcTmp + "\n"; - sMsg += "temporary ilst file: " + aSysListTmp + "\n"; - sMsg += "ilst file: " + aSysList + "\n"; + sMsg += "temporary rc file: " + aRcTmp + "\n" + "temporary ilst file: " + aSysListTmp + "\n" + "ilst file: " + aSysList + "\n"; pTC->pEH->FatalError(ERR_OPENFILE, RscId(), sMsg.getStr()); } if ( nullptr == (fExitFile = foutput = fopen( aRcTmp.getStr(), "wb" )) ) |