summaryrefslogtreecommitdiff
path: root/svgio/qa/cppunit
diff options
context:
space:
mode:
Diffstat (limited to 'svgio/qa/cppunit')
-rw-r--r--svgio/qa/cppunit/SvgImportTest.cxx19
-rw-r--r--svgio/qa/cppunit/data/tdf156167.svg18
2 files changed, 37 insertions, 0 deletions
diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx
index 788eab52fdf5..24f146592249 100644
--- a/svgio/qa/cppunit/SvgImportTest.cxx
+++ b/svgio/qa/cppunit/SvgImportTest.cxx
@@ -505,6 +505,25 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf156018)
assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]", "color", "#0000ff");
}
+CPPUNIT_TEST_FIXTURE(Test, testTdf156167)
+{
+ Primitive2DSequence aSequence = parseSvg(u"/svgio/qa/cppunit/data/tdf156167.svg");
+ CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequence.getLength()));
+
+ drawinglayer::Primitive2dXmlDump dumper;
+ xmlDocUniquePtr pDocument = dumper.dumpAndParse(aSequence);
+
+ CPPUNIT_ASSERT (pDocument);
+
+ assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[1]", "color", "#ffa500");
+
+ // Without the fix in place, this test would have failed with
+ // - Expected: #ffa500
+ // - Actual : #ff0000
+ assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[2]", "color", "#ffa500");
+ assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor[3]", "color", "#ffa500");
+}
+
CPPUNIT_TEST_FIXTURE(Test, testTdf155932)
{
Primitive2DSequence aSequence = parseSvg(u"/svgio/qa/cppunit/data/tdf155932.svg");
diff --git a/svgio/qa/cppunit/data/tdf156167.svg b/svgio/qa/cppunit/data/tdf156167.svg
new file mode 100644
index 000000000000..5ab1254013c4
--- /dev/null
+++ b/svgio/qa/cppunit/data/tdf156167.svg
@@ -0,0 +1,18 @@
+<svg id="svg-root" width="100%" height="100%"
+ viewBox="0 0 480 360" xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink">
+ <g id="test-body-content" font-family="SVGFreeSansASCII,sans-serif" font-size="18">
+
+ <g fill="orange">
+ <circle id="a" FiLl="red" cx="140" cy="100" r="50"/>
+ </g>
+ <circle id="b" fill="red" style="FiLl: oRaNgE" cx="340" cy="100" r="50"/>
+ <circle id="c" fill="blue" cx="140" cy="220" r="50"/>
+
+ <style type="text/css">
+ #c {fill: red }
+ #c {FiLl: oRaNgE }
+ </style>
+
+ </g>
+</svg>