| commit | 8fdbb8aed1b48734a717d5f98ada566de7204605 | [log] |
|---|---|---|
| author | Vasily Melenchuk <vasily.melenchuk@cib.de> | Thu Aug 05 11:16:58 2021 +0300 |
| committer | Thorsten Behrens <thorsten.behrens@allotropia.de> | Sun Aug 08 23:17:30 2021 +0200 |
| tree | 854fa7a2179583f6a4495c6255abebc19f178e6f | |
| parent | 3f43dc55dba1af61cb587d0a81e1f920c129daaa [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> (cherry picked from commit 6e879d5f142766c941d1c3bafd17f67b78c1c9f4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119990
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx index b2ad0f3..646b00b 100644 --- a/sw/source/core/draw/dview.cxx +++ b/sw/source/core/draw/dview.cxx
@@ -235,6 +235,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() ) {