summaryrefslogtreecommitdiffstats
path: root/svgio/qa
diff options
context:
space:
mode:
Diffstat (limited to 'svgio/qa')
-rw-r--r--svgio/qa/cppunit/SvgImportTest.cxx17
-rw-r--r--svgio/qa/cppunit/data/tdf97941.svg6
2 files changed, 23 insertions, 0 deletions
diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx
index 20305988c3ab..78701880f3eb 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 testTdf97941();
void testTdf85770();
void testTdf79163();
void testTdf97542_1();
@@ -63,6 +64,7 @@ public:
CPPUNIT_TEST(testFontsizeKeywords);
CPPUNIT_TEST(testFontsizePercentage);
CPPUNIT_TEST(testTdf45771);
+ CPPUNIT_TEST(testTdf97941);
CPPUNIT_TEST(testTdf85770);
CPPUNIT_TEST(testTdf79163);
CPPUNIT_TEST(testTdf97542_1);
@@ -208,6 +210,7 @@ void Test::testFontsizePercentage()
void Test::testTdf45771()
{
+ //Check text fontsize when using relative units
Primitive2DSequence aSequenceTdf45771 = parseSvg("/svgio/qa/cppunit/data/tdf45771.svg");
CPPUNIT_ASSERT_EQUAL(1, (int)aSequenceTdf45771.getLength());
@@ -219,6 +222,20 @@ void Test::testTdf45771()
assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", "height", "32");
}
+void Test::testTdf97941()
+{
+ //Check tspan fontsize when using relative units
+ Primitive2DSequence aSequenceTdf97941 = parseSvg("/svgio/qa/cppunit/data/tdf97941.svg");
+ CPPUNIT_ASSERT_EQUAL(1, (int)aSequenceTdf97941.getLength());
+
+ Primitive2dXmlDump dumper;
+ xmlDocPtr pDocument = dumper.dumpAndParse(comphelper::sequenceToContainer<Primitive2DContainer>(aSequenceTdf97941));
+
+ CPPUNIT_ASSERT (pDocument);
+
+ assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", "height", "48");
+}
+
void Test::testTdf85770()
{
Primitive2DSequence aSequenceTdf85770 = parseSvg("/svgio/qa/cppunit/data/tdf85770.svg");
diff --git a/svgio/qa/cppunit/data/tdf97941.svg b/svgio/qa/cppunit/data/tdf97941.svg
new file mode 100644
index 000000000000..cfe1ca8c475b
--- /dev/null
+++ b/svgio/qa/cppunit/data/tdf97941.svg
@@ -0,0 +1,6 @@
+<?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">
+ <tspan font-size="3em">Sample</tspan></text>
+</svg>