summaryrefslogtreecommitdiff
path: root/sc/qa
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-03-25 19:30:24 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-03-26 11:24:13 +0000
commit86313f053315cd0ba896e494d7bac14d2279c9b4 (patch)
treecc76691f65cb5fa70e86d81293fcdbf0a74f0e76 /sc/qa
parent4938bbcd64e95c9b494bcc32e8a5be3706f00cfa (diff)
loplugin:stringadd in sc
after my patch to merge the bufferadd loplugin into stringadd Change-Id: Ifa70db5be4719fe66d3043e5e49403246f6aa8bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149582 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/qa')
-rw-r--r--sc/qa/unit/helper/qahelper.cxx6
-rw-r--r--sc/qa/unit/subsequent_export_test3.cxx21
2 files changed, 7 insertions, 20 deletions
diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index 27230e0d2b43..dbfb6af398f2 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -131,8 +131,7 @@ void ScModelTestBase::testFile(const OUString& aFileName, ScDocument& rDoc, SCTA
catch (const orcus::parse_error& e)
{
std::cout << "reading csv content file failed: " << e.what() << std::endl;
- OStringBuffer aErrorMsg("csv parser error: ");
- aErrorMsg.append(e.what());
+ OString aErrorMsg = OString::Concat("csv parser error: ") + e.what();
CPPUNIT_ASSERT_MESSAGE(aErrorMsg.getStr(), false);
}
}
@@ -155,8 +154,7 @@ void ScModelTestBase::testCondFile( const OUString& aFileName, ScDocument* pDoc,
catch (const orcus::parse_error& e)
{
std::cout << "reading csv content file failed: " << e.what() << std::endl;
- OStringBuffer aErrorMsg("csv parser error: ");
- aErrorMsg.append(e.what());
+ OString aErrorMsg = OString::Concat("csv parser error: ") + e.what();
CPPUNIT_ASSERT_MESSAGE(aErrorMsg.getStr(), false);
}
}
diff --git a/sc/qa/unit/subsequent_export_test3.cxx b/sc/qa/unit/subsequent_export_test3.cxx
index f07f25b2e3a7..4039f54547ef 100644
--- a/sc/qa/unit/subsequent_export_test3.cxx
+++ b/sc/qa/unit/subsequent_export_test3.cxx
@@ -264,22 +264,11 @@ CPPUNIT_TEST_FIXTURE(ScExportTest3, testBordersExchangeXLSX)
static OUString toString(const ScBigRange& rRange)
{
- OUStringBuffer aBuf;
- aBuf.append("(columns:");
- aBuf.append(rRange.aStart.Col());
- aBuf.append('-');
- aBuf.append(rRange.aEnd.Col());
- aBuf.append(";rows:");
- aBuf.append(rRange.aStart.Row());
- aBuf.append('-');
- aBuf.append(rRange.aEnd.Row());
- aBuf.append(";sheets:");
- aBuf.append(rRange.aStart.Tab());
- aBuf.append('-');
- aBuf.append(rRange.aEnd.Tab());
- aBuf.append(')');
-
- return aBuf.makeStringAndClear();
+ return "(columns:" + OUString::number(rRange.aStart.Col()) + "-"
+ + OUString::number(rRange.aEnd.Col()) + ";rows:" + OUString::number(rRange.aStart.Row())
+ + "-" + OUString::number(rRange.aEnd.Row())
+ + ";sheets:" + OUString::number(rRange.aStart.Tab()) + "-"
+ + OUString::number(rRange.aEnd.Tab()) + ")";
}
CPPUNIT_TEST_FIXTURE(ScExportTest3, testTrackChangesSimpleXLSX)