diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-12-07 20:00:32 +0100 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2020-12-08 00:27:42 +0100 |
commit | d0de2750e28d99df9f342c29fec555b7df566c01 (patch) | |
tree | a3d5a7191f8b815d2874c4249d8ccc7ea3085f5d /sw | |
parent | 61f3e0a213a7cddf929643cfff8daea9d4c857e6 (diff) |
sw: layout: SwFlyNotify should invalidate a content or tab frame
The problem happens during layout for a temporary mail merge document,
but that is probably incidental. (The SwRootFrame is the 2nd one out of
3 being createed, the one for the target document.)
The problem is that a text frame with a fly moves backward, and
~SwFlyNotify() invalidates the position of the next frame, but the next
frame is a section frame, and this does not encourage the text frame
inside the section frame to move backward at a later time, which leads
to general user unhappiness.
So invalidate the lower of the section frame too.
Change-Id: I14fa20a279979c029c468f5c6f2e5ecad4ccd240
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107360
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
(cherry picked from commit c797fc768152a57f6cc7fb9dd447138e4b0629ee)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107311
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/layout/frmtool.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx index 295000c0aa64..ed8a46259f79 100644 --- a/sw/source/core/layout/frmtool.cxx +++ b/sw/source/core/layout/frmtool.cxx @@ -678,9 +678,16 @@ SwFlyNotify::~SwFlyNotify() if ( pFly->IsFlyAtContentFrame() ) { SwFrame *pNxt = pFly->AnchorFrame()->FindNext(); - if ( pNxt ) + while (pNxt) { pNxt->InvalidatePos(); + if (!pNxt->IsSctFrame()) + { + break; + } + // invalidating pos of a section frame doesn't have much + // effect, so try again with its lower + pNxt = static_cast<SwSectionFrame*>(pNxt)->Lower(); } } |