vcl/source/window/paint.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
New commits: commit 93916bb3167802e7abb4fe0a1bcb5c1366cb476e Author: Henry Castro <hcas...@collabora.com> Date: Wed Apr 1 17:59:46 2015 -0400 sc tiled editing: Invalidate graphic selection. When dragging shapes the MapMode is disabled, so the coordinates are wrong values converted to twip unit. Change-Id: Idf1e40963cf124fd20dbdf8633487bc71786c6cf diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index f977378..e619226 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -862,8 +862,14 @@ void Window::Invalidate( sal_uInt16 nFlags ) /// Converts rRectangle from MM100 to twips based on the map mode of rWindow. void lcl_toTwips(const Window& rWindow, Rectangle& rRectangle) { - if (rWindow.GetMapMode().GetMapUnit() == MAP_100TH_MM) - rRectangle = OutputDevice::LogicToLogic(rRectangle, MAP_100TH_MM, MAP_TWIP); + // When dragging shapes the map mode is disabled. + if (rWindow.IsMapModeEnabled()) + { + if (rWindow.GetMapMode().GetMapUnit() == MAP_100TH_MM) + rRectangle = OutputDevice::LogicToLogic(rRectangle, MAP_100TH_MM, MAP_TWIP); + } + else + rRectangle = OutputDevice::LogicToLogic(rRectangle, MAP_PIXEL, MAP_TWIP); } void Window::Invalidate( const Rectangle& rRect, sal_uInt16 nFlags ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits