[Libreoffice-commits] .: basegfx/inc basegfx/source sw/source

Jan Holesovsky kendy at kemper.freedesktop.org
Tue Mar 20 09:17:40 PDT 2012


 basegfx/inc/basegfx/tools/zoomtools.hxx |    2 --
 basegfx/source/tools/zoomtools.cxx      |   21 ---------------------
 sw/source/ui/uiview/viewport.cxx        |    6 +++---
 3 files changed, 3 insertions(+), 26 deletions(-)

New commits:
commit f626ff59b229ce7aec2f2313936133c53d70781f
Author: Tim Hardeck <thardeck at suse.com>
Date:   Thu Feb 23 19:59:34 2012 +0100

    removed zoomtools int functions
    
    Changed viewport.cxx to use long instead of int like all other zoom
    functions and in this succession removed the zoomtools int functions
    which where only added for this one exception.

diff --git a/basegfx/inc/basegfx/tools/zoomtools.hxx b/basegfx/inc/basegfx/tools/zoomtools.hxx
index 566418d..44d9052 100644
--- a/basegfx/inc/basegfx/tools/zoomtools.hxx
+++ b/basegfx/inc/basegfx/tools/zoomtools.hxx
@@ -42,8 +42,6 @@ namespace basegfx
     {
         BASEGFX_DLLPUBLIC long zoomOut(long nCurrent);
         BASEGFX_DLLPUBLIC long zoomIn(long nCurrent);
-        BASEGFX_DLLPUBLIC int zoomOut(int nCurrent);
-        BASEGFX_DLLPUBLIC int zoomIn(int nCurrent);
     }
 }
 
diff --git a/basegfx/source/tools/zoomtools.cxx b/basegfx/source/tools/zoomtools.cxx
index d4b274c..34b0b8c 100644
--- a/basegfx/source/tools/zoomtools.cxx
+++ b/basegfx/source/tools/zoomtools.cxx
@@ -129,27 +129,6 @@ long zoomOut(long nCurrent)
     nNew = enforceStep(nNew, nCurrent, 25);
     return nNew;
 }
-
-/**
-* Increasing the zoom level.
-*
-* @param nCurrent current zoom factor
-*/
-int zoomIn(int nCurrent)
-{
-    return static_cast<int>( zoomIn( long( nCurrent ) ) );
-}
-
-/**
-* Decreasing the zoom level.
-*
-* @param nCurrent current zoom factor
-*/
-int zoomOut(int nCurrent)
-{
-    return static_cast<int>( zoomOut( long( nCurrent ) ) );
-}
-
 } // namespace zoomtools
 } // namespace basegfx
 
diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx
index d6b723d..e28d63e 100644
--- a/sw/source/ui/uiview/viewport.cxx
+++ b/sw/source/ui/uiview/viewport.cxx
@@ -1307,11 +1307,11 @@ sal_Bool SwView::HandleWheelCommands( const CommandEvent& rCEvt )
     const CommandWheelData* pWData = rCEvt.GetWheelData();
     if( pWData && COMMAND_WHEEL_ZOOM == pWData->GetMode() )
     {
-        sal_uInt16 nFact = pWrtShell->GetViewOptions()->GetZoom();
+        long nFact = pWrtShell->GetViewOptions()->GetZoom();
         if( 0L > pWData->GetDelta() )
-            nFact = static_cast< sal_uInt16 >(Max( 20, basegfx::zoomtools::zoomOut( static_cast<int>(nFact) )));
+            nFact = Max( (long) 20, basegfx::zoomtools::zoomOut( nFact ));
         else
-            nFact = static_cast< sal_uInt16 >(Min( 600, basegfx::zoomtools::zoomIn( static_cast<int>(nFact) )));
+            nFact = Min( (long) 600, basegfx::zoomtools::zoomIn( nFact ));
 
         SetZoom( SVX_ZOOM_PERCENT, nFact );
         bOk = sal_True;


More information about the Libreoffice-commits mailing list