[Libreoffice-commits] core.git: sw/source
Jan-Marek Glogowski
glogow at fbihome.de
Fri Sep 5 09:06:42 PDT 2014
sw/source/core/view/vdraw.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 5a107d3fdc069fdf95b7ab9a24fd84accf4160ae
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date: Sat Jul 12 13:35:54 2014 +0200
Fix moving out-of-bounds draw / fly objects
Actually move the object in the right direction, if it's outside
of the document boundaries.
Fixes the mysterious effect, that negative y-offset in fdo#80926
changed the objects x-offset values.
Change-Id: If88cf2a07fb44537b2e047e77c5e009664db94af
Reviewed-on: https://gerrit.libreoffice.org/10975
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx
index d068a03..cfadd9e 100644
--- a/sw/source/core/view/vdraw.cxx
+++ b/sw/source/core/view/vdraw.cxx
@@ -247,10 +247,10 @@ void SwViewImp::NotifySizeChg( const Size &rNewSz )
// Don't let large objects dissappear to the top
aSz.Width() = aSz.Height() = 0;
- if ( aObjBound.Bottom() < aDocRect.Top() )
- aSz.Width() = (aObjBound.Bottom() - aDocRect.Top()) - MINFLY;
if ( aObjBound.Right() < aDocRect.Left() )
- aSz.Height() = (aObjBound.Right() - aDocRect.Left()) - MINFLY;
+ aSz.Width() = (aDocRect.Left() - aObjBound.Right()) + MINFLY;
+ if ( aObjBound.Bottom() < aDocRect.Top() )
+ aSz.Height() = (aDocRect.Top() - aObjBound.Bottom()) + MINFLY;
if ( aSz.Width() || aSz.Height() )
pObj->Move( aSz );
}
More information about the Libreoffice-commits
mailing list