[Libreoffice-commits] core.git: chart2/qa dbaccess/qa sc/qa

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Wed Apr 28 07:39:52 UTC 2021


 chart2/qa/extras/chart2dump/chart2dump.cxx      |    2 +-
 dbaccess/qa/unit/embeddeddb_performancetest.cxx |   16 ++++++++--------
 sc/qa/unit/helper/qahelper.cxx                  |   14 ++++++++++----
 3 files changed, 19 insertions(+), 13 deletions(-)

New commits:
commit 2a33a16253d4f7c6ef989cc3a65ef5bd552ac48b
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Apr 27 22:11:01 2021 +0200
Commit:     Tor Lillqvist <tml at collabora.com>
CommitDate: Wed Apr 28 09:39:12 2021 +0200

    loplugin:stringadd
    
    Change-Id: Iacb72f10f5306143390774e0a3ef30f5a5bf5c57
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114761
    Tested-by: Tor Lillqvist <tml at collabora.com>
    Reviewed-by: Tor Lillqvist <tml at collabora.com>

diff --git a/chart2/qa/extras/chart2dump/chart2dump.cxx b/chart2/qa/extras/chart2dump/chart2dump.cxx
index 2ec7ba6f9bcb..aebee0dd8fcc 100644
--- a/chart2/qa/extras/chart2dump/chart2dump.cxx
+++ b/chart2/qa/extras/chart2dump/chart2dump.cxx
@@ -230,7 +230,7 @@ protected:
         OUStringBuffer aBuffer;
         for (const OUString& seqItem : rSeq)
         {
-            aBuffer.append(seqItem).append(";");
+            aBuffer.append(seqItem + ";");
         }
         return aBuffer.makeStringAndClear();
     }
diff --git a/dbaccess/qa/unit/embeddeddb_performancetest.cxx b/dbaccess/qa/unit/embeddeddb_performancetest.cxx
index ec23226d4016..17eaa52aeb9d 100644
--- a/dbaccess/qa/unit/embeddeddb_performancetest.cxx
+++ b/dbaccess/qa/unit/embeddeddb_performancetest.cxx
@@ -134,11 +134,11 @@ void EmbeddedDBPerformanceTest::printTimes(
     const TimeValue* pTime2,
     const TimeValue* pTime3)
 {
-    m_aOutputBuffer
-        .append(getPrintableTimeValue(pTime1)).append("\t")
-        .append(getPrintableTimeValue(pTime2)).append("\t")
-        .append(getPrintableTimeValue(pTime3)).append("\t")
-        .append("\n");
+    m_aOutputBuffer.append(
+        getPrintableTimeValue(pTime1) + "\t" +
+        getPrintableTimeValue(pTime2) + "\t" +
+        getPrintableTimeValue(pTime3) + "\t"
+        "\n");
 }
 
 // TODO: we probably should create a document from scratch instead?
@@ -278,7 +278,7 @@ void EmbeddedDBPerformanceTest::performPreparedStatementInsertTest(
     getTimeDifference(&aStart, &aMiddle, &aTimeInsert);
     getTimeDifference(&aMiddle, &aEnd, &aTimeCommit);
     getTimeDifference(&aStart, &aEnd, &aTimeTotal);
-    m_aOutputBuffer.append("Insert: ").append(rDBName).append("\n");
+    m_aOutputBuffer.append(OUString::Concat("Insert: ") + rDBName + "\n");
     printTimes(&aTimeInsert, &aTimeCommit, &aTimeTotal);
 
     pFile->Close();
@@ -316,7 +316,7 @@ void EmbeddedDBPerformanceTest::performStatementInsertTest(
     getTimeDifference(&aStart, &aMiddle, &aTimeInsert);
     getTimeDifference(&aMiddle, &aEnd, &aTimeCommit);
     getTimeDifference(&aStart, &aEnd, &aTimeTotal);
-    m_aOutputBuffer.append("Insert: ").append(rDBName).append("\n");
+    m_aOutputBuffer.append(OUString::Concat("Insert: ") + rDBName + "\n");
     printTimes(&aTimeInsert, &aTimeCommit, &aTimeTotal);
 
     pFile->Close();
@@ -347,7 +347,7 @@ void EmbeddedDBPerformanceTest::performReadTest(
     getTimeDifference(&aStart, &aMiddle, &aTimeSelect);
     getTimeDifference(&aMiddle, &aEnd, &aTimeIterate);
     getTimeDifference(&aStart, &aEnd, &aTimeTotal);
-    m_aOutputBuffer.append("Read from: ").append(rDBName).append("\n");
+    m_aOutputBuffer.append(OUString::Concat("Read from: ") + rDBName + "\n");
     printTimes(&aTimeSelect, &aTimeIterate, &aTimeTotal);
 }
 
diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index ed13b7058786..4091a75ef6dd 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -657,16 +657,22 @@ void ScBootstrapFixture::createFileURL(
 void ScBootstrapFixture::createCSVPath(const char* aFileBase, OUString& rCSVPath)
 {
     OUStringBuffer aBuffer( m_directories.getSrcRootPath());
-    aBuffer.append(EnsureSeparator(aBuffer)).append(m_aBaseString);
-    aBuffer.append(EnsureSeparator(aBuffer)).append("contentCSV/").appendAscii(aFileBase).append("csv");
+    aBuffer.append(EnsureSeparator(aBuffer));
+    aBuffer.append(m_aBaseString);
+    aBuffer.append(EnsureSeparator(aBuffer));
+    aBuffer.append("contentCSV/").appendAscii(aFileBase).append("csv");
     rCSVPath = aBuffer.makeStringAndClear();
 }
 
 void ScBootstrapFixture::createCSVPath(std::u16string_view aFileBase, OUString& rCSVPath)
 {
     OUStringBuffer aBuffer( m_directories.getSrcRootPath());
-    aBuffer.append(EnsureSeparator(aBuffer)).append(m_aBaseString);
-    aBuffer.append(EnsureSeparator(aBuffer)).append("contentCSV/").append(aFileBase).append("csv");
+    aBuffer.append(EnsureSeparator(aBuffer));
+    aBuffer.append(m_aBaseString);
+    aBuffer.append(EnsureSeparator(aBuffer));
+    aBuffer.append("contentCSV/");
+    aBuffer.append(aFileBase);
+    aBuffer.append("csv");
     rCSVPath = aBuffer.makeStringAndClear();
 }
 


More information about the Libreoffice-commits mailing list