Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3550

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/50/3550/1

Replace chained O(U)StringBuffer::append() with operator+

Change-Id: I24923acfe693eca63d641b6d685c0f4e3dcd9298
---
M sw/qa/complex/writer/CheckBookmarks.java
M sw/qa/core/uwriter.cxx
2 files changed, 4 insertions(+), 18 deletions(-)



diff --git a/sw/qa/complex/writer/CheckBookmarks.java b/sw/qa/complex/writer/CheckBookmarks.java
index 2a42711..1cb8499 100644
--- a/sw/qa/complex/writer/CheckBookmarks.java
+++ b/sw/qa/complex/writer/CheckBookmarks.java
@@ -70,10 +70,7 @@
             XTextContent xBookmarkAsContent = UnoRuntime.queryInterface(
                 XTextContent.class,
                 xBookmark);
-            buffer.append(sBookmarkname);
-            buffer.append(":");
-            buffer.append(xBookmarkAsContent.getAnchor().getString());
-            buffer.append(";");
+            buffer = buffer + sBookmarkname + ":" + xBookmarkAsContent.getAnchor().getString() + 
";" ;
         }
         java.security.MessageDigest sha1 = java.security.MessageDigest.getInstance("SHA-1");
         sha1.reset();
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx
index 26dded0..b8e5470 100644
--- a/sw/qa/core/uwriter.cxx
+++ b/sw/qa/core/uwriter.cxx
@@ -296,22 +296,14 @@
         {
             ModelToViewHelper aModelToViewHelper(*pTxtNode, HIDEINVISIBLE);
             OUString sViewText = aModelToViewHelper.getViewText();
-            OUStringBuffer aBuffer;
-            aBuffer.append("AAAAA CCCCC ");
-            aBuffer.append(CH_TXTATR_BREAKWORD);
-            aBuffer.append(" DDDDD");
+            OUStringBuffer aBuffer = "AAAAA CCCCC " + CH_TXTATR_BREAKWORD + " DDDDD";
             CPPUNIT_ASSERT(sViewText == aBuffer.makeStringAndClear());
         }
 
         {
             ModelToViewHelper aModelToViewHelper(*pTxtNode, HIDEREDLINED);
             OUString sViewText = aModelToViewHelper.getViewText();
-            OUStringBuffer aBuffer;
-            aBuffer.append("AAAABB ");
-            aBuffer.append(CH_TXTATR_BREAKWORD);
-            aBuffer.append(" CCCCC ");
-            aBuffer.append(CH_TXTATR_BREAKWORD);
-            aBuffer.append(" DDDDD");
+            OUStringBuffer aBuffer = "AAAABB " + CH_TXTATR_BREAKWORD + " CCCCC " + 
CH_TXTATR_BREAKWORD + " DDDDD" ;
             CPPUNIT_ASSERT(sViewText == aBuffer.makeStringAndClear());
         }
 
@@ -330,10 +322,7 @@
         {
             ModelToViewHelper aModelToViewHelper(*pTxtNode, HIDEINVISIBLE | HIDEREDLINED);
             OUString sViewText = aModelToViewHelper.getViewText();
-            OUStringBuffer aBuffer;
-            aBuffer.append("AAAACCCCC ");
-            aBuffer.append(CH_TXTATR_BREAKWORD);
-            aBuffer.append(" DDDDD");
+            OUStringBuffer aBuffer = "AAAACCCCC " + CH_TXTATR_BREAKWORD + " DDDDD";
             CPPUNIT_ASSERT(sViewText == aBuffer.makeStringAndClear());
         }
 

-- 
To view, visit https://gerrit.libreoffice.org/3550
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I24923acfe693eca63d641b6d685c0f4e3dcd9298
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Anurag Kanungo <anuragkanungo@gmail.com>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.