summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/drviewse.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index b3183397a084..5a6a7577951e 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -95,6 +95,7 @@
#include <fuformatpaintbrush.hxx>
#include <fuzoom.hxx>
#include <sdmod.hxx>
+#include <basegfx/utils/zoomtools.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -1189,8 +1190,11 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
case SID_ZOOM_OUT: // BASIC
{
+ const sal_uInt16 nOldZoom = GetActiveWindow()->GetZoom();
+ const sal_uInt16 nNewZoom = basegfx::zoomtools::zoomOut(nOldZoom);
+ SetZoom(nNewZoom);
+
mbZoomOnPage = false;
- SetZoom( std::max<::tools::Long>( GetActiveWindow()->GetZoom() / 2, GetActiveWindow()->GetMinZoom() ) );
::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0),
GetActiveWindow()->GetOutputSizePixel()) );
mpZoomList->InsertZoomRect(aVisAreaWin);
@@ -1203,8 +1207,11 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
case SID_ZOOM_IN:
{
+ const sal_uInt16 nOldZoom = GetActiveWindow()->GetZoom();
+ const sal_uInt16 nNewZoom = basegfx::zoomtools::zoomIn(nOldZoom);
+ SetZoom(nNewZoom);
+
mbZoomOnPage = false;
- SetZoom( std::min<::tools::Long>( GetActiveWindow()->GetZoom() * 2, GetActiveWindow()->GetMaxZoom() ) );
::tools::Rectangle aVisAreaWin = GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(0,0),
GetActiveWindow()->GetOutputSizePixel()) );
mpZoomList->InsertZoomRect(aVisAreaWin);