diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2023-10-13 08:44:49 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2023-10-15 21:15:49 +0200 |
commit | b4844c310bd9897fef59e8a4da0513100ea86096 (patch) | |
tree | 379a43d012894ff06d29d79c7d4d8009b7853501 /sd/qa | |
parent | 8797ba5e5d63151837ba443e1aea9d0997b6b7ab (diff) |
Repurpose loplugin:stringstatic for O[U]String vars that can be constexpr
...now that warning about O[U]String vars that could be O[U]StringLiteral is no
longer useful
Change-Id: I389e72038171f28482049b41f6224257dd11f452
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157992
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sd/qa')
-rw-r--r-- | sd/qa/unit/export-tests-ooxml2.cxx | 7 | ||||
-rw-r--r-- | sd/qa/unit/export-tests.cxx | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/sd/qa/unit/export-tests-ooxml2.cxx b/sd/qa/unit/export-tests-ooxml2.cxx index c075d54d7ca4..625c04953006 100644 --- a/sd/qa/unit/export-tests-ooxml2.cxx +++ b/sd/qa/unit/export-tests-ooxml2.cxx @@ -727,8 +727,6 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testPresetShapesExport) save("Impress Office Open XML"); xmlDocUniquePtr pXmlDocCT = parseExport("ppt/slides/slide1.xml"); - const OString sPattern( - "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:prstGeom[@prst='_T_']/a:avLst/a:gd[_N_]"); static constexpr OStringLiteral sT("_T_"); static constexpr OStringLiteral sN("_N_"); static constexpr OStringLiteral sPropertyName("name"); @@ -742,7 +740,10 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest2, testPresetShapesExport) && o3tl::starts_with(sShapeTypeAndValues[i], "adj"); ++j) { - OString sXPath = sPattern.replaceFirst(sT, sType).replaceFirst(sN, OString::number(j)); + OString sXPath + = "/p:sld/p:cSld/p:spTree/p:sp/p:spPr/a:prstGeom[@prst='_T_']/a:avLst/a:gd[_N_]"_ostr + .replaceFirst(sT, sType) + .replaceFirst(sN, OString::number(j)); assertXPath(pXmlDocCT, sXPath, sPropertyName, OUString::createFromAscii(sShapeTypeAndValues[i++])); assertXPath(pXmlDocCT, sXPath, sPropertyFmla, diff --git a/sd/qa/unit/export-tests.cxx b/sd/qa/unit/export-tests.cxx index 92971d4b4221..9d9ba03f14a9 100644 --- a/sd/qa/unit/export-tests.cxx +++ b/sd/qa/unit/export-tests.cxx @@ -736,7 +736,7 @@ CPPUNIT_TEST_FIXTURE(SdExportTest, testLinkedGraphicRT) // Check if the graphic has been imported correctly (before doing the export/import run) { - const OString sFailedImportMessage = "Failed to correctly import the document"; + constexpr OString sFailedImportMessage = "Failed to correctly import the document"_ostr; SdXImpressDocument* pXImpressDocument = dynamic_cast<SdXImpressDocument*>(mxComponent.get()); CPPUNIT_ASSERT(pXImpressDocument); |