diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2021-05-19 10:38:02 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2021-05-21 13:31:50 +0200 |
commit | 5e046f9c74977b0db7502fa73e7488c64027a957 (patch) | |
tree | af1b6c4d998269a2ce70e45d255a45633387a74b /sw | |
parent | 154e1e7cb8be043000a711cabd1dc922bf71d350 (diff) |
tdf#118637: sw_xhtmlexport: Add unittest
Change-Id: I110404a73ccdbffed788009730967b0efbbaf51f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115785
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit 0655560f1b8aff45954682bb92498570f2000014)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115836
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/htmlexport/xhtmlexport.cxx | 16 | ||||
-rw-r--r-- | sw/qa/extras/odfexport/data/tdf118637.odt | bin | 0 -> 10547 bytes |
2 files changed, 16 insertions, 0 deletions
diff --git a/sw/qa/extras/htmlexport/xhtmlexport.cxx b/sw/qa/extras/htmlexport/xhtmlexport.cxx index 85adfa2b7b49..738e16760c89 100644 --- a/sw/qa/extras/htmlexport/xhtmlexport.cxx +++ b/sw/qa/extras/htmlexport/xhtmlexport.cxx @@ -54,6 +54,22 @@ DECLARE_HTMLEXPORT_TEST(testTdf131812, "tdf131812.odt") != -1); } +DECLARE_HTMLEXPORT_TEST(testTdf118637, "tdf118637.odt") +{ + SvStream* pStream = maTempFile.GetStream(StreamMode::READ); + CPPUNIT_ASSERT(pStream); + sal_uInt64 nLength = pStream->TellEnd(); + OString aStream(read_uInt8s_ToOString(*pStream, nLength)); + CPPUNIT_ASSERT( + aStream.indexOf( + "<div style=\"display:inline; position:relative; left:0cm;\">The formula </div>") + != -1); + CPPUNIT_ASSERT( + aStream.indexOf( + "<div style=\"display:inline; position:relative; left:0cm;\">should be inline.</div>") + != -1); +} + DECLARE_HTMLEXPORT_TEST(testTdf107696, "tdf107696.odt") { SvStream* pStream = maTempFile.GetStream(StreamMode::READ); diff --git a/sw/qa/extras/odfexport/data/tdf118637.odt b/sw/qa/extras/odfexport/data/tdf118637.odt Binary files differnew file mode 100644 index 000000000000..c2a8b4f53035 --- /dev/null +++ b/sw/qa/extras/odfexport/data/tdf118637.odt |