sw/qa/filter/ww8/data/tdf71749_with_footnote.doc |binary sw/qa/filter/ww8/data/tdf71749_without_footnote.doc |binary sw/qa/filter/ww8/ww8.cxx | 16 ++++++++++++++++ 3 files changed, 16 insertions(+)
New commits: commit d5d4e1334957abc29c5c4f543a8cd15a5aaf8748 Author: Adam Seskunas <adamsesku...@gmail.com> AuthorDate: Mon Jul 8 11:23:10 2024 -0700 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Thu Jul 18 01:11:12 2024 +0200 tdf#71749 Unit test for sw: WW8: don't loop on tables in footnotes Change-Id: I5ca830b2ec0c883a23bab1ece006f8c88310f3ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170169 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/qa/filter/ww8/data/tdf71749_with_footnote.doc b/sw/qa/filter/ww8/data/tdf71749_with_footnote.doc new file mode 100644 index 000000000000..9de42a4aac11 Binary files /dev/null and b/sw/qa/filter/ww8/data/tdf71749_with_footnote.doc differ diff --git a/sw/qa/filter/ww8/data/tdf71749_without_footnote.doc b/sw/qa/filter/ww8/data/tdf71749_without_footnote.doc new file mode 100644 index 000000000000..cf0b647f1066 Binary files /dev/null and b/sw/qa/filter/ww8/data/tdf71749_without_footnote.doc differ diff --git a/sw/qa/filter/ww8/ww8.cxx b/sw/qa/filter/ww8/ww8.cxx index 9a1b919c0cc8..1838210ed9d8 100644 --- a/sw/qa/filter/ww8/ww8.cxx +++ b/sw/qa/filter/ww8/ww8.cxx @@ -642,6 +642,22 @@ CPPUNIT_TEST_FIXTURE(Test, testContentControlPDFDropDownEmptyItem) // i.e. we emitted an empty list item, so the result can't be opened in Word. assertXPath(pXmlDoc, "//w:dropDownList/w:listItem"_ostr, 1); } + +CPPUNIT_TEST_FIXTURE(Test, tdf71749_with_footnote) +{ + // Without the fix in place, + // loading the document would hang. + loadFromFile(u"tdf71749_with_footnote.doc"); + CPPUNIT_ASSERT_EQUAL(1, getPages()); +} + +CPPUNIT_TEST_FIXTURE(Test, tdf71749_without_footnote) +{ + // Without the fix in place, + // loading the document would hang. + loadFromFile(u"tdf71749_without_footnote.doc"); + CPPUNIT_ASSERT_EQUAL(1, getPages()); +} } CPPUNIT_PLUGIN_IMPLEMENT();