diff options
author | Korrawit Pruegsanusak <detective.conan.1412@gmail.com> | 2012-01-17 00:18:08 +0700 |
---|---|---|
committer | Korrawit Pruegsanusak <detective.conan.1412@gmail.com> | 2012-01-17 00:18:08 +0700 |
commit | a9ebfbc2b6c8db7997d5982435951c068120af6f (patch) | |
tree | 61d9ba9d84cfed9c892f7a42136f45f6914dbe82 /sc | |
parent | ef0ee083e668be2b41e86196417893f84359aee8 (diff) |
Use platform-independent ::rtl::math::round to fix msvc build
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/view/prevwsh.cxx | 5 | ||||
-rw-r--r-- | sc/source/ui/view/tabview.cxx | 5 |
2 files changed, 6 insertions, 4 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 ) { |