summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-04-02 09:46:22 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-04-07 09:18:11 +0200
commitcf405bb14c45e4c4fe1be9716f19d40b27605c43 (patch)
tree0a8564112eb0c9df8bf1b46fb57d1ae76f2bda4e /vcl
parent428c3a712955c1d4787baa2b4c5727b035d566e4 (diff)
vcl tiled rendering: fix Writer/Impress invalidation rectangle
Both Writer and Impress disable map mode during tiled rendering, i.e. IsMapModeEnabled() always returns false. Nevertheless, using GetMapMode(), it's possible to query what was the map unit before disabling the map mode, which is twips for Writer and mm100 for Impress. If Calc needs anything special here, that's better to be done in ScGridWindow::LogicInvalidate(). Change-Id: I2c10df47d32b80d2cef2b6e6587872fe4126a3f5
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/paint.cxx10
1 files changed, 2 insertions, 8 deletions
diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx
index e6192267ae9b..f977378a1ab2 100644
--- a/vcl/source/window/paint.cxx
+++ b/vcl/source/window/paint.cxx
@@ -862,14 +862,8 @@ 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)
{
- // 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);
+ if (rWindow.GetMapMode().GetMapUnit() == MAP_100TH_MM)
+ rRectangle = OutputDevice::LogicToLogic(rRectangle, MAP_100TH_MM, MAP_TWIP);
}
void Window::Invalidate( const Rectangle& rRect, sal_uInt16 nFlags )