[Libreoffice-commits] core.git: sw/source
Jan-Marek Glogowski
glogow at fbihome.de
Wed Sep 10 12:55:50 PDT 2014
sw/source/core/layout/anchoreddrawobject.cxx | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
New commits:
commit 5dc8691e0909654c68eb0dcbc6d787701d02839b
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date: Sat Jul 12 19:27:11 2014 +0200
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 at canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
diff --git a/sw/source/core/layout/anchoreddrawobject.cxx b/sw/source/core/layout/anchoreddrawobject.cxx
index 43aeb13..628ed13 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(
More information about the Libreoffice-commits
mailing list