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

Michael Stahl mstahl at redhat.com
Thu Mar 15 19:28:03 UTC 2018


 sw/source/core/layout/sectfrm.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 7a342988e010d50e47fa63c500840994c5dc62d8
Author: Michael Stahl <mstahl at redhat.com>
Date:   Thu Mar 15 20:01:12 2018 +0100

    sw: tweak sanity check in SwFrame::GetNextSctLeaf()
    
    An additional way in which column sections are a special case is if
    "this" is the SwBodyFrame inside the SwColumnFrame; handle this too.
    
    Happens in ooo31607-2.sxw.
    
    Change-Id: Id07b76e67c34b2335f2802f52e215d37476b3446

diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index 52391e106fb4..e175ee709221 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -1748,6 +1748,12 @@ SwLayoutFrame *SwFrame::GetNextSctLeaf( MakePageType eMakePage )
                     assert(parents[2]->IsSctFrame());
                     std::advance(iter, +2);
                 }
+                else if (IsBodyFrame() && parents.size() >= 1
+                         && parents[0]->IsColumnFrame())
+                {   // same as above, special case: "this" is the body frame
+                    assert(parents[1]->IsSctFrame());
+                    std::advance(iter, +1);
+                }
                 else  if (IsSctFrame()) // special case: "this" is the section
                 {
                     pTmp = pTmp->GetUpper();


More information about the Libreoffice-commits mailing list