diff options
author | Svante Schubert <svante.schubert@gmail.com> | 2023-05-05 12:26:53 +0200 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2023-05-08 09:42:22 +0200 |
commit | e857b12dada1468cb3bdb49ed5ea636df0b6d153 (patch) | |
tree | 880bc040c53b02f09d005cb7410c8a5feb010ed4 /sd | |
parent | ab85fd73a52256da6feb4fabd1b188f4f0fb7ce4 (diff) |
tdf#154989 filter: XHTML export: avoid duplicated frames
Various updates on XSLT ODF2HTML triggered by TDF issue 154989 - esp. image/frame positioning by CSS position
(regression from commit f680b6d74209fd78c547201b2f14c6547e55c81b)
Change-Id: I4d08a67ebca7ae3808db07c828488bb9284623a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151094
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/qa/unit/HtmlExportTest.cxx | 24 | ||||
-rw-r--r-- | sd/qa/unit/data/tdf154989.odg | bin | 0 -> 69643 bytes |
2 files changed, 24 insertions, 0 deletions
diff --git a/sd/qa/unit/HtmlExportTest.cxx b/sd/qa/unit/HtmlExportTest.cxx index 812757bc1761..93c1a21339d1 100644 --- a/sd/qa/unit/HtmlExportTest.cxx +++ b/sd/qa/unit/HtmlExportTest.cxx @@ -40,8 +40,32 @@ public: assertXPath(htmlDoc, "/html/head/meta[3]", "content", "2014-04-09T17:05:41.987922038"); } + void testTdf154989() + { + loadFromURL(u"tdf154989.odg"); + save("XHTML Draw File"); + xmlDocUniquePtr pXmlDoc = parseXml(maTempFile); + + assertXPath(pXmlDoc, "/xhtml:html", 1); + // 1 page + assertXPath(pXmlDoc, "/xhtml:html/xhtml:body/xhtml:div", 1); + // 4 shapes + assertXPath(pXmlDoc, "/xhtml:html/xhtml:body/xhtml:div[1]/xhtml:div", 4); + // 3 of them are text boxes + assertXPath(pXmlDoc, "/xhtml:html/xhtml:body/xhtml:div[1]/xhtml:div/xhtml:div", 3); + // not sure if the order of these is stable? + assertXPathContent(pXmlDoc, + "/xhtml:html/xhtml:body/xhtml:div[1]/xhtml:div[2]/xhtml:div/xhtml:p", + "before"); + assertXPathContent( + pXmlDoc, "/xhtml:html/xhtml:body/xhtml:div[1]/xhtml:div[3]/xhtml:div/xhtml:p", "above"); + assertXPathContent( + pXmlDoc, "/xhtml:html/xhtml:body/xhtml:div[1]/xhtml:div[4]/xhtml:div/xhtml:p", "below"); + } + CPPUNIT_TEST_SUITE(SdHTMLFilterTest); CPPUNIT_TEST(testHTMLExport); + CPPUNIT_TEST(testTdf154989); CPPUNIT_TEST_SUITE_END(); }; diff --git a/sd/qa/unit/data/tdf154989.odg b/sd/qa/unit/data/tdf154989.odg Binary files differnew file mode 100644 index 000000000000..5bc7e83042dd --- /dev/null +++ b/sd/qa/unit/data/tdf154989.odg |