sw/source/core/layout/sectfrm.cxx | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit c4a61409da7a21397a8913ccbae3613175a54075 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Mon Nov 18 19:51:52 2024 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Thu Nov 21 12:59:30 2024 +0100 sw: layout: fix crash in SwSectionFrame::MakeAll() sectfrm.cxx:854: Assertion `moveBackPos == &GetPrecede()->GetFrame()' failed. Because the section has columns, and GetPrevSctLeaf() apparently returns the body frame in a column. (regression from commit c60ad7e0fbf3cc86af167f5e98b38c25620ada7e) Change-Id: I16fcd7a42b24e54873cde0aa0087c7aa56b0a8e5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176738 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> (cherry picked from commit e8c59414016a2f28ab9e15002e2c36b5a714924e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176913 Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx index a7dbf0e02be5..b1dc6587a6ac 100644 --- a/sw/source/core/layout/sectfrm.cxx +++ b/sw/source/core/layout/sectfrm.cxx @@ -846,6 +846,10 @@ void SwSectionFrame::MakeAll(vcl::RenderContext* pRenderContext) // appropriately; then drop the temporary, if needed. if (SwLayoutFrame* moveBackPos = GetPrevSctLeaf()) { + if (moveBackPos->IsColBodyFrame()) + { + moveBackPos = moveBackPos->GetUpper()->GetUpper(); + } SwLayoutFrame* newUpper = moveBackPos; SwFrame* newSibling = nullptr; const bool temporaryMasterCreated = IsFollow();