diff options
-rw-r--r-- | svgio/qa/cppunit/SvgImportTest.cxx | 18 | ||||
-rw-r--r-- | svgio/qa/cppunit/data/noneColor.svg | 3 |
2 files changed, 21 insertions, 0 deletions
diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx index aee83b05d440..c3605a16e09f 100644 --- a/svgio/qa/cppunit/SvgImportTest.cxx +++ b/svgio/qa/cppunit/SvgImportTest.cxx @@ -54,6 +54,7 @@ class Test : public test::BootstrapFixture, public XmlTestTools void testTdf97543(); void testRGBColor(); void testRGBAColor(); + void testNoneColor(); void testTdf97936(); void testClipPathAndParentStyle(); void testClipPathAndStyle(); @@ -88,6 +89,7 @@ public: CPPUNIT_TEST(testTdf97543); CPPUNIT_TEST(testRGBColor); CPPUNIT_TEST(testRGBAColor); + CPPUNIT_TEST(testNoneColor); CPPUNIT_TEST(testTdf97936); CPPUNIT_TEST(testClipPathAndParentStyle); CPPUNIT_TEST(testClipPathAndStyle); @@ -465,6 +467,22 @@ void Test::testRGBAColor() assertXPath(pDocument, "/primitive2D/transform/unifiedtransparence", "transparence", "0.5"); } +void Test::testNoneColor() +{ + Primitive2DSequence aSequenceRGBAColor = parseSvg("/svgio/qa/cppunit/data/noneColor.svg"); + CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequenceRGBAColor.getLength())); + + drawinglayer::tools::Primitive2dXmlDump dumper; + xmlDocPtr pDocument = dumper.dumpAndParse(comphelper::sequenceToContainer<Primitive2DContainer>(aSequenceRGBAColor)); + + CPPUNIT_ASSERT (pDocument); + + //No polypolygoncolor exists + assertXPath(pDocument, "/primitive2D/transform/mask/polypolygoncolor", 0); + assertXPath(pDocument, "/primitive2D/transform/mask/polypolygonstroke/line", "color", "#000000"); + assertXPath(pDocument, "/primitive2D/transform/mask/polypolygonstroke/line", "width", "3"); +} + void Test::testTdf97936() { // check that both rectangles are rendered in the viewBox diff --git a/svgio/qa/cppunit/data/noneColor.svg b/svgio/qa/cppunit/data/noneColor.svg new file mode 100644 index 000000000000..552a1cf5afaf --- /dev/null +++ b/svgio/qa/cppunit/data/noneColor.svg @@ -0,0 +1,3 @@ +<svg width="400" height="110"> + <rect width="300" height="100" style="fill:none;stroke-width:3;stroke:rgb(0,0,0)" /> +</svg> |