summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/layout/data/linked_frames_section_bug.odtbin0 -> 13663 bytes
-rw-r--r--sw/qa/extras/layout/layout.cxx18
-rw-r--r--sw/source/core/layout/sectfrm.cxx1
3 files changed, 19 insertions, 0 deletions
diff --git a/sw/qa/extras/layout/data/linked_frames_section_bug.odt b/sw/qa/extras/layout/data/linked_frames_section_bug.odt
new file mode 100644
index 000000000000..639332ad5516
--- /dev/null
+++ b/sw/qa/extras/layout/data/linked_frames_section_bug.odt
Binary files differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index def657eec623..1e35f749e67d 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -3693,6 +3693,24 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf156725)
"/root/page[2]/body/txt/anchored/fly/column[2]/body/section/column[2]/body/txt", 1);
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf156419)
+{
+ createDoc("linked_frames_section_bug.odt");
+
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page", 2);
+ // there are 2 flys on page 1, and 1 on page 2, all linked
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt/anchored/fly[1]/section/column", 2);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt/anchored/fly[1]/section/column[1]/body/txt", 11);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt/anchored/fly[1]/section/column[2]/body/txt", 11);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt/anchored/fly[2]/section/column", 2);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt/anchored/fly[2]/section/column[1]/body/txt", 12);
+ assertXPath(pXmlDoc, "/root/page[1]/body/txt/anchored/fly[2]/section/column[2]/body/txt", 12);
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt/anchored/fly[1]/section/column", 2);
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt/anchored/fly[1]/section/column[1]/body/txt", 2);
+ assertXPath(pXmlDoc, "/root/page[2]/body/txt/anchored/fly[1]/section/column[2]/body/txt", 1);
+}
+
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index 163b8932552c..3ff52ce84117 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -1725,6 +1725,7 @@ SwLayoutFrame *SwFrame::GetNextSctLeaf( MakePageType eMakePage )
// creating / moving the cell frame.
// It doesn't make sense to move to a page that starts with break?
if (pNxtPg != FindPageFrame() // tdf#156725 not between columns!
+ && !FindFlyFrame() // tdf#156419 linked fly frames don't care!
&& (WrongPageDesc(pNxtPg) || HasPageBreakBefore(*pNxtPg))
&& !bLayLeafTableAllowed)
{