dev/null                                  |binary
 sw/qa/extras/ww8export/data/tdf124937.doc |binary
 sw/qa/extras/ww8export/ww8export3.cxx     |    9 +++++++++
 3 files changed, 9 insertions(+)

New commits:
commit a86f7a139012b4b49c0420041769c4b68a289eab
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Wed Oct 13 15:01:45 2021 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Wed Oct 13 18:44:18 2021 +0200

    tdf#124937: sw_ww8export3: Add unittest
    
    sw/qa/core/data/doc/tdf124937.doc was added in
    96acebb72211b4718eb3038c427df37b55b17b0b
    < tdf#124937 reset m_pFirstOfBorderMerge before truncate. >
    but no unittest was added with it.
    Simplify the document and add the test
    
    Change-Id: I505df15d701c2061b33dfb9cd7cfdf95817c1f5e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123559
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sw/qa/core/data/doc/tdf124937.doc 
b/sw/qa/core/data/doc/tdf124937.doc
deleted file mode 100644
index 4a3f91f7c020..000000000000
Binary files a/sw/qa/core/data/doc/tdf124937.doc and /dev/null differ
diff --git a/sw/qa/extras/ww8export/data/tdf124937.doc 
b/sw/qa/extras/ww8export/data/tdf124937.doc
new file mode 100644
index 000000000000..eb1ab2d9e0cd
Binary files /dev/null and b/sw/qa/extras/ww8export/data/tdf124937.doc differ
diff --git a/sw/qa/extras/ww8export/ww8export3.cxx 
b/sw/qa/extras/ww8export/ww8export3.cxx
index 01ddaf60016e..a7ce6a38ed75 100644
--- a/sw/qa/extras/ww8export/ww8export3.cxx
+++ b/sw/qa/extras/ww8export/ww8export3.cxx
@@ -307,6 +307,15 @@ DECLARE_WW8EXPORT_TEST(testTdf139495_tinyHeader, 
"tdf139495_tinyHeader.doc")
     CPPUNIT_ASSERT(getPages() < 3);
 }
 
+DECLARE_WW8EXPORT_TEST(testTdf124937, "tdf124937.doc")
+{
+    // Check it doesn't crash at import time
+    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());
+    CPPUNIT_ASSERT_EQUAL(1, getPages());
+}
+
 DECLARE_WW8EXPORT_TEST(testFdo53985, "fdo53985.doc")
 {
     uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, 
uno::UNO_QUERY);

Reply via email to