diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-08-21 12:35:49 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-08-21 19:59:27 +0200 |
commit | 8fa209ce2e800dc8a51e941cd42a65fa8b2eb14b (patch) | |
tree | 2501cf959b05ac8bcf909932f0980b7fe249f3b8 /svgio/qa/cppunit/SvgImportTest.cxx | |
parent | e6a5ccbe578898878468180c2d4c9ee9e6afbad9 (diff) |
tdf#156834: Add basic support for dominant-baseline attribute
Change-Id: I005d6ca6bc340d73cae639ccd09321a0a00bc4b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155892
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'svgio/qa/cppunit/SvgImportTest.cxx')
-rw-r--r-- | svgio/qa/cppunit/SvgImportTest.cxx | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/svgio/qa/cppunit/SvgImportTest.cxx b/svgio/qa/cppunit/SvgImportTest.cxx index 95cbc0bcda6a..4d7cd9772d51 100644 --- a/svgio/qa/cppunit/SvgImportTest.cxx +++ b/svgio/qa/cppunit/SvgImportTest.cxx @@ -731,6 +731,30 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf156777) assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", "y", "23"); } +CPPUNIT_TEST_FIXTURE(Test, testTdf156834) +{ + Primitive2DSequence aSequence = parseSvg(u"/svgio/qa/cppunit/data/tdf156834.svg"); + CPPUNIT_ASSERT_EQUAL(1, static_cast<int>(aSequence.getLength())); + + drawinglayer::Primitive2dXmlDump dumper; + xmlDocUniquePtr pDocument = dumper.dumpAndParse(Primitive2DContainer(aSequence)); + + CPPUNIT_ASSERT (pDocument); + + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion", 3); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", "text", "Auto"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", "x", "30"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[1]", "y", "20"); + + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]", "text", "Middle"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]", "x", "30"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[2]", "y", "56"); + + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]", "text", "Hanging"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]", "x", "30"); + assertXPath(pDocument, "/primitive2D/transform/textsimpleportion[3]", "y", "94"); +} + CPPUNIT_TEST_FIXTURE(Test, testTdf104339) { Primitive2DSequence aSequenceTdf104339 = parseSvg(u"/svgio/qa/cppunit/data/tdf104339.svg"); |