sw/source/core/layout/sectfrm.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 45d59e98f4905475648d5e3ccacfa1279eb69a18
Author: Michael Stahl <mst...@redhat.com>
Date:   Tue Mar 6 09:51:46 2018 +0100

    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 <c...@libreoffice.org>
    Reviewed-by: Michael Stahl <mst...@redhat.com>
    (cherry picked from commit 054be0850ed7574473452ed965001504caf0b5e2)
    Reviewed-on: https://gerrit.libreoffice.org/50821
    Reviewed-by: Miklos Vajna <vmik...@collabora.co.uk>

diff --git a/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)
Libreoffice-commits mailing list

Reply via email to