sw/source/core/layout/anchoreddrawobject.cxx |   16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

New commits:
commit 5dc8691e0909654c68eb0dcbc6d787701d02839b
Author: Jan-Marek Glogowski <glo...@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.michael...@canonical.com>
    Tested-by: Björn Michaelsen <bjoern.michael...@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(
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to