summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorAdam Seskunas <adamseskunas@gmail.com>2024-07-08 11:23:10 -0700
committerXisco Fauli <xiscofauli@libreoffice.org>2024-07-18 01:11:12 +0200
commitd5d4e1334957abc29c5c4f543a8cd15a5aaf8748 (patch)
tree72d16b0df84ca90f6bffb5aa9dbc61477ab1f535 /sw/qa
parent4504d921a6ac45617ab700316182e68c3248a045 (diff)
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 <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/filter/ww8/data/tdf71749_with_footnote.docbin0 -> 20480 bytes
-rw-r--r--sw/qa/filter/ww8/data/tdf71749_without_footnote.docbin0 -> 22528 bytes
-rw-r--r--sw/qa/filter/ww8/ww8.cxx16
3 files changed, 16 insertions, 0 deletions
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
--- /dev/null
+++ b/sw/qa/filter/ww8/data/tdf71749_with_footnote.doc
Binary files 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
--- /dev/null
+++ b/sw/qa/filter/ww8/data/tdf71749_without_footnote.doc
Binary files 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();