[Libreoffice-commits] core.git: sw/qa
Xisco Fauli (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jun 7 11:39:38 UTC 2021
sw/qa/extras/htmlexport/xhtmlexport.cxx | 36 ++++++++++++++++++++++++++++++
sw/qa/extras/odfexport/data/tdf142483.odt |binary
2 files changed, 36 insertions(+)
New commits:
commit d161c4de0b145b975bc90ce4b0a1ff7c234b676e
Author: Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Mon Jun 7 10:45:23 2021 +0200
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Mon Jun 7 13:38:59 2021 +0200
tdf#142483: sw_xhtmlexport: Add unittest
Change-Id: Ie22d23a49e4e1f352cec5ef32c2b0545b50f5aa5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116777
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
diff --git a/sw/qa/extras/htmlexport/xhtmlexport.cxx b/sw/qa/extras/htmlexport/xhtmlexport.cxx
index 4fa48cf77cdb..17efc1607b57 100644
--- a/sw/qa/extras/htmlexport/xhtmlexport.cxx
+++ b/sw/qa/extras/htmlexport/xhtmlexport.cxx
@@ -70,6 +70,42 @@ DECLARE_HTMLEXPORT_TEST(testTdf118637, "tdf118637.odt")
!= -1);
}
+DECLARE_HTMLEXPORT_TEST(testTdf142483, "tdf142483.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("padding:0.0382in; border-left-width:thin; border-left-style:solid; "
+ "border-left-color:#000000; border-right-style:none; "
+ "border-top-width:thin; border-top-style:solid; border-top-color:#000000; "
+ "border-bottom-width:thin; border-bottom-style:solid; "
+ "border-bottom-color:#000000;")
+ != -1);
+ CPPUNIT_ASSERT(
+ aStream.indexOf("padding:0.0382in; border-left-width:thin; border-left-style:solid; "
+ "border-left-color:#000000; border-right-style:none; "
+ "border-top-style:none; border-bottom-width:thin; "
+ "border-bottom-style:solid; border-bottom-color:#000000;")
+ != -1);
+ CPPUNIT_ASSERT(
+ aStream.indexOf("border-top-width:thin; border-top-style:solid; border-top-color:#000000; "
+ "border-left-width:thin; border-left-style:solid; "
+ "border-left-color:#000000; border-bottom-width:thin; "
+ "border-bottom-style:solid; border-bottom-color:#000000; "
+ "border-right-width:thin; border-right-style:solid; "
+ "border-right-color:#000000; padding:0.0382in;")
+ != -1);
+ CPPUNIT_ASSERT(
+ aStream.indexOf("padding:0.0382in; border-left-width:thin; border-left-style:solid; "
+ "border-left-color:#000000; border-right-width:thin; "
+ "border-right-style:solid; border-right-color:#000000; "
+ "border-top-style:none; border-bottom-width:thin; "
+ "border-bottom-style:solid; border-bottom-color:#000000;")
+ != -1);
+}
+
DECLARE_HTMLEXPORT_TEST(testTdf107696, "tdf107696.odt")
{
SvStream* pStream = maTempFile.GetStream(StreamMode::READ);
diff --git a/sw/qa/extras/odfexport/data/tdf142483.odt b/sw/qa/extras/odfexport/data/tdf142483.odt
new file mode 100644
index 000000000000..d6aba2bbd959
Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf142483.odt differ
More information about the Libreoffice-commits
mailing list