summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svgio/qa/cppunit/SvgImportTest.cxx15
-rw-r--r--svgio/qa/cppunit/data/tdf87309.svg4
2 files changed, 19 insertions, 0 deletions
diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx
index d0560534a24c..4b87b501a274 100644
--- a/svgio/qa/cppunit/SvgImportTest.cxx
+++ b/svgio/qa/cppunit/SvgImportTest.cxx
@@ -38,6 +38,7 @@ class Test : public test::BootstrapFixture, public XmlTestTools
void checkRectPrimitive(Primitive2DSequence& rPrimitive);
void testStyles();
+ void testTdf87309();
Primitive2DSequence parseSvg(const char* aSource);
@@ -47,6 +48,7 @@ public:
CPPUNIT_TEST_SUITE(Test);
CPPUNIT_TEST(testStyles);
+ CPPUNIT_TEST(testTdf87309);
CPPUNIT_TEST_SUITE_END();
};
@@ -118,6 +120,19 @@ void Test::testStyles()
CPPUNIT_ASSERT(arePrimitive2DSequencesEqual(aSequenceRect, aSequenceRectWithStylesByGroup));
}
+void Test::testTdf87309()
+{
+ Primitive2DSequence aSequenceTdf87309 = parseSvg("/svgio/qa/cppunit/data/tdf87309.svg");
+ CPPUNIT_ASSERT_EQUAL(1, (int)aSequenceTdf87309.getLength());
+
+ Primitive2dXmlDump dumper;
+ xmlDocPtr pDocument = dumper.dumpAndParse(aSequenceTdf87309);
+
+ CPPUNIT_ASSERT (pDocument);
+
+ assertXPath(pDocument, "/primitive2D/transform/polypolygoncolor", "color", "#000000");
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
}
diff --git a/svgio/qa/cppunit/data/tdf87309.svg b/svgio/qa/cppunit/data/tdf87309.svg
new file mode 100644
index 000000000000..af8a7df254f4
--- /dev/null
+++ b/svgio/qa/cppunit/data/tdf87309.svg
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<svg width="120" height="120" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <rect x="10" y="10" width="100" height="100" fill="currentColor"/>
+</svg> \ No newline at end of file