summaryrefslogtreecommitdiff
path: root/postprocess
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2021-05-05 12:21:42 +0200
committerMichael Stahl <michael.stahl@allotropia.de>2021-05-05 16:55:23 +0200
commited12269c42f75f553bb8a8770923406f7824e473 (patch)
tree447c718baea4da603ff09c351efb1525c0a46b19 /postprocess
parentc6d0986acb50941d30257cb497466066badfcaa1 (diff)
tdf#142080 sw: layout: fix infinite loop in CalcContent()
On page 9, SwSectionFrame::Format() calls CalcContent() and that formats all its content frames, then on SwTextFrame 91 SwObjectFormatter::FormatObj() fails becuase it moved forward. With commit c799de145f7e289f31e3669646e5bd12814e6c5e this now sets the o_rbPageHasFlysAnchoredBelowThis to true, which prevents a call to SwLayouter::InsertMovedFwdFrame(), and the flys anchored in next frames aren't moved off the page at this time. Then the loop starts over at the beginning of the SwSectionFrame, and frame 91 will be formatted again because the loop tries to format the first frame on the next page to see if it will move back; now the MoveBwd() isn't prevented any more so the result is the same failure in SwObjectFormatter::FormatObj(). Fix this by ignoring the bRestartLayoutProcess in case the current frame was originally on the next page and didn't move back (or, as is the case here, moved back and then forward again); it should just be formatted again on the next page. Once that happens, it will eventually be entered into SwLayouter::InsertMovedFwdFrame() too. This happens to fix another problem with this bugdoc too: the first column of the section on page 9 is empty. This also happens in LO 6.4 but not LO 6.1. An alternative would be to move the flys anchored below off the page as is done in SwLayAction::FormatContent() now but sections can be in flys or footnotes or headers so perhaps it should be done only at the top-level. (regression from c799de145f7e289f31e3669646e5bd12814e6c5e) Change-Id: I0965aebb4e3cec687f4e70f8d5e3aa8a55da3393 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115144 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'postprocess')
0 files changed, 0 insertions, 0 deletions