diff options
Diffstat (limited to 'svgio')
-rw-r--r-- | svgio/qa/cppunit/SvgImportTest.cxx | 17 | ||||
-rw-r--r-- | svgio/qa/cppunit/data/tdf85770.svg | 7 |
2 files changed, 24 insertions, 0 deletions
diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx index cc4c2679a4f7..f918a1527946 100644 --- a/svgio/qa/cppunit/SvgImportTest.cxx +++ b/svgio/qa/cppunit/SvgImportTest.cxx @@ -43,6 +43,7 @@ class Test : public test::BootstrapFixture, public XmlTestTools void testFontsizeKeywords(); void testFontsizePercentage(); void testTdf45771(); + void testTdf85770(); Primitive2DSequence parseSvg(const char* aSource); @@ -56,6 +57,7 @@ public: CPPUNIT_TEST(testFontsizeKeywords); CPPUNIT_TEST(testFontsizePercentage); CPPUNIT_TEST(testTdf45771); + CPPUNIT_TEST(testTdf85770); CPPUNIT_TEST_SUITE_END(); }; @@ -204,6 +206,21 @@ void Test::testTdf45771() assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", "height", "32"); } + +void Test::testTdf85770() +{ + Primitive2DSequence aSequenceTdf85770 = parseSvg("/svgio/qa/cppunit/data/tdf85770.svg"); + CPPUNIT_ASSERT_EQUAL(1, (int)aSequenceTdf85770.getLength()); + + Primitive2dXmlDump dumper; + xmlDocPtr pDocument = dumper.dumpAndParse(comphelper::sequenceToContainer<Primitive2DContainer>(aSequenceTdf85770)); + + CPPUNIT_ASSERT (pDocument); + + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", "text", "Start Middle End"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]", "text", "Start "); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]", "text", "End"); +} CPPUNIT_TEST_SUITE_REGISTRATION(Test); } diff --git a/svgio/qa/cppunit/data/tdf85770.svg b/svgio/qa/cppunit/data/tdf85770.svg new file mode 100644 index 000000000000..b1cf9eb3c26e --- /dev/null +++ b/svgio/qa/cppunit/data/tdf85770.svg @@ -0,0 +1,7 @@ +<svg id="svg-root" + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + width="13cm" height="11cm"> +<text x="5" y="35" font-size="x-small">Start Middle End</text> +<text x="5" y="65" font-size="x-small">Start <tspan visibility="hidden">Middle</tspan> End</text> +</svg> |