diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-14 09:40:54 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-15 12:53:22 +0200 |
commit | 75111c745a29552aca864fc218aec9b731e7d106 (patch) | |
tree | 42f21230279e3c999656beddb068090ef5b6d72a /svgio | |
parent | 436f823c7c5497f2b22762cec5849a0ff84c220b (diff) |
loplugin:ostr in svgio
Change-Id: I9869f8558a69d5a6b6ac3165c627b943c00e787e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167653
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'svgio')
-rw-r--r-- | svgio/qa/cppunit/SvgImportTest.cxx | 1470 | ||||
-rw-r--r-- | svgio/qa/cppunit/SvgRead.cxx | 6 | ||||
-rw-r--r-- | svgio/source/svgreader/svgcharacternode.cxx | 2 | ||||
-rw-r--r-- | svgio/source/svgreader/svgfilternode.cxx | 12 | ||||
-rw-r--r-- | svgio/source/svgreader/svgnode.cxx | 2 | ||||
-rw-r--r-- | svgio/source/svgreader/svgstyleattributes.cxx | 4 | ||||
-rw-r--r-- | svgio/source/svgreader/svgsvgnode.cxx | 2 | ||||
-rw-r--r-- | svgio/source/svguno/xsvgparser.cxx | 6 |
8 files changed, 752 insertions, 752 deletions
diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx index dc2aa1a6eaf4..9dc25ac2fb03 100644 --- a/svgio/qa/cppunit/SvgImportTest.cxx +++ b/svgio/qa/cppunit/SvgImportTest.cxx @@ -80,15 +80,15 @@ void Test::checkRectPrimitive(Primitive2DSequence const & rPrimitive) CPPUNIT_ASSERT (pDocument); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor"_ostr, "color"_ostr, "#00cc00"); // rect background color - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "height"_ostr, "100"); // rect background height - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "width"_ostr, "100"); // rect background width - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "minx"_ostr, "10"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "miny"_ostr, "10"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "maxx"_ostr, "110"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "maxy"_ostr, "110"); - assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke/line"_ostr, "color"_ostr, "#ff0000"); // rect stroke color - assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke/line"_ostr, "width"_ostr, "3"); // rect stroke width + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor"_ostr, "color"_ostr, u"#00cc00"_ustr); // rect background color + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "height"_ostr, u"100"_ustr); // rect background height + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "width"_ostr, u"100"_ustr); // rect background width + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "minx"_ostr, u"10"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "miny"_ostr, u"10"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "maxx"_ostr, u"110"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "maxy"_ostr, u"110"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke/line"_ostr, "color"_ostr, u"#ff0000"_ustr); // rect stroke color + assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke/line"_ostr, "width"_ostr, u"3"_ustr); // rect stroke width } namespace @@ -153,7 +153,7 @@ CPPUNIT_TEST_FIXTURE(Test, testSymbol) // - Expected: 1 // - Actual : 2 // number of nodes is incorrect - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor"_ostr, "color"_ostr, "#00d000"); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor"_ostr, "color"_ostr, u"#00d000"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf150124) @@ -181,53 +181,53 @@ CPPUNIT_TEST_FIXTURE(Test, testNormalBlend) xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/normalBlend.svg"); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "height"_ostr, "170"); + "/primitive2D/transform/transform/bitmap"_ostr, "height"_ostr, u"170"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "width"_ostr, "170"); + "/primitive2D/transform/transform/bitmap"_ostr, "width"_ostr, u"170"_ustr); assertXPath(pDocument, "/primitive2D/transform/transform/bitmap/data"_ostr, 170); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy11"_ostr, "170"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy11"_ostr, u"170"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy12"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy12"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy13"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy13"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy21"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy21"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy22"_ostr, "170"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy22"_ostr, u"170"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy23"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy23"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy31"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy31"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy32"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy32"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy33"_ostr, "1"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy33"_ostr, u"1"_ustr); // Check the colors in the diagonal OUString sDataRow = getXPath(pDocument, "/primitive2D/transform/transform/bitmap/data[40]"_ostr, "row"_ostr); std::vector<OUString> aPixels = comphelper::string::split(sDataRow, ','); - CPPUNIT_ASSERT_EQUAL(OUString("ffd700"), aPixels[40]); + CPPUNIT_ASSERT_EQUAL(u"ffd700"_ustr, aPixels[40]); sDataRow = getXPath(pDocument, "/primitive2D/transform/transform/bitmap/data[85]"_ostr, "row"_ostr); aPixels = comphelper::string::split(sDataRow, ','); - CPPUNIT_ASSERT_EQUAL(OUString("ffd700"), aPixels[85]); + CPPUNIT_ASSERT_EQUAL(u"ffd700"_ustr, aPixels[85]); sDataRow = getXPath(pDocument, "/primitive2D/transform/transform/bitmap/data[130]"_ostr, "row"_ostr); aPixels = comphelper::string::split(sDataRow, ','); - CPPUNIT_ASSERT_EQUAL(OUString("8a2be2"), aPixels[130]); + CPPUNIT_ASSERT_EQUAL(u"8a2be2"_ustr, aPixels[130]); } CPPUNIT_TEST_FIXTURE(Test, testFeColorMatrix) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/filterFeColorMatrix.svg"); - assertXPath(pDocument, "/primitive2D/transform/mask/modifiedColor[1]"_ostr, "modifier"_ostr, "matrix"); - assertXPath(pDocument, "/primitive2D/transform/mask/modifiedColor[2]"_ostr, "modifier"_ostr, "saturate"); - assertXPath(pDocument, "/primitive2D/transform/mask/modifiedColor[3]"_ostr, "modifier"_ostr, "hueRotate"); - assertXPath(pDocument, "/primitive2D/transform/mask/modifiedColor[4]"_ostr, "modifier"_ostr, "luminance_to_alpha"); + assertXPath(pDocument, "/primitive2D/transform/mask/modifiedColor[1]"_ostr, "modifier"_ostr, u"matrix"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/modifiedColor[2]"_ostr, "modifier"_ostr, u"saturate"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/modifiedColor[3]"_ostr, "modifier"_ostr, u"hueRotate"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/modifiedColor[4]"_ostr, "modifier"_ostr, u"luminance_to_alpha"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testFilterFeComposite) @@ -258,7 +258,7 @@ CPPUNIT_TEST_FIXTURE(Test, testFilterFeGaussianBlur) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/filterFeGaussianBlur.svg"); - assertXPath(pDocument, "/primitive2D/transform/softedge"_ostr, "radius"_ostr, "5"); + assertXPath(pDocument, "/primitive2D/transform/softedge"_ostr, "radius"_ostr, u"5"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testInFilterAttribute) @@ -266,16 +266,16 @@ CPPUNIT_TEST_FIXTURE(Test, testInFilterAttribute) xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/inFilterAttribute.svg"); // Without the fix in place, the feGaussianBlur and feColorMatrix filter would have been applied - assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy11"_ostr, "1"); - assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy12"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy13"_ostr, "40"); - assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy21"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy22"_ostr, "1"); - assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy23"_ostr, "40"); - assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy31"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy32"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy33"_ostr, "1"); - assertXPath(pDocument, "/primitive2D/transform/transform/polypolygoncolor"_ostr, "color"_ostr, "#ffffff"); + assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy11"_ostr, u"1"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy12"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy13"_ostr, u"40"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy21"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy22"_ostr, u"1"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy23"_ostr, u"40"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy31"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy32"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy33"_ostr, u"1"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform/polypolygoncolor"_ostr, "color"_ostr, u"#ffffff"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testResultFilterAttribute) @@ -283,17 +283,17 @@ CPPUNIT_TEST_FIXTURE(Test, testResultFilterAttribute) xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/resultFilterAttribute.svg"); // Without the fix in place, the feColorMatrix filter would have been applied - assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy11"_ostr, "1"); - assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy12"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy13"_ostr, "40"); - assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy21"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy22"_ostr, "1"); - assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy23"_ostr, "40"); - assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy31"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy32"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy33"_ostr, "1"); - assertXPath(pDocument, "/primitive2D/transform/transform/softedge"_ostr, "radius"_ostr, "2"); - assertXPath(pDocument, "/primitive2D/transform/transform/softedge/polypolygoncolor"_ostr, "color"_ostr, "#ffffff"); + assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy11"_ostr, u"1"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy12"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy13"_ostr, u"40"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy21"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy22"_ostr, u"1"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy23"_ostr, u"40"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy31"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy32"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy33"_ostr, u"1"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform/softedge"_ostr, "radius"_ostr, u"2"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform/softedge/polypolygoncolor"_ostr, "color"_ostr, u"#ffffff"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testFilterFeMerge) @@ -310,38 +310,38 @@ CPPUNIT_TEST_FIXTURE(Test, testFilterFeOffset) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/filterFeOffset.svg"); - assertXPath(pDocument, "/primitive2D/transform/mask/transform"_ostr, "xy11"_ostr, "1"); - assertXPath(pDocument, "/primitive2D/transform/mask/transform"_ostr, "xy12"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/mask/transform"_ostr, "xy13"_ostr, "44"); - assertXPath(pDocument, "/primitive2D/transform/mask/transform"_ostr, "xy21"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/mask/transform"_ostr, "xy22"_ostr, "1"); - assertXPath(pDocument, "/primitive2D/transform/mask/transform"_ostr, "xy23"_ostr, "66"); - assertXPath(pDocument, "/primitive2D/transform/mask/transform"_ostr, "xy31"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/mask/transform"_ostr, "xy32"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/mask/transform"_ostr, "xy33"_ostr, "1"); + assertXPath(pDocument, "/primitive2D/transform/mask/transform"_ostr, "xy11"_ostr, u"1"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/transform"_ostr, "xy12"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/transform"_ostr, "xy13"_ostr, u"44"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/transform"_ostr, "xy21"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/transform"_ostr, "xy22"_ostr, u"1"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/transform"_ostr, "xy23"_ostr, u"66"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/transform"_ostr, "xy31"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/transform"_ostr, "xy32"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/transform"_ostr, "xy33"_ostr, u"1"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testFilterFeFlood) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/filterFeFlood.svg"); - assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence"_ostr, "transparence"_ostr, "50"); - assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence/polypolygoncolor"_ostr, "color"_ostr, "#008000"); - assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence/polypolygoncolor/polypolygon"_ostr, "height"_ostr, "100"); - assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence/polypolygoncolor/polypolygon"_ostr, "width"_ostr, "100"); - assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence/polypolygoncolor/polypolygon"_ostr, "minx"_ostr, "50"); - assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence/polypolygoncolor/polypolygon"_ostr, "miny"_ostr, "50"); + assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence"_ostr, "transparence"_ostr, u"50"_ustr); + assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence/polypolygoncolor"_ostr, "color"_ostr, u"#008000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence/polypolygoncolor/polypolygon"_ostr, "height"_ostr, u"100"_ustr); + assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence/polypolygoncolor/polypolygon"_ostr, "width"_ostr, u"100"_ustr); + assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence/polypolygoncolor/polypolygon"_ostr, "minx"_ostr, u"50"_ustr); + assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence/polypolygoncolor/polypolygon"_ostr, "miny"_ostr, u"50"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testFilterFeDropShadow) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/filterFeDropShadow.svg"); - assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence"_ostr, "transparence"_ostr, "50"); - assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence/shadow"_ostr, "color"_ostr, "#0000ff"); - assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence/shadow"_ostr, "blur"_ostr, "0.2"); - assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence/shadow"_ostr, "blur"_ostr, "0.2"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor"_ostr, "color"_ostr, "#ffc0cb"); + assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence"_ostr, "transparence"_ostr, u"50"_ustr); + assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence/shadow"_ostr, "color"_ostr, u"#0000ff"_ustr); + assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence/shadow"_ostr, "blur"_ostr, u"0.2"_ustr); + assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence/shadow"_ostr, "blur"_ostr, u"0.2"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor"_ostr, "color"_ostr, u"#ffc0cb"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testFilterFeImage) @@ -355,68 +355,68 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf87309) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf87309.svg"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor"_ostr, "color"_ostr, "#000000"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "height"_ostr, "100"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "width"_ostr, "100"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "minx"_ostr, "10"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "miny"_ostr, "10"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "maxx"_ostr, "110"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "maxy"_ostr, "110"); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor"_ostr, "color"_ostr, u"#000000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "height"_ostr, u"100"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "width"_ostr, u"100"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "minx"_ostr, u"10"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "miny"_ostr, u"10"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "maxx"_ostr, u"110"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "maxy"_ostr, u"110"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testFontsizeKeywords) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/FontsizeKeywords.svg"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "fontcolor"_ostr, "#000000"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, "Sample"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "height"_ostr, "9"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "familyname"_ostr, "Times New Roman"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "fontcolor"_ostr, u"#000000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, u"Sample"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "height"_ostr, u"9"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "familyname"_ostr, u"Times New Roman"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "fontcolor"_ostr, "#ffffff"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, "Sample"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "height"_ostr, "11"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "familyname"_ostr, "Times New Roman"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "fontcolor"_ostr, u"#ffffff"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, u"Sample"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "height"_ostr, u"11"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "familyname"_ostr, u"Times New Roman"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "fontcolor"_ostr, "#ffd700"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "text"_ostr, "Sample"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "height"_ostr, "13"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "familyname"_ostr, "Times New Roman"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "fontcolor"_ostr, u"#ffd700"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "text"_ostr, u"Sample"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "height"_ostr, u"13"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "familyname"_ostr, u"Times New Roman"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "fontcolor"_ostr, "#ff0000"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "text"_ostr, "Sample"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "height"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "familyname"_ostr, "Times New Roman"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "fontcolor"_ostr, u"#ff0000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "text"_ostr, u"Sample"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "height"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "familyname"_ostr, u"Times New Roman"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[5]"_ostr, "fontcolor"_ostr, "#ffff00"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[5]"_ostr, "text"_ostr, "Sample"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[5]"_ostr, "height"_ostr, "19"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[5]"_ostr, "familyname"_ostr, "Times New Roman"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[5]"_ostr, "fontcolor"_ostr, u"#ffff00"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[5]"_ostr, "text"_ostr, u"Sample"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[5]"_ostr, "height"_ostr, u"19"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[5]"_ostr, "familyname"_ostr, u"Times New Roman"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[6]"_ostr, "fontcolor"_ostr, "#0000ff"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[6]"_ostr, "text"_ostr, "Sample"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[6]"_ostr, "height"_ostr, "23"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[6]"_ostr, "familyname"_ostr, "Times New Roman"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[6]"_ostr, "fontcolor"_ostr, u"#0000ff"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[6]"_ostr, "text"_ostr, u"Sample"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[6]"_ostr, "height"_ostr, u"23"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[6]"_ostr, "familyname"_ostr, u"Times New Roman"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[7]"_ostr, "fontcolor"_ostr, "#008000"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[7]"_ostr, "text"_ostr, "Sample"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[7]"_ostr, "height"_ostr, "28"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[7]"_ostr, "familyname"_ostr, "Times New Roman"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[7]"_ostr, "fontcolor"_ostr, u"#008000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[7]"_ostr, "text"_ostr, u"Sample"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[7]"_ostr, "height"_ostr, u"28"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[7]"_ostr, "familyname"_ostr, u"Times New Roman"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[8]"_ostr, "fontcolor"_ostr, "#ff7f50"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[8]"_ostr, "text"_ostr, "Sample"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[8]"_ostr, "height"_ostr, "13"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[8]"_ostr, "familyname"_ostr, "Times New Roman"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[8]"_ostr, "fontcolor"_ostr, u"#ff7f50"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[8]"_ostr, "text"_ostr, u"Sample"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[8]"_ostr, "height"_ostr, u"13"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[8]"_ostr, "familyname"_ostr, u"Times New Roman"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[9]"_ostr, "fontcolor"_ostr, "#ffc0cb"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[9]"_ostr, "text"_ostr, "Sample"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[9]"_ostr, "height"_ostr, "19"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[9]"_ostr, "familyname"_ostr, "Times New Roman"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[9]"_ostr, "fontcolor"_ostr, u"#ffc0cb"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[9]"_ostr, "text"_ostr, u"Sample"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[9]"_ostr, "height"_ostr, u"19"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[9]"_ostr, "familyname"_ostr, u"Times New Roman"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[10]"_ostr, "fontcolor"_ostr, "#fffff0"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[10]"_ostr, "text"_ostr, "Sample"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[10]"_ostr, "height"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[9]"_ostr, "familyname"_ostr, "Times New Roman"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[10]"_ostr, "fontcolor"_ostr, u"#fffff0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[10]"_ostr, "text"_ostr, u"Sample"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[10]"_ostr, "height"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[9]"_ostr, "familyname"_ostr, u"Times New Roman"_ustr); } @@ -425,10 +425,10 @@ CPPUNIT_TEST_FIXTURE(Test, testFontsizePercentage) //Check when font-size uses percentage and defined globally xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/FontsizePercentage.svg"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "fontcolor"_ostr, "#000000"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, "Sample"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "height"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "familyname"_ostr, "Times New Roman"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "fontcolor"_ostr, u"#000000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, u"Sample"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "height"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "familyname"_ostr, u"Times New Roman"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testFontsizeRelative) @@ -436,15 +436,15 @@ CPPUNIT_TEST_FIXTURE(Test, testFontsizeRelative) //Check when font-size uses relative units (em,ex) and it's based on its parent's font-size xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/FontsizeRelative.svg"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "fontcolor"_ostr, "#000000"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, "Sample"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "height"_ostr, "50"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "familyname"_ostr, "DejaVu Serif"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "fontcolor"_ostr, u"#000000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, u"Sample"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "height"_ostr, u"50"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "familyname"_ostr, u"DejaVu Serif"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "fontcolor"_ostr, "#000000"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, "Sample"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "height"_ostr, "50"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "familyname"_ostr, "DejaVu Serif"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "fontcolor"_ostr, u"#000000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, u"Sample"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "height"_ostr, u"50"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "familyname"_ostr, u"DejaVu Serif"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf160386) @@ -455,7 +455,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf160386) // - Expected: 1 // - Actual : 11 assertXPath(pDocument, "/primitive2D/transform/textsimpleportion"_ostr, 1); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion"_ostr, "text"_ostr, "Hello!"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion"_ostr, "text"_ostr, u"Hello!"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf145896) @@ -465,9 +465,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf145896) // Without the fix in place, this test would have failed with // - Expected: #ffff00 // - Actual : #000000 - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]"_ostr, "color"_ostr, "#ffff00"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]"_ostr, "color"_ostr, "#008000"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[3]"_ostr, "color"_ostr, "#0000ff"); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]"_ostr, "color"_ostr, u"#ffff00"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]"_ostr, "color"_ostr, u"#008000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[3]"_ostr, "color"_ostr, u"#0000ff"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf156579) @@ -475,7 +475,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf156579) xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf156579.svg"); // Without the fix in place, nothing would be displayed - assertXPath(pDocument, "/primitive2D/transform/mask/transform/polypolygoncolor[1]"_ostr, "color"_ostr, "#0000ff"); + assertXPath(pDocument, "/primitive2D/transform/mask/transform/polypolygoncolor[1]"_ostr, "color"_ostr, u"#0000ff"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf156168) @@ -483,31 +483,31 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf156168) xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf156168.svg"); assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor"_ostr, 8); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]"_ostr, "color"_ostr, "#0000ff"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]"_ostr, "color"_ostr, "#0000ff"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[3]"_ostr, "color"_ostr, "#ff0000"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[4]"_ostr, "color"_ostr, "#ff0000"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[5]"_ostr, "color"_ostr, "#000000"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[6]"_ostr, "color"_ostr, "#000000"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[7]"_ostr, "color"_ostr, "#ff0000"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[8]"_ostr, "color"_ostr, "#ff0000"); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]"_ostr, "color"_ostr, u"#0000ff"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]"_ostr, "color"_ostr, u"#0000ff"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[3]"_ostr, "color"_ostr, u"#ff0000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[4]"_ostr, "color"_ostr, u"#ff0000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[5]"_ostr, "color"_ostr, u"#000000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[6]"_ostr, "color"_ostr, u"#000000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[7]"_ostr, "color"_ostr, u"#ff0000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[8]"_ostr, "color"_ostr, u"#ff0000"_ustr); // Without the fix in place, this test would have failed with // - Expected: 4 // - Actual : 3 assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke"_ostr, 4); - assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke[1]/line"_ostr, "width"_ostr, "5"); + assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke[1]/line"_ostr, "width"_ostr, u"5"_ustr); - assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke[1]/line"_ostr, "color"_ostr, "#00ff00"); - assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke[2]/line"_ostr, "width"_ostr, "5"); + assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke[1]/line"_ostr, "color"_ostr, u"#00ff00"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke[2]/line"_ostr, "width"_ostr, u"5"_ustr); - assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke[2]/line"_ostr, "color"_ostr, "#00ff00"); - assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke[3]/line"_ostr, "width"_ostr, "5"); + assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke[2]/line"_ostr, "color"_ostr, u"#00ff00"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke[3]/line"_ostr, "width"_ostr, u"5"_ustr); - assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke[3]/line"_ostr, "color"_ostr, "#00ff00"); - assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke[4]/line"_ostr, "width"_ostr, "5"); + assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke[3]/line"_ostr, "color"_ostr, u"#00ff00"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke[4]/line"_ostr, "width"_ostr, u"5"_ustr); - assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke[4]/line"_ostr, "color"_ostr, "#00ff00"); + assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke[4]/line"_ostr, "color"_ostr, u"#00ff00"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf160373) @@ -515,7 +515,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf160373) xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf160373.svg"); // Without the fix in place, nothing would be displayed - assertXPath(pDocument, "/primitive2D/transform/transform/polypolygoncolor"_ostr, "color"_ostr, "#0000ff"); + assertXPath(pDocument, "/primitive2D/transform/transform/polypolygoncolor"_ostr, "color"_ostr, u"#0000ff"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf129356) @@ -525,14 +525,14 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf129356) // Without the fix in place, this test would have failed with // - Expected: #008000 // - Actual : #0000ff - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]"_ostr, "color"_ostr, "#008000"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]"_ostr, "color"_ostr, "#008000"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[3]"_ostr, "color"_ostr, "#008000"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[4]"_ostr, "color"_ostr, "#008000"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[5]"_ostr, "color"_ostr, "#008000"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[6]"_ostr, "color"_ostr, "#008000"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[7]"_ostr, "color"_ostr, "#008000"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[8]"_ostr, "color"_ostr, "#008000"); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]"_ostr, "color"_ostr, u"#008000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]"_ostr, "color"_ostr, u"#008000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[3]"_ostr, "color"_ostr, u"#008000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[4]"_ostr, "color"_ostr, u"#008000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[5]"_ostr, "color"_ostr, u"#008000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[6]"_ostr, "color"_ostr, u"#008000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[7]"_ostr, "color"_ostr, u"#008000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[8]"_ostr, "color"_ostr, u"#008000"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf156034) @@ -542,32 +542,32 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf156034) // Without the fix in place, this test would have failed with // - Expected: #008000 // - Actual : #0000ff - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]"_ostr, "color"_ostr, "#008000"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]"_ostr, "color"_ostr, "#008000"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[3]"_ostr, "color"_ostr, "#008000"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[4]"_ostr, "color"_ostr, "#008000"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[5]"_ostr, "color"_ostr, "#008000"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[6]"_ostr, "color"_ostr, "#008000"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[7]"_ostr, "color"_ostr, "#008000"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[8]"_ostr, "color"_ostr, "#008000"); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]"_ostr, "color"_ostr, u"#008000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]"_ostr, "color"_ostr, u"#008000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[3]"_ostr, "color"_ostr, u"#008000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[4]"_ostr, "color"_ostr, u"#008000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[5]"_ostr, "color"_ostr, u"#008000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[6]"_ostr, "color"_ostr, u"#008000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[7]"_ostr, "color"_ostr, u"#008000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[8]"_ostr, "color"_ostr, u"#008000"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf156038) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf156038.svg"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]"_ostr, "color"_ostr, "#0000ff"); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]"_ostr, "color"_ostr, u"#0000ff"_ustr); // Without the fix in place, this test would have failed with // - Expected: #008000 // - Actual : #0000ff - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]"_ostr, "color"_ostr, "#008000"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[3]"_ostr, "color"_ostr, "#0000ff"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[4]"_ostr, "color"_ostr, "#008000"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[5]"_ostr, "color"_ostr, "#0000ff"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[6]"_ostr, "color"_ostr, "#008000"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[7]"_ostr, "color"_ostr, "#0000ff"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[8]"_ostr, "color"_ostr, "#008000"); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]"_ostr, "color"_ostr, u"#008000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[3]"_ostr, "color"_ostr, u"#0000ff"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[4]"_ostr, "color"_ostr, u"#008000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[5]"_ostr, "color"_ostr, u"#0000ff"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[6]"_ostr, "color"_ostr, u"#008000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[7]"_ostr, "color"_ostr, u"#0000ff"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[8]"_ostr, "color"_ostr, u"#008000"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf156018) @@ -577,92 +577,92 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf156018) // Without the fix in place, this test would have failed with // - Expected: #008000 // - Actual : #0000ff - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]"_ostr, "color"_ostr, "#008000"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]"_ostr, "color"_ostr, "#0000ff"); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]"_ostr, "color"_ostr, u"#008000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]"_ostr, "color"_ostr, u"#0000ff"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf156201) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf156201.svg"); - assertXPath(pDocument, "/primitive2D/transform/transform/transform/polypolygoncolor"_ostr, "color"_ostr, "#2f3ba1"); + assertXPath(pDocument, "/primitive2D/transform/transform/transform/polypolygoncolor"_ostr, "color"_ostr, u"#2f3ba1"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf156167) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf156167.svg"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]"_ostr, "color"_ostr, "#ffa500"); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]"_ostr, "color"_ostr, u"#ffa500"_ustr); // Without the fix in place, this test would have failed with // - Expected: #ffa500 // - Actual : #ff0000 - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]"_ostr, "color"_ostr, "#ffa500"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[3]"_ostr, "color"_ostr, "#ffa500"); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]"_ostr, "color"_ostr, u"#ffa500"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[3]"_ostr, "color"_ostr, u"#ffa500"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf155932) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf155932.svg"); - assertXPath(pDocument, "/primitive2D/transform/mask/mask/unifiedtransparence"_ostr, "transparence"_ostr, "50"); - assertXPath(pDocument, "/primitive2D/transform/mask/mask/unifiedtransparence[1]/polypolygoncolor"_ostr, "color"_ostr, "#0000ff"); + assertXPath(pDocument, "/primitive2D/transform/mask/mask/unifiedtransparence"_ostr, "transparence"_ostr, u"50"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/mask/unifiedtransparence[1]/polypolygoncolor"_ostr, "color"_ostr, u"#0000ff"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf97717) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf97717.svg"); - assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence[1]"_ostr, "transparence"_ostr, "50"); + assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence[1]"_ostr, "transparence"_ostr, u"50"_ustr); // Without the fix in place, this test would have failed here since the patch // would have contained two unifiedtransparence - assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence[1]/polypolygoncolor"_ostr, "color"_ostr, "#ccccff"); - assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence[2]"_ostr, "transparence"_ostr, "50"); - assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence[2]/polypolygoncolor"_ostr, "color"_ostr, "#ccccff"); + assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence[1]/polypolygoncolor"_ostr, "color"_ostr, u"#ccccff"_ustr); + assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence[2]"_ostr, "transparence"_ostr, u"50"_ustr); + assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence[2]/polypolygoncolor"_ostr, "color"_ostr, u"#ccccff"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testMarkerOrient) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/MarkerOrient.svg"); - assertXPath(pDocument, "/primitive2D/transform/transform[1]"_ostr, "xy11"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/transform[1]"_ostr, "xy12"_ostr, "1"); - assertXPath(pDocument, "/primitive2D/transform/transform[1]"_ostr, "xy13"_ostr, "7"); - assertXPath(pDocument, "/primitive2D/transform/transform[1]"_ostr, "xy21"_ostr, "-1"); - assertXPath(pDocument, "/primitive2D/transform/transform[1]"_ostr, "xy22"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/transform[1]"_ostr, "xy23"_ostr, "13"); - assertXPath(pDocument, "/primitive2D/transform/transform[1]"_ostr, "xy31"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/transform[1]"_ostr, "xy32"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/transform[1]"_ostr, "xy33"_ostr, "1"); - - assertXPath(pDocument, "/primitive2D/transform/transform[2]"_ostr, "xy11"_ostr, "1"); - assertXPath(pDocument, "/primitive2D/transform/transform[2]"_ostr, "xy12"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/transform[2]"_ostr, "xy13"_ostr, "87"); - assertXPath(pDocument, "/primitive2D/transform/transform[2]"_ostr, "xy21"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/transform[2]"_ostr, "xy22"_ostr, "1"); - assertXPath(pDocument, "/primitive2D/transform/transform[2]"_ostr, "xy23"_ostr, "87"); - assertXPath(pDocument, "/primitive2D/transform/transform[2]"_ostr, "xy31"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/transform[2]"_ostr, "xy32"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/transform[2]"_ostr, "xy33"_ostr, "1"); + assertXPath(pDocument, "/primitive2D/transform/transform[1]"_ostr, "xy11"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform[1]"_ostr, "xy12"_ostr, u"1"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform[1]"_ostr, "xy13"_ostr, u"7"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform[1]"_ostr, "xy21"_ostr, u"-1"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform[1]"_ostr, "xy22"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform[1]"_ostr, "xy23"_ostr, u"13"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform[1]"_ostr, "xy31"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform[1]"_ostr, "xy32"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform[1]"_ostr, "xy33"_ostr, u"1"_ustr); + + assertXPath(pDocument, "/primitive2D/transform/transform[2]"_ostr, "xy11"_ostr, u"1"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform[2]"_ostr, "xy12"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform[2]"_ostr, "xy13"_ostr, u"87"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform[2]"_ostr, "xy21"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform[2]"_ostr, "xy22"_ostr, u"1"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform[2]"_ostr, "xy23"_ostr, u"87"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform[2]"_ostr, "xy31"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform[2]"_ostr, "xy32"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform[2]"_ostr, "xy33"_ostr, u"1"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testContextFill) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/contextFill.svg"); - assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke/line"_ostr, "color"_ostr, "#ff0000"); - assertXPath(pDocument, "/primitive2D/transform/transform/polypolygoncolor"_ostr, "color"_ostr, "#ff0000"); + assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke/line"_ostr, "color"_ostr, u"#ff0000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform/polypolygoncolor"_ostr, "color"_ostr, u"#ff0000"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testContextStroke) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/contextStroke.svg"); - assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke/line"_ostr, "color"_ostr, "#ff0000"); - assertXPath(pDocument, "/primitive2D/transform/transform[1]/polypolygonstroke/line"_ostr, "color"_ostr, "#ff0000"); - assertXPath(pDocument, "/primitive2D/transform/transform[2]/polypolygonstroke/line"_ostr, "color"_ostr, "#ff0000"); - assertXPath(pDocument, "/primitive2D/transform/transform[3]/polypolygonstroke/line"_ostr, "color"_ostr, "#ff0000"); - assertXPath(pDocument, "/primitive2D/transform/transform[4]/polypolygonstroke/line"_ostr, "color"_ostr, "#ff0000"); + assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke/line"_ostr, "color"_ostr, u"#ff0000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform[1]/polypolygonstroke/line"_ostr, "color"_ostr, u"#ff0000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform[2]/polypolygonstroke/line"_ostr, "color"_ostr, u"#ff0000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform[3]/polypolygonstroke/line"_ostr, "color"_ostr, u"#ff0000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform[4]/polypolygonstroke/line"_ostr, "color"_ostr, u"#ff0000"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testMarkerInPresentation) @@ -688,11 +688,11 @@ CPPUNIT_TEST_FIXTURE(Test, testMarkerInCssStyle) // - Actual : 0 assertXPath(pDocument, "/primitive2D/transform/transform/polypolygonstroke/line"_ostr, 20); - assertXPath(pDocument, "/primitive2D/transform/transform[1]/polypolygonstroke/line"_ostr, "color"_ostr, "#008000"); - assertXPath(pDocument, "/primitive2D/transform/transform[1]/polypolygonstroke/line"_ostr, "width"_ostr, "1"); - assertXPath(pDocument, "/primitive2D/transform/transform[1]/polypolygonstroke/line"_ostr, "linejoin"_ostr, "Miter"); - assertXPath(pDocument, "/primitive2D/transform/transform[1]/polypolygonstroke/line"_ostr, "miterangle"_ostr, "29"); - assertXPath(pDocument, "/primitive2D/transform/transform[1]/polypolygonstroke/line"_ostr, "linecap"_ostr, "BUTT"); + assertXPath(pDocument, "/primitive2D/transform/transform[1]/polypolygonstroke/line"_ostr, "color"_ostr, u"#008000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform[1]/polypolygonstroke/line"_ostr, "width"_ostr, u"1"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform[1]/polypolygonstroke/line"_ostr, "linejoin"_ostr, u"Miter"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform[1]/polypolygonstroke/line"_ostr, "miterangle"_ostr, u"29"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform[1]/polypolygonstroke/line"_ostr, "linecap"_ostr, u"BUTT"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTextXmlSpace) @@ -700,14 +700,14 @@ CPPUNIT_TEST_FIXTURE(Test, testTextXmlSpace) //Check tspan fontsize when using relative units xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/textXmlSpace.svg"); - assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[1]"_ostr, "text"_ostr, "a b"); - assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[2]"_ostr, "text"_ostr, "a b"); - assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[3]"_ostr, "text"_ostr, "a b"); - assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[4]"_ostr, "text"_ostr, "ab"); - assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[5]"_ostr, "text"_ostr, " a b "); - assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[6]"_ostr, "text"_ostr, "a b"); - assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[7]"_ostr, "text"_ostr, "a b"); - assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[8]"_ostr, "text"_ostr, "a b"); + assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[1]"_ostr, "text"_ostr, u"a b"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[2]"_ostr, "text"_ostr, u"a b"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[3]"_ostr, "text"_ostr, u"a b"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[4]"_ostr, "text"_ostr, u"ab"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[5]"_ostr, "text"_ostr, u" a b "_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[6]"_ostr, "text"_ostr, u"a b"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[7]"_ostr, "text"_ostr, u"a b"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[8]"_ostr, "text"_ostr, u"a b"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf45771) @@ -715,10 +715,10 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf45771) //Check text fontsize when using relative units xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf45771.svg"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "fontcolor"_ostr, "#000000"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, "Sample"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "height"_ostr, "32"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "familyname"_ostr, "Times New Roman"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "fontcolor"_ostr, u"#000000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, u"Sample"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "height"_ostr, u"32"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "familyname"_ostr, u"Times New Roman"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf155833) @@ -733,10 +733,10 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf97941) //Check tspan fontsize when using relative units xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf97941.svg"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "fontcolor"_ostr, "#000000"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, "Sample"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "height"_ostr, "48"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "familyname"_ostr, "Times New Roman"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "fontcolor"_ostr, u"#000000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, u"Sample"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "height"_ostr, u"48"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "familyname"_ostr, u"Times New Roman"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf156777) @@ -744,14 +744,14 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf156777) xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf156777.svg"); assertXPath(pDocument, "/primitive2D/transform/textsimpleportion"_ostr, 23); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, "Quick brown fox jumps over the lazy dog."); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, u"Quick brown fox jumps over the lazy dog."_ustr); // Without the fix in place, this test would have failed with // - Expected: #008000 // - Actual : #000000 - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "fontcolor"_ostr, "#008000"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "x"_ostr, "85"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "y"_ostr, "23"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "fontcolor"_ostr, u"#008000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "x"_ostr, u"85"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "y"_ostr, u"23"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf156834) @@ -759,119 +759,119 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf156834) xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf156834.svg"); assertXPath(pDocument, "/primitive2D/transform/textsimpleportion"_ostr, 4); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, "Auto"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "x"_ostr, "30"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "y"_ostr, "20"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, u"Auto"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "x"_ostr, u"30"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "y"_ostr, u"20"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, "Middle"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "x"_ostr, "30"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "y"_ostr, "57"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, u"Middle"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "x"_ostr, u"30"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "y"_ostr, u"57"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "text"_ostr, "Hanging"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "x"_ostr, "30"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "text"_ostr, u"Hanging"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "x"_ostr, u"30"_ustr); assertXPathDoubleValue(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "y"_ostr, 93.5, 0.5); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "text"_ostr, "Central"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "x"_ostr, "30"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "y"_ostr, "117"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "text"_ostr, u"Central"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "x"_ostr, u"30"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "y"_ostr, u"117"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf104339) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf104339.svg"); - assertXPath(pDocument, "/primitive2D/transform/transform/transform/transform/transform/polypolygoncolor"_ostr, "color"_ostr, "#000000"); + assertXPath(pDocument, "/primitive2D/transform/transform/transform/transform/transform/polypolygoncolor"_ostr, "color"_ostr, u"#000000"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf85770) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf85770.svg"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "fontcolor"_ostr, "#000000"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, "Start Middle End"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "height"_ostr, "11"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "familyname"_ostr, "Times New Roman"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "fontcolor"_ostr, "#000000"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, "Start "); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "height"_ostr, "11"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "familyname"_ostr, "Times New Roman"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "fontcolor"_ostr, "#000000"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "text"_ostr, " End"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "height"_ostr, "11"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "familyname"_ostr, "Times New Roman"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "fontcolor"_ostr, u"#000000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, u"Start Middle End"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "height"_ostr, u"11"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "familyname"_ostr, u"Times New Roman"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "fontcolor"_ostr, u"#000000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, u"Start "_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "height"_ostr, u"11"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "familyname"_ostr, u"Times New Roman"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "fontcolor"_ostr, u"#000000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "text"_ostr, u" End"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "height"_ostr, u"11"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "familyname"_ostr, u"Times New Roman"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf86938) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf86938.svg"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, "line"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "x"_ostr, "290"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "y"_ostr, "183"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, "above"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "x"_ostr, "290"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, u"line"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "x"_ostr, u"290"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "y"_ostr, u"183"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, u"above"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "x"_ostr, u"290"_ustr); // Without the fix in place, this test would have failed with // - Expected: 159 // - Actual : 207 - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "y"_ostr, "159"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "text"_ostr, "below"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "x"_ostr, "290"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "y"_ostr, "207"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "y"_ostr, u"159"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "text"_ostr, u"below"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "x"_ostr, u"290"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "y"_ostr, u"207"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf93583) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf93583.svg"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, "This is the"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "x"_ostr, "58"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "y"_ostr, "303"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "width"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "height"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, " first "); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "x"_ostr, "125"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "y"_ostr, "303"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "width"_ostr, "32"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "height"_ostr, "32"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "text"_ostr, "line"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "x"_ostr, "192"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "y"_ostr, "303"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "width"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "height"_ostr, "16"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, u"This is the"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "x"_ostr, u"58"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "y"_ostr, u"303"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "width"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "height"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, u" first "_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "x"_ostr, u"125"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "y"_ostr, u"303"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "width"_ostr, u"32"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "height"_ostr, u"32"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "text"_ostr, u"line"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "x"_ostr, u"192"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "y"_ostr, u"303"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "width"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "height"_ostr, u"16"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf156616) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf156616.svg"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, "First "); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "x"_ostr, "114"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "y"_ostr, "103"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, "line "); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "x"_ostr, "147"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "y"_ostr, "103"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "text"_ostr, "Second line"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "x"_ostr, "114"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "y"_ostr, "122"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "text"_ostr, "First "); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "x"_ostr, "85"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "y"_ostr, "153"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[5]"_ostr, "text"_ostr, "line "); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[5]"_ostr, "x"_ostr, "118"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[5]"_ostr, "y"_ostr, "153"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[6]"_ostr, "text"_ostr, "Second line"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[6]"_ostr, "x"_ostr, "77"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[6]"_ostr, "y"_ostr, "172"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[7]"_ostr, "text"_ostr, "First "); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[7]"_ostr, "x"_ostr, "55"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[7]"_ostr, "y"_ostr, "203"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[8]"_ostr, "text"_ostr, "line "); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[8]"_ostr, "x"_ostr, "88"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[8]"_ostr, "y"_ostr, "203"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[9]"_ostr, "text"_ostr, "Second line"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[9]"_ostr, "x"_ostr, "40"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[9]"_ostr, "y"_ostr, "222"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, u"First "_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "x"_ostr, u"114"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "y"_ostr, u"103"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, u"line "_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "x"_ostr, u"147"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "y"_ostr, u"103"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "text"_ostr, u"Second line"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "x"_ostr, u"114"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "y"_ostr, u"122"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "text"_ostr, u"First "_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "x"_ostr, u"85"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "y"_ostr, u"153"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[5]"_ostr, "text"_ostr, u"line "_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[5]"_ostr, "x"_ostr, u"118"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[5]"_ostr, "y"_ostr, u"153"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[6]"_ostr, "text"_ostr, u"Second line"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[6]"_ostr, "x"_ostr, u"77"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[6]"_ostr, "y"_ostr, u"172"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[7]"_ostr, "text"_ostr, u"First "_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[7]"_ostr, "x"_ostr, u"55"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[7]"_ostr, "y"_ostr, u"203"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[8]"_ostr, "text"_ostr, u"line "_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[8]"_ostr, "x"_ostr, u"88"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[8]"_ostr, "y"_ostr, u"203"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[9]"_ostr, "text"_ostr, u"Second line"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[9]"_ostr, "x"_ostr, u"40"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[9]"_ostr, "y"_ostr, u"222"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf79163) @@ -879,30 +879,30 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf79163) //Check Opacity xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf79163.svg"); - assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence"_ostr, "transparence"_ostr, "50"); + assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence"_ostr, "transparence"_ostr, u"50"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf97542_1) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf97542_1.svg"); - assertXPath(pDocument, "/primitive2D/transform/objectinfo/textsimpleportion"_ostr, "fontcolor"_ostr, "#ffff00"); - assertXPath(pDocument, "/primitive2D/transform/objectinfo/textsimpleportion"_ostr, "text"_ostr, "Text"); - assertXPath(pDocument, "/primitive2D/transform/objectinfo/textsimpleportion"_ostr, "height"_ostr, "48"); - assertXPath(pDocument, "/primitive2D/transform/objectinfo/textsimpleportion"_ostr, "familyname"_ostr, "DejaVu Serif"); + assertXPath(pDocument, "/primitive2D/transform/objectinfo/textsimpleportion"_ostr, "fontcolor"_ostr, u"#ffff00"_ustr); + assertXPath(pDocument, "/primitive2D/transform/objectinfo/textsimpleportion"_ostr, "text"_ostr, u"Text"_ustr); + assertXPath(pDocument, "/primitive2D/transform/objectinfo/textsimpleportion"_ostr, "height"_ostr, u"48"_ustr); + assertXPath(pDocument, "/primitive2D/transform/objectinfo/textsimpleportion"_ostr, "familyname"_ostr, u"DejaVu Serif"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf97542_2) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf97542_2.svg"); - assertXPath(pDocument, "/primitive2D/transform/objectinfo/svgradialgradient"_ostr, "startx"_ostr, "1"); - assertXPath(pDocument, "/primitive2D/transform/objectinfo/svgradialgradient"_ostr, "starty"_ostr, "1"); + assertXPath(pDocument, "/primitive2D/transform/objectinfo/svgradialgradient"_ostr, "startx"_ostr, u"1"_ustr); + assertXPath(pDocument, "/primitive2D/transform/objectinfo/svgradialgradient"_ostr, "starty"_ostr, u"1"_ustr); assertXPath(pDocument, "/primitive2D/transform/objectinfo/svgradialgradient/focalx"_ostr, 0); assertXPath(pDocument, "/primitive2D/transform/objectinfo/svgradialgradient/focaly"_ostr, 0); - assertXPath(pDocument, "/primitive2D/transform/objectinfo/svgradialgradient"_ostr, "radius"_ostr, "3"); - assertXPath(pDocument, "/primitive2D/transform/objectinfo/svgradialgradient"_ostr, "spreadmethod"_ostr, "pad"); - assertXPath(pDocument, "/primitive2D/transform/objectinfo/svgradialgradient"_ostr, "opacity"_ostr, "1"); + assertXPath(pDocument, "/primitive2D/transform/objectinfo/svgradialgradient"_ostr, "radius"_ostr, u"3"_ustr); + assertXPath(pDocument, "/primitive2D/transform/objectinfo/svgradialgradient"_ostr, "spreadmethod"_ostr, u"pad"_ustr); + assertXPath(pDocument, "/primitive2D/transform/objectinfo/svgradialgradient"_ostr, "opacity"_ostr, u"1"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf97543) @@ -910,43 +910,43 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf97543) // check visibility="inherit" xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf97543.svg"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor"_ostr, "color"_ostr, "#00cc00"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "height"_ostr, "100"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "width"_ostr, "100"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "minx"_ostr, "10"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "miny"_ostr, "10"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "maxx"_ostr, "110"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "maxy"_ostr, "110"); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor"_ostr, "color"_ostr, u"#00cc00"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "height"_ostr, u"100"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "width"_ostr, u"100"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "minx"_ostr, u"10"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "miny"_ostr, u"10"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "maxx"_ostr, u"110"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "maxy"_ostr, u"110"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testRGBColor) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/RGBColor.svg"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor"_ostr, "color"_ostr, "#646464"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "height"_ostr, "100"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "width"_ostr, "100"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "minx"_ostr, "10"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "miny"_ostr, "10"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "maxx"_ostr, "110"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "maxy"_ostr, "110"); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor"_ostr, "color"_ostr, u"#646464"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "height"_ostr, u"100"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "width"_ostr, u"100"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "minx"_ostr, u"10"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "miny"_ostr, u"10"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "maxx"_ostr, u"110"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon"_ostr, "maxy"_ostr, u"110"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf149673) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf149673.svg"); - assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence"_ostr, "transparence"_ostr, "90"); - assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence/polypolygoncolor[1]"_ostr, "color"_ostr, "#ff0000"); - assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence/polypolygoncolor[2]"_ostr, "color"_ostr, "#00ff00"); - assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence/polypolygoncolor[3]"_ostr, "color"_ostr, "#0000ff"); + assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence"_ostr, "transparence"_ostr, u"90"_ustr); + assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence/polypolygoncolor[1]"_ostr, "color"_ostr, u"#ff0000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence/polypolygoncolor[2]"_ostr, "color"_ostr, u"#00ff00"_ustr); + assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence/polypolygoncolor[3]"_ostr, "color"_ostr, u"#0000ff"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testRGBAColor) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/RGBAColor.svg"); - assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence"_ostr, "transparence"_ostr, "50"); + assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence"_ostr, "transparence"_ostr, u"50"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testNoneColor) @@ -955,23 +955,23 @@ CPPUNIT_TEST_FIXTURE(Test, testNoneColor) //No polypolygoncolor exists assertXPath(pDocument, "/primitive2D/transform/mask/polypolygoncolor"_ostr, 0); - assertXPath(pDocument, "/primitive2D/transform/mask/polypolygonstroke/line"_ostr, "color"_ostr, "#000000"); - assertXPath(pDocument, "/primitive2D/transform/mask/polypolygonstroke/line"_ostr, "width"_ostr, "3"); + assertXPath(pDocument, "/primitive2D/transform/mask/polypolygonstroke/line"_ostr, "color"_ostr, u"#000000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/polypolygonstroke/line"_ostr, "width"_ostr, u"3"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf117920) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf117920.svg"); - assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy11"_ostr, "1"); - assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy12"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy13"_ostr, "-18"); - assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy21"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy22"_ostr, "1"); - assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy23"_ostr, "-6"); - assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy31"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy32"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy33"_ostr, "1"); + assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy11"_ostr, u"1"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy12"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy13"_ostr, u"-18"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy21"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy22"_ostr, u"1"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy23"_ostr, u"-6"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy31"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy32"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform"_ostr, "xy33"_ostr, u"1"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf97936) @@ -980,19 +980,19 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf97936) xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf97936.svg"); assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]"_ostr); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]/polypolygon"_ostr, "height"_ostr, "50"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]/polypolygon"_ostr, "width"_ostr, "50"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]/polypolygon"_ostr, "minx"_ostr, "70"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]/polypolygon"_ostr, "miny"_ostr, "50"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]/polypolygon"_ostr, "maxx"_ostr, "120"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]/polypolygon"_ostr, "maxy"_ostr, "100"); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]/polypolygon"_ostr, "height"_ostr, u"50"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]/polypolygon"_ostr, "width"_ostr, u"50"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]/polypolygon"_ostr, "minx"_ostr, u"70"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]/polypolygon"_ostr, "miny"_ostr, u"50"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]/polypolygon"_ostr, "maxx"_ostr, u"120"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]/polypolygon"_ostr, "maxy"_ostr, u"100"_ustr); assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]"_ostr); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]/polypolygon"_ostr, "height"_ostr, "50"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]/polypolygon"_ostr, "width"_ostr, "50"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]/polypolygon"_ostr, "minx"_ostr, "10"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]/polypolygon"_ostr, "miny"_ostr, "50"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]/polypolygon"_ostr, "maxx"_ostr, "60"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]/polypolygon"_ostr, "maxy"_ostr, "100"); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]/polypolygon"_ostr, "height"_ostr, u"50"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]/polypolygon"_ostr, "width"_ostr, u"50"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]/polypolygon"_ostr, "minx"_ostr, u"10"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]/polypolygon"_ostr, "miny"_ostr, u"50"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]/polypolygon"_ostr, "maxx"_ostr, u"60"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]/polypolygon"_ostr, "maxy"_ostr, u"100"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf149893) @@ -1002,7 +1002,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf149893) // Without the fix in place, this test would have failed with // - Expected: #008000 // - Actual : #000000 - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor"_ostr, "color"_ostr, "#008000"); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor"_ostr, "color"_ostr, u"#008000"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testShapeWithClipPathAndCssStyle) @@ -1020,17 +1020,17 @@ CPPUNIT_TEST_FIXTURE(Test, testClipPathAndParentStyle) //when the element is within a clipPath element xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/ClipPathAndParentStyle.svg"); - assertXPath(pDocument, "/primitive2D/transform/transform/polypolygoncolor"_ostr, "color"_ostr, "#ff0000"); - assertXPath(pDocument, "/primitive2D/transform/transform/polypolygonstroke/line"_ostr, "color"_ostr, "#000000"); - assertXPath(pDocument, "/primitive2D/transform/transform/polypolygonstroke/line"_ostr, "width"_ostr, "5"); + assertXPath(pDocument, "/primitive2D/transform/transform/polypolygoncolor"_ostr, "color"_ostr, u"#ff0000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform/polypolygonstroke/line"_ostr, "color"_ostr, u"#000000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform/polypolygonstroke/line"_ostr, "width"_ostr, u"5"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf155814) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf155814.svg"); - assertXPath(pDocument, "/primitive2D/transform/mask/mask/transform/unifiedtransparence"_ostr, "transparence"_ostr, "50"); - assertXPath(pDocument, "/primitive2D/transform/mask/mask/transform/unifiedtransparence/polypolygoncolor"_ostr, "color"_ostr, "#0000ff"); + assertXPath(pDocument, "/primitive2D/transform/mask/mask/transform/unifiedtransparence"_ostr, "transparence"_ostr, u"50"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/mask/transform/unifiedtransparence/polypolygoncolor"_ostr, "color"_ostr, u"#0000ff"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testClipPathAndStyle) @@ -1039,9 +1039,9 @@ CPPUNIT_TEST_FIXTURE(Test, testClipPathAndStyle) //when the element is within a clipPath element xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/ClipPathAndStyle.svg"); - assertXPath(pDocument, "/primitive2D/transform/transform/polypolygoncolor"_ostr, "color"_ostr, "#ccccff"); - assertXPath(pDocument, "/primitive2D/transform/transform/polypolygonstroke/line"_ostr, "color"_ostr, "#0000cc"); - assertXPath(pDocument, "/primitive2D/transform/transform/polypolygonstroke/line"_ostr, "width"_ostr, "2"); + assertXPath(pDocument, "/primitive2D/transform/transform/polypolygoncolor"_ostr, "color"_ostr, u"#ccccff"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform/polypolygonstroke/line"_ostr, "color"_ostr, u"#0000cc"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform/polypolygonstroke/line"_ostr, "width"_ostr, u"2"_ustr); } @@ -1066,9 +1066,9 @@ CPPUNIT_TEST_FIXTURE(Test, testFillRule) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/FillRule.svg"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor"_ostr, "color"_ostr, "#000000"); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor"_ostr, "color"_ostr, u"#000000"_ustr); assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor/polypolygon/polygon"_ostr, 2); - assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke/line"_ostr, "color"_ostr, "#ff0000"); + assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke/line"_ostr, "color"_ostr, u"#ff0000"_ustr); assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke/polypolygon/polygon"_ostr, 2); } @@ -1080,11 +1080,11 @@ CPPUNIT_TEST_FIXTURE(Test, testClipRule) // - Expected: 5 // - Actual : 10 assertXPath(pDocument, "/primitive2D/transform/mask[1]/polypolygon/polygon/point"_ostr, 5); - assertXPath(pDocument, "/primitive2D/transform/mask[1]/polypolygoncolor"_ostr, "color"_ostr, "#0000ff"); + assertXPath(pDocument, "/primitive2D/transform/mask[1]/polypolygoncolor"_ostr, "color"_ostr, u"#0000ff"_ustr); assertXPath(pDocument, "/primitive2D/transform/mask[1]/polypolygoncolor/polypolygon/polygon/point"_ostr, 4); assertXPath(pDocument, "/primitive2D/transform/mask[2]/polypolygon/polygon/point"_ostr, 5); - assertXPath(pDocument, "/primitive2D/transform/mask[2]/polypolygoncolor"_ostr, "color"_ostr, "#ff0000"); + assertXPath(pDocument, "/primitive2D/transform/mask[2]/polypolygoncolor"_ostr, "color"_ostr, u"#ff0000"_ustr); assertXPath(pDocument, "/primitive2D/transform/mask[2]/polypolygoncolor/polypolygon/polygon/point"_ostr, 4); } @@ -1093,15 +1093,15 @@ CPPUNIT_TEST_FIXTURE(Test, testi125329) //Check style inherit from * css element xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/i125329.svg"); - assertXPath(pDocument, "/primitive2D/transform/transform/objectinfo/polypolygoncolor"_ostr, "color"_ostr, "#c0c0c0"); // rect background color - assertXPath(pDocument, "/primitive2D/transform/transform/objectinfo/polypolygoncolor/polypolygon"_ostr, "height"_ostr, "30"); // rect background height - assertXPath(pDocument, "/primitive2D/transform/transform/objectinfo/polypolygoncolor/polypolygon"_ostr, "width"_ostr, "50"); // rect background width - assertXPath(pDocument, "/primitive2D/transform/transform/objectinfo/polypolygoncolor/polypolygon"_ostr, "minx"_ostr, "15"); - assertXPath(pDocument, "/primitive2D/transform/transform/objectinfo/polypolygoncolor/polypolygon"_ostr, "miny"_ostr, "15"); - assertXPath(pDocument, "/primitive2D/transform/transform/objectinfo/polypolygoncolor/polypolygon"_ostr, "maxx"_ostr, "65"); - assertXPath(pDocument, "/primitive2D/transform/transform/objectinfo/polypolygoncolor/polypolygon"_ostr, "maxy"_ostr, "45"); - assertXPath(pDocument, "/primitive2D/transform/transform/objectinfo/polypolygonstroke/line"_ostr, "color"_ostr, "#008000"); // rect stroke color - assertXPath(pDocument, "/primitive2D/transform/transform/objectinfo/polypolygonstroke/line"_ostr, "width"_ostr, "1"); // rect stroke width + assertXPath(pDocument, "/primitive2D/transform/transform/objectinfo/polypolygoncolor"_ostr, "color"_ostr, u"#c0c0c0"_ustr); // rect background color + assertXPath(pDocument, "/primitive2D/transform/transform/objectinfo/polypolygoncolor/polypolygon"_ostr, "height"_ostr, u"30"_ustr); // rect background height + assertXPath(pDocument, "/primitive2D/transform/transform/objectinfo/polypolygoncolor/polypolygon"_ostr, "width"_ostr, u"50"_ustr); // rect background width + assertXPath(pDocument, "/primitive2D/transform/transform/objectinfo/polypolygoncolor/polypolygon"_ostr, "minx"_ostr, u"15"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform/objectinfo/polypolygoncolor/polypolygon"_ostr, "miny"_ostr, u"15"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform/objectinfo/polypolygoncolor/polypolygon"_ostr, "maxx"_ostr, u"65"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform/objectinfo/polypolygoncolor/polypolygon"_ostr, "maxy"_ostr, u"45"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform/objectinfo/polypolygonstroke/line"_ostr, "color"_ostr, u"#008000"_ustr); // rect stroke color + assertXPath(pDocument, "/primitive2D/transform/transform/objectinfo/polypolygonstroke/line"_ostr, "width"_ostr, u"1"_ustr); // rect stroke width } CPPUNIT_TEST_FIXTURE(Test, testMaskingPath07b) @@ -1115,7 +1115,7 @@ CPPUNIT_TEST_FIXTURE(Test, test123926) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf123926.svg"); - assertXPath(pDocument, "/primitive2D/transform/transform/transform/unifiedtransparence/polypolygoncolor"_ostr, "color"_ostr, "#7cb5ec"); + assertXPath(pDocument, "/primitive2D/transform/transform/transform/unifiedtransparence/polypolygoncolor"_ostr, "color"_ostr, u"#7cb5ec"_ustr); } CPPUNIT_TEST_FIXTURE(Test, test47446) @@ -1123,7 +1123,7 @@ CPPUNIT_TEST_FIXTURE(Test, test47446) //Check that marker's fill attribute is black is not set xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/47446.svg"); - assertXPath(pDocument, "/primitive2D/transform/transform/transform/polypolygoncolor"_ostr, "color"_ostr, "#000000"); + assertXPath(pDocument, "/primitive2D/transform/transform/transform/polypolygoncolor"_ostr, "color"_ostr, u"#000000"_ustr); } CPPUNIT_TEST_FIXTURE(Test, test47446b) @@ -1131,7 +1131,7 @@ CPPUNIT_TEST_FIXTURE(Test, test47446b) //Check that marker's fill attribute is inherit from def xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/47446b.svg"); - assertXPath(pDocument, "/primitive2D/transform/transform/transform/polypolygoncolor"_ostr, "color"_ostr, "#ffff00"); + assertXPath(pDocument, "/primitive2D/transform/transform/transform/polypolygoncolor"_ostr, "color"_ostr, u"#ffff00"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf103888) @@ -1139,9 +1139,9 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf103888) xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf103888.svg"); // Without the fix in place, this test would have failed here with number of nodes is incorrect - assertXPath(pDocument, "/primitive2D/transform/transform/textsimpleportion[1]"_ostr, "text"_ostr, "Her"); - assertXPath(pDocument, "/primitive2D/transform/transform/textsimpleportion[2]"_ostr, "text"_ostr, "vor"); - assertXPath(pDocument, "/primitive2D/transform/transform/textsimpleportion[3]"_ostr, "text"_ostr, "hebung"); + assertXPath(pDocument, "/primitive2D/transform/transform/textsimpleportion[1]"_ostr, "text"_ostr, u"Her"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform/textsimpleportion[2]"_ostr, "text"_ostr, u"vor"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform/textsimpleportion[3]"_ostr, "text"_ostr, u"hebung"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf156251) @@ -1151,12 +1151,12 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf156251) // Without the fix in place, this test would have failed with // - Expected: 'You are ' // - Actual : 'You are' - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, "You are "); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, "not"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "text"_ostr, " a banana!"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "text"_ostr, "You are"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[5]"_ostr, "text"_ostr, " not "); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[6]"_ostr, "text"_ostr, "a banana!"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, u"You are "_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, u"not"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "text"_ostr, u" a banana!"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "text"_ostr, u"You are"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[5]"_ostr, "text"_ostr, u" not "_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[6]"_ostr, "text"_ostr, u"a banana!"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testMaskText) @@ -1164,11 +1164,11 @@ CPPUNIT_TEST_FIXTURE(Test, testMaskText) //Check that mask is applied on text xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/maskText.svg"); - assertXPath(pDocument, "/primitive2D/transform/transform/polypolygoncolor"_ostr, "color"_ostr, "#000000"); - assertXPath(pDocument, "/primitive2D/transform/transform/transform/textsimpleportion"_ostr, "fontcolor"_ostr, "#ffffff"); - assertXPath(pDocument, "/primitive2D/transform/transform/transform/textsimpleportion"_ostr, "text"_ostr, "Black White"); - assertXPath(pDocument, "/primitive2D/transform/transform/transform/textsimpleportion"_ostr, "height"_ostr, "26"); - assertXPath(pDocument, "/primitive2D/transform/transform/transform/textsimpleportion"_ostr, "familyname"_ostr, "Times New Roman"); + assertXPath(pDocument, "/primitive2D/transform/transform/polypolygoncolor"_ostr, "color"_ostr, u"#000000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform/transform/textsimpleportion"_ostr, "fontcolor"_ostr, u"#ffffff"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform/transform/textsimpleportion"_ostr, "text"_ostr, u"Black White"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform/transform/textsimpleportion"_ostr, "height"_ostr, u"26"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform/transform/textsimpleportion"_ostr, "familyname"_ostr, u"Times New Roman"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf99994) @@ -1176,10 +1176,10 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf99994) //Check text fontsize when using relative units xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf99994.svg"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "fontcolor"_ostr, "#0000ff"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "height"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, "test"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "familyname"_ostr, "DejaVu Sans"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "fontcolor"_ostr, u"#0000ff"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "height"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, u"test"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "familyname"_ostr, u"DejaVu Sans"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf99115) @@ -1187,41 +1187,41 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf99115) //Check that styles are resolved correctly where there is a * css selector xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf99115.svg"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, "red 1"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "fontcolor"_ostr, "#ff0000"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "height"_ostr, "18"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, u"red 1"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "fontcolor"_ostr, u"#ff0000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "height"_ostr, u"18"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, "red 2"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "fontcolor"_ostr, "#ff0000"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "height"_ostr, "18"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, u"red 2"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "fontcolor"_ostr, u"#ff0000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "height"_ostr, u"18"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "text"_ostr, "red 3"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "fontcolor"_ostr, "#ff0000"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "height"_ostr, "18"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "text"_ostr, u"red 3"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "fontcolor"_ostr, u"#ff0000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "height"_ostr, u"18"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "text"_ostr, "blue 4"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "fontcolor"_ostr, "#0000ff"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "height"_ostr, "18"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "text"_ostr, u"blue 4"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "fontcolor"_ostr, u"#0000ff"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "height"_ostr, u"18"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[5]"_ostr, "text"_ostr, "blue 5"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[5]"_ostr, "fontcolor"_ostr, "#0000ff"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[5]"_ostr, "height"_ostr, "18"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[5]"_ostr, "text"_ostr, u"blue 5"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[5]"_ostr, "fontcolor"_ostr, u"#0000ff"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[5]"_ostr, "height"_ostr, u"18"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[6]"_ostr, "text"_ostr, "blue 6"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[6]"_ostr, "fontcolor"_ostr, "#0000ff"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[6]"_ostr, "height"_ostr, "18"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[6]"_ostr, "text"_ostr, u"blue 6"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[6]"_ostr, "fontcolor"_ostr, u"#0000ff"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[6]"_ostr, "height"_ostr, u"18"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[7]"_ostr, "text"_ostr, "green 7"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[7]"_ostr, "fontcolor"_ostr, "#008000"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[7]"_ostr, "height"_ostr, "18"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[7]"_ostr, "text"_ostr, u"green 7"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[7]"_ostr, "fontcolor"_ostr, u"#008000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[7]"_ostr, "height"_ostr, u"18"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[8]"_ostr, "text"_ostr, "green 8"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[8]"_ostr, "fontcolor"_ostr, "#008000"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[8]"_ostr, "height"_ostr, "18"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[8]"_ostr, "text"_ostr, u"green 8"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[8]"_ostr, "fontcolor"_ostr, u"#008000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[8]"_ostr, "height"_ostr, u"18"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[9]"_ostr, "text"_ostr, "green 9"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[9]"_ostr, "fontcolor"_ostr, "#008000"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[9]"_ostr, "height"_ostr, "18"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[9]"_ostr, "text"_ostr, u"green 9"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[9]"_ostr, "fontcolor"_ostr, u"#008000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[9]"_ostr, "height"_ostr, u"18"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf101237) @@ -1230,27 +1230,27 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf101237) //when the element is within a clipPath element xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf101237.svg"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor"_ostr, "color"_ostr, "#ff0000"); - assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke/line"_ostr, "color"_ostr, "#000000"); - assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke/line"_ostr, "width"_ostr, "5"); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor"_ostr, "color"_ostr, u"#ff0000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke/line"_ostr, "color"_ostr, u"#000000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygonstroke/line"_ostr, "width"_ostr, u"5"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf97710) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf97710.svg"); - assertXPath(pDocument, "/primitive2D/transform/mask/polypolygoncolor[1]"_ostr, "color"_ostr, "#000000"); + assertXPath(pDocument, "/primitive2D/transform/mask/polypolygoncolor[1]"_ostr, "color"_ostr, u"#000000"_ustr); // Without the fix in place, this test would have failed with // - Expected: 100 // - Actual : 0 - assertXPath(pDocument, "/primitive2D/transform/mask/polypolygoncolor[1]/polypolygon"_ostr, "width"_ostr, "100"); - assertXPath(pDocument, "/primitive2D/transform/mask/polypolygoncolor[1]/polypolygon"_ostr, "height"_ostr, "100"); - assertXPath(pDocument, "/primitive2D/transform/mask/polypolygoncolor[2]"_ostr, "color"_ostr, "#008000"); - assertXPath(pDocument, "/primitive2D/transform/mask/polypolygoncolor[2]/polypolygon"_ostr, "width"_ostr, "100"); - assertXPath(pDocument, "/primitive2D/transform/mask/polypolygoncolor[2]/polypolygon"_ostr, "height"_ostr, "100"); - assertXPath(pDocument, "/primitive2D/transform/mask/polypolygonstroke/line"_ostr, "color"_ostr, "#000000"); - assertXPath(pDocument, "/primitive2D/transform/mask/polypolygonstroke/line"_ostr, "width"_ostr, "1"); + assertXPath(pDocument, "/primitive2D/transform/mask/polypolygoncolor[1]/polypolygon"_ostr, "width"_ostr, u"100"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/polypolygoncolor[1]/polypolygon"_ostr, "height"_ostr, u"100"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/polypolygoncolor[2]"_ostr, "color"_ostr, u"#008000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/polypolygoncolor[2]/polypolygon"_ostr, "width"_ostr, u"100"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/polypolygoncolor[2]/polypolygon"_ostr, "height"_ostr, u"100"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/polypolygonstroke/line"_ostr, "color"_ostr, u"#000000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/polypolygonstroke/line"_ostr, "width"_ostr, u"1"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf94765) @@ -1258,24 +1258,24 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf94765) xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf94765.svg"); //Check that both rectangles use the gradient as fill - assertXPath(pDocument, "/primitive2D/transform/transform/svglineargradient[1]"_ostr, "startx"_ostr, "1"); - assertXPath(pDocument, "/primitive2D/transform/transform/svglineargradient[1]"_ostr, "starty"_ostr, "1"); - assertXPath(pDocument, "/primitive2D/transform/transform/svglineargradient[1]"_ostr, "endx"_ostr, "2"); - assertXPath(pDocument, "/primitive2D/transform/transform/svglineargradient[1]"_ostr, "endy"_ostr, "1"); - assertXPath(pDocument, "/primitive2D/transform/transform/svglineargradient[2]"_ostr, "startx"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/transform/svglineargradient[2]"_ostr, "starty"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/transform/svglineargradient[2]"_ostr, "endx"_ostr, "1"); - assertXPath(pDocument, "/primitive2D/transform/transform/svglineargradient[2]"_ostr, "endy"_ostr, "0"); + assertXPath(pDocument, "/primitive2D/transform/transform/svglineargradient[1]"_ostr, "startx"_ostr, u"1"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform/svglineargradient[1]"_ostr, "starty"_ostr, u"1"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform/svglineargradient[1]"_ostr, "endx"_ostr, u"2"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform/svglineargradient[1]"_ostr, "endy"_ostr, u"1"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform/svglineargradient[2]"_ostr, "startx"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform/svglineargradient[2]"_ostr, "starty"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform/svglineargradient[2]"_ostr, "endx"_ostr, u"1"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform/svglineargradient[2]"_ostr, "endy"_ostr, u"0"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf156236) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf156236.svg"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]/polypolygon"_ostr, "path"_ostr, "m50 180h-30v-60h60v60z"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]/polypolygon"_ostr, "path"_ostr, "m150 180h15c8.2842712474619 0 15-6.7157287525381 15-15v-30c0-8.2842712474619-6.7157287525381-15-15-15h-30c-8.2842712474619 0-15 6.7157287525381-15 15v30c0 8.2842712474619 6.7157287525381 15 15 15z"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[3]/polypolygon"_ostr, "path"_ostr, "m250 180h15c8.2842712474619 0 15-6.7157287525381 15-15v-30c0-8.2842712474619-6.7157287525381-15-15-15h-30c-8.2842712474619 0-15 6.7157287525381-15 15v30c0 8.2842712474619 6.7157287525381 15 15 15z"); - assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[4]/polypolygon"_ostr, "path"_ostr, "m350 180c16.5685424949238 0 30-6.7157287525381 30-15v-30c0-8.2842712474619-13.4314575050762-15-30-15s-30 6.7157287525381-30 15v30c0 8.2842712474619 13.4314575050762 15 30 15z"); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]/polypolygon"_ostr, "path"_ostr, u"m50 180h-30v-60h60v60z"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]/polypolygon"_ostr, "path"_ostr, u"m150 180h15c8.2842712474619 0 15-6.7157287525381 15-15v-30c0-8.2842712474619-6.7157287525381-15-15-15h-30c-8.2842712474619 0-15 6.7157287525381-15 15v30c0 8.2842712474619 6.7157287525381 15 15 15z"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[3]/polypolygon"_ostr, "path"_ostr, u"m250 180h15c8.2842712474619 0 15-6.7157287525381 15-15v-30c0-8.2842712474619-6.7157287525381-15-15-15h-30c-8.2842712474619 0-15 6.7157287525381-15 15v30c0 8.2842712474619 6.7157287525381 15 15 15z"_ustr); + assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[4]/polypolygon"_ostr, "path"_ostr, u"m350 180c16.5685424949238 0 30-6.7157287525381 30-15v-30c0-8.2842712474619-13.4314575050762-15-30-15s-30 6.7157287525381-30 15v30c0 8.2842712474619 13.4314575050762 15 30 15z"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testBehaviourWhenWidthAndHeightIsOrIsNotSet) @@ -1344,30 +1344,30 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf155733) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf155733.svg"); - assertXPath(pDocument, "/primitive2D/transform/softedge"_ostr, "radius"_ostr, "5"); + assertXPath(pDocument, "/primitive2D/transform/softedge"_ostr, "radius"_ostr, u"5"_ustr); // Without the fix in place, the softedge would have been applied to the second element // - Expected: 1 // - Actual : 0 - assertXPath(pDocument, "/primitive2D/transform/transform/unifiedtransparence"_ostr, "transparence"_ostr, "50"); + assertXPath(pDocument, "/primitive2D/transform/transform/unifiedtransparence"_ostr, "transparence"_ostr, u"50"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf158445) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf158445.svg"); - assertXPath(pDocument, "/primitive2D/transform/mask/transform/transform/transform/polypolygoncolor"_ostr, "color"_ostr, "#000000"); - assertXPath(pDocument, "/primitive2D/transform/mask/transform/transform/transform/polypolygoncolor/polypolygon"_ostr, "height"_ostr, "8.052"); - assertXPath(pDocument, "/primitive2D/transform/mask/transform/transform/transform/polypolygoncolor/polypolygon"_ostr, "width"_ostr, "5.328"); + assertXPath(pDocument, "/primitive2D/transform/mask/transform/transform/transform/polypolygoncolor"_ostr, "color"_ostr, u"#000000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/transform/transform/transform/polypolygoncolor/polypolygon"_ostr, "height"_ostr, u"8.052"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/transform/transform/transform/polypolygoncolor/polypolygon"_ostr, "width"_ostr, u"5.328"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf159594) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf159594.svg"); - assertXPath(pDocument, "/primitive2D/transform/transform/polypolygoncolor"_ostr, "color"_ostr, "#000000"); - assertXPath(pDocument, "/primitive2D/transform/transform/polypolygoncolor/polypolygon"_ostr, "height"_ostr, "11.671875"); - assertXPath(pDocument, "/primitive2D/transform/transform/polypolygoncolor/polypolygon"_ostr, "width"_ostr, "7.5"); + assertXPath(pDocument, "/primitive2D/transform/transform/polypolygoncolor"_ostr, "color"_ostr, u"#000000"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform/polypolygoncolor/polypolygon"_ostr, "height"_ostr, u"11.671875"_ustr); + assertXPath(pDocument, "/primitive2D/transform/transform/polypolygoncolor/polypolygon"_ostr, "width"_ostr, u"7.5"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf97663) @@ -1377,48 +1377,48 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf97663) // tdf#97663: Without the fix in place, this test would have failed with // - Expected: 236 // - Actual : 204 - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "y"_ostr, "237"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "y"_ostr, u"237"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf156269) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf156269.svg"); - assertXPath(pDocument, "//textsimpleportion[@text='one']"_ostr, "width"_ostr, "16"); - assertXPath(pDocument, "//textsimpleportion[@text='one']"_ostr, "height"_ostr, "16"); - assertXPath(pDocument, "//textsimpleportion[@text='one']"_ostr, "x"_ostr, "10"); - assertXPath(pDocument, "//textsimpleportion[@text='one']"_ostr, "y"_ostr, "50"); - assertXPath(pDocument, "//textsimpleportion[@text='one']"_ostr, "fontcolor"_ostr, "#808080"); + assertXPath(pDocument, "//textsimpleportion[@text='one']"_ostr, "width"_ostr, u"16"_ustr); + assertXPath(pDocument, "//textsimpleportion[@text='one']"_ostr, "height"_ostr, u"16"_ustr); + assertXPath(pDocument, "//textsimpleportion[@text='one']"_ostr, "x"_ostr, u"10"_ustr); + assertXPath(pDocument, "//textsimpleportion[@text='one']"_ostr, "y"_ostr, u"50"_ustr); + assertXPath(pDocument, "//textsimpleportion[@text='one']"_ostr, "fontcolor"_ostr, u"#808080"_ustr); - assertXPath(pDocument, "//textsimpleportion[@text='two']"_ostr, "width"_ostr, "16"); - assertXPath(pDocument, "//textsimpleportion[@text='two']"_ostr, "height"_ostr, "16"); + assertXPath(pDocument, "//textsimpleportion[@text='two']"_ostr, "width"_ostr, u"16"_ustr); + assertXPath(pDocument, "//textsimpleportion[@text='two']"_ostr, "height"_ostr, u"16"_ustr); // Without the fix in place, this test would have failed with // - Expected: 60 // - Actual : 10 - assertXPath(pDocument, "//textsimpleportion[@text='two']"_ostr, "x"_ostr, "60"); - assertXPath(pDocument, "//textsimpleportion[@text='two']"_ostr, "y"_ostr, "100"); - assertXPath(pDocument, "//textsimpleportion[@text='two']"_ostr, "fontcolor"_ostr, "#000000"); + assertXPath(pDocument, "//textsimpleportion[@text='two']"_ostr, "x"_ostr, u"60"_ustr); + assertXPath(pDocument, "//textsimpleportion[@text='two']"_ostr, "y"_ostr, u"100"_ustr); + assertXPath(pDocument, "//textsimpleportion[@text='two']"_ostr, "fontcolor"_ostr, u"#000000"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf95400) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf95400.svg"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "width"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "height"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "x"_ostr, "30"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "y"_ostr, "20"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, "ABC"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "width"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "height"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "x"_ostr, u"30"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "y"_ostr, u"20"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, u"ABC"_ustr); assertXPathDoubleValue(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "dx0"_ostr, 36, 0.5); assertXPathDoubleValue(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "dx1"_ostr, 69, 0.5); assertXPathDoubleValue(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "dx2"_ostr, 102, 0.5); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "width"_ostr, "50"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "height"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "x"_ostr, "30"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "y"_ostr, "30"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, "ABC"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "width"_ostr, u"50"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "height"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "x"_ostr, u"30"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "y"_ostr, u"30"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, u"ABC"_ustr); assertXPathNoAttribute(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "dx0"_ostr); } @@ -1426,98 +1426,98 @@ CPPUNIT_TEST_FIXTURE(Test, testTextAnchor) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf151103.svg"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "x"_ostr, "60"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "y"_ostr, "40"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, "ABC"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "x"_ostr, u"60"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "y"_ostr, u"40"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, u"ABC"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "x"_ostr, "43"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "y"_ostr, "50"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, "ABC"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "x"_ostr, u"43"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "y"_ostr, u"50"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, u"ABC"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "x"_ostr, "26"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "y"_ostr, "60"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "text"_ostr, "ABC"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "x"_ostr, u"26"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "y"_ostr, u"60"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]"_ostr, "text"_ostr, u"ABC"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "x"_ostr, "60"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "y"_ostr, "40"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "text"_ostr, "ABC"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "x"_ostr, u"60"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "y"_ostr, u"40"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[4]"_ostr, "text"_ostr, u"ABC"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[5]"_ostr, "x"_ostr, "43"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[5]"_ostr, "y"_ostr, "50"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[5]"_ostr, "text"_ostr, "ABC"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[5]"_ostr, "x"_ostr, u"43"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[5]"_ostr, "y"_ostr, u"50"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[5]"_ostr, "text"_ostr, u"ABC"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[6]"_ostr, "x"_ostr, "26"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[6]"_ostr, "y"_ostr, "60"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[6]"_ostr, "text"_ostr, "ABC"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[6]"_ostr, "x"_ostr, u"26"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[6]"_ostr, "y"_ostr, u"60"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[6]"_ostr, "text"_ostr, u"ABC"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[7]"_ostr, "x"_ostr, "60"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[7]"_ostr, "y"_ostr, "40"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[7]"_ostr, "text"_ostr, "ABC"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[7]"_ostr, "x"_ostr, u"60"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[7]"_ostr, "y"_ostr, u"40"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[7]"_ostr, "text"_ostr, u"ABC"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[8]"_ostr, "x"_ostr, "43"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[8]"_ostr, "y"_ostr, "50"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[8]"_ostr, "text"_ostr, "ABC"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[8]"_ostr, "x"_ostr, u"43"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[8]"_ostr, "y"_ostr, u"50"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[8]"_ostr, "text"_ostr, u"ABC"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[9]"_ostr, "x"_ostr, "26"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[9]"_ostr, "y"_ostr, "60"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[9]"_ostr, "text"_ostr, "ABC"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[9]"_ostr, "x"_ostr, u"26"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[9]"_ostr, "y"_ostr, u"60"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[9]"_ostr, "text"_ostr, u"ABC"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[10]"_ostr, "x"_ostr, "60"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[10]"_ostr, "y"_ostr, "40"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[10]"_ostr, "text"_ostr, "A"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[10]"_ostr, "x"_ostr, u"60"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[10]"_ostr, "y"_ostr, u"40"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[10]"_ostr, "text"_ostr, u"A"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[11]"_ostr, "x"_ostr, "72"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[11]"_ostr, "y"_ostr, "40"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[11]"_ostr, "text"_ostr, "B"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[11]"_ostr, "x"_ostr, u"72"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[11]"_ostr, "y"_ostr, u"40"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[11]"_ostr, "text"_ostr, u"B"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[12]"_ostr, "x"_ostr, "82"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[12]"_ostr, "y"_ostr, "40"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[12]"_ostr, "text"_ostr, "C"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[12]"_ostr, "x"_ostr, u"82"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[12]"_ostr, "y"_ostr, u"40"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[12]"_ostr, "text"_ostr, u"C"_ustr); // Without the fix in place, this test would have failed with // - Expected: 43 // - Actual : 54 - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[13]"_ostr, "x"_ostr, "43"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[13]"_ostr, "y"_ostr, "50"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[13]"_ostr, "text"_ostr, "A"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[13]"_ostr, "x"_ostr, u"43"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[13]"_ostr, "y"_ostr, u"50"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[13]"_ostr, "text"_ostr, u"A"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[14]"_ostr, "x"_ostr, "55"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[14]"_ostr, "y"_ostr, "50"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[14]"_ostr, "text"_ostr, "B"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[14]"_ostr, "x"_ostr, u"55"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[14]"_ostr, "y"_ostr, u"50"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[14]"_ostr, "text"_ostr, u"B"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[15]"_ostr, "x"_ostr, "65"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[15]"_ostr, "y"_ostr, "50"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[15]"_ostr, "text"_ostr, "C"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[15]"_ostr, "x"_ostr, u"65"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[15]"_ostr, "y"_ostr, u"50"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[15]"_ostr, "text"_ostr, u"C"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[16]"_ostr, "x"_ostr, "26"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[16]"_ostr, "y"_ostr, "60"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[16]"_ostr, "text"_ostr, "A"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[16]"_ostr, "x"_ostr, u"26"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[16]"_ostr, "y"_ostr, u"60"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[16]"_ostr, "text"_ostr, u"A"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[17]"_ostr, "x"_ostr, "38"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[17]"_ostr, "y"_ostr, "60"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[17]"_ostr, "text"_ostr, "B"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[17]"_ostr, "x"_ostr, u"38"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[17]"_ostr, "y"_ostr, u"60"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[17]"_ostr, "text"_ostr, u"B"_ustr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[18]"_ostr, "x"_ostr, "48"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[18]"_ostr, "y"_ostr, "60"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[18]"_ostr, "text"_ostr, "C"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[18]"_ostr, "x"_ostr, u"48"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[18]"_ostr, "y"_ostr, u"60"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[18]"_ostr, "text"_ostr, u"C"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf156577) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf156577.svg"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "width"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "height"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "x"_ostr, "30"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "y"_ostr, "20"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, "ABC"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "width"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "height"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "x"_ostr, u"30"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "y"_ostr, u"20"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, u"ABC"_ustr); assertXPathNoAttribute(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "dx0"_ostr); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "width"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "height"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "x"_ostr, "30"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "y"_ostr, "30"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, "ABC"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "width"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "height"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "x"_ostr, u"30"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "y"_ostr, u"30"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, u"ABC"_ustr); // Without the fix in place, this test would have failed with // - Expected: 22 @@ -1531,20 +1531,20 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf156283) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf156283.svg"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "width"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "height"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "x"_ostr, "30"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "y"_ostr, "20"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, "ABC"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "width"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "height"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "x"_ostr, u"30"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "y"_ostr, u"20"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, u"ABC"_ustr); assertXPathDoubleValue(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "dx0"_ostr, 41, 0.5); assertXPathDoubleValue(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "dx1"_ostr, 52, 0.5); assertXPathDoubleValue(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "dx2"_ostr, 62, 0.5); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "width"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "height"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "x"_ostr, "30"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "y"_ostr, "30"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, "ABC"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "width"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "height"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "x"_ostr, u"30"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "y"_ostr, u"30"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, u"ABC"_ustr); // Without the fix in place, this test would have failed with // - Expected: 41 @@ -1558,26 +1558,26 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf156569) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf156569.svg"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "width"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "height"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "x"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "y"_ostr, "20"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, "ABC"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "width"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "height"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "x"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "y"_ostr, u"20"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, u"ABC"_ustr); assertXPathDoubleValue(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "dx0"_ostr, 40, 0.5); assertXPathDoubleValue(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "dx1"_ostr, 80, 0.5); assertXPathDoubleValue(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "dx2"_ostr, 91, 0.5); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "width"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "height"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "x"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "y"_ostr, "30"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, "ABC"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "width"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "height"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "x"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "y"_ostr, u"30"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, u"ABC"_ustr); assertXPathDoubleValue(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "dx0"_ostr, 40, 0.5); // Without the fix in place, this test would have failed with // - Expected: 80 // - Actual : 51 - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "dx1"_ostr, "80"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "dx1"_ostr, u"80"_ustr); assertXPathDoubleValue(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "dx2"_ostr, 91, 0.5); } @@ -1586,18 +1586,18 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf156837) xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf156837.svg"); assertXPath(pDocument, "/primitive2D/transform/textsimpleportion"_ostr, 2); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "x"_ostr, "114"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "y"_ostr, "103"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "height"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, "x "); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "x"_ostr, "126"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "x"_ostr, u"114"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "y"_ostr, u"103"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "height"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, u"x "_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "x"_ostr, u"126"_ustr); // Without the fix in place, this test would have failed with // - Expected: 94 // - Actual : 103 - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "y"_ostr, "94"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "height"_ostr, "10"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, "3"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "y"_ostr, u"94"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "height"_ostr, u"10"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]"_ostr, "text"_ostr, u"3"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf160773) @@ -1605,34 +1605,34 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf160773) xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf160773.svg"); // tdf#160773 Check there is a rectangle - assertXPath(pDocument, "/primitive2D/transform/mask/transform/polypolygoncolor"_ostr, "color"_ostr, "#ff0000"); + assertXPath(pDocument, "/primitive2D/transform/mask/transform/polypolygoncolor"_ostr, "color"_ostr, u"#ff0000"_ustr); // tdf#159661 Check there is text in the right position assertXPath(pDocument, "/primitive2D/transform/mask/transform/textsimpleportion"_ostr, 1); - assertXPath(pDocument, "/primitive2D/transform/mask/transform/textsimpleportion"_ostr, "x"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/mask/transform/textsimpleportion"_ostr, "y"_ostr, "1"); - assertXPath(pDocument, "/primitive2D/transform/mask/transform/textsimpleportion"_ostr, "height"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/mask/transform/textsimpleportion"_ostr, "width"_ostr, "0"); - assertXPath(pDocument, "/primitive2D/transform/mask/transform/textsimpleportion"_ostr, "text"_ostr, "Red"); + assertXPath(pDocument, "/primitive2D/transform/mask/transform/textsimpleportion"_ostr, "x"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/transform/textsimpleportion"_ostr, "y"_ostr, u"1"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/transform/textsimpleportion"_ostr, "height"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/transform/textsimpleportion"_ostr, "width"_ostr, u"0"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/transform/textsimpleportion"_ostr, "text"_ostr, u"Red"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTdf156271) { xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf156271.svg"); - assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[1]"_ostr, "width"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[1]"_ostr, "height"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[1]"_ostr, "x"_ostr, "40"); - assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[1]"_ostr, "y"_ostr, "10"); - assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[1]"_ostr, "text"_ostr, "AB"); + assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[1]"_ostr, "width"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[1]"_ostr, "height"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[1]"_ostr, "x"_ostr, u"40"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[1]"_ostr, "y"_ostr, u"10"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[1]"_ostr, "text"_ostr, u"AB"_ustr); assertXPathDoubleValue(pDocument, "/primitive2D/transform/mask/textsimpleportion[1]"_ostr, "dx0"_ostr, -30, 0.5); assertXPathDoubleValue(pDocument, "/primitive2D/transform/mask/textsimpleportion[1]"_ostr, "dx1"_ostr, -19, 0.5); - assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[2]"_ostr, "width"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[2]"_ostr, "height"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[2]"_ostr, "x"_ostr, "40"); - assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[2]"_ostr, "y"_ostr, "20"); - assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[2]"_ostr, "text"_ostr, "AB"); + assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[2]"_ostr, "width"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[2]"_ostr, "height"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[2]"_ostr, "x"_ostr, u"40"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[2]"_ostr, "y"_ostr, u"20"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[2]"_ostr, "text"_ostr, u"AB"_ustr); // Without the fix in place, this test would have failed with // - Expected: -30 @@ -1640,19 +1640,19 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf156271) assertXPathDoubleValue(pDocument, "/primitive2D/transform/mask/textsimpleportion[2]"_ostr, "dx0"_ostr, -30, 0.5); assertXPathDoubleValue(pDocument, "/primitive2D/transform/mask/textsimpleportion[2]"_ostr, "dx1"_ostr, -19, 0.5); - assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[3]"_ostr, "width"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[3]"_ostr, "height"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[3]"_ostr, "x"_ostr, "40"); - assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[3]"_ostr, "y"_ostr, "30"); - assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[3]"_ostr, "text"_ostr, "AB"); + assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[3]"_ostr, "width"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[3]"_ostr, "height"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[3]"_ostr, "x"_ostr, u"40"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[3]"_ostr, "y"_ostr, u"30"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[3]"_ostr, "text"_ostr, u"AB"_ustr); assertXPathDoubleValue(pDocument, "/primitive2D/transform/mask/textsimpleportion[3]"_ostr, "dx0"_ostr, -30, 0.5); assertXPathDoubleValue(pDocument, "/primitive2D/transform/mask/textsimpleportion[3]"_ostr, "dx1"_ostr, -19, 0.5); - assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[4]"_ostr, "width"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[4]"_ostr, "height"_ostr, "16"); - assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[4]"_ostr, "x"_ostr, "40"); - assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[4]"_ostr, "y"_ostr, "40"); - assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[4]"_ostr, "text"_ostr, "AB"); + assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[4]"_ostr, "width"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[4]"_ostr, "height"_ostr, u"16"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[4]"_ostr, "x"_ostr, u"40"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[4]"_ostr, "y"_ostr, u"40"_ustr); + assertXPath(pDocument, "/primitive2D/transform/mask/textsimpleportion[4]"_ostr, "text"_ostr, u"AB"_ustr); assertXPathDoubleValue(pDocument, "/primitive2D/transform/mask/textsimpleportion[4]"_ostr, "dx0"_ostr, 12, 0.5); assertXPathDoubleValue(pDocument, "/primitive2D/transform/mask/textsimpleportion[4]"_ostr, "dx1"_ostr, 22, 0.5); } @@ -1663,7 +1663,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf159968) // Check no mask is applied to the marker assertXPath(pDocument, - "/primitive2D/transform/transform/transform/transform/polypolygoncolor"_ostr, "color"_ostr, "#000000"); + "/primitive2D/transform/transform/transform/transform/polypolygoncolor"_ostr, "color"_ostr, u"#000000"_ustr); assertXPath(pDocument, "/primitive2D/transform/transform/transform/transform/polypolygoncolor/polypolygon/polygon/point"_ostr, 5); } @@ -1673,35 +1673,35 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf160517) xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf160517.svg"); assertXPath(pDocument, - "/primitive2D/transform/bitmap"_ostr, "height"_ostr, "110"); + "/primitive2D/transform/bitmap"_ostr, "height"_ostr, u"110"_ustr); assertXPath(pDocument, - "/primitive2D/transform/bitmap"_ostr, "width"_ostr, "110"); + "/primitive2D/transform/bitmap"_ostr, "width"_ostr, u"110"_ustr); assertXPath(pDocument, "/primitive2D/transform/bitmap/data"_ostr, 110); assertXPath(pDocument, - "/primitive2D/transform/bitmap"_ostr, "xy11"_ostr, "110"); + "/primitive2D/transform/bitmap"_ostr, "xy11"_ostr, u"110"_ustr); assertXPath(pDocument, - "/primitive2D/transform/bitmap"_ostr, "xy12"_ostr, "0"); + "/primitive2D/transform/bitmap"_ostr, "xy12"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D//transform/bitmap"_ostr, "xy13"_ostr, "0"); + "/primitive2D//transform/bitmap"_ostr, "xy13"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D//transform/bitmap"_ostr, "xy21"_ostr, "0"); + "/primitive2D//transform/bitmap"_ostr, "xy21"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D//transform/bitmap"_ostr, "xy22"_ostr, "110"); + "/primitive2D//transform/bitmap"_ostr, "xy22"_ostr, u"110"_ustr); assertXPath(pDocument, - "/primitive2D//transform/bitmap"_ostr, "xy23"_ostr, "0"); + "/primitive2D//transform/bitmap"_ostr, "xy23"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D//transform/bitmap"_ostr, "xy31"_ostr, "0"); + "/primitive2D//transform/bitmap"_ostr, "xy31"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D//transform/bitmap"_ostr, "xy32"_ostr, "0"); + "/primitive2D//transform/bitmap"_ostr, "xy32"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D//transform/bitmap"_ostr, "xy33"_ostr, "1"); + "/primitive2D//transform/bitmap"_ostr, "xy33"_ostr, u"1"_ustr); // Check the color of a pixel in the middle const OUString sDataRow = getXPath(pDocument, "/primitive2D/transform/bitmap/data[55]"_ostr, "row"_ostr); std::vector<OUString> aPixels = comphelper::string::split(sDataRow, ','); - CPPUNIT_ASSERT_EQUAL(OUString("008100"), aPixels[55]); + CPPUNIT_ASSERT_EQUAL(u"008100"_ustr, aPixels[55]); } CPPUNIT_TEST_FIXTURE(Test, testArithmeticComposite) @@ -1709,43 +1709,43 @@ CPPUNIT_TEST_FIXTURE(Test, testArithmeticComposite) xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/arithmetic.svg"); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "height"_ostr, "150"); + "/primitive2D/transform/transform/bitmap"_ostr, "height"_ostr, u"150"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "width"_ostr, "150"); + "/primitive2D/transform/transform/bitmap"_ostr, "width"_ostr, u"150"_ustr); assertXPath(pDocument, "/primitive2D/transform/transform/bitmap/data"_ostr, 150); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy11"_ostr, "150"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy11"_ostr, u"150"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy12"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy12"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy13"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy13"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy21"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy21"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy22"_ostr, "150"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy22"_ostr, u"150"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy23"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy23"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy31"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy31"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy32"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy32"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy33"_ostr, "1"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy33"_ostr, u"1"_ustr); // Check the colors in the diagonal OUString sDataRow = getXPath(pDocument, "/primitive2D/transform/transform/bitmap/data[25]"_ostr, "row"_ostr); std::vector<OUString> aPixels = comphelper::string::split(sDataRow, ','); - CPPUNIT_ASSERT_EQUAL(OUString("000000"), aPixels[25]); + CPPUNIT_ASSERT_EQUAL(u"000000"_ustr, aPixels[25]); sDataRow = getXPath(pDocument, "/primitive2D/transform/transform/bitmap/data[75]"_ostr, "row"_ostr); aPixels = comphelper::string::split(sDataRow, ','); - CPPUNIT_ASSERT_EQUAL(OUString("ff8000"), aPixels[75]); + CPPUNIT_ASSERT_EQUAL(u"ff8000"_ustr, aPixels[75]); sDataRow = getXPath(pDocument, "/primitive2D/transform/transform/bitmap/data[125]"_ostr, "row"_ostr); aPixels = comphelper::string::split(sDataRow, ','); - CPPUNIT_ASSERT_EQUAL(OUString("ff8000"), aPixels[125]); + CPPUNIT_ASSERT_EQUAL(u"ff8000"_ustr, aPixels[125]); } CPPUNIT_TEST_FIXTURE(Test, testArithmeticComposite2) @@ -1753,43 +1753,43 @@ CPPUNIT_TEST_FIXTURE(Test, testArithmeticComposite2) xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/arithmetic2.svg"); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "height"_ostr, "150"); + "/primitive2D/transform/transform/bitmap"_ostr, "height"_ostr, u"150"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "width"_ostr, "150"); + "/primitive2D/transform/transform/bitmap"_ostr, "width"_ostr, u"150"_ustr); assertXPath(pDocument, "/primitive2D/transform/transform/bitmap/data"_ostr, 150); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy11"_ostr, "150"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy11"_ostr, u"150"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy12"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy12"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy13"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy13"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy21"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy21"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy22"_ostr, "150"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy22"_ostr, u"150"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy23"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy23"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy31"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy31"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy32"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy32"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy33"_ostr, "1"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy33"_ostr, u"1"_ustr); // Check the colors in the diagonal OUString sDataRow = getXPath(pDocument, "/primitive2D/transform/transform/bitmap/data[25]"_ostr, "row"_ostr); std::vector<OUString> aPixels = comphelper::string::split(sDataRow, ','); - CPPUNIT_ASSERT_EQUAL(OUString("ff0000"), aPixels[25]); + CPPUNIT_ASSERT_EQUAL(u"ff0000"_ustr, aPixels[25]); sDataRow = getXPath(pDocument, "/primitive2D/transform/transform/bitmap/data[75]"_ostr, "row"_ostr); aPixels = comphelper::string::split(sDataRow, ','); - CPPUNIT_ASSERT_EQUAL(OUString("ff8000"), aPixels[75]); + CPPUNIT_ASSERT_EQUAL(u"ff8000"_ustr, aPixels[75]); sDataRow = getXPath(pDocument, "/primitive2D/transform/transform/bitmap/data[125]"_ostr, "row"_ostr); aPixels = comphelper::string::split(sDataRow, ','); - CPPUNIT_ASSERT_EQUAL(OUString("008000"), aPixels[125]); + CPPUNIT_ASSERT_EQUAL(u"008000"_ustr, aPixels[125]); } CPPUNIT_TEST_FIXTURE(Test, testTdf160726) @@ -1797,43 +1797,43 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf160726) xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf160726.svg"); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "height"_ostr, "250"); + "/primitive2D/transform/transform/bitmap"_ostr, "height"_ostr, u"250"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "width"_ostr, "250"); + "/primitive2D/transform/transform/bitmap"_ostr, "width"_ostr, u"250"_ustr); assertXPath(pDocument, "/primitive2D/transform/transform/bitmap/data"_ostr, 250); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy11"_ostr, "250"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy11"_ostr, u"250"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy12"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy12"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy13"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy13"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy21"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy21"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy22"_ostr, "250"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy22"_ostr, u"250"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy23"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy23"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy31"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy31"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy32"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy32"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy33"_ostr, "1"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy33"_ostr, u"1"_ustr); // Check the colors in the diagonal OUString sDataRow = getXPath(pDocument, "/primitive2D/transform/transform/bitmap/data[50]"_ostr, "row"_ostr); std::vector<OUString> aPixels = comphelper::string::split(sDataRow, ','); - CPPUNIT_ASSERT_EQUAL(OUString("ff0000"), aPixels[50]); + CPPUNIT_ASSERT_EQUAL(u"ff0000"_ustr, aPixels[50]); sDataRow = getXPath(pDocument, "/primitive2D/transform/transform/bitmap/data[125]"_ostr, "row"_ostr); aPixels = comphelper::string::split(sDataRow, ','); - CPPUNIT_ASSERT_EQUAL(OUString("ffff00"), aPixels[125]); + CPPUNIT_ASSERT_EQUAL(u"ffff00"_ustr, aPixels[125]); sDataRow = getXPath(pDocument, "/primitive2D/transform/transform/bitmap/data[200]"_ostr, "row"_ostr); aPixels = comphelper::string::split(sDataRow, ','); - CPPUNIT_ASSERT_EQUAL(OUString("ffff00"), aPixels[200]); + CPPUNIT_ASSERT_EQUAL(u"ffff00"_ustr, aPixels[200]); } CPPUNIT_TEST_FIXTURE(Test, testTdf160782) @@ -1841,43 +1841,43 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf160782) xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/tdf160782.svg"); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "height"_ostr, "255"); + "/primitive2D/transform/transform/bitmap"_ostr, "height"_ostr, u"255"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "width"_ostr, "255"); + "/primitive2D/transform/transform/bitmap"_ostr, "width"_ostr, u"255"_ustr); assertXPath(pDocument, "/primitive2D/transform/transform/bitmap/data"_ostr, 255); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy11"_ostr, "255"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy11"_ostr, u"255"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy12"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy12"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy13"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy13"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy21"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy21"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy22"_ostr, "255"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy22"_ostr, u"255"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy23"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy23"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy31"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy31"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy32"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy32"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy33"_ostr, "1"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy33"_ostr, u"1"_ustr); // Check the colors in the diagonal OUString sDataRow = getXPath(pDocument, "/primitive2D/transform/transform/bitmap/data[50]"_ostr, "row"_ostr); std::vector<OUString> aPixels = comphelper::string::split(sDataRow, ','); - CPPUNIT_ASSERT_EQUAL(OUString("ff0000"), aPixels[50]); + CPPUNIT_ASSERT_EQUAL(u"ff0000"_ustr, aPixels[50]); sDataRow = getXPath(pDocument, "/primitive2D/transform/transform/bitmap/data[125]"_ostr, "row"_ostr); aPixels = comphelper::string::split(sDataRow, ','); - CPPUNIT_ASSERT_EQUAL(OUString("ffff00"), aPixels[125]); + CPPUNIT_ASSERT_EQUAL(u"ffff00"_ustr, aPixels[125]); sDataRow = getXPath(pDocument, "/primitive2D/transform/transform/bitmap/data[200]"_ostr, "row"_ostr); aPixels = comphelper::string::split(sDataRow, ','); - CPPUNIT_ASSERT_EQUAL(OUString("ffff00"), aPixels[200]); + CPPUNIT_ASSERT_EQUAL(u"ffff00"_ustr, aPixels[200]); } CPPUNIT_TEST_FIXTURE(Test, testScreenBlend) @@ -1885,43 +1885,43 @@ CPPUNIT_TEST_FIXTURE(Test, testScreenBlend) xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/screenBlend.svg"); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "height"_ostr, "150"); + "/primitive2D/transform/transform/bitmap"_ostr, "height"_ostr, u"150"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "width"_ostr, "150"); + "/primitive2D/transform/transform/bitmap"_ostr, "width"_ostr, u"150"_ustr); assertXPath(pDocument, "/primitive2D/transform/transform/bitmap/data"_ostr, 150); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy11"_ostr, "150"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy11"_ostr, u"150"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy12"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy12"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy13"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy13"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy21"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy21"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy22"_ostr, "150"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy22"_ostr, u"150"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy23"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy23"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy31"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy31"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy32"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy32"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy33"_ostr, "1"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy33"_ostr, u"1"_ustr); // Check the colors in the diagonal OUString sDataRow = getXPath(pDocument, "/primitive2D/transform/transform/bitmap/data[25]"_ostr, "row"_ostr); std::vector<OUString> aPixels = comphelper::string::split(sDataRow, ','); - CPPUNIT_ASSERT_EQUAL(OUString("ff0000"), aPixels[25]); + CPPUNIT_ASSERT_EQUAL(u"ff0000"_ustr, aPixels[25]); sDataRow = getXPath(pDocument, "/primitive2D/transform/transform/bitmap/data[75]"_ostr, "row"_ostr); aPixels = comphelper::string::split(sDataRow, ','); - CPPUNIT_ASSERT_EQUAL(OUString("ff8000"), aPixels[75]); + CPPUNIT_ASSERT_EQUAL(u"ff8000"_ustr, aPixels[75]); sDataRow = getXPath(pDocument, "/primitive2D/transform/transform/bitmap/data[125]"_ostr, "row"_ostr); aPixels = comphelper::string::split(sDataRow, ','); - CPPUNIT_ASSERT_EQUAL(OUString("008000"), aPixels[125]); + CPPUNIT_ASSERT_EQUAL(u"008000"_ustr, aPixels[125]); } CPPUNIT_TEST_FIXTURE(Test, testMultiplyBlend) @@ -1929,43 +1929,43 @@ CPPUNIT_TEST_FIXTURE(Test, testMultiplyBlend) xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/multiplyBlend.svg"); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "height"_ostr, "150"); + "/primitive2D/transform/transform/bitmap"_ostr, "height"_ostr, u"150"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "width"_ostr, "150"); + "/primitive2D/transform/transform/bitmap"_ostr, "width"_ostr, u"150"_ustr); assertXPath(pDocument, "/primitive2D/transform/transform/bitmap/data"_ostr, 150); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy11"_ostr, "150"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy11"_ostr, u"150"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy12"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy12"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy13"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy13"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy21"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy21"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy22"_ostr, "150"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy22"_ostr, u"150"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy23"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy23"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy31"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy31"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy32"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy32"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy33"_ostr, "1"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy33"_ostr, u"1"_ustr); // Check the colors in the diagonal OUString sDataRow = getXPath(pDocument, "/primitive2D/transform/transform/bitmap/data[25]"_ostr, "row"_ostr); std::vector<OUString> aPixels = comphelper::string::split(sDataRow, ','); - CPPUNIT_ASSERT_EQUAL(OUString("ff0000"), aPixels[25]); + CPPUNIT_ASSERT_EQUAL(u"ff0000"_ustr, aPixels[25]); sDataRow = getXPath(pDocument, "/primitive2D/transform/transform/bitmap/data[75]"_ostr, "row"_ostr); aPixels = comphelper::string::split(sDataRow, ','); - CPPUNIT_ASSERT_EQUAL(OUString("000000"), aPixels[75]); + CPPUNIT_ASSERT_EQUAL(u"000000"_ustr, aPixels[75]); sDataRow = getXPath(pDocument, "/primitive2D/transform/transform/bitmap/data[125]"_ostr, "row"_ostr); aPixels = comphelper::string::split(sDataRow, ','); - CPPUNIT_ASSERT_EQUAL(OUString("008000"), aPixels[125]); + CPPUNIT_ASSERT_EQUAL(u"008000"_ustr, aPixels[125]); } CPPUNIT_TEST_FIXTURE(Test, testDarkenBlend) @@ -1973,43 +1973,43 @@ CPPUNIT_TEST_FIXTURE(Test, testDarkenBlend) xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/darkenBlend.svg"); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "height"_ostr, "150"); + "/primitive2D/transform/transform/bitmap"_ostr, "height"_ostr, u"150"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "width"_ostr, "150"); + "/primitive2D/transform/transform/bitmap"_ostr, "width"_ostr, u"150"_ustr); assertXPath(pDocument, "/primitive2D/transform/transform/bitmap/data"_ostr, 150); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy11"_ostr, "150"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy11"_ostr, u"150"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy12"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy12"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy13"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy13"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy21"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy21"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy22"_ostr, "150"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy22"_ostr, u"150"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy23"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy23"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy31"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy31"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy32"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy32"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy33"_ostr, "1"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy33"_ostr, u"1"_ustr); // Check the colors in the diagonal OUString sDataRow = getXPath(pDocument, "/primitive2D/transform/transform/bitmap/data[25]"_ostr, "row"_ostr); std::vector<OUString> aPixels = comphelper::string::split(sDataRow, ','); - CPPUNIT_ASSERT_EQUAL(OUString("ff0000"), aPixels[25]); + CPPUNIT_ASSERT_EQUAL(u"ff0000"_ustr, aPixels[25]); sDataRow = getXPath(pDocument, "/primitive2D/transform/transform/bitmap/data[75]"_ostr, "row"_ostr); aPixels = comphelper::string::split(sDataRow, ','); - CPPUNIT_ASSERT_EQUAL(OUString("000000"), aPixels[75]); + CPPUNIT_ASSERT_EQUAL(u"000000"_ustr, aPixels[75]); sDataRow = getXPath(pDocument, "/primitive2D/transform/transform/bitmap/data[125]"_ostr, "row"_ostr); aPixels = comphelper::string::split(sDataRow, ','); - CPPUNIT_ASSERT_EQUAL(OUString("008000"), aPixels[125]); + CPPUNIT_ASSERT_EQUAL(u"008000"_ustr, aPixels[125]); } CPPUNIT_TEST_FIXTURE(Test, testLightenBlend) @@ -2017,43 +2017,43 @@ CPPUNIT_TEST_FIXTURE(Test, testLightenBlend) xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/lightenBlend.svg"); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "height"_ostr, "150"); + "/primitive2D/transform/transform/bitmap"_ostr, "height"_ostr, u"150"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "width"_ostr, "150"); + "/primitive2D/transform/transform/bitmap"_ostr, "width"_ostr, u"150"_ustr); assertXPath(pDocument, "/primitive2D/transform/transform/bitmap/data"_ostr, 150); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy11"_ostr, "150"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy11"_ostr, u"150"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy12"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy12"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy13"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy13"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy21"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy21"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy22"_ostr, "150"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy22"_ostr, u"150"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy23"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy23"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy31"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy31"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy32"_ostr, "0"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy32"_ostr, u"0"_ustr); assertXPath(pDocument, - "/primitive2D/transform/transform/bitmap"_ostr, "xy33"_ostr, "1"); + "/primitive2D/transform/transform/bitmap"_ostr, "xy33"_ostr, u"1"_ustr); // Check the colors in the diagonal OUString sDataRow = getXPath(pDocument, "/primitive2D/transform/transform/bitmap/data[25]"_ostr, "row"_ostr); std::vector<OUString> aPixels = comphelper::string::split(sDataRow, ','); - CPPUNIT_ASSERT_EQUAL(OUString("ff0000"), aPixels[25]); + CPPUNIT_ASSERT_EQUAL(u"ff0000"_ustr, aPixels[25]); sDataRow = getXPath(pDocument, "/primitive2D/transform/transform/bitmap/data[75]"_ostr, "row"_ostr); aPixels = comphelper::string::split(sDataRow, ','); - CPPUNIT_ASSERT_EQUAL(OUString("ff8000"), aPixels[75]); + CPPUNIT_ASSERT_EQUAL(u"ff8000"_ustr, aPixels[75]); sDataRow = getXPath(pDocument, "/primitive2D/transform/transform/bitmap/data[125]"_ostr, "row"_ostr); aPixels = comphelper::string::split(sDataRow, ','); - CPPUNIT_ASSERT_EQUAL(OUString("008000"), aPixels[125]); + CPPUNIT_ASSERT_EQUAL(u"008000"_ustr, aPixels[125]); } CPPUNIT_TEST_FIXTURE(Test, testTdf149880) @@ -2065,7 +2065,7 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf149880) // - Actual : 0 // - In <>, XPath '/primitive2D/transform/mask/unhandled' number of nodes is incorrect assertXPath(pDocument, - "/primitive2D/transform/mask/unhandled"_ostr, "id"_ostr, "PATTERNFILL"); + "/primitive2D/transform/mask/unhandled"_ostr, "id"_ostr, u"PATTERNFILL"_ustr); assertXPath(pDocument, "/primitive2D/transform/mask/unhandled/mask/transform/transform/bitmap"_ostr, 28); } @@ -2083,10 +2083,10 @@ CPPUNIT_TEST_FIXTURE(Test, testCssClassRedefinition) // attribute in the original definition xmlDocUniquePtr pDocument = dumpAndParseSvg(u"/svgio/qa/cppunit/data/CssClassRedefinition.svg"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, "012"); - assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "fontcolor"_ostr, "#ff0000"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "text"_ostr, u"012"_ustr); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "fontcolor"_ostr, u"#ff0000"_ustr); assertXPath( - pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "familyname"_ostr, "Open Symbol"); + pDocument, "/primitive2D/transform/textsimpleportion[1]"_ostr, "familyname"_ostr, u"Open Symbol"_ustr); } CPPUNIT_TEST_FIXTURE(Test, testTspanFillOpacity) diff --git a/svgio/qa/cppunit/SvgRead.cxx b/svgio/qa/cppunit/SvgRead.cxx index a26556dd7a5c..a7321206b278 100644 --- a/svgio/qa/cppunit/SvgRead.cxx +++ b/svgio/qa/cppunit/SvgRead.cxx @@ -56,7 +56,7 @@ uno::Reference<io::XInputStream> TestParsing::parseSvg(const OUString& aSource) void TestParsing::testSimpleRectangle() { - OUString aSvgFile = "/svgio/qa/cppunit/data/VisiotorTest-Rect.svg"; + OUString aSvgFile = u"/svgio/qa/cppunit/data/VisiotorTest-Rect.svg"_ustr; OUString aUrl = m_directories.getURLFromSrc(aSvgFile); OUString aPath = m_directories.getPathFromSrc(aSvgFile); @@ -89,7 +89,7 @@ void TestParsing::testSimpleRectangle() void TestParsing::testPath() { - OUString aSvgFile = "/svgio/qa/cppunit/data/path.svg"; + OUString aSvgFile = u"/svgio/qa/cppunit/data/path.svg"_ustr; OUString aUrl = m_directories.getURLFromSrc(aSvgFile); OUString aPath = m_directories.getPathFromSrc(aSvgFile); @@ -109,7 +109,7 @@ void TestParsing::testPath() CPPUNIT_ASSERT_EQUAL(gfx::DrawCommandType::Path, pDrawBase->getType()); auto* pDrawPath = static_cast<gfx::DrawPath*>(pDrawBase); - CPPUNIT_ASSERT_EQUAL(OUString("m1 1h42v24h-42v-24z"), + CPPUNIT_ASSERT_EQUAL(u"m1 1h42v24h-42v-24z"_ustr, basegfx::utils::exportToSvgD(pDrawPath->maPolyPolygon, true, true, false)); CPPUNIT_ASSERT_EQUAL(0.0, pDrawPath->mnStrokeWidth); CPPUNIT_ASSERT(bool(pDrawPath->mpStrokeColor)); diff --git a/svgio/source/svgreader/svgcharacternode.cxx b/svgio/source/svgreader/svgcharacternode.cxx index 0aea1976c10f..632765d328c1 100644 --- a/svgio/source/svgreader/svgcharacternode.cxx +++ b/svgio/source/svgreader/svgcharacternode.cxx @@ -103,7 +103,7 @@ namespace svgio::svgreader const SvgStyleAttributes& rSvgStyleAttributes) { const SvgStringVector& rFontFamilyVector = rSvgStyleAttributes.getFontFamily(); - OUString aFontFamily("Times New Roman"); + OUString aFontFamily(u"Times New Roman"_ustr); if(!rFontFamilyVector.empty()) aFontFamily=rFontFamilyVector[0]; diff --git a/svgio/source/svgreader/svgfilternode.cxx b/svgio/source/svgreader/svgfilternode.cxx index 5b2f7e867523..b81b913b8f35 100644 --- a/svgio/source/svgreader/svgfilternode.cxx +++ b/svgio/source/svgreader/svgfilternode.cxx @@ -43,16 +43,16 @@ void SvgFilterNode::apply(drawinglayer::primitive2d::Primitive2DContainer& rTarg const auto& rChildren = getChildren(); const sal_uInt32 nCount(rChildren.size()); - addGraphicSourceToMapper("SourceGraphic", rTarget); + addGraphicSourceToMapper(u"SourceGraphic"_ustr, rTarget); // TODO: For now, map SourceAlpha, BackgroundImage, // BackgroundAlpha, FillPaint and StrokePaint to rTarget // so at least something is displayed - addGraphicSourceToMapper("SourceAlpha", rTarget); - addGraphicSourceToMapper("BackgroundImage", rTarget); - addGraphicSourceToMapper("BackgroundAlpha", rTarget); - addGraphicSourceToMapper("FillPaint", rTarget); - addGraphicSourceToMapper("StrokePaint", rTarget); + addGraphicSourceToMapper(u"SourceAlpha"_ustr, rTarget); + addGraphicSourceToMapper(u"BackgroundImage"_ustr, rTarget); + addGraphicSourceToMapper(u"BackgroundAlpha"_ustr, rTarget); + addGraphicSourceToMapper(u"FillPaint"_ustr, rTarget); + addGraphicSourceToMapper(u"StrokePaint"_ustr, rTarget); // apply children's filters for (sal_uInt32 a(0); a < nCount; a++) diff --git a/svgio/source/svgreader/svgnode.cxx b/svgio/source/svgreader/svgnode.cxx index 80d727a2c697..7ce5b690bb57 100644 --- a/svgio/source/svgreader/svgnode.cxx +++ b/svgio/source/svgreader/svgnode.cxx @@ -295,7 +295,7 @@ namespace { if(pParent && pParent->getType() == SVGToken::Svg) { // #i125329# find Css selector '*', add as last element if found - const SvgStyleAttributes* pNew = getDocument().findGlobalCssStyleAttributes("*"); + const SvgStyleAttributes* pNew = getDocument().findGlobalCssStyleAttributes(u"*"_ustr); if(pNew) { diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx index cd6a705114a9..7e099534e464 100644 --- a/svgio/source/svgreader/svgstyleattributes.cxx +++ b/svgio/source/svgreader/svgstyleattributes.cxx @@ -215,7 +215,7 @@ namespace svgio::svgreader // check for '!important' CssStyle mark, currently not supported // but needs to be extracted for correct parsing - OUString aTokenImportant("!important"); + OUString aTokenImportant(u"!important"_ustr); const sal_Int32 nIndexTokenImportant(aOUTokenValue.indexOf(aTokenImportant)); if(-1 != nIndexTokenImportant) @@ -2460,7 +2460,7 @@ namespace svgio::svgreader // All together gives: if(Visibility::hidden == maVisibility && SVGToken::G == mrOwner.getType() - && nullptr != mrOwner.getDocument().findSvgNodeById("ooo:meta_slides")) + && nullptr != mrOwner.getDocument().findSvgNodeById(u"ooo:meta_slides"_ustr)) { const SvgNode* pParent(mrOwner.getParent()); diff --git a/svgio/source/svgreader/svgsvgnode.cxx b/svgio/source/svgreader/svgsvgnode.cxx index 4dfa60271844..c5b0fad5e7b2 100644 --- a/svgio/source/svgreader/svgsvgnode.cxx +++ b/svgio/source/svgreader/svgsvgnode.cxx @@ -664,7 +664,7 @@ namespace svgio::svgreader // but does not need to be. bool bEmbedInFinalTransformPxTo100ThMM(true); - if(getDocument().findSvgNodeById("ooo:meta_slides") + if(getDocument().findSvgNodeById(u"ooo:meta_slides"_ustr) && !getWidth().isSet() && !getHeight().isSet()) { diff --git a/svgio/source/svguno/xsvgparser.cxx b/svgio/source/svguno/xsvgparser.cxx index 8c216821b486..13db4d2750cb 100644 --- a/svgio/source/svguno/xsvgparser.cxx +++ b/svgio/source/svguno/xsvgparser.cxx @@ -96,7 +96,7 @@ namespace svgio::svgreader // that use entities to define XML namespaces. uno::Reference<lang::XInitialization> const xInit(xParser, uno::UNO_QUERY_THROW); - uno::Sequence<uno::Any> args{ uno::Any(OUString("DoSmeplease")) }; + uno::Sequence<uno::Any> args{ uno::Any(u"DoSmeplease"_ustr) }; xInit->initialize(args); // connect parser and filter @@ -177,7 +177,7 @@ namespace svgio::svgreader OUString SAL_CALL XSvgParser::getImplementationName() { - return "svgio::svgreader::XSvgParser"; + return u"svgio::svgreader::XSvgParser"_ustr; } sal_Bool SAL_CALL XSvgParser::supportsService(const OUString& rServiceName) @@ -187,7 +187,7 @@ namespace svgio::svgreader uno::Sequence< OUString > SAL_CALL XSvgParser::getSupportedServiceNames() { - return { "com.sun.star.graphic.SvgTools" }; + return { u"com.sun.star.graphic.SvgTools"_ustr }; } } // end of namespace svgio::svgreader |