summaryrefslogtreecommitdiffstats
path: root/sd
diff options
context:
space:
mode:
authorTim Hardeck <thardeck@suse.com>2012-01-13 18:22:46 +0100
committerJan Holesovsky <kendy@suse.cz>2012-01-13 23:04:12 +0100
commit022ce7d362f146ed69f54aae20cf2b8c582e9f8d (patch)
tree2119b7ead9c05302a72ad77fd199333e255df2ca /sd
parentchanged [pt-PT] default date format to DD-MM-AAAA (was DD-MM-AA) (diff)
downloadcore-022ce7d362f146ed69f54aae20cf2b8c582e9f8d.tar.gz
core-022ce7d362f146ed69f54aae20cf2b8c582e9f8d.zip
fdo#44173: use a geometric progression for zooming
Zooming does now base on a geometric progression instead of an arithmetic one. Since the zoom factor is not only used in Draw but for all other applications 1.2 seems like a good choice.
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/viewshel.cxx8
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 );