sw/source/core/layout/sectfrm.cxx | 4 ++++ 1 file changed, 4 insertions(+)
New commits: commit e8c59414016a2f28ab9e15002e2c36b5a714924e 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:01:13 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> diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx index 11245f084a92..18701702197d 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();