summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2020-03-31 14:49:13 +0300
committerMiklos Vajna <vmiklos@collabora.com>2020-04-03 10:06:18 +0200
commitf497d1dc27b4fee3db1e2228647a00971922eb5f (patch)
tree7b141274305372600e8e154ecc5926e79af97ed0 /sw/source
parent0f29d36aa9e6ac7d0914a6e1749c16ecec216904 (diff)
tdf#131707 sw layout try2: ConsiderTextWrap on positioning
rework 7.0 commit 1052acae9a599c54e518c8fc17d6a994d8778757 jmux and I were working on related bugs at the same time. My patch happened to get committed before his. Since mine regressed, use jmux's version instead. This should fix tdf#119748 and tdf#123257 Change-Id: I705d9f6c4ac81216c31009948cf1c9150017bbf3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91420 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/layout/frmtool.cxx31
1 files changed, 15 insertions, 16 deletions
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index a7ffd2c51920..c7424c95d4a8 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -702,8 +702,7 @@ SwFlyNotify::~SwFlyNotify()
// #i54138# - suppress restart of the layout process
// on changed frame height.
// Note: It doesn't seem to be necessary and can cause layout loops.
- // Also suppress on initial positioning - required to trigger text wrapping (tdf#119748).
- if ( bPosChgd && maFrame.Pos().X() != FAR_AWAY )
+ if ( bPosChgd )
{
// indicate a restart of the layout process
pFly->SetRestartLayoutProcess( true );
@@ -712,21 +711,21 @@ SwFlyNotify::~SwFlyNotify()
{
// lock position
pFly->LockPosition();
+ }
- if ( !pFly->ConsiderForTextWrap() )
- {
- // indicate that object has to be considered for text wrap
- pFly->SetConsiderForTextWrap( true );
- // invalidate 'background' in order to allow its 'background'
- // to wrap around it.
- pFly->NotifyBackground( pFly->GetPageFrame(),
- pFly->GetObjRectWithSpaces(),
- PrepareHint::FlyFrameArrive );
- // invalidate position of anchor frame in order to force
- // a re-format of the anchor frame, which also causes a
- // re-format of the invalid previous frames of the anchor frame.
- pFly->AnchorFrame()->InvalidatePos();
- }
+ if ( !pFly->ConsiderForTextWrap() )
+ {
+ // indicate that object has to be considered for text wrap
+ pFly->SetConsiderForTextWrap( true );
+ // invalidate 'background' in order to allow its 'background'
+ // to wrap around it.
+ pFly->NotifyBackground( pFly->GetPageFrame(),
+ pFly->GetObjRectWithSpaces(),
+ PrepareHint::FlyFrameArrive );
+ // invalidate position of anchor frame in order to force
+ // a re-format of the anchor frame, which also causes a
+ // re-format of the invalid previous frames of the anchor frame.
+ pFly->AnchorFrame()->InvalidatePos();
}
}
}