summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2024-06-25 18:47:15 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2024-06-26 14:29:16 +0200
commit3e845b10be7ae7f2ac91e37fe6404dd390aaa49d (patch)
treeb70046ae52d1154c36ddb7f94efa0679b76a4937 /sw/qa
parentd44784a24a8ff2a6f92618585b786192ef55a6ab (diff)
tdf#161718 sw: fix background flys blocking footnotes
The problem is that the document has an unwanted page break on the paragraph with the footnote. The reason is that lcl_GetFootnoteLower() tries to evade flys, but doesn't take into account that background flys (Wrap Through) should be ignored. (somehow regression from commit c303981cfd95ce1c3881366023d5495ae2edce97) Change-Id: I02578f14644e232fac127142fe12801101f87f86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169530 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/layout/data/tdf161718.docxbin0 -> 18843 bytes
-rw-r--r--sw/qa/extras/layout/layout3.cxx17
2 files changed, 17 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/data/tdf161718.docx b/sw/qa/extras/layout/data/tdf161718.docx
new file mode 100644
index 000000000000..240192e07a71
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf161718.docx
Binary files differ
diff --git a/sw/qa/extras/layout/layout3.cxx b/sw/qa/extras/layout/layout3.cxx
index a07e7e6cd037..7c36605bb82d 100644
--- a/sw/qa/extras/layout/layout3.cxx
+++ b/sw/qa/extras/layout/layout3.cxx
@@ -195,6 +195,23 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf128966)
xmlXPathFreeObject(pXmlObj);
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf161718)
+{
+ createSwDoc("tdf161718.docx");
+
+ xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+
+ // everything on one page
+ assertXPath(pXmlDoc, "/root/page/header"_ostr, 1);
+ assertXPath(pXmlDoc, "/root/page/header/txt/anchored"_ostr, 1);
+ assertXPath(pXmlDoc, "/root/page/footer"_ostr, 1);
+ assertXPath(pXmlDoc, "/root/page/ftncont/ftn"_ostr, 1);
+ assertXPath(pXmlDoc, "/root/page/ftncont/ftn/txt"_ostr, 1);
+ assertXPath(pXmlDoc, "/root/page/body/txt"_ostr, 27);
+ assertXPath(pXmlDoc, "/root/page/body/txt/anchored"_ostr, 1);
+ assertXPath(pXmlDoc, "/root/page"_ostr, 1);
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf119908)
{
createSwDoc("tdf130088.docx");