summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/sectfrm.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/layout/sectfrm.cxx')
-rw-r--r--sw/source/core/layout/sectfrm.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index 8ae220e84272..fa47d70bc63f 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -1622,7 +1622,14 @@ SwLayoutFrame *SwFrame::GetNextSctLeaf( MakePageType eMakePage )
InsertPage(pOldLayLeaf ? pOldLayLeaf->FindPageFrame() : FindPageFrame(),
false );
// and again the whole thing
- pLayLeaf = pOldLayLeaf ? pOldLayLeaf : GetNextLayoutLeaf();
+ if (pCellLeaf && CanContainSplitSection(this))
+ // GetNextLayoutLeaf() would refer to the next cell in the same
+ // row, avoid that. pCellLeaf points to the correct cell in the
+ // follow table, and in the next round it'll be used, as we now
+ // have a next page.
+ pLayLeaf = pCellLeaf;
+ else
+ pLayLeaf = pOldLayLeaf ? pOldLayLeaf : GetNextLayoutLeaf();
continue;
}
break;