[Libreoffice-commits] core.git: desktop/source extensions/source filter/source forms/source framework/source rsc/source

Gökhan Gurbetoğlu gokhan.gurbetoglu at pardus.org.tr
Fri Aug 26 07:15:57 UTC 2016


 desktop/source/migration/migration.cxx                        |   13 +++++-----
 extensions/source/propctrlr/formcomponenthandler.cxx          |    8 +++---
 extensions/source/propctrlr/newdatatype.cxx                   |    3 --
 filter/source/svg/svgwriter.cxx                               |    3 --
 forms/source/xforms/submission/replace.cxx                    |    4 +--
 framework/source/uiconfiguration/uicategorydescription.cxx    |    4 +--
 framework/source/uiconfiguration/windowstateconfiguration.cxx |    4 +--
 framework/source/uielement/uicommanddescription.cxx           |    8 +++---
 rsc/source/rsc/rsc.cxx                                        |    6 ++--
 9 files changed, 26 insertions(+), 27 deletions(-)

New commits:
commit 674e0f0b43392a7e7fa515dad8427ccc901f7a01
Author: Gökhan Gurbetoğlu <gokhan.gurbetoglu at pardus.org.tr>
Date:   Wed Aug 24 14:43:05 2016 +0300

    tdf#100726 - Improve readability of OUString concatanations
    
    Change-Id: I3099818283a9801976288d0efa67a8711106f376
    Reviewed-on: https://gerrit.libreoffice.org/28360
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noelgrandin at gmail.com>

diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index db40b4d..3d1383d 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 4f9f9eb..e3322ae 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 d7c6d20..f290500 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 af83e28..0aaa305 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 5b56848..fa39715 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 d97b0fb..d82c242 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 966bdd7..1e64639 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 2dd1098..5d5b447 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 9626167..a26084b 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" )) )


More information about the Libreoffice-commits mailing list