diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-12-29 12:19:45 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-12-30 11:06:20 +0100 |
commit | 84b08eaeb7b2e8a61ee0dab79cabae07e2209c3f (patch) | |
tree | ab7ac6da14be5156a3b6701ef3f867fffe27ef7c /sc | |
parent | 188ec34cf157ffee8c63f03f420ca9daafb5ff29 (diff) |
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>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/qa/unit/scshapetest.cxx | 6 | ||||
-rw-r--r-- | sc/qa/unit/subsequent_export-test.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/excel/xeextlst.cxx | 10 |
3 files changed, 11 insertions, 7 deletions
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; } |