summaryrefslogtreecommitdiff
path: root/oox/qa/unit
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-06-26 16:16:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-06-27 13:10:44 +0200
commite266d448f45348f27f8291ea5d0542747d7c8168 (patch)
tree0d6d14e94d9bf25aeeb4ef21630ee72c10681645 /oox/qa/unit
parent05c6cdb144d1732ca51d463845fa6ddef7c08265 (diff)
loplugin:stringstatic look for more strings
that can be initialised at compile-time instead of runtime Change-Id: I08d516fdc13a3a79f93c079f89ac44cbc7a1ed71 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153620 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox/qa/unit')
-rw-r--r--oox/qa/unit/export.cxx2
-rw-r--r--oox/qa/unit/mcgr.cxx8
2 files changed, 5 insertions, 5 deletions
diff --git a/oox/qa/unit/export.cxx b/oox/qa/unit/export.cxx
index 9b62dc337c1b..042f0cd4ffaa 100644
--- a/oox/qa/unit/export.cxx
+++ b/oox/qa/unit/export.cxx
@@ -920,7 +920,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFontworkDirectColor)
// Examine the saved markup.
xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
- const OString sElement = "//w:txbxContent/w:p/w:r/w:rPr/";
+ static constexpr OStringLiteral sElement = "//w:txbxContent/w:p/w:r/w:rPr/";
// Make sure the fallback in <w:color> has correct value.
assertXPath(pXmlDoc, sElement + "w:color", "val", "2E8B57");
diff --git a/oox/qa/unit/mcgr.cxx b/oox/qa/unit/mcgr.cxx
index 1fb06bb3f1f1..1158da7fc35e 100644
--- a/oox/qa/unit/mcgr.cxx
+++ b/oox/qa/unit/mcgr.cxx
@@ -34,7 +34,7 @@ CPPUNIT_TEST_FIXTURE(TestMCGR, testFontworkColorGradient)
// linear gradient with 30deg angle
assertXPath(pXmlDoc, "//a:r/a:rPr/a:gradFill/a:lin", "ang", "3600000");
// three color stops, no transparency
- const OString sPath = "//a:r/a:rPr/a:gradFill/a:gsLst/";
+ static constexpr OStringLiteral sPath = "//a:r/a:rPr/a:gradFill/a:gsLst/";
assertXPath(pXmlDoc, sPath + "a:gs", 3);
assertXPath(pXmlDoc, sPath + "a:gs[1]", "pos", "0");
assertXPath(pXmlDoc, sPath + "a:gs[1]/a:srgbClr", "val", "ff1493");
@@ -57,7 +57,7 @@ CPPUNIT_TEST_FIXTURE(TestMCGR, testFontworkColorGradientWord)
// linear gradient with 30deg angle
assertXPath(pXmlDoc, "//w14:lin", "ang", "3600000");
// three color stops, no transparency
- const OString sPath = "//w14:gradFill/w14:gsLst/";
+ static constexpr OStringLiteral sPath = "//w14:gradFill/w14:gsLst/";
assertXPath(pXmlDoc, sPath + "w14:gs", 3);
assertXPath(pXmlDoc, sPath + "w14:gs[1]", "pos", "0");
assertXPath(pXmlDoc, sPath + "w14:gs[1]/w14:srgbClr", "val", "ff1493");
@@ -88,7 +88,7 @@ CPPUNIT_TEST_FIXTURE(TestMCGR, testStepCount)
// Without the fix the colors in the sections were wrong. And when opening a file with StepCount
// and saving it immediately to pptx, a continuous gradient might be produced.
- const OString sPath = "//a:gradFill/a:gsLst/";
+ static constexpr OStringLiteral sPath = "//a:gradFill/a:gsLst/";
// The default way of load and save would have produced 2 stops, but we need start stop, end stop
// and 3*2 inner stops.
assertXPath(pXmlDoc, sPath + "a:gs", 8);
@@ -115,7 +115,7 @@ CPPUNIT_TEST_FIXTURE(TestMCGR, testAxialColorLinearTrans)
// method will be changed, the test needs to be adjusted.
xmlDocUniquePtr pXmlDoc = parseExport("ppt/slides/slide1.xml");
- const OString sPath = "//a:gradFill/a:gsLst/";
+ static constexpr OStringLiteral sPath = "//a:gradFill/a:gsLst/";
assertXPath(pXmlDoc, sPath + "a:gs", 3);
assertXPath(pXmlDoc, sPath + "a:gs[1]", "pos", "0");
assertXPath(pXmlDoc, sPath + "a:gs[1]/a:srgbClr", "val", "00ffff");