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

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Sun Aug 15 20:14:40 UTC 2021


 sw/qa/extras/ww8export/data/tdf142760.doc |binary
 sw/qa/extras/ww8export/ww8export3.cxx     |   13 +++++++++++++
 2 files changed, 13 insertions(+)

New commits:
commit b338d215894b518098747caf0a03ea108bbd2fa3
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Sun Aug 15 19:59:59 2021 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Sun Aug 15 22:14:06 2021 +0200

    tdf#142760: sw_ww8export3: Add unittest
    
    Change-Id: I82a1e8b8ddf5e392b9c2b578247a2364864a0970
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120513
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/sw/qa/extras/ww8export/data/tdf142760.doc b/sw/qa/extras/ww8export/data/tdf142760.doc
new file mode 100644
index 000000000000..1e90532fe899
Binary files /dev/null and b/sw/qa/extras/ww8export/data/tdf142760.doc differ
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx b/sw/qa/extras/ww8export/ww8export3.cxx
index 831a1923d6d8..d3a22cb13013 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -930,6 +930,19 @@ DECLARE_WW8EXPORT_TEST(testTdf120394, "tdf120394.doc")
     }
 }
 
+DECLARE_WW8EXPORT_TEST(testTdf142760, "tdf142760.doc")
+{
+    // Without the fix in place, this test would have failed with
+    // - Expected: 2
+    // - Actual  : 6
+    CPPUNIT_ASSERT_EQUAL(2, getPages());
+    CPPUNIT_ASSERT_EQUAL(1, getShapes());
+
+    uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+    uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
+    CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xTables->getCount());
+}
+
 DECLARE_WW8EXPORT_TEST(testTdf134570, "tdf134570.doc")
 {
     CPPUNIT_ASSERT_EQUAL(1, getPages());


More information about the Libreoffice-commits mailing list