From 9e53a50b7d6764122b7171d67de8093900201dab Mon Sep 17 00:00:00 2001 From: Oliver Bolte Date: Thu, 12 Oct 2006 13:34:20 +0000 Subject: INTEGRATION: CWS sb59 (1.4.24); FILE MERGED 2006/08/11 15:04:32 sb 1.4.24.1: #i67487# Made code warning-free (wntmsci10). --- basic/source/sbx/sbxlng.cxx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'basic/source/sbx/sbxlng.cxx') diff --git a/basic/source/sbx/sbxlng.cxx b/basic/source/sbx/sbxlng.cxx index 7dcd93dcf465..39516716219f 100644 --- a/basic/source/sbx/sbxlng.cxx +++ b/basic/source/sbx/sbxlng.cxx @@ -4,9 +4,9 @@ * * $RCSfile: sbxlng.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: obo $ $Date: 2006-09-17 10:10:36 $ + * last change: $Author: obo $ $Date: 2006-10-12 14:33:20 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -103,7 +103,7 @@ start: else if( p->eType == SbxULONG64 ) dVal = ImpUINT64ToDouble( p->nULong64 ); else if( p->eType == SbxSALINT64 ) - dVal = p->nInt64; + dVal = static_cast< double >(p->nInt64); else if( p->eType == SbxSALUINT64 ) dVal = ImpSalUInt64ToDouble( p->uInt64 ); else if( p->eType == SbxDECIMAL ) @@ -330,15 +330,20 @@ start: case SbxBYREF | SbxDOUBLE: *p->pDouble = (double) n; break; case SbxBYREF | SbxCURRENCY: + double d; if( n > SbxMAXCURR ) { - SbxBase::SetError( SbxERR_OVERFLOW ); n = sal::static_int_cast( SbxMAXCURR ); + SbxBase::SetError( SbxERR_OVERFLOW ); d = SbxMAXCURR; } else if( n < SbxMINCURR ) { - SbxBase::SetError( SbxERR_OVERFLOW ); n = sal::static_int_cast( SbxMINCURR ); + SbxBase::SetError( SbxERR_OVERFLOW ); d = SbxMINCURR; } - *p->pLong64 = ImpDoubleToCurrency( (double)n ); break; + else + { + d = n; + } + *p->pLong64 = ImpDoubleToCurrency( d ); break; default: SbxBase::SetError( SbxERR_CONVERSION ); -- cgit