summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2023-08-25 18:31:42 +0200
committerThorsten Behrens <thorsten.behrens@allotropia.de>2023-10-15 22:13:57 +0200
commitd96a62fa6b8de21749b28355376f31331c324b5e (patch)
tree605616883a44fc52650315157aa25e1097593012
parent72d37c786cca52e90d619d555ab0b1e4736cd36b (diff)
(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.stahl@allotropia.de> (cherry picked from commit 8c24bc5baa1f501943bf955e07787d80cb7a5763) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156196 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-rw-r--r--sw/source/core/layout/tabfrm.cxx6
1 files changed, 5 insertions, 1 deletions
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);