tdf#156419 sw: layout: don't prevent moving between linked flys
... when there is a page break on the next page.
Of course you can put a section into a fly, and then link multiple flys.
(regression from commit 325fe7ab50)
Change-Id: I5cb854fc7ee5caa2af4e04f4da2d8a8083c0d007
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155842
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
This commit is contained in:
Binary file not shown.
@@ -1228,6 +1228,24 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf156725)
|
||||
"/root/page[2]/body/txt/anchored/fly/column[2]/body/section/column[2]/body/txt", 1);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(SwLayoutWriter3, testTdf156419)
|
||||
{
|
||||
createSwDoc("linked_frames_section_bug.odt");
|
||||
|
||||
xmlDocUniquePtr 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_TEST_FIXTURE(SwLayoutWriter3, testTdf145826)
|
||||
{
|
||||
createSwDoc("tdf145826.odt");
|
||||
|
||||
@@ -1758,6 +1758,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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user