diff options
-rw-r--r-- | svgio/qa/cppunit/SvgImportTest.cxx | 14 | ||||
-rw-r--r-- | svgio/qa/cppunit/data/tdf45771.svg | 5 |
2 files changed, 19 insertions, 0 deletions
diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx index e50d8862d0d8..cc4c2679a4f7 100644 --- a/svgio/qa/cppunit/SvgImportTest.cxx +++ b/svgio/qa/cppunit/SvgImportTest.cxx @@ -42,6 +42,7 @@ class Test : public test::BootstrapFixture, public XmlTestTools void testTdf87309(); void testFontsizeKeywords(); void testFontsizePercentage(); + void testTdf45771(); Primitive2DSequence parseSvg(const char* aSource); @@ -54,6 +55,7 @@ public: CPPUNIT_TEST(testTdf87309); CPPUNIT_TEST(testFontsizeKeywords); CPPUNIT_TEST(testFontsizePercentage); + CPPUNIT_TEST(testTdf45771); CPPUNIT_TEST_SUITE_END(); }; @@ -190,6 +192,18 @@ void Test::testFontsizePercentage() assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", "height", "16"); } +void Test::testTdf45771() +{ + Primitive2DSequence aSequenceTdf45771 = parseSvg("/svgio/qa/cppunit/data/tdf45771.svg"); + CPPUNIT_ASSERT_EQUAL(1, (int)aSequenceTdf45771.getLength()); + + Primitive2dXmlDump dumper; + xmlDocPtr pDocument = dumper.dumpAndParse(comphelper::sequenceToContainer<Primitive2DContainer>(aSequenceTdf45771)); + + CPPUNIT_ASSERT (pDocument); + + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", "height", "32"); +} CPPUNIT_TEST_SUITE_REGISTRATION(Test); } diff --git a/svgio/qa/cppunit/data/tdf45771.svg b/svgio/qa/cppunit/data/tdf45771.svg new file mode 100644 index 000000000000..f49e0f569134 --- /dev/null +++ b/svgio/qa/cppunit/data/tdf45771.svg @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<svg height="600" width="400" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> + +<text x="5" y="100" font-size="2em">Sample</text> +</svg> |