diff options
Diffstat (limited to 'sd/source/ui/view')
-rw-r--r-- | sd/source/ui/view/viewshel.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index 68ebe722f4e1..6c79ec29863f 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -82,6 +82,8 @@ #include <sfx2/request.hxx> #include "SpellDialogChildWindow.hxx" +#include <svx/zoom_def.hxx> + #include "Window.hxx" #include "fupoor.hxx" @@ -125,8 +127,6 @@ private: namespace sd { -static const int DELTA_ZOOM = 10; - sal_Bool ViewShell::IsPageFlipMode(void) const { return this->ISA(DrawViewShell) && mpContentWindow.get() != NULL && @@ -718,9 +718,9 @@ bool ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWi long nNewZoom; if( pData->GetDelta() < 0L ) - nNewZoom = Max( (long) pWin->GetMinZoom(), (long)(nOldZoom - DELTA_ZOOM) ); + nNewZoom = Max( (long) pWin->GetMinZoom(), (long)round( nOldZoom / ZOOM_FACTOR )); else - nNewZoom = Min( (long) pWin->GetMaxZoom(), (long)(nOldZoom + DELTA_ZOOM) ); + nNewZoom = Min( (long) pWin->GetMaxZoom(), (long)round( nOldZoom * ZOOM_FACTOR )); SetZoom( nNewZoom ); Invalidate( SID_ATTR_ZOOM ); |