summaryrefslogtreecommitdiff
path: root/basegfx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-01-08 19:54:55 +0000
committerCaolán McNamara <caolanm@redhat.com>2021-01-09 13:01:49 +0100
commitac396f2f6b058ddff8c394443669b8c5d8b97b71 (patch)
treefc5120838a69ced58c3cd2333718ffeb6d4adf67 /basegfx
parent0c20b68149797c8b0779534a8e0cb9045085d451 (diff)
fix coverity parse errors
Change-Id: I3a1179947704452e3ffec02be59d0f7bf0b75ab0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109017 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'basegfx')
-rw-r--r--basegfx/test/SvgPathImportExport.cxx10
-rw-r--r--basegfx/test/boxclipper.cxx2
-rw-r--r--basegfx/test/clipstate.cxx2
3 files changed, 7 insertions, 7 deletions
diff --git a/basegfx/test/SvgPathImportExport.cxx b/basegfx/test/SvgPathImportExport.cxx
index 7fa0468e7042..955c47b239f2 100644
--- a/basegfx/test/SvgPathImportExport.cxx
+++ b/basegfx/test/SvgPathImportExport.cxx
@@ -116,7 +116,7 @@ public:
CPPUNIT_ASSERT_MESSAGE("importing simple rectangle from SVG-D",
utils::importFromSvgD( aPoly, aPath0, false, nullptr ));
aExport = utils::exportToSvgD( aPoly, true, true, false );
- static const OUStringLiteral sExportString = u"m10 10h-20v-20h20z";
+ static constexpr OUStringLiteral sExportString = u"m10 10h-20v-20h20z";
CPPUNIT_ASSERT_EQUAL_MESSAGE("exporting rectangle to SVG-D",
OUString(sExportString), aExport );
CPPUNIT_ASSERT_MESSAGE("importing simple rectangle from SVG-D (round-trip",
@@ -143,7 +143,7 @@ public:
// so for correct unit test i add the new exported string here as sExportStringSimpleBezier
// and compare to it.
- static const OUStringLiteral sExportStringSimpleBezier =
+ static constexpr OUStringLiteral sExportStringSimpleBezier =
u"m11430 0c-8890 3810 5715 6985 5715 6985"
"l-17145-1905c0 0 22860-10160 16510 6350"
"s-3810-11430-3810-11430z";
@@ -164,7 +164,7 @@ public:
// same here, the corrected export with the corrected B2DPolygon is simply more efficient,
// so i needed to change the compare string. Also adding the re-import comparison below.
- static const OUStringLiteral sExportString1 =
+ static constexpr OUStringLiteral sExportString1 =
u"m1917 1114c-89-189-233-284-430-284-167 0-306 91-419 273s-170 370-17"
"0 564c0 145 33 259 98 342 65 84 150 126 257 126q115.5 0 231-57s147-97 210-176 99-143 109-190c38-199 76-398 114"
"-598zm840 1646c-133 73-312 139-537 197-225 57-440 86-644 87-483-1-866-132-1150-392-284-261-426-619-426-1076 0-"
@@ -187,7 +187,7 @@ public:
CPPUNIT_ASSERT_MESSAGE("importing complex polygon from SVG-D",
utils::importFromSvgD( aPoly, aPath3, false, nullptr ));
aExport = utils::exportToSvgD( aPoly, true, true, false );
- static const OUStringLiteral sExportString2 =
+ static constexpr OUStringLiteral sExportString2 =
u"m1598 125h306v2334h-306v-1105h-1293v1105h-305v-2334h305v973h1293"
"zm2159 1015 78-44 85 235-91 47-91 40-90 34-90 29-89 21-88 16-88 10-88 3-102-4-97"
"-12-91-19-85-26-40-16-39-18-38-20-36-22-34-24-33-26-32-27-30-30-29-31-27-33-25-3"
@@ -220,7 +220,7 @@ public:
utils::createPolygonFromRect( B2DRange(0.0,0.0,4000.0,4000.0) ));
aExport = utils::exportToSvgD( B2DPolyPolygon(aRect), false, false, false );
- static const OUStringLiteral sExportStringRect = u"M0 0H4000V4000H0Z";
+ static constexpr OUStringLiteral sExportStringRect = u"M0 0H4000V4000H0Z";
CPPUNIT_ASSERT_EQUAL_MESSAGE("exporting to rectangle svg-d string",
OUString(sExportStringRect), aExport);
}
diff --git a/basegfx/test/boxclipper.cxx b/basegfx/test/boxclipper.cxx
index cca5cabf3766..8aaa45be9fbc 100644
--- a/basegfx/test/boxclipper.cxx
+++ b/basegfx/test/boxclipper.cxx
@@ -155,7 +155,7 @@ public:
aRandomIntersections.appendElement( aRandomRange, B2VectorOrientation::Negative );
}
#else
- static const OUStringLiteral randomSvg=u"m394 783h404v57h-404zm-197-505h571v576h-571zm356-634h75v200h-75zm-40-113h403v588h-403zm93-811h111v494h-111zm-364-619h562v121h-562zm-134-8h292v27h-292zm110 356h621v486h-621zm78-386h228v25h-228zm475-345h201v201h-201zm-2-93h122v126h-122zm-417-243h567v524h-567zm-266-738h863v456h-863zm262-333h315v698h-315zm-328-826h43v393h-43zm830-219h120v664h-120zm-311-636h221v109h-221zm-500 137h628v19h-628zm681-94h211v493h-211zm-366-646h384v355h-384zm-189-199h715v247h-715zm165-459h563v601h-563zm258-479h98v606h-98zm270-517h65v218h-65zm-44-259h96v286h-96zm-599-202h705v468h-705zm216-803h450v494h-450zm-150-22h26v167h-26zm-55-599h50v260h-50zm190-278h490v387h-490zm-290-453h634v392h-634zm257 189h552v300h-552zm-151-690h136v455h-136zm12-597h488v432h-488zm501-459h48v39h-48zm-224-112h429v22h-429zm-281 102h492v621h-492zm519-158h208v17h-208zm-681-563h56v427h-56zm126-451h615v392h-615zm-47-410h598v522h-598zm-32 316h79v110h-79zm-71-129h18v127h-18zm126-993h743v589h-743zm211-430h428v750h-428zm61-554h100v220h-100zm-353-49h658v157h-658zm778-383h115v272h-115zm-249-541h119v712h-119zm203 86h94v40h-94z";
+ static constexpr OUStringLiteral randomSvg=u"m394 783h404v57h-404zm-197-505h571v576h-571zm356-634h75v200h-75zm-40-113h403v588h-403zm93-811h111v494h-111zm-364-619h562v121h-562zm-134-8h292v27h-292zm110 356h621v486h-621zm78-386h228v25h-228zm475-345h201v201h-201zm-2-93h122v126h-122zm-417-243h567v524h-567zm-266-738h863v456h-863zm262-333h315v698h-315zm-328-826h43v393h-43zm830-219h120v664h-120zm-311-636h221v109h-221zm-500 137h628v19h-628zm681-94h211v493h-211zm-366-646h384v355h-384zm-189-199h715v247h-715zm165-459h563v601h-563zm258-479h98v606h-98zm270-517h65v218h-65zm-44-259h96v286h-96zm-599-202h705v468h-705zm216-803h450v494h-450zm-150-22h26v167h-26zm-55-599h50v260h-50zm190-278h490v387h-490zm-290-453h634v392h-634zm257 189h552v300h-552zm-151-690h136v455h-136zm12-597h488v432h-488zm501-459h48v39h-48zm-224-112h429v22h-429zm-281 102h492v621h-492zm519-158h208v17h-208zm-681-563h56v427h-56zm126-451h615v392h-615zm-47-410h598v522h-598zm-32 316h79v110h-79zm-71-129h18v127h-18zm126-993h743v589h-743zm211-430h428v750h-428zm61-554h100v220h-100zm-353-49h658v157h-658zm778-383h115v272h-115zm-249-541h119v712h-119zm203 86h94v40h-94z";
B2DPolyPolygon randomPoly;
CPPUNIT_ASSERT(utils::importFromSvgD(randomPoly, randomSvg, false, nullptr));
for (auto const& aPolygon : randomPoly)
diff --git a/basegfx/test/clipstate.cxx b/basegfx/test/clipstate.cxx
index 94c0246d8312..94cb6b3a2920 100644
--- a/basegfx/test/clipstate.cxx
+++ b/basegfx/test/clipstate.cxx
@@ -127,7 +127,7 @@ public:
{
utils::B2DClipState aMixedClip;
- static const OUStringLiteral unionSvg=u"m100 10v90h-90v10h-20v-10h-90v-90h-10v-20h10v-90h90v-10h20v10h90v90h10v20z";
+ static constexpr OUStringLiteral unionSvg=u"m100 10v90h-90v10h-20v-10h-90v-90h-10v-20h10v-90h90v-10h20v10h90v90h10v20z";
B2DPolyPolygon aTmp1;
CPPUNIT_ASSERT(utils::importFromSvgD(aTmp1, unionSvg, false, nullptr));