sw/source/core/layout/frmtool.cxx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
New commits: commit d0de2750e28d99df9f342c29fec555b7df566c01 Author: Michael Stahl <michael.st...@cib.de> AuthorDate: Mon Dec 7 20:00:32 2020 +0100 Commit: Thorsten Behrens <thorsten.behr...@cib.de> CommitDate: Tue Dec 8 00:27:42 2020 +0100 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.mehrbr...@cib.de> (cherry picked from commit c797fc768152a57f6cc7fb9dd447138e4b0629ee) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107311 Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de> 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(); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits