[Libreoffice-commits] core.git: sw/source

Michael Stahl mstahl at redhat.com
Tue Mar 6 11:53:41 UTC 2018


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

New commits:
commit 054be0850ed7574473452ed965001504caf0b5e2
Author: Michael Stahl <mstahl at 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 <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index 319974f41713..e9cf9479dc91 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -1602,9 +1602,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)


More information about the Libreoffice-commits mailing list