summaryrefslogtreecommitdiffstats
path: root/sw/inc/anchoredobject.hxx
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2020-11-13 20:51:42 +0100
committerGabor Kelemen <kelemeng@ubuntu.com>2021-12-10 16:41:52 +0100
commit36efc6acd2bff211ce44a62ef36d3bb3dd4c173c (patch)
treeab8eac716bd8727e339b08fe1dc6ba269de937a3 /sw/inc/anchoredobject.hxx
parenttdf#138785 sw: fix mis-positioned as-char flys when deleting empty page (diff)
downloadcore-36efc6acd2bff211ce44a62ef36d3bb3dd4c173c.tar.gz
core-36efc6acd2bff211ce44a62ef36d3bb3dd4c173c.zip
tdf#138039 tdf#134298 sw: layout: fix overlap of fly and table
The layout is horribly borked, the fly anchored in the body-level paragraph messed with the preceding table: page id="1" top="284" width="11905" height="16837" bottom="17120" tab id="3" top="794" row id="4" top="17121" fly id="8" top="16725" txt id="7" top="1394" fly ptr="0x6ce5510" id="10" top="1302" SwTabFrame::CalcFlyOffsets() detects an overlap with the large fly, and since it has wrap NONE it resizes to below the large image. Then the SwTabFrame doesn't fit on the page, so it is split, but the split fails because nDistanceToUpperPrtBottom is -720 (negative); hence it is joined again. Meanwhile the fly was invalidated, so now CalcFlyOffsets() ignores it and the table shrinks again. Once the fly is positioned again, the process repeats from the start. Fix this in SwTabFrame::CalcFlyOffsets() by ignoring flys with wrap NONE that extend below the body of the document and are anchored in a frame in the next-chain of the table frame: these must move to the next page with their anchor frame. For the bugdoc this gives the same layout as LO 5.2. Reportedly this problem started to happen since commit 6f5024de2e1a5cc533527e45b33d9a415467c48d, but it's not obvious why. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105809 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> (cherry picked from commit 6b92d2e8522ecc98d2c5532f5076c20ae295168e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105940 Tested-by: Michael Stahl <michael.stahl@cib.de> Change-Id: Iafb8a6afcba634f11c5db73869313ded0fe13bbd
Diffstat (limited to 'sw/inc/anchoredobject.hxx')
0 files changed, 0 insertions, 0 deletions