diff options
author | Tor Lillqvist <tml@iki.fi> | 2013-03-04 23:59:04 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2013-03-05 00:02:38 +0200 |
commit | 016206156d412b7df6445e81753f49a36f29b29a (patch) | |
tree | af771b53c26150994e4cb090a0b617f047983d8a /sw | |
parent | 68eea32a6e1b38013c06e91fc2d88fb67b4b300e (diff) |
Fix float scale factor -> integer percentage conversion bug in my new code
Change-Id: I1b843ee1921bad3607e62f7e61b085a33cd84aed
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/uiview/viewport.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx index bd3444ad347e..9fd7d63e5383 100644 --- a/sw/source/ui/uiview/viewport.cxx +++ b/sw/source/ui/uiview/viewport.cxx @@ -1277,8 +1277,8 @@ sal_Bool SwView::HandleWheelCommands( const CommandEvent& rCEvt ) } else if( pWData && COMMAND_WHEEL_ZOOM_SCALE == pWData->GetMode() ) { - long newZoom = 100 * (long) ((pWrtShell->GetViewOptions()->GetZoom() / 100.0) * (pWData->GetDelta() / 100.0)); - SetZoom( SVX_ZOOM_PERCENT, Max( 20L, Min( 600L, newZoom ) ) ); + int newZoom = 100 * (pWrtShell->GetViewOptions()->GetZoom() / 100.0) * (pWData->GetDelta() / 100.0); + SetZoom( SVX_ZOOM_PERCENT, Max( 20, Min( 600, newZoom ) ) ); bOk = sal_True; } else |