diff options
author | Jan-Marek Glogowski <glogow@fbihome.de> | 2014-07-12 13:35:54 +0200 |
---|---|---|
committer | Jan-Marek Glogowski <glogow@fbihome.de> | 2014-09-30 09:47:54 +0200 |
commit | 9b83dcd9f593950e41b9f3036f10c76de8d1c5d1 (patch) | |
tree | cd9f40dde8cd68545aa915778599f3579b37171c /sw | |
parent | 2e4c3841e8f36fe58aeca4f785c2862d6c3f2887 (diff) |
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@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 5a107d3fdc069fdf95b7ab9a24fd84accf4160ae)
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/view/vdraw.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/view/vdraw.cxx b/sw/source/core/view/vdraw.cxx index ed9cbbb7edad..136425ffd9cd 100644 --- a/sw/source/core/view/vdraw.cxx +++ b/sw/source/core/view/vdraw.cxx @@ -246,10 +246,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 ); } |