sw/source/core/layout/tabfrm.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
New commits: commit ce1120eecdafa04b03617dcb88eb6027b6b50679 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Fri Aug 25 18:31:42 2023 +0200 Commit: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> CommitDate: Fri Sep 22 19:46:56 2023 +0200 (related? tdf#155177) sw: layout: fix another RemoveFollowFlowLine SNAFU This happens with the following commit, on testForcepoint76, for no obvious reason. A follow table frame is in SwTabFrame::MakeAll(), then its follow flow line becomes empty and it does SetRemoveFollowFlowLinePending() on the master, then it formats its follow flow line (but at that time there's again a text frame in it), then that content moves backward, formats its uppers until it gets to the master table frame, which wants to join the row frame that's being formatted on the stack. Obviously a SwFrameDeleteGuard in lcl_RecalcRow() can't hurt, but it needs an additional change later to prevent it from moving rows of the follow back. Change-Id: Idca90b7eb67994385ccd306562ea26ff39e884f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156117 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> (cherry picked from commit 8c24bc5baa1f501943bf955e07787d80cb7a5763) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156196 Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 95a93c4112e7..d2e4618bf317 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -1691,6 +1691,8 @@ static void lcl_RecalcRow(SwRowFrame & rRow, tools::Long const nBottom) if( bCheck ) { + SwFrameDeleteGuard g(&rRow); + // #115759# - force another format of the // lowers, if at least one of it was invalid. bCheck = SwContentFrame::CalcLowers(rRow, *rRow.GetUpper(), nBottom, true); @@ -2244,7 +2246,9 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext) if ( !bSplit && GetFollow() ) { bool bDummy; - if ( GetFollow()->ShouldBwdMoved( GetUpper(), bDummy ) ) + if (!(HasFollowFlowLine() + && GetFollow()->GetFirstNonHeadlineRow()->IsDeleteForbidden()) + && GetFollow()->ShouldBwdMoved(GetUpper(), bDummy)) { SwFrame *pTmp = GetUpper(); SwTwips nDeadLine = aRectFnSet.GetPrtBottom(*pTmp);