[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-6-4+backports' - sw/source

Vasily Melenchuk (via logerrit) logerrit at kemper.freedesktop.org
Thu Aug 5 19:48:36 UTC 2021


 sw/source/core/draw/dview.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit fd7ac9010aabc89286e6e7d7ee5b565c8c5b22cb
Author:     Vasily Melenchuk <vasily.melenchuk at cib.de>
AuthorDate: Thu Aug 5 11:16:58 2021 +0300
Commit:     Thorsten Behrens <thorsten.behrens at allotropia.de>
CommitDate: Thu Aug 5 21:48:01 2021 +0200

    tdf#99932: sw: fix for invalid anchor location for FLY_AT_CHAR mode
    
    In such case anchor position depends on LastCharRect which can be
    invalid because of happened frame movement, resize, etc.
    
    Change-Id: I3d3c6318ee1ce5f4043e21ab091417d283c4260c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120059
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <thorsten.behrens at allotropia.de>
    (cherry picked from commit 6e879d5f142766c941d1c3bafd17f67b78c1c9f4)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119989
    Tested-by: Thorsten Behrens <thorsten.behrens at allotropia.de>

diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index c1a7b6a8cbbc..b20ae1031382 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -231,6 +231,11 @@ void SwDrawView::AddCustomHdl()
         // #i28701# - use last character rectangle saved at object
         // in order to avoid a format of the anchor frame
         SwAnchoredObject* pAnchoredObj = ::GetUserCall( pObj )->GetAnchoredObj( pObj );
+
+        // Invalidate/recalc LastCharRect which can contain invalid frame offset because
+        // of later frame changes
+        pAnchoredObj->CheckCharRectAndTopOfLine(false);
+
         SwRect aAutoPos = pAnchoredObj->GetLastCharRect();
         if ( aAutoPos.Height() )
         {


More information about the Libreoffice-commits mailing list