diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2014-07-12 19:27:11 +0200 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@canonical.com> | 2014-09-10 19:55:25 +0000 |
commit | 5dc8691e0909654c68eb0dcbc6d787701d02839b (patch) | |
tree | 8fc8eea7fd3b5996dec0587bc10f41a1ec6d856d /sw/source | |
parent | 508d2d2b1a6a23043c8c0f0d3fea4ec033ac2684 (diff) |
Invalidate rect cache before moving object
Otherwise I get sw/source/core/layout/anchoredobject.cxx:582:
<SwAnchoredObject::GetObjRectWithSpaces> - cache for object
rectangle inclusive spaces marked as valid, but it couldn't be.
Missing invalidation of cache. Please inform OD.
Change-Id: I3f315b15fca6e2480c11183269be5583e6aea123
Reviewed-on: https://gerrit.libreoffice.org/10977
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/layout/anchoreddrawobject.cxx | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx index 43aeb13c2498..628ed1356d5b 100644 --- a/sw/source/core/layout/anchoreddrawobject.cxx +++ b/sw/source/core/layout/anchoreddrawobject.cxx @@ -794,14 +794,20 @@ void SwAnchoredDrawObject::_SetPositioningAttr() // --> #i71182# // only change position - do not lose other attributes + SwFmtHoriOrient aHori( GetFrmFmt().GetHoriOrient() ); - aHori.SetPos( nHoriPos ); - GetFrmFmt().SetFmtAttr( aHori ); + if (nHoriPos != aHori.GetPos()) { + aHori.SetPos( nHoriPos ); + InvalidateObjRectWithSpaces(); + GetFrmFmt().SetFmtAttr( aHori ); + } SwFmtVertOrient aVert( GetFrmFmt().GetVertOrient() ); - - aVert.SetPos( nVertPos ); - GetFrmFmt().SetFmtAttr( aVert ); + if (nVertPos != aVert.GetPos()) { + aVert.SetPos( nVertPos ); + InvalidateObjRectWithSpaces(); + GetFrmFmt().SetFmtAttr( aVert ); + } // --> #i36010# - set layout direction of the position GetFrmFmt().SetPositionLayoutDir( |