[Libreoffice-commits] core.git: sc/source vcl/source

Furkan Ahmet Kara furkanahmetkara.fk at gmail.com
Mon Oct 30 10:37:40 UTC 2017


 sc/source/ui/dbgui/foptmgr.cxx |    8 ++++----
 vcl/source/uitest/uiobject.cxx |   18 ++++++++----------
 2 files changed, 12 insertions(+), 14 deletions(-)

New commits:
commit c7660cc543903c26c30d22e70e42deab9573c94d
Author: Furkan Ahmet Kara <furkanahmetkara.fk at gmail.com>
Date:   Sat Oct 21 23:36:44 2017 +0300

    tdf#112689 - Replace chained O(U)StringBuffer::append() with operator+
    
    Change-Id: If0ed3929f8faab187327b90e63014720e287e501
    Reviewed-on: https://gerrit.libreoffice.org/43681
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Muhammet Kara <muhammet.kara at pardus.org.tr>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sc/source/ui/dbgui/foptmgr.cxx b/sc/source/ui/dbgui/foptmgr.cxx
index b96c24b876ea..05c6bd062c1c 100644
--- a/sc/source/ui/dbgui/foptmgr.cxx
+++ b/sc/source/ui/dbgui/foptmgr.cxx
@@ -96,7 +96,7 @@ void ScFilterOptionsMgr::Init()
                                                 rQueryData.nRow2,
                                                 pViewData->GetTabNo() ) );
         ScDBCollection* pDBColl     = pDoc->GetDBCollection();
-        OUStringBuffer theDbArea;
+        OUString theDbArea;
         OUString   theDbName(STR_DB_LOCAL_NONAME);
         const formula::FormulaGrammar::AddressConvention eConv = pDoc->GetAddressConvention();
 
@@ -149,9 +149,9 @@ void ScFilterOptionsMgr::Init()
 
         if ( theDbName != STR_DB_LOCAL_NONAME )
         {
-            theDbArea.append(" (");
-            theDbArea.append(theDbName).append(')');
-            pFtDbArea->SetText( theDbArea.makeStringAndClear() );
+            theDbArea += " (" + theDbName + ")";
+
+            pFtDbArea->SetText( theDbArea );
         }
         else
         {
diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx
index 7b09da585859..9fe9035e2e6a 100644
--- a/vcl/source/uitest/uiobject.cxx
+++ b/vcl/source/uitest/uiobject.cxx
@@ -246,22 +246,20 @@ std::vector<KeyEvent> generate_key_events_from_keycode(const OUString& rStr)
 
 OUString to_string(const Point& rPos)
 {
-    OUStringBuffer aBuffer;
-    aBuffer.append(OUString::number(rPos.X()));
-    aBuffer.append("x");
-    aBuffer.append(OUString::number(rPos.Y()));
+    OUString sStr = OUString::number(rPos.X())
+                  + "x"
+                  + OUString::number(rPos.Y());
 
-    return aBuffer.makeStringAndClear();
+    return sStr;
 }
 
 OUString to_string(const Size& rSize)
 {
-    OUStringBuffer aBuffer;
-    aBuffer.append(rSize.Width());
-    aBuffer.append("x");
-    aBuffer.append(rSize.Height());
+    OUString sStr = OUString::number(rSize.Width())
+                  + "x"
+                  + OUString::number(rSize.Height());
 
-    return aBuffer.makeStringAndClear();
+    return sStr;
 }
 
 }


More information about the Libreoffice-commits mailing list