diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-03-20 17:35:17 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-03-23 09:19:07 +0100 |
commit | 7b8a59807806dbf6ec759a836c873b435e09e907 (patch) | |
tree | f221c5bc1830cc3237e857cf01b4073bff2e6773 /sd/source/ui/view/sdwindow.cxx | |
parent | 35cf00e20ad5826f715f5d5bbc48d486228774ca (diff) |
sd: when tiled rendering, disable map mode early
This brings sd in sync with sw, that does the same for some time
already. With this, we no longer do a complete repaint 6 times after
every postMouseEvent().
Change-Id: I38754f4bdbb977abbdbb0f32e1460ab2f6290f87
Diffstat (limited to 'sd/source/ui/view/sdwindow.cxx')
-rw-r--r-- | sd/source/ui/view/sdwindow.cxx | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx index 20e3086feedb..1268596c7042 100644 --- a/sd/source/ui/view/sdwindow.cxx +++ b/sd/source/ui/view/sdwindow.cxx @@ -324,10 +324,13 @@ long Window::SetZoomFactor(long nZoom) nZoom = mnMinZoom; // Set the zoom factor at the window's map mode. - MapMode aMap(GetMapMode()); - aMap.SetScaleX(Fraction(nZoom, 100)); - aMap.SetScaleY(Fraction(nZoom, 100)); - SetMapMode(aMap); + if (!mpViewShell || !mpViewShell->GetDoc()->isTiledRendering()) + { + MapMode aMap(GetMapMode()); + aMap.SetScaleX(Fraction(nZoom, 100)); + aMap.SetScaleY(Fraction(nZoom, 100)); + SetMapMode(aMap); + } // invalidate previous size - it was relative to the old scaling maPrevSize = Size(-1,-1); @@ -559,7 +562,8 @@ void Window::UpdateMapOrigin(bool bInvalidate) maPrevSize = aWinSize; - if (bChanged && bInvalidate) + // When tiled rendering, the above UpdateMapMode() call doesn't touch the map mode. + if (bChanged && bInvalidate && (!mpViewShell || !mpViewShell->GetDoc()->isTiledRendering())) Invalidate(); } @@ -599,9 +603,12 @@ void Window::UpdateMapMode (void) Point aNewOrigin (-maWinPos.X(), -maWinPos.Y()); maWinPos += maViewOrigin; - MapMode aMap(GetMapMode()); - aMap.SetOrigin(aNewOrigin); - SetMapMode(aMap); + if (!mpViewShell || !mpViewShell->GetDoc()->isTiledRendering()) + { + MapMode aMap(GetMapMode()); + aMap.SetOrigin(aNewOrigin); + SetMapMode(aMap); + } } /** |