summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ww8export
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-08-15 19:59:59 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-08-15 22:14:06 +0200
commitb338d215894b518098747caf0a03ea108bbd2fa3 (patch)
tree238978db83debd8ba5e08a7cb0a7080976704a8e /sw/qa/extras/ww8export
parent24a8e3209b1d7c2f4f13d5cc3f69726253af9eff (diff)
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@libreoffice.org>
Diffstat (limited to 'sw/qa/extras/ww8export')
-rw-r--r--sw/qa/extras/ww8export/data/tdf142760.docbin0 -> 36864 bytes
-rw-r--r--sw/qa/extras/ww8export/ww8export3.cxx13
2 files changed, 13 insertions, 0 deletions
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
--- /dev/null
+++ b/sw/qa/extras/ww8export/data/tdf142760.doc
Binary files 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());