From b338d215894b518098747caf0a03ea108bbd2fa3 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Sun, 15 Aug 2021 19:59:59 +0200 Subject: 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 --- sw/qa/extras/ww8export/data/tdf142760.doc | Bin 0 -> 36864 bytes sw/qa/extras/ww8export/ww8export3.cxx | 13 +++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 sw/qa/extras/ww8export/data/tdf142760.doc 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 xTablesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference 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()); -- cgit