diff options
Diffstat (limited to 'basic/source/sbx/sbxuint.cxx')
-rw-r--r-- | basic/source/sbx/sbxuint.cxx | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/basic/source/sbx/sbxuint.cxx b/basic/source/sbx/sbxuint.cxx index d093b5d4b2da..fb366d91afa3 100644 --- a/basic/source/sbx/sbxuint.cxx +++ b/basic/source/sbx/sbxuint.cxx @@ -30,7 +30,7 @@ start: switch( +p->eType ) { case SbxNULL: - SbxBase::SetError( ERRCODE_SBX_CONVERSION ); + SbxBase::SetError( ERRCODE_BASIC_CONVERSION ); SAL_FALLTHROUGH; case SbxEMPTY: nRes = 0; break; @@ -43,7 +43,7 @@ start: case SbxBOOL: if( p->nInteger < 0 ) { - SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = 0; + SbxBase::SetError( ERRCODE_BASIC_MATH_OVERFLOW ); nRes = 0; } else nRes = p->nInteger; @@ -55,11 +55,11 @@ start: case SbxLONG: if( p->nLong > SbxMAXUINT ) { - SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXUINT; + SbxBase::SetError( ERRCODE_BASIC_MATH_OVERFLOW ); nRes = SbxMAXUINT; } else if( p->nLong < 0 ) { - SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = 0; + SbxBase::SetError( ERRCODE_BASIC_MATH_OVERFLOW ); nRes = 0; } else nRes = (sal_uInt16) p->nLong; @@ -67,7 +67,7 @@ start: case SbxULONG: if( p->nULong > SbxMAXUINT ) { - SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXUINT; + SbxBase::SetError( ERRCODE_BASIC_MATH_OVERFLOW ); nRes = SbxMAXUINT; } else nRes = (sal_uInt16) p->nULong; @@ -75,11 +75,11 @@ start: case SbxCURRENCY: if( p->nInt64 / CURRENCY_FACTOR > SbxMAXUINT ) { - SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXUINT; + SbxBase::SetError( ERRCODE_BASIC_MATH_OVERFLOW ); nRes = SbxMAXUINT; } else if( p->nInt64 < 0 ) { - SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = 0; + SbxBase::SetError( ERRCODE_BASIC_MATH_OVERFLOW ); nRes = 0; } else nRes = (sal_uInt16) (p->nInt64 / CURRENCY_FACTOR); @@ -87,11 +87,11 @@ start: case SbxSALINT64: if( p->nInt64 > SbxMAXUINT ) { - SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXUINT; + SbxBase::SetError( ERRCODE_BASIC_MATH_OVERFLOW ); nRes = SbxMAXUINT; } else if( p->nInt64 < 0 ) { - SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = 0; + SbxBase::SetError( ERRCODE_BASIC_MATH_OVERFLOW ); nRes = 0; } else nRes = (sal_uInt16) p->nInt64; @@ -99,7 +99,7 @@ start: case SbxSALUINT64: if( p->uInt64 > SbxMAXUINT ) { - SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXUINT; + SbxBase::SetError( ERRCODE_BASIC_MATH_OVERFLOW ); nRes = SbxMAXUINT; } else nRes = (sal_uInt16) p->uInt64; @@ -107,11 +107,11 @@ start: case SbxSINGLE: if( p->nSingle > SbxMAXUINT ) { - SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXUINT; + SbxBase::SetError( ERRCODE_BASIC_MATH_OVERFLOW ); nRes = SbxMAXUINT; } else if( p->nSingle < 0 ) { - SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = 0; + SbxBase::SetError( ERRCODE_BASIC_MATH_OVERFLOW ); nRes = 0; } else nRes = (sal_uInt16) ( p->nSingle + 0.5 ); @@ -133,11 +133,11 @@ start: if( dVal > SbxMAXUINT ) { - SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXUINT; + SbxBase::SetError( ERRCODE_BASIC_MATH_OVERFLOW ); nRes = SbxMAXUINT; } else if( dVal < 0 ) { - SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = 0; + SbxBase::SetError( ERRCODE_BASIC_MATH_OVERFLOW ); nRes = 0; } else nRes = (sal_uInt16) ( dVal + 0.5 ); @@ -156,11 +156,11 @@ start: nRes = 0; else if( d > SbxMAXUINT ) { - SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXUINT; + SbxBase::SetError( ERRCODE_BASIC_MATH_OVERFLOW ); nRes = SbxMAXUINT; } else if( d < 0 ) { - SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = 0; + SbxBase::SetError( ERRCODE_BASIC_MATH_OVERFLOW ); nRes = 0; } else nRes = (sal_uInt16) ( d + 0.5 ); @@ -173,7 +173,7 @@ start: nRes = pVal->GetUShort(); else { - SbxBase::SetError( ERRCODE_SBX_NO_OBJECT ); nRes = 0; + SbxBase::SetError( ERRCODE_BASIC_NO_OBJECT ); nRes = 0; } break; } @@ -209,7 +209,7 @@ start: p = &aTmp; goto start; default: - SbxBase::SetError( ERRCODE_SBX_CONVERSION ); nRes = 0; + SbxBase::SetError( ERRCODE_BASIC_CONVERSION ); nRes = 0; } return nRes; } @@ -269,7 +269,7 @@ start: if( pVal ) pVal->PutUShort( n ); else - SbxBase::SetError( ERRCODE_SBX_NO_OBJECT ); + SbxBase::SetError( ERRCODE_BASIC_NO_OBJECT ); break; } @@ -278,14 +278,14 @@ start: case SbxBYREF | SbxBYTE: if( n > SbxMAXBYTE ) { - SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXBYTE; + SbxBase::SetError( ERRCODE_BASIC_MATH_OVERFLOW ); n = SbxMAXBYTE; } *p->pByte = (sal_uInt8) n; break; case SbxBYREF | SbxINTEGER: case SbxBYREF | SbxBOOL: if( n > SbxMAXINT ) { - SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXINT; + SbxBase::SetError( ERRCODE_BASIC_MATH_OVERFLOW ); n = SbxMAXINT; } *p->pInteger = (sal_Int16) n; break; case SbxBYREF | SbxERROR: @@ -308,7 +308,7 @@ start: *p->puInt64 = n; break; default: - SbxBase::SetError( ERRCODE_SBX_CONVERSION ); + SbxBase::SetError( ERRCODE_BASIC_CONVERSION ); } } |