summaryrefslogtreecommitdiff
path: root/sc/qa
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-10-24 15:43:06 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-10-24 17:17:46 +0200
commit6d6fad522a2cd6a2959ea774969a86288f5a3cb7 (patch)
tree392503346dc17a8573f4a33c51155ffdb6f95cfa /sc/qa
parentaaff73401318a7fd1b3e936555f933538b2407bc (diff)
Introduce OStringChar
...similar to OUStringChar, to be used in string concatenation expressions. And enable the corresponding loplugin:stringadd check, and fix its findings. Change-Id: I35ebb2253ba82bda6c98ae6ebd2ad4f27cf9abf9 Reviewed-on: https://gerrit.libreoffice.org/81456 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sc/qa')
-rw-r--r--sc/qa/unit/opencl-test.cxx4
-rw-r--r--sc/qa/unit/ucalc_sort.cxx4
2 files changed, 4 insertions, 4 deletions
diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx
index 2cb7667751cf..abf87e6b33bd 100644
--- a/sc/qa/unit/opencl-test.cxx
+++ b/sc/qa/unit/opencl-test.cxx
@@ -738,10 +738,10 @@ void ScOpenCLTest::testSystematic()
double fExcel = rDoc.GetValue(ScAddress(j, nBVertBegin + (i - nAVertBegin), 0));
const OString sFailedMessage =
- OString(static_cast<sal_Char>('A'+j)) +
+ OStringChar(static_cast<sal_Char>('A'+j)) +
OString::number(i+1) +
"!=" +
- OString(static_cast<sal_Char>('A'+j)) +
+ OStringChar(static_cast<sal_Char>('A'+j)) +
OString::number(nBVertBegin+(i-nAVertBegin)+1);
CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE(sFailedMessage.getStr(), fExcel, fLibre, 1e-10);
}
diff --git a/sc/qa/unit/ucalc_sort.cxx b/sc/qa/unit/ucalc_sort.cxx
index a527fce73ac0..bc44ac2e9ddc 100644
--- a/sc/qa/unit/ucalc_sort.cxx
+++ b/sc/qa/unit/ucalc_sort.cxx
@@ -1147,7 +1147,7 @@ void Test::testSortRefUpdate4_Impl()
{
for (SCCOL nCol=0; nCol < 4; ++nCol)
{
- ASSERT_FORMULA_EQUAL(*m_pDoc, ScAddress(nCol,nRow+1,0), aCheck[nRow][nCol], OString("Wrong formula in " + OString('A'+nCol) + OString::number(nRow+2) + ".").getStr());
+ ASSERT_FORMULA_EQUAL(*m_pDoc, ScAddress(nCol,nRow+1,0), aCheck[nRow][nCol], OString("Wrong formula in " + OStringChar(char('A'+nCol)) + OString::number(nRow+2) + ".").getStr());
}
}
@@ -1218,7 +1218,7 @@ void Test::testSortRefUpdate4_Impl()
{
for (SCCOL nCol=0; nCol < 4; ++nCol)
{
- ASSERT_FORMULA_EQUAL(*m_pDoc, ScAddress(nCol,nRow+1,0), aCheck[nRow][nCol], OString("Wrong formula in " + OString('A'+nCol) + OString::number(nRow+2) + ".").getStr());
+ ASSERT_FORMULA_EQUAL(*m_pDoc, ScAddress(nCol,nRow+1,0), aCheck[nRow][nCol], OString("Wrong formula in " + OStringChar(char('A'+nCol)) + OString::number(nRow+2) + ".").getStr());
}
}
}