From a9ebfbc2b6c8db7997d5982435951c068120af6f Mon Sep 17 00:00:00 2001 From: Korrawit Pruegsanusak Date: Tue, 17 Jan 2012 00:18:08 +0700 Subject: Use platform-independent ::rtl::math::round to fix msvc build --- sc/source/ui/view/prevwsh.cxx | 5 +++-- sc/source/ui/view/tabview.cxx | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'sc/source') 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 #include +#include #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 #include +#include #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 ) { -- cgit