[Libreoffice-commits] core.git: sw/qa

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Thu Sep 10 22:47:18 UTC 2020


 sw/qa/extras/odfexport/data/tdf136645.odt |binary
 sw/qa/extras/odfexport/odfexport.cxx      |   14 ++++++++++++++
 2 files changed, 14 insertions(+)

New commits:
commit ed4f610f4a3de12016f8308a17b6ad4f86e9d67a
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Thu Sep 10 21:41:59 2020 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Fri Sep 11 00:46:29 2020 +0200

    tdf#136645: sw_odfexport: Add unittest
    
    Change-Id: I0ec82de4932f4200aeb7cf778bf93dd9d1c28eda
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102402
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/sw/qa/extras/odfexport/data/tdf136645.odt b/sw/qa/extras/odfexport/data/tdf136645.odt
new file mode 100644
index 000000000000..a8487c317347
Binary files /dev/null and b/sw/qa/extras/odfexport/data/tdf136645.odt differ
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index 20c8b25f0b48..bf7b02e13704 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -1530,6 +1530,20 @@ DECLARE_ODFEXPORT_TEST(testWhitespace, "whitespace.odt")
     CPPUNIT_ASSERT(!xPortions->hasMoreElements());
 }
 
+DECLARE_ODFEXPORT_TEST(testTdf136645, "tdf136645.odt")
+{
+    CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+    // Without the fix in place, this would have failed with
+    //- Expected: 2640
+    //- Actual  : 3000
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(2640), parseDump("/root/page/body/section/column[1]/body/infos/bounds", "width").toInt32());
+
+    //- Expected: 6000
+    //- Actual  : 6360
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(6000), parseDump("/root/page/body/section/column[2]/body/infos/bounds", "width").toInt32());
+}
+
 DECLARE_ODFEXPORT_TEST(testBtlrCell, "btlr-cell.odt")
 {
     CPPUNIT_ASSERT_EQUAL(1, getPages());


More information about the Libreoffice-commits mailing list