summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-04-27 22:11:01 +0200
committerTor Lillqvist <tml@collabora.com>2021-04-28 09:39:12 +0200
commit2a33a16253d4f7c6ef989cc3a65ef5bd552ac48b (patch)
tree70a18c6806af39e911c9d812663424f123d3f70e
parent41ff704cc49b7097b717882616011962ecd7198f (diff)
loplugin:stringadd
Change-Id: Iacb72f10f5306143390774e0a3ef30f5a5bf5c57 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114761 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
-rw-r--r--chart2/qa/extras/chart2dump/chart2dump.cxx2
-rw-r--r--dbaccess/qa/unit/embeddeddb_performancetest.cxx16
-rw-r--r--sc/qa/unit/helper/qahelper.cxx14
3 files changed, 19 insertions, 13 deletions
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();
}