sw/source/core/draw/dview.cxx | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit 8fdbb8aed1b48734a717d5f98ada566de7204605 Author: Vasily Melenchuk <vasily.melenc...@cib.de> AuthorDate: Thu Aug 5 11:16:58 2021 +0300 Commit: Thorsten Behrens <thorsten.behr...@allotropia.de> CommitDate: Sun Aug 8 23:17:30 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.behr...@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 b2ad0f39c14e..646b00bb1b5f 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() ) {