summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-12-29 12:19:45 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-12-30 11:06:20 +0100
commit84b08eaeb7b2e8a61ee0dab79cabae07e2209c3f (patch)
treeab7ac6da14be5156a3b6701ef3f867fffe27ef7c
parentatrflyin.cxx Modify no more (diff)
downloadcore-84b08eaeb7b2e8a61ee0dab79cabae07e2209c3f.tar.gz
core-84b08eaeb7b2e8a61ee0dab79cabae07e2209c3f.zip
loplugin:stringviewparam: operator +, redux
Change-Id: I0790e09f24512d7b205681127eb95ad7dc15a15f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108473 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--chart2/qa/extras/chart2import.cxx2
-rw-r--r--sc/qa/unit/scshapetest.cxx6
-rw-r--r--sc/qa/unit/subsequent_export-test.cxx2
-rw-r--r--sc/source/filter/excel/xeextlst.cxx10
4 files changed, 12 insertions, 8 deletions
diff --git a/chart2/qa/extras/chart2import.cxx b/chart2/qa/extras/chart2import.cxx
index 272639ad069c..57c7227b49c1 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -2806,7 +2806,7 @@ void Chart2ImportTest::testTdfCustomShapePos()
void Chart2ImportTest::testTdf121281()
{
- load("/chart2/qa/extras/data/xlsx/", "incorrect_label_position.xlsx");
+ load(u"/chart2/qa/extras/data/xlsx/", "incorrect_label_position.xlsx");
Reference<chart::XChartDocument> xChartDoc(getChartDocFromSheet(0, mxComponent),
UNO_QUERY_THROW);
Reference<drawing::XDrawPageSupplier> xDrawPageSupplier(xChartDoc, UNO_QUERY_THROW);
diff --git a/sc/qa/unit/scshapetest.cxx b/sc/qa/unit/scshapetest.cxx
index d9fa04683ea6..727997a8c8c0 100644
--- a/sc/qa/unit/scshapetest.cxx
+++ b/sc/qa/unit/scshapetest.cxx
@@ -144,7 +144,7 @@ void ScShapeTest::testTdf137033_FlipHori_Resize()
// Load a document, which has a rotated custom shape, which is horizontal flipped. Error was, that
// if such shape was anchored "resize with cell", then after save and reload it was destorted.
OUString aFileURL;
- createFileURL("tdf137033_FlipHoriRotCustomShape.ods", aFileURL);
+ createFileURL(u"tdf137033_FlipHoriRotCustomShape.ods", aFileURL);
uno::Reference<css::lang::XComponent> xComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT(xComponent.is());
@@ -203,7 +203,7 @@ void ScShapeTest::testTdf137033_RotShear_ResizeHide()
// Load a document, which has a rotated and sheared shape, anchored to cell with resize.
OUString aFileURL;
- createFileURL("tdf137033_RotShearResizeAnchor.ods", aFileURL);
+ createFileURL(u"tdf137033_RotShearResizeAnchor.ods", aFileURL);
uno::Reference<css::lang::XComponent> xComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT(xComponent.is());
@@ -278,7 +278,7 @@ void ScShapeTest::testTdf137033_RotShear_Hide()
// Load a document, which has a rotated and sheared shape, anchored to cell, without resize.
OUString aFileURL;
- createFileURL("tdf137033_RotShearCellAnchor.ods", aFileURL);
+ createFileURL(u"tdf137033_RotShearCellAnchor.ods", aFileURL);
uno::Reference<css::lang::XComponent> xComponent = loadFromDesktop(aFileURL);
CPPUNIT_ASSERT(xComponent.is());
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index f93f24b2688a..0261ea9f2dca 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -521,7 +521,7 @@ void ScExportTest::test()
void ScExportTest::testExtCondFormatXLSX()
{
- ScDocShellRef xShell = loadDoc("tdf139021.", FORMAT_XLSX);
+ ScDocShellRef xShell = loadDoc(u"tdf139021.", FORMAT_XLSX);
CPPUNIT_ASSERT(xShell.is());
ScDocShellRef xDocSh = saveAndReload(&(*xShell), FORMAT_XLSX);
diff --git a/sc/source/filter/excel/xeextlst.cxx b/sc/source/filter/excel/xeextlst.cxx
index 1f4055aff5ea..972a9010b342 100644
--- a/sc/source/filter/excel/xeextlst.cxx
+++ b/sc/source/filter/excel/xeextlst.cxx
@@ -7,6 +7,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <xeextlst.hxx>
#include <xeroot.hxx>
#include <xestyle.hxx>
@@ -164,7 +168,7 @@ bool RequiresFixedFormula(ScConditionMode eMode)
return false;
}
-OString GetFixedFormula(ScConditionMode eMode, const ScAddress& rAddress, const OString& rText)
+OString GetFixedFormula(ScConditionMode eMode, const ScAddress& rAddress, std::string_view rText)
{
OStringBuffer aBuffer;
XclXmlUtils::ToOString(aBuffer, rAddress);
@@ -176,9 +180,9 @@ OString GetFixedFormula(ScConditionMode eMode, const ScAddress& rAddress, const
case ScConditionMode::EndsWith:
return OString("RIGHT(" + aPos + ",LEN(" + rText + "))=\"" + rText + "\"");
case ScConditionMode::ContainsText:
- return OString("NOT(ISERROR(SEARCH(" + rText + "," + aPos + ")))");
+ return OString(OString::Concat("NOT(ISERROR(SEARCH(") + rText + "," + aPos + ")))");
case ScConditionMode::NotContainsText:
- return OString("ISERROR(SEARCH(" + rText + "," + aPos + "))");
+ return OString(OString::Concat("ISERROR(SEARCH(") + rText + "," + aPos + "))");
default:
break;
}