summaryrefslogtreecommitdiff
path: root/basic/source/sbx/sbxuint.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-07-27 11:37:01 +0200
committerNoel Grandin <noel@peralex.com>2015-07-28 08:35:34 +0200
commit01075a7274bd3921501d382a71720581a48bfd66 (patch)
tree7f748dfa03ed10666d15dbfa2481cf03171e644b /basic/source/sbx/sbxuint.cxx
parent9072c5c8551c0bc512865ab15b1054c78706f1f3 (diff)
inline the "old" SbxErr constants
Change-Id: I1c54c792e0397d61c97d5067963b343f912275fc
Diffstat (limited to 'basic/source/sbx/sbxuint.cxx')
-rw-r--r--basic/source/sbx/sbxuint.cxx46
1 files changed, 23 insertions, 23 deletions
diff --git a/basic/source/sbx/sbxuint.cxx b/basic/source/sbx/sbxuint.cxx
index e5f62f287cbd..06784c309424 100644
--- a/basic/source/sbx/sbxuint.cxx
+++ b/basic/source/sbx/sbxuint.cxx
@@ -29,7 +29,7 @@ start:
switch( +p->eType )
{
case SbxNULL:
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
case SbxEMPTY:
nRes = 0; break;
case SbxCHAR:
@@ -41,7 +41,7 @@ start:
case SbxBOOL:
if( p->nInteger < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = 0;
}
else
nRes = p->nInteger;
@@ -53,11 +53,11 @@ start:
case SbxLONG:
if( p->nLong > SbxMAXUINT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXUINT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXUINT;
}
else if( p->nLong < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = 0;
}
else
nRes = (sal_uInt16) p->nLong;
@@ -65,7 +65,7 @@ start:
case SbxULONG:
if( p->nULong > SbxMAXUINT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXUINT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXUINT;
}
else
nRes = (sal_uInt16) p->nULong;
@@ -73,11 +73,11 @@ start:
case SbxCURRENCY:
if( p->nInt64 / CURRENCY_FACTOR > SbxMAXUINT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXUINT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXUINT;
}
else if( p->nInt64 < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = 0;
}
else
nRes = (sal_uInt16) (p->nInt64 / CURRENCY_FACTOR);
@@ -85,11 +85,11 @@ start:
case SbxSALINT64:
if( p->nInt64 > SbxMAXUINT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXUINT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXUINT;
}
else if( p->nInt64 < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = 0;
}
else
nRes = (sal_uInt16) p->nInt64;
@@ -97,7 +97,7 @@ start:
case SbxSALUINT64:
if( p->uInt64 > SbxMAXUINT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXUINT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXUINT;
}
else
nRes = (sal_uInt16) p->uInt64;
@@ -105,11 +105,11 @@ start:
case SbxSINGLE:
if( p->nSingle > SbxMAXUINT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXUINT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXUINT;
}
else if( p->nSingle < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = 0;
}
else
nRes = (sal_uInt16) ( p->nSingle + 0.5 );
@@ -131,11 +131,11 @@ start:
if( dVal > SbxMAXUINT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXUINT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXUINT;
}
else if( dVal < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = 0;
}
else
nRes = (sal_uInt16) ( dVal + 0.5 );
@@ -150,15 +150,15 @@ start:
{
double d;
SbxDataType t;
- if( ImpScan( *p->pOUString, d, t, NULL ) != SbxERR_OK )
+ if( ImpScan( *p->pOUString, d, t, NULL ) != ERRCODE_SBX_OK )
nRes = 0;
else if( d > SbxMAXUINT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXUINT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXUINT;
}
else if( d < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = 0;
}
else
nRes = (sal_uInt16) ( d + 0.5 );
@@ -171,7 +171,7 @@ start:
nRes = pVal->GetUShort();
else
{
- SbxBase::SetError( SbxERR_NO_OBJECT ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT ); nRes = 0;
}
break;
}
@@ -207,7 +207,7 @@ start:
p = &aTmp; goto start;
default:
- SbxBase::SetError( SbxERR_CONVERSION ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION ); nRes = 0;
}
return nRes;
}
@@ -267,7 +267,7 @@ start:
if( pVal )
pVal->PutUShort( n );
else
- SbxBase::SetError( SbxERR_NO_OBJECT );
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT );
break;
}
@@ -276,14 +276,14 @@ start:
case SbxBYREF | SbxBYTE:
if( n > SbxMAXBYTE )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXBYTE;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXBYTE;
}
*p->pByte = (sal_uInt8) n; break;
case SbxBYREF | SbxINTEGER:
case SbxBYREF | SbxBOOL:
if( n > SbxMAXINT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXINT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXINT;
}
*p->pInteger = (sal_Int16) n; break;
case SbxBYREF | SbxERROR:
@@ -306,7 +306,7 @@ start:
*p->puInt64 = n; break;
default:
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
}
}