diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2019-02-26 18:47:46 +0100 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2019-03-04 11:09:02 +0100 |
commit | b7d4418c309c8bc4fd25485dd3a0ea6ad9edf34e (patch) | |
tree | 51a01346685ad3a5694382b551d6f6d0c01aca7d /extensions/Library_ldapbe2.mk | |
parent | 3abe1e83c18c5778d60252092e9cc70c4c63268b (diff) |
tdf#122892 sw: fix IsPrepWidow() loop in SwTextFrame::CalcFollow()
The bugdoc loops on calculating the follow of SwTextFrame 560, the one
containing "Hiermit nehme ich das Angebot an" in a cell with rowspan 3,
while the table is being split and its first row (also now its last
i.e. split row) is being formatted.
Loop in CalcFollow() because the follow is in the same upper frame as
its master and cannot move forward, so the 2nd call to pMyFollow->Calc()
after pMyFollow->Prepare() always sets the SetPrepWidows() flag on the
master and in that case the loop never terminates.
The problem is that the check in WidowsAndOrphans::FindWidows() of
GetThisLines() uses stale cached data - the value returned is 4, but
the frame contains fewer lines at that point and doesn't have lines to
spare for the follow; the cached value is only updated at the end of
SwTextFrame::Format(). Fix it by calling ChgThisLines() here.
But this fix only helps for the first SwTextFrame in a cell; the next
one with id 561 loops in a similar way. The problem then is that
SwTextFrame::PrepWidows() always calls SetPrepWidows(), even if the
Orphan-rule of the frame prevents it from giving lines to the follow.
Fix this by calling SetPrepWidows() only if lines are removed.
This also helps for the 2 attachments of tdf#118104.
(regression from commit 18765b9fa739337d2d891513f6e2fb7c3ce23b50
particularly the change in SwFrame::IsMoveable()
in the sense that it didn't loop before but there isn't anything
obviously wrong with this commit)
Change-Id: Ia1e5928a6510e68520b29eb265e26ffd0627c52e
Reviewed-on: https://gerrit.libreoffice.org/68402
Tested-by: Jenkins
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Diffstat (limited to 'extensions/Library_ldapbe2.mk')
0 files changed, 0 insertions, 0 deletions