summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorVasily Melenchuk <vasily.melenchuk@cib.de>2021-08-05 11:16:58 +0300
committerThorsten Behrens <thorsten.behrens@allotropia.de>2021-08-05 18:34:09 +0200
commit6e879d5f142766c941d1c3bafd17f67b78c1c9f4 (patch)
tree7e9c641e4e3531173ccabf1e53018fb14d6953d9 /sw
parent4edf3a964e764dcc40be729b8305476c5b968f1c (diff)
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@allotropia.de>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/draw/dview.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index 276fbf922c9a..aa116d3d7bb7 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -236,6 +236,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() )
{