summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2022-03-14 19:11:21 +0100
committerThorsten Behrens <thorsten.behrens@allotropia.de>2022-03-17 12:25:12 +0100
commit24a8c6d10bfe377631d980806a511e1aa00a2e16 (patch)
treece6966a1ad8d4af34c8b49b030ee5c8112f53ff4
parenthwpfilter: why isn't that path string null terminated (diff)
downloadcore-24a8c6d10bfe377631d980806a511e1aa00a2e16.tar.gz
core-24a8c6d10bfe377631d980806a511e1aa00a2e16.zip
tdf#135220 sw: fix layout after SwUndoDelete
The bugdoc is 398 pages after initial load and 397 pages after Undo. There is really only one problem, on page 6 the fly frame 7370 "Figure 3: Hay Rake in Weeds" anchored on SwTextFrame 5896 should be on page 7 and aligned to the top of its paragraph. First, 5986 moves forward from page 6 to 7, hitting the condition added in commit c799de145f7e289f31e3669646e5bd12814e6c5e debug:1170918:1170918: SwObjectFormatterTextFrame::CheckMovedFwdCondition(): o_rbPageHasFlysAnchoredBelowThis because next chain on same page Then 5986 moves back to page 6. When it is formatted there, the ConsiderObjWrapInfluenceOnObjPos() is true, preventing a formatting of the anchor frame - so it does not move forward. The flag SetTmpConsiderWrapInfluence(true) was set the first time (when it moved forward). Setting this flag for any anchor frame that moves forward was added in 2005 in commit 46297c0923c50a12510c7b15b725c8d2fd80f9c0 and apparently the only way the flag is cleared is when SwDoc's SetModified() is called (or the frame is in a table or column). So it is similar to the InsertMovedFwdFrame() case that was addressed by commit c799de145f7e289f31e3669646e5bd12814e6c5e in that the flag should not be set if bPageHasFlysAnchoredBelowThis is true. (reportedly regression from sw_redlinehide commit 6c7245e789f973cf6dad03f7008ab3f9d12d350c) Change-Id: I27b2a1becf5f7a760e74e801e23472116d0a5ced Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131560 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit d9e38d5830ac278d7180b96fb6cefe3ee8ef6d76) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131591 Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
-rw-r--r--sw/source/core/layout/flycnt.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index 214df4da1b27..ac8f98f6c85e 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -426,7 +426,10 @@ void SwFlyAtContentFrame::MakeAll(vcl::RenderContext* pRenderContext)
bAnchoredAtMaster, nToPageNum, bDummy,
bPageHasFlysAnchoredBelowThis) )
{
- bConsiderWrapInfluenceDueToMovedFwdAnchor = true;
+ if (!bPageHasFlysAnchoredBelowThis)
+ {
+ bConsiderWrapInfluenceDueToMovedFwdAnchor = true;
+ }
// mark anchor text frame
// directly, that it is moved forward by object positioning.
SwTextFrame* pAnchorTextFrame( static_cast<SwTextFrame*>(AnchorFrame()) );