sw/qa/extras/htmlexport/xhtmlexport.cxx | 25 +++++++++++++++++++++++++ sw/qa/extras/odfexport/data/tdf107696.odt |binary 2 files changed, 25 insertions(+)
New commits: commit acedbb8692bc84c93114dc4d441b3eb20b3ac467 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Thu Apr 16 11:13:57 2020 +0200 Commit: Xisco FaulĂ <xiscofa...@libreoffice.org> CommitDate: Thu Apr 16 14:32:17 2020 +0200 tdf#107696, tdf#111492: xhtml: Add unittest Change-Id: Ic276a4ad53920c7f1e8bb8f7bcefe580ef88a446 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92346 Tested-by: Jenkins Reviewed-by: Xisco FaulĂ <xiscofa...@libreoffice.org> diff --git a/sw/qa/extras/htmlexport/xhtmlexport.cxx b/sw/qa/extras/htmlexport/xhtmlexport.cxx index bce7a1ea16c4..714c9825d759 100644 --- a/sw/qa/extras/htmlexport/xhtmlexport.cxx +++ b/sw/qa/extras/htmlexport/xhtmlexport.cxx @@ -54,6 +54,31 @@ DECLARE_HTMLEXPORT_TEST(testTdf131812, "tdf131812.odt") != -1); } +DECLARE_HTMLEXPORT_TEST(testTdf107696, "tdf107696.odt") +{ + SvStream* pStream = maTempFile.GetStream(StreamMode::READ); + CPPUNIT_ASSERT(pStream); + sal_uInt64 nLength = pStream->TellEnd(); + OString aStream(read_uInt8s_ToOString(*pStream, nLength)); + //tdf#111492 + CPPUNIT_ASSERT(aStream.indexOf("span.heading_numbering { margin-right: 0.8rem; }* { margin:0;}") + != -1); + CPPUNIT_ASSERT( + aStream.indexOf("<h2 class=\"Heading_20_2\"><a " + "id=\"a__Level_2_without_number\"><span/></a>Level 2 without number</h2>") + != -1); + CPPUNIT_ASSERT( + aStream.indexOf("<h2 class=\"Heading_20_2\"><a id=\"a_3_1_Level_2__number_3_1\"><span " + "class=\"heading_numbering\">3.1</span></a>Level <span " + "class=\"T2\">2</span>, <span class=\"T1\">number 3.1</span></h2>") + != -1); + CPPUNIT_ASSERT( + aStream.indexOf("<h2 class=\"Heading_20_2\"><a id=\"a_3_2_Level_2__number_3_2\"><span " + "class=\"heading_numbering\">3.2</span></a>Level 2, <span " + "class=\"T1\">number 3.2</span></h2>") + != -1); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/qa/extras/odfexport/data/tdf107696.odt b/sw/qa/extras/odfexport/data/tdf107696.odt new file mode 100644 index 000000000000..c24100bbdfcb Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf107696.odt differ _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits