summaryrefslogtreecommitdiff
path: root/sw/source/core
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2018-03-06 09:51:46 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-03-06 17:06:42 +0100
commit45d59e98f4905475648d5e3ccacfa1279eb69a18 (patch)
treec0a8ed01fb54a06fb8795c49dc5afc21e64f44d9 /sw/source/core
parentdb7dae40a2082d5d2b1ac22008d32ef9ebf86f4e (diff)
forcepoint #18 sw: fix condition for detecting section-in-table splits
The problem with the bugdoc is that SwFrame::GetNextSctLeaf() creates a follow frame for a section in a table, and puts it outside the table, below the page's body frame, while moving text frames that have the mbInfTab flag set into the follow frame. Checking for CanContainSplitSection() at this point doesn't make sense to me: if it's not allowed to split the section, we can't just split it anyway and put the follow outside the table. Just removing it fails in testTableInNestedSection() but it turns out that the problem there is that the mbInfTab flag is set on a outermost SwTabFrame itself, so we need to check the parent's flag instead to check if this frame needs to go into a cell. (regression from 652556ec3e9218655a67b4c4de4e26fbe81855de) Change-Id: I79663391fb1b2cb10f008676feb01a2607cfb33d Reviewed-on: https://gerrit.libreoffice.org/50804 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked from commit 054be0850ed7574473452ed965001504caf0b5e2) Reviewed-on: https://gerrit.libreoffice.org/50821 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/source/core')
-rw-r--r--sw/source/core/layout/sectfrm.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index 2b6def165059..c0479dc53673 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -1601,9 +1601,9 @@ SwLayoutFrame *SwFrame::GetNextSctLeaf( MakePageType eMakePage )
SwLayoutFrame *pLayLeaf;
SwLayoutFrame* pCellLeaf = nullptr;
- if (IsInTab() && CanContainSplitSection(this))
+ if (GetUpper()->IsInTab())
{
- // We are in a table (which is itself not in a section), see if there
+ // We are *in* a table (not an outermost SwTabFrame), see if there
// is a follow cell frame created already.
pCellLeaf = GetNextCellLeaf();
if (!pCellLeaf)