summaryrefslogtreecommitdiff
path: root/test/source/sheet/xsheetauditing.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-10-13 08:47:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-14 08:26:14 +0200
commit9b5dad13b56bdde7c40970351af3da3a2c3c9350 (patch)
treeabfd4b02743a0e6a93c51c026f4c53f0e21100bc /test/source/sheet/xsheetauditing.cxx
parentfa71320329999c968feb16ff65be328b5b8ff5e4 (diff)
loplugin:stringadd look for unnecessary temporaries
which defeat the *StringConcat optimisation. Also make StringConcat conversions treat a nullptr as an empty string, to match the O*String(char*) constructors. Change-Id: If45f5b4b6a535c97bfeeacd9ec472a7603a52e5b Reviewed-on: https://gerrit.libreoffice.org/80724 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'test/source/sheet/xsheetauditing.cxx')
-rw-r--r--test/source/sheet/xsheetauditing.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/source/sheet/xsheetauditing.cxx b/test/source/sheet/xsheetauditing.cxx
index 3e832413ffe4..61e96d09d92f 100644
--- a/test/source/sheet/xsheetauditing.cxx
+++ b/test/source/sheet/xsheetauditing.cxx
@@ -87,7 +87,8 @@ void XSheetAuditing::testShowErrors()
uno::Reference<sheet::XSpreadsheet> xSheet(xAuditing, UNO_QUERY_THROW);
uno::Reference<table::XCell> xCell = xSheet->getCellByPosition(7, 6);
xCell->setValue(-9);
- xCell->setFormula("=SQRT(" + OUString(static_cast<char>('A' + 7)) + OUString::number(7) + ")");
+ xCell->setFormula("=SQRT(" + OUStringLiteral1(static_cast<char>('A' + 7)) + OUString::number(7)
+ + ")");
uno::Reference<text::XText> xText(xCell, UNO_QUERY_THROW);
CPPUNIT_ASSERT_EQUAL_MESSAGE("No error code", OUString("Err:522"), xText->getString());