summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/ui/view/prevwsh.cxx5
-rw-r--r--sc/source/ui/view/tabview.cxx5
-rw-r--r--sd/source/ui/view/viewshel.cxx5
-rw-r--r--svx/source/stbctrls/zoomsliderctrl.cxx5
-rw-r--r--sw/source/ui/uiview/viewport.cxx5
5 files changed, 15 insertions, 10 deletions
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index b25a46486347..e85f9ca66e65 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -76,6 +76,7 @@
#include <svx/dialogs.hrc>
#include <svx/zoom_def.hxx>
+#include <rtl/math.hxx>
#include "sc.hrc"
#include "scabstdlg.hxx"
@@ -448,9 +449,9 @@ sal_Bool ScPreviewShell::ScrollCommand( const CommandEvent& rCEvt )
long nOld = pPreview->GetZoom();
long nNew = nOld;
if ( pData->GetDelta() < 0 )
- nNew = Max( (long) MINZOOM, (long)round( nOld / ZOOM_FACTOR ));
+ nNew = Max( (long) MINZOOM, (long)::rtl::math::round( nOld / ZOOM_FACTOR ));
else
- nNew = Min( (long) MAXZOOM, (long)round( nOld * ZOOM_FACTOR ));
+ nNew = Min( (long) MAXZOOM, (long)::rtl::math::round( nOld * ZOOM_FACTOR ));
if ( nNew != nOld )
{
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 738aeec692f6..326af1a57f19 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -150,6 +150,7 @@
#include <algorithm>
#include <svx/zoom_def.hxx>
+#include <rtl/math.hxx>
#define SPLIT_MARGIN 30
#define SC_ICONSIZE 36
@@ -1059,9 +1060,9 @@ bool ScTabView::ScrollCommand( const CommandEvent& rCEvt, ScSplitPos ePos )
long nOld = (long)(( rOldY.GetNumerator() * 100 ) / rOldY.GetDenominator());
long nNew = nOld;
if ( pData->GetDelta() < 0 )
- nNew = Max( (long) MINZOOM, (long)round( nOld / ZOOM_FACTOR ));
+ nNew = Max( (long) MINZOOM, (long)::rtl::math::round( nOld / ZOOM_FACTOR ));
else
- nNew = Min( (long) MAXZOOM, (long)round( nOld * ZOOM_FACTOR ));
+ nNew = Min( (long) MAXZOOM, (long)::rtl::math::round( nOld * ZOOM_FACTOR ));
if ( nNew != nOld )
{
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 6c79ec29863f..b1cc2d302093 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -83,6 +83,7 @@
#include "SpellDialogChildWindow.hxx"
#include <svx/zoom_def.hxx>
+#include <rtl/math.hxx>
#include "Window.hxx"
#include "fupoor.hxx"
@@ -718,9 +719,9 @@ bool ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWi
long nNewZoom;
if( pData->GetDelta() < 0L )
- nNewZoom = Max( (long) pWin->GetMinZoom(), (long)round( nOldZoom / ZOOM_FACTOR ));
+ nNewZoom = Max( (long) pWin->GetMinZoom(), (long)::rtl::math::round( nOldZoom / ZOOM_FACTOR ));
else
- nNewZoom = Min( (long) pWin->GetMaxZoom(), (long)round( nOldZoom * ZOOM_FACTOR ));
+ nNewZoom = Min( (long) pWin->GetMaxZoom(), (long)::rtl::math::round( nOldZoom * ZOOM_FACTOR ));
SetZoom( nNewZoom );
Invalidate( SID_ATTR_ZOOM );
diff --git a/svx/source/stbctrls/zoomsliderctrl.cxx b/svx/source/stbctrls/zoomsliderctrl.cxx
index b27048025d8d..a845eb987d48 100644
--- a/svx/source/stbctrls/zoomsliderctrl.cxx
+++ b/svx/source/stbctrls/zoomsliderctrl.cxx
@@ -37,6 +37,7 @@
#include <svx/dialogs.hrc>
#include <svx/zoom_def.hxx>
+#include <rtl/math.hxx>
#include <set>
@@ -359,11 +360,11 @@ sal_Bool SvxZoomSliderControl::MouseButtonDown( const MouseEvent & rEvt )
// click to - button
if ( nXDiff >= nButtonLeftOffset && nXDiff <= nButtonRightOffset )
- mpImpl->mnCurrentZoom = round( mpImpl->mnCurrentZoom / ZOOM_FACTOR );
+ mpImpl->mnCurrentZoom = ::rtl::math::round( mpImpl->mnCurrentZoom / ZOOM_FACTOR );
// click to + button
else if ( nXDiff >= aControlRect.GetWidth() - nSliderXOffset + nButtonLeftOffset &&
nXDiff <= aControlRect.GetWidth() - nSliderXOffset + nButtonRightOffset )
- mpImpl->mnCurrentZoom = round( mpImpl->mnCurrentZoom * ZOOM_FACTOR );
+ mpImpl->mnCurrentZoom = ::rtl::math::round( mpImpl->mnCurrentZoom * ZOOM_FACTOR );
// click to slider
else if( nXDiff >= nSliderXOffset && nXDiff <= aControlRect.GetWidth() - nSliderXOffset )
mpImpl->mnCurrentZoom = Offset2Zoom( nXDiff );
diff --git a/sw/source/ui/uiview/viewport.cxx b/sw/source/ui/uiview/viewport.cxx
index 6bbb5d6e0c87..e6300872c498 100644
--- a/sw/source/ui/uiview/viewport.cxx
+++ b/sw/source/ui/uiview/viewport.cxx
@@ -53,6 +53,7 @@
#include <IDocumentSettingAccess.hxx>
#include <svx/zoom_def.hxx>
+#include <rtl/math.hxx>
//Das SetVisArea der DocShell darf nicht vom InnerResizePixel gerufen werden.
//Unsere Einstellungen muessen aber stattfinden.
@@ -1311,9 +1312,9 @@ sal_Bool SwView::HandleWheelCommands( const CommandEvent& rCEvt )
{
sal_uInt16 nFact = pWrtShell->GetViewOptions()->GetZoom();
if( 0L > pWData->GetDelta() )
- nFact = static_cast< sal_uInt16 >(Max( 20, (int)round( nFact / ZOOM_FACTOR )));
+ nFact = static_cast< sal_uInt16 >(Max( 20, (int)::rtl::math::round( nFact / ZOOM_FACTOR )));
else
- nFact = static_cast< sal_uInt16 >(Min( 600, (int)round( nFact * ZOOM_FACTOR )));
+ nFact = static_cast< sal_uInt16 >(Min( 600, (int)::rtl::math::round( nFact * ZOOM_FACTOR )));
SetZoom( SVX_ZOOM_PERCENT, nFact );
bOk = sal_True;