summaryrefslogtreecommitdiffstats
path: root/basic
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
parentconvert SbxFlagsBits to scoped enum (diff)
downloadcore-01075a7274bd3921501d382a71720581a48bfd66.tar.gz
core-01075a7274bd3921501d382a71720581a48bfd66.zip
inline the "old" SbxErr constants
Change-Id: I1c54c792e0397d61c97d5067963b343f912275fc
Diffstat (limited to 'basic')
-rw-r--r--basic/source/classes/sb.cxx10
-rw-r--r--basic/source/classes/sbxmod.cxx4
-rw-r--r--basic/source/comp/sbcomp.cxx8
-rw-r--r--basic/source/runtime/methods.cxx6
-rw-r--r--basic/source/runtime/methods1.cxx4
-rw-r--r--basic/source/runtime/runtime.cxx2
-rw-r--r--basic/source/sbx/sbxarray.cxx32
-rw-r--r--basic/source/sbx/sbxbase.cxx8
-rw-r--r--basic/source/sbx/sbxbool.cxx14
-rw-r--r--basic/source/sbx/sbxbyte.cxx44
-rw-r--r--basic/source/sbx/sbxchar.cxx38
-rw-r--r--basic/source/sbx/sbxcoll.cxx20
-rw-r--r--basic/source/sbx/sbxcurr.cxx48
-rw-r--r--basic/source/sbx/sbxdate.cxx46
-rw-r--r--basic/source/sbx/sbxdbl.cxx58
-rw-r--r--basic/source/sbx/sbxdec.cxx42
-rw-r--r--basic/source/sbx/sbxexec.cxx14
-rw-r--r--basic/source/sbx/sbxint.cxx142
-rw-r--r--basic/source/sbx/sbxlng.cxx48
-rw-r--r--basic/source/sbx/sbxobj.cxx2
-rw-r--r--basic/source/sbx/sbxscan.cxx16
-rw-r--r--basic/source/sbx/sbxsng.cxx54
-rw-r--r--basic/source/sbx/sbxstr.cxx10
-rw-r--r--basic/source/sbx/sbxuint.cxx46
-rw-r--r--basic/source/sbx/sbxulng.cxx38
-rw-r--r--basic/source/sbx/sbxvalue.cxx118
-rw-r--r--basic/source/sbx/sbxvar.cxx4
27 files changed, 438 insertions, 438 deletions
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 2e2efa6d546d..fb8fd46377dd 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -996,7 +996,7 @@ StarBASIC::~StarBASIC()
lclRemoveDocBasicItem( *this );
SbxBase::ResetError();
- if( eOld != SbxERR_OK )
+ if( eOld != ERRCODE_SBX_OK )
{
SbxBase::SetError( eOld );
}
@@ -1406,7 +1406,7 @@ bool StarBASIC::Call( const OUString& rName, SbxArray* pParam )
{
SbxError eErr = SbxBase::GetError();
SbxBase::ResetError();
- if( eErr != SbxERR_OK )
+ if( eErr != ERRCODE_SBX_OK )
{
RTError( (SbError)eErr, 0, 0, 0 );
}
@@ -2213,7 +2213,7 @@ void BasicCollection::CollAdd( SbxArray* pPar_ )
sal_uInt16 nCount = pPar_->Count();
if( nCount < 2 || nCount > 5 )
{
- SetError( SbxERR_WRONG_ARGS );
+ SetError( ERRCODE_SBX_WRONG_ARGS );
return;
}
@@ -2290,7 +2290,7 @@ void BasicCollection::CollItem( SbxArray* pPar_ )
{
if( pPar_->Count() != 2 )
{
- SetError( SbxERR_WRONG_ARGS );
+ SetError( ERRCODE_SBX_WRONG_ARGS );
return;
}
SbxVariable* pRes = NULL;
@@ -2314,7 +2314,7 @@ void BasicCollection::CollRemove( SbxArray* pPar_ )
{
if( pPar_ == NULL || pPar_->Count() != 2 )
{
- SetError( SbxERR_WRONG_ARGS );
+ SetError( ERRCODE_SBX_WRONG_ARGS );
return;
}
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 06ddaddcc92f..7e04ce1a0d19 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -824,7 +824,7 @@ void SbModule::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
if( pProp )
{
if( pProp->GetModule() != this )
- SetError( SbxERR_BAD_ACTION );
+ SetError( ERRCODE_SBX_BAD_ACTION );
}
else if( pMeth )
{
@@ -1101,7 +1101,7 @@ void SbModule::Run( SbMethod* pMeth )
// i80726 The Find below will genarate an error in Testtool so we reset it unless there was one before already
bool bWasError = SbxBase::GetError() != 0;
SbxVariable* pMSOMacroRuntimeLibVar = Find( "Launcher", SbxCLASS_OBJECT );
- if ( !bWasError && (SbxBase::GetError() == SbxERR_PROC_UNDEFINED) )
+ if ( !bWasError && (SbxBase::GetError() == ERRCODE_SBX_PROC_UNDEFINED) )
SbxBase::ResetError();
if( pMSOMacroRuntimeLibVar )
{
diff --git a/basic/source/comp/sbcomp.cxx b/basic/source/comp/sbcomp.cxx
index 0c7dc6d6223f..95f5b7f927a1 100644
--- a/basic/source/comp/sbcomp.cxx
+++ b/basic/source/comp/sbcomp.cxx
@@ -321,7 +321,7 @@ OUString lcl_dumpMethodParameters( SbMethod* pMethod )
}
SbxBase::ResetError();
- if( eOld != SbxERR_OK )
+ if( eOld != ERRCODE_SBX_OK )
{
SbxBase::SetError( eOld );
}
@@ -902,12 +902,12 @@ void RTL_Impl_TraceCommand( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite )
}
SbxError eOld = SbxBase::GetError();
- if( eOld != SbxERR_OK )
+ if( eOld != ERRCODE_SBX_OK )
SbxBase::ResetError();
OUString aValStr = rPar.Get(2)->GetString();
SbxError eErr = SbxBase::GetError();
- if( eErr != SbxERR_OK )
+ if( eErr != ERRCODE_SBX_OK )
{
aValStr = "<ERROR converting value to String>";
SbxBase::ResetError();
@@ -919,7 +919,7 @@ void RTL_Impl_TraceCommand( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite )
int nIndent = GnLastCallLvl * GnIndentPerCallLevel;
lcl_lineOut( Buffer, lcl_getSpaces( nIndent ) );
- if( eOld != SbxERR_OK )
+ if( eOld != ERRCODE_SBX_OK )
{
SbxBase::SetError( eOld );
}
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index f497f715eefe..424a747ed7cf 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -1899,7 +1899,7 @@ RTLFUNC(CDateFromUnoDate)
if(aAny >>= aUnoDate)
SbxDateFromUNODate(rPar.Get(0), aUnoDate);
else
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
}
css::util::Time SbxDateToUNOTime( const SbxValue* const pVal )
@@ -1952,7 +1952,7 @@ RTLFUNC(CDateFromUnoTime)
if(aAny >>= aUnoTime)
SbxDateFromUNOTime(rPar.Get(0), aUnoTime);
else
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
}
css::util::DateTime SbxDateToUNODateTime( const SbxValue* const pVal )
@@ -2014,7 +2014,7 @@ RTLFUNC(CDateFromUnoDateTime)
if(aAny >>= aUnoDT)
SbxDateFromUNODateTime(rPar.Get(0), aUnoDT);
else
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
}
// Function to convert date to ISO 8601 date format
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index 4edffe011349..00cbf15a2dbc 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -334,7 +334,7 @@ RTLFUNC(CDbl) // JSM
// #41690
OUString aScanStr = pSbxVariable->GetOUString();
SbError Error = SbxValue::ScanNumIntnl( aScanStr, nVal );
- if( Error != SbxERR_OK )
+ if( Error != ERRCODE_SBX_OK )
{
StarBASIC::Error( Error );
}
@@ -403,7 +403,7 @@ RTLFUNC(CSng) // JSM
double dVal = 0.0;
OUString aScanStr = pSbxVariable->GetOUString();
SbError Error = SbxValue::ScanNumIntnl( aScanStr, dVal, /*bSingle=*/true );
- if( SbxBase::GetError() == SbxERR_OK && Error != SbxERR_OK )
+ if( SbxBase::GetError() == ERRCODE_SBX_OK && Error != ERRCODE_SBX_OK )
{
StarBASIC::Error( Error );
}
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index f77bcbc49c89..68634592ccc5 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -1666,7 +1666,7 @@ inline bool checkUnoStructCopy( bool bVBA, SbxVariableRef& refVal, SbxVariableRe
// Alternatively it is possible that the same scenario
// could overwrite and existing error. Lets prevent that
SbxObjectRef xVarObj = static_cast<SbxObject*>(refVar->GetObject());
- if ( eOldErr != SbxERR_OK )
+ if ( eOldErr != ERRCODE_SBX_OK )
SbxBase::SetError( eOldErr );
else
SbxBase::ResetError();
diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx
index 37f11e6b2e31..3bf2a8d26279 100644
--- a/basic/source/sbx/sbxarray.cxx
+++ b/basic/source/sbx/sbxarray.cxx
@@ -135,7 +135,7 @@ SbxVariableRef& SbxArray::GetRef32( sal_uInt32 nIdx )
// Very Hot Fix
if( nIdx > SBX_MAXINDEX32 )
{
- SetError( SbxERR_BOUNDS );
+ SetError( ERRCODE_SBX_BOUNDS );
nIdx = 0;
}
while( mpVarEntries->size() <= nIdx )
@@ -152,7 +152,7 @@ SbxVariableRef& SbxArray::GetRef( sal_uInt16 nIdx )
// Very Hot Fix
if( nIdx > SBX_MAXINDEX )
{
- SetError( SbxERR_BOUNDS );
+ SetError( ERRCODE_SBX_BOUNDS );
nIdx = 0;
}
while( mpVarEntries->size() <= nIdx )
@@ -166,7 +166,7 @@ SbxVariable* SbxArray::Get32( sal_uInt32 nIdx )
{
if( !CanRead() )
{
- SetError( SbxERR_PROP_WRITEONLY );
+ SetError( ERRCODE_SBX_PROP_WRITEONLY );
return NULL;
}
SbxVariableRef& rRef = GetRef32( nIdx );
@@ -181,7 +181,7 @@ SbxVariable* SbxArray::Get( sal_uInt16 nIdx )
{
if( !CanRead() )
{
- SetError( SbxERR_PROP_WRITEONLY );
+ SetError( ERRCODE_SBX_PROP_WRITEONLY );
return NULL;
}
SbxVariableRef& rRef = GetRef( nIdx );
@@ -195,7 +195,7 @@ SbxVariable* SbxArray::Get( sal_uInt16 nIdx )
void SbxArray::Put32( SbxVariable* pVar, sal_uInt32 nIdx )
{
if( !CanWrite() )
- SetError( SbxERR_PROP_READONLY );
+ SetError( ERRCODE_SBX_PROP_READONLY );
else
{
if( pVar )
@@ -215,7 +215,7 @@ void SbxArray::Put32( SbxVariable* pVar, sal_uInt32 nIdx )
void SbxArray::Put( SbxVariable* pVar, sal_uInt16 nIdx )
{
if( !CanWrite() )
- SetError( SbxERR_PROP_READONLY );
+ SetError( ERRCODE_SBX_PROP_READONLY );
else
{
if( pVar )
@@ -236,7 +236,7 @@ OUString SbxArray::GetAlias( sal_uInt16 nIdx )
{
if( !CanRead() )
{
- SetError( SbxERR_PROP_WRITEONLY );
+ SetError( ERRCODE_SBX_PROP_WRITEONLY );
return OUString();
}
SbxVarEntry& rRef = reinterpret_cast<SbxVarEntry&>(GetRef( nIdx ));
@@ -251,7 +251,7 @@ void SbxArray::PutAlias( const OUString& rAlias, sal_uInt16 nIdx )
{
if( !CanWrite() )
{
- SetError( SbxERR_PROP_READONLY );
+ SetError( ERRCODE_SBX_PROP_READONLY );
}
else
{
@@ -595,10 +595,10 @@ void SbxDimArray::Clear()
void SbxDimArray::AddDimImpl32( sal_Int32 lb, sal_Int32 ub, bool bAllowSize0 )
{
- SbxError eRes = SbxERR_OK;
+ SbxError eRes = ERRCODE_SBX_OK;
if( ub < lb && !bAllowSize0 )
{
- eRes = SbxERR_BOUNDS;
+ eRes = ERRCODE_SBX_BOUNDS;
ub = lb;
}
SbxDim d;
@@ -638,7 +638,7 @@ bool SbxDimArray::GetDim32( sal_Int32 n, sal_Int32& rlb, sal_Int32& rub ) const
{
if( n < 1 || n > static_cast<sal_Int32>(m_vDimensions.size()) )
{
- SetError( SbxERR_BOUNDS );
+ SetError( ERRCODE_SBX_BOUNDS );
rub = rlb = 0;
return false;
}
@@ -658,7 +658,7 @@ bool SbxDimArray::GetDim( short n, short& rlb, short& rub ) const
{
if( rlb32 < -SBX_MAXINDEX || rub32 > SBX_MAXINDEX )
{
- SetError( SbxERR_BOUNDS );
+ SetError( ERRCODE_SBX_BOUNDS );
return false;
}
}
@@ -682,7 +682,7 @@ sal_uInt32 SbxDimArray::Offset32( const sal_Int32* pIdx )
}
if( m_vDimensions.empty() || nPos > SBX_MAXINDEX32 )
{
- SetError( SbxERR_BOUNDS );
+ SetError( ERRCODE_SBX_BOUNDS );
nPos = 0;
}
return nPos;
@@ -704,7 +704,7 @@ sal_uInt16 SbxDimArray::Offset( const short* pIdx )
}
if( m_vDimensions.empty() || nPos > SBX_MAXINDEX )
{
- SetError( SbxERR_BOUNDS );
+ SetError( ERRCODE_SBX_BOUNDS );
nPos = 0;
}
return (sal_uInt16) nPos;
@@ -738,7 +738,7 @@ sal_uInt32 SbxDimArray::Offset32( SbxArray* pPar )
((m_vDimensions.size() != sal::static_int_cast<size_t>(pPar->Count() - 1))
&& SbiRuntime::isVBAEnabled()))
{
- SetError( SbxERR_BOUNDS );
+ SetError( ERRCODE_SBX_BOUNDS );
return 0;
}
#endif
@@ -757,7 +757,7 @@ sal_uInt32 SbxDimArray::Offset32( SbxArray* pPar )
}
if( nPos > (sal_uInt32) SBX_MAXINDEX32 )
{
- SetError( SbxERR_BOUNDS );
+ SetError( ERRCODE_SBX_BOUNDS );
nPos = 0;
}
return nPos;
diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx
index d763e972d680..8924c3fb57cf 100644
--- a/basic/source/sbx/sbxbase.cxx
+++ b/basic/source/sbx/sbxbase.cxx
@@ -33,7 +33,7 @@
TYPEINIT0(SbxBase)
SbxAppData::SbxAppData()
- : eSbxError(SbxERR_OK)
+ : eSbxError(ERRCODE_SBX_OK)
, pBasicFormater(0)
, eBasicFormaterLangType(LANGUAGE_DONTKNOW)
{
@@ -105,18 +105,18 @@ SbxError SbxBase::GetError()
void SbxBase::SetError( SbxError e )
{
SbxAppData& r = GetSbxData_Impl();
- if( e && r.eSbxError == SbxERR_OK )
+ if( e && r.eSbxError == ERRCODE_SBX_OK )
r.eSbxError = e;
}
bool SbxBase::IsError()
{
- return GetSbxData_Impl().eSbxError != SbxERR_OK;
+ return GetSbxData_Impl().eSbxError != ERRCODE_SBX_OK;
}
void SbxBase::ResetError()
{
- GetSbxData_Impl().eSbxError = SbxERR_OK;
+ GetSbxData_Impl().eSbxError = ERRCODE_SBX_OK;
}
void SbxBase::AddFactory( SbxFactory* pFac )
diff --git a/basic/source/sbx/sbxbool.cxx b/basic/source/sbx/sbxbool.cxx
index 666bb5364d74..674eae2d9541 100644
--- a/basic/source/sbx/sbxbool.cxx
+++ b/basic/source/sbx/sbxbool.cxx
@@ -28,7 +28,7 @@ enum SbxBOOL ImpGetBool( const SbxValues* p )
switch( +p->eType )
{
case SbxNULL:
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
case SbxEMPTY:
nRes = SbxFALSE; break;
case SbxCHAR:
@@ -79,7 +79,7 @@ enum SbxBOOL ImpGetBool( const SbxValues* p )
double n;
SbxDataType t;
sal_uInt16 nLen = 0;
- if( ImpScan( *p->pOUString, n, t, &nLen ) == SbxERR_OK )
+ if( ImpScan( *p->pOUString, n, t, &nLen ) == ERRCODE_SBX_OK )
{
if( nLen == p->pOUString->getLength() )
{
@@ -89,7 +89,7 @@ enum SbxBOOL ImpGetBool( const SbxValues* p )
}
}
if( bError )
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
}
}
break;
@@ -100,7 +100,7 @@ enum SbxBOOL ImpGetBool( const SbxValues* p )
nRes = pVal->GetBool() ? SbxTRUE : SbxFALSE;
else
{
- SbxBase::SetError( SbxERR_NO_OBJECT ); nRes = SbxFALSE;
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT ); nRes = SbxFALSE;
}
break;
}
@@ -130,7 +130,7 @@ enum SbxBOOL ImpGetBool( const SbxValues* p )
case SbxBYREF | SbxSALUINT64:
nRes = ( *p->puInt64 ) ? SbxTRUE : SbxFALSE; break;
default:
- SbxBase::SetError( SbxERR_CONVERSION ); nRes = SbxFALSE;
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION ); nRes = SbxFALSE;
}
return nRes;
}
@@ -185,7 +185,7 @@ void ImpPutBool( SbxValues* p, sal_Int16 n )
if( pVal )
pVal->PutBool( n != 0 );
else
- SbxBase::SetError( SbxERR_NO_OBJECT );
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT );
break;
}
case SbxBYREF | SbxCHAR:
@@ -213,7 +213,7 @@ void ImpPutBool( SbxValues* p, sal_Int16 n )
case SbxBYREF | SbxSALUINT64:
*p->puInt64 = (sal_uInt64) n; break;
default:
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
}
}
diff --git a/basic/source/sbx/sbxbyte.cxx b/basic/source/sbx/sbxbyte.cxx
index 9c9522294023..160f23fea21c 100644
--- a/basic/source/sbx/sbxbyte.cxx
+++ b/basic/source/sbx/sbxbyte.cxx
@@ -29,13 +29,13 @@ start:
switch( +p->eType )
{
case SbxNULL:
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
case SbxEMPTY:
nRes = 0; break;
case SbxCHAR:
if( p->nChar > SbxMAXBYTE )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = 0;
}
else
nRes = (sal_uInt8) p->nChar;
@@ -46,11 +46,11 @@ start:
case SbxBOOL:
if( p->nInteger > SbxMAXBYTE )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXBYTE;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXBYTE;
}
else if( p->nInteger < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = 0;
}
else
nRes = (sal_uInt8) p->nInteger;
@@ -59,7 +59,7 @@ start:
case SbxUSHORT:
if( p->nUShort > (sal_uInt16) SbxMAXBYTE )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXBYTE;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXBYTE;
}
else
nRes = (sal_uInt8) p->nUShort;
@@ -67,11 +67,11 @@ start:
case SbxLONG:
if( p->nLong > SbxMAXBYTE )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXBYTE;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXBYTE;
}
else if( p->nLong < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = 0;
}
else
nRes = (sal_uInt8) p->nLong;
@@ -79,7 +79,7 @@ start:
case SbxULONG:
if( p->nULong > SbxMAXBYTE )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXBYTE;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXBYTE;
}
else
nRes = (sal_uInt8) p->nULong;
@@ -92,11 +92,11 @@ start:
val = val / CURRENCY_FACTOR;
if( val > SbxMAXBYTE )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXBYTE;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXBYTE;
}
else if( p->nInt64 < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = 0;
}
else
nRes = (sal_uInt8) val;
@@ -105,7 +105,7 @@ start:
case SbxSALUINT64:
if( p->uInt64 > SbxMAXBYTE )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXBYTE;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXBYTE;
}
else
nRes = (sal_uInt8) p->uInt64;
@@ -113,11 +113,11 @@ start:
case SbxSINGLE:
if( p->nSingle > SbxMAXBYTE )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXBYTE;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXBYTE;
}
else if( p->nSingle < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = 0;
}
else
nRes = (sal_uInt8) ImpRound( p->nSingle );
@@ -139,11 +139,11 @@ start:
if( dVal > SbxMAXBYTE )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXBYTE;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXBYTE;
}
else if( dVal < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = 0;
}
else
nRes = (sal_uInt8) ImpRound( dVal );
@@ -158,15 +158,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 > SbxMAXBYTE )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXBYTE;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXBYTE;
}
else if( d < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = 0;
}
else
nRes = (sal_uInt8) ( d + 0.5 );
@@ -179,7 +179,7 @@ start:
nRes = pVal->GetByte();
else
{
- SbxBase::SetError( SbxERR_NO_OBJECT ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT ); nRes = 0;
}
break;
}
@@ -215,7 +215,7 @@ start:
p = &aTmp; goto start;
default:
- SbxBase::SetError( SbxERR_CONVERSION ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION ); nRes = 0;
}
return nRes;
}
@@ -268,7 +268,7 @@ void ImpPutByte( SbxValues* p, sal_uInt8 n )
if( pVal )
pVal->PutByte( n );
else
- SbxBase::SetError( SbxERR_NO_OBJECT );
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT );
break;
}
case SbxBYREF | SbxCHAR:
@@ -298,7 +298,7 @@ void ImpPutByte( SbxValues* p, sal_uInt8 n )
*p->puInt64 = n; break;
default:
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
}
}
diff --git a/basic/source/sbx/sbxchar.cxx b/basic/source/sbx/sbxchar.cxx
index 9628be2cbe91..9070b8bdd514 100644
--- a/basic/source/sbx/sbxchar.cxx
+++ b/basic/source/sbx/sbxchar.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 < SbxMINCHAR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMINCHAR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMINCHAR;
}
else
nRes = (sal_Unicode) p->nInteger;
@@ -53,11 +53,11 @@ start:
case SbxLONG:
if( p->nLong > SbxMAXCHAR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXCHAR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXCHAR;
}
else if( p->nLong < SbxMINCHAR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMINCHAR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMINCHAR;
}
else
nRes = (sal_Unicode) p->nLong;
@@ -65,7 +65,7 @@ start:
case SbxULONG:
if( p->nULong > SbxMAXCHAR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXCHAR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXCHAR;
}
else
nRes = (sal_Unicode) p->nULong;
@@ -80,11 +80,11 @@ start:
if( val > SbxMAXCHAR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXCHAR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXCHAR;
}
else if( p->nInt64 < SbxMINCHAR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMINCHAR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMINCHAR;
}
else
nRes = (sal_Unicode) val;
@@ -93,7 +93,7 @@ start:
case SbxSALUINT64:
if( p->uInt64 > SbxMAXCHAR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXCHAR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXCHAR;
}
else
nRes = (sal_Unicode) p->uInt64;
@@ -101,11 +101,11 @@ start:
case SbxSINGLE:
if( p->nSingle > SbxMAXCHAR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXCHAR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXCHAR;
}
else if( p->nSingle < SbxMINCHAR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMINCHAR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMINCHAR;
}
else
nRes = (sal_Unicode) ImpRound( p->nSingle );
@@ -127,11 +127,11 @@ start:
if( dVal > SbxMAXCHAR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXCHAR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXCHAR;
}
else if( dVal < SbxMINCHAR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMINCHAR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMINCHAR;
}
else
nRes = (sal_uInt8) ImpRound( dVal );
@@ -144,15 +144,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 > SbxMAXCHAR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXCHAR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXCHAR;
}
else if( d < SbxMINCHAR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMINCHAR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMINCHAR;
}
else
nRes = (sal_Unicode) ImpRound( d );
@@ -165,7 +165,7 @@ start:
nRes = pVal->GetChar();
else
{
- SbxBase::SetError( SbxERR_NO_OBJECT ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT ); nRes = 0;
}
break;
}
@@ -200,7 +200,7 @@ start:
p = &aTmp; goto start;
default:
- SbxBase::SetError( SbxERR_CONVERSION ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION ); nRes = 0;
}
return nRes;
}
@@ -259,7 +259,7 @@ start:
if( pVal )
pVal->PutChar( n );
else
- SbxBase::SetError( SbxERR_NO_OBJECT );
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT );
break;
}
case SbxBYREF | SbxCHAR:
@@ -289,7 +289,7 @@ start:
*p->puInt64 = n; break;
default:
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
}
}
diff --git a/basic/source/sbx/sbxcoll.cxx b/basic/source/sbx/sbxcoll.cxx
index 8d98977e3ea0..6513d29aad2b 100644
--- a/basic/source/sbx/sbxcoll.cxx
+++ b/basic/source/sbx/sbxcoll.cxx
@@ -167,14 +167,14 @@ void SbxCollection::CollAdd( SbxArray* pPar_ )
{
if( pPar_->Count() != 2 )
{
- SetError( SbxERR_WRONG_ARGS );
+ SetError( ERRCODE_SBX_WRONG_ARGS );
}
else
{
SbxBase* pObj = pPar_->Get( 1 )->GetObject();
if( !pObj || !( pObj->ISA(SbxObject) ) )
{
- SetError( SbxERR_NOTIMP );
+ SetError( ERRCODE_SBX_NOTIMP );
}
else
{
@@ -189,7 +189,7 @@ void SbxCollection::CollItem( SbxArray* pPar_ )
{
if( pPar_->Count() != 2 )
{
- SetError( SbxERR_WRONG_ARGS );
+ SetError( ERRCODE_SBX_WRONG_ARGS );
}
else
{
@@ -209,7 +209,7 @@ void SbxCollection::CollItem( SbxArray* pPar_ )
}
if( !pRes )
{
- SetError( SbxERR_BAD_INDEX );
+ SetError( ERRCODE_SBX_BAD_INDEX );
}
pPar_->Get( 0 )->PutObject( pRes );
}
@@ -220,12 +220,12 @@ void SbxCollection::CollItem( SbxArray* pPar_ )
void SbxCollection::CollRemove( SbxArray* pPar_ )
{
if( pPar_->Count() != 2 )
- SetError( SbxERR_WRONG_ARGS );
+ SetError( ERRCODE_SBX_WRONG_ARGS );
else
{
short n = pPar_->Get( 1 )->GetInteger();
if( n < 1 || n > (short) pObjs->Count() )
- SetError( SbxERR_BAD_INDEX );
+ SetError( ERRCODE_SBX_BAD_INDEX );
else
Remove( pObjs->Get( (sal_uInt16) n - 1 ) );
}
@@ -256,7 +256,7 @@ SbxStdCollection& SbxStdCollection::operator=( const SbxStdCollection& r )
{
if( !r.aElemClass.equalsIgnoreAsciiCase( aElemClass ) )
{
- SetError( SbxERR_CONVERSION );
+ SetError( ERRCODE_SBX_CONVERSION );
}
else
{
@@ -275,7 +275,7 @@ void SbxStdCollection::Insert( SbxVariable* p )
{
SbxObject* pObj = PTR_CAST(SbxObject,p);
if( pObj && !pObj->IsClass( aElemClass ) )
- SetError( SbxERR_BAD_ACTION );
+ SetError( ERRCODE_SBX_BAD_ACTION );
else
SbxCollection::Insert( p );
}
@@ -283,7 +283,7 @@ void SbxStdCollection::Insert( SbxVariable* p )
void SbxStdCollection::CollAdd( SbxArray* pPar_ )
{
if( !bAddRemoveOk )
- SetError( SbxERR_BAD_ACTION );
+ SetError( ERRCODE_SBX_BAD_ACTION );
else
SbxCollection::CollAdd( pPar_ );
}
@@ -291,7 +291,7 @@ void SbxStdCollection::CollAdd( SbxArray* pPar_ )
void SbxStdCollection::CollRemove( SbxArray* pPar_ )
{
if( !bAddRemoveOk )
- SetError( SbxERR_BAD_ACTION );
+ SetError( ERRCODE_SBX_BAD_ACTION );
else
SbxCollection::CollRemove( pPar_ );
}
diff --git a/basic/source/sbx/sbxcurr.cxx b/basic/source/sbx/sbxcurr.cxx
index 56defb0a8d8a..49f324eed9be 100644
--- a/basic/source/sbx/sbxcurr.cxx
+++ b/basic/source/sbx/sbxcurr.cxx
@@ -199,7 +199,7 @@ static sal_Int64 ImpStringToCurrency( const OUString &rStr )
// complains.
if ( p != sTmp.getStr() + sTmp.getLength() )
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
while( nFractDigit )
{
sNormalisedNumString.append( '0' );
@@ -223,7 +223,7 @@ start:
{
case SbxERROR:
case SbxNULL:
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
nRes = 0; break;
case SbxEMPTY:
nRes = 0; break;
@@ -259,7 +259,7 @@ start:
// you know for sure the 'break' above is intentional.
if ( nRes > SbxMAXSALINT64 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXSALINT64;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXSALINT64;
}
#endif
}
@@ -269,11 +269,11 @@ start:
// As above
if ( nRes > SbxMAXSALINT64 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXSALINT64;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXSALINT64;
}
else if ( nRes < SbxMINSALINT64 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMINSALINT64;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMINSALINT64;
}
break;
#endif
@@ -285,7 +285,7 @@ start:
nRes = SAL_MAX_INT64;
if( p->nSingle * CURRENCY_FACTOR - 0.5 < (float)SAL_MIN_INT64 )
nRes = SAL_MIN_INT64;
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
break;
}
nRes = ImpDoubleToCurrency( (double)p->nSingle );
@@ -299,7 +299,7 @@ start:
nRes = SAL_MAX_INT64;
if( p->nDouble * CURRENCY_FACTOR - 0.5 < (double)SAL_MIN_INT64 )
nRes = SAL_MIN_INT64;
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
break;
}
nRes = ImpDoubleToCurrency( p->nDouble );
@@ -331,7 +331,7 @@ start:
nRes = pVal->GetCurrency();
else
{
- SbxBase::SetError( SbxERR_NO_OBJECT );
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT );
nRes=0;
}
break;
@@ -372,7 +372,7 @@ start:
p = &aTmp; goto start;
default:
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
nRes=0;
}
return nRes;
@@ -423,7 +423,7 @@ start:
{
SbxDecimal* pDec = ImpCreateDecimal( p );
if( !pDec->setDouble( ImpCurrencyToDouble( r ) / CURRENCY_FACTOR ) )
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
break;
}
case SbxBYREF | SbxSTRING:
@@ -440,7 +440,7 @@ start:
if( pVal )
pVal->PutCurrency( r );
else
- SbxBase::SetError( SbxERR_NO_OBJECT );
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT );
break;
}
case SbxBYREF | SbxCHAR:
@@ -448,11 +448,11 @@ start:
sal_Int64 val = r / CURRENCY_FACTOR;
if( val > SbxMAXCHAR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); val = SbxMAXCHAR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); val = SbxMAXCHAR;
}
else if( val < SbxMINCHAR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); val = SbxMINCHAR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); val = SbxMINCHAR;
}
*p->pChar = (sal_Unicode) val; break;
}
@@ -461,11 +461,11 @@ start:
sal_Int64 val = r / CURRENCY_FACTOR;
if( val > SbxMAXBYTE )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); val = SbxMAXBYTE;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); val = SbxMAXBYTE;
}
else if( val < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); val = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); val = 0;
}
*p->pByte = (sal_uInt8) val; break;
}
@@ -475,11 +475,11 @@ start:
sal_Int64 val = r / CURRENCY_FACTOR;
if( r > SbxMAXINT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); val = SbxMAXINT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); val = SbxMAXINT;
}
else if( r < SbxMININT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); val = SbxMININT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); val = SbxMININT;
}
*p->pInteger = (sal_uInt16) val; break;
}
@@ -489,11 +489,11 @@ start:
sal_Int64 val = r / CURRENCY_FACTOR;
if( val > SbxMAXUINT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); val = SbxMAXUINT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); val = SbxMAXUINT;
}
else if( val < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); val = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); val = 0;
}
*p->pUShort = (sal_uInt16) val; break;
}
@@ -502,11 +502,11 @@ start:
sal_Int64 val = r / CURRENCY_FACTOR;
if( val > SbxMAXLNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); val = SbxMAXLNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); val = SbxMAXLNG;
}
else if( val < SbxMINLNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); val = SbxMINLNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); val = SbxMINLNG;
}
*p->pLong = (sal_Int32) val; break;
}
@@ -515,11 +515,11 @@ start:
sal_Int64 val = r / CURRENCY_FACTOR;
if( val > SbxMAXULNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); val = SbxMAXULNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); val = SbxMAXULNG;
}
else if( val < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); val = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); val = 0;
}
*p->pULong = (sal_uInt32) val; break;
}
@@ -535,7 +535,7 @@ start:
case SbxBYREF | SbxDOUBLE:
*p->pDouble = ImpCurrencyToDouble( r ); break;
default:
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
}
}
diff --git a/basic/source/sbx/sbxdate.cxx b/basic/source/sbx/sbxdate.cxx
index 7b5df4957353..6d11d61fb272 100644
--- a/basic/source/sbx/sbxdate.cxx
+++ b/basic/source/sbx/sbxdate.cxx
@@ -38,7 +38,7 @@ double ImpGetDate( const SbxValues* p )
switch( +p->eType )
{
case SbxNULL:
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
case SbxEMPTY:
nRes = 0;
break;
@@ -143,7 +143,7 @@ double ImpGetDate( const SbxValues* p )
if ( !bSuccess )
{
- SbxBase::SetError( SbxERR_CONVERSION ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION ); nRes = 0;
}
}
break;
@@ -155,7 +155,7 @@ double ImpGetDate( const SbxValues* p )
}
else
{
- SbxBase::SetError( SbxERR_NO_OBJECT ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT ); nRes = 0;
}
break;
case SbxBYREF | SbxCHAR:
@@ -195,7 +195,7 @@ double ImpGetDate( const SbxValues* p )
nRes = ImpSalUInt64ToDouble( *p->puInt64 );
break;
default:
- SbxBase::SetError( SbxERR_CONVERSION ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION ); nRes = 0;
break;
}
return nRes;
@@ -250,7 +250,7 @@ start:
pDec = ImpCreateDecimal( p );
if( !pDec->setDouble( n ) )
{
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
}
break;
direct:
@@ -323,28 +323,28 @@ start:
}
else
{
- SbxBase::SetError( SbxERR_NO_OBJECT );
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT );
}
break;
case SbxBYREF | SbxCHAR:
if( n > SbxMAXCHAR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXCHAR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXCHAR;
}
else if( n < SbxMINCHAR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMINCHAR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMINCHAR;
}
*p->pChar = (sal_Unicode) n;
break;
case SbxBYREF | SbxBYTE:
if( n > SbxMAXBYTE )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXBYTE;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXBYTE;
}
else if( n < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = 0;
}
*p->pByte = (sal_uInt8) n;
break;
@@ -352,11 +352,11 @@ start:
case SbxBYREF | SbxBOOL:
if( n > SbxMAXINT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXINT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXINT;
}
else if( n < SbxMININT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMININT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMININT;
}
*p->pInteger = (sal_Int16) n;
break;
@@ -364,44 +364,44 @@ start:
case SbxBYREF | SbxUSHORT:
if( n > SbxMAXUINT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXUINT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXUINT;
}
else if( n < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = 0;
}
*p->pUShort = (sal_uInt16) n;
break;
case SbxBYREF | SbxLONG:
if( n > SbxMAXLNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXLNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXLNG;
}
else if( n < SbxMINLNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMINLNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMINLNG;
}
*p->pLong = (sal_Int32) n;
break;
case SbxBYREF | SbxULONG:
if( n > SbxMAXULNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXULNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXULNG;
}
else if( n < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = 0;
}
*p->pULong = (sal_uInt32) n;
break;
case SbxBYREF | SbxSINGLE:
if( n > SbxMAXSNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXSNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXSNG;
}
else if( n < SbxMINSNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMINSNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMINSNG;
}
*p->pSingle = (float) n;
break;
@@ -418,16 +418,16 @@ start:
case SbxBYREF | SbxCURRENCY:
if( n > SbxMAXCURR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXCURR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXCURR;
}
else if( n < SbxMINCURR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMINCURR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMINCURR;
}
*p->pnInt64 = ImpDoubleToCurrency( n );
break;
default:
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
break;
}
}
diff --git a/basic/source/sbx/sbxdbl.cxx b/basic/source/sbx/sbxdbl.cxx
index e251336c62c8..51c391c5d4e2 100644
--- a/basic/source/sbx/sbxdbl.cxx
+++ b/basic/source/sbx/sbxdbl.cxx
@@ -30,7 +30,7 @@ double ImpGetDouble( const SbxValues* p )
switch( +p->eType )
{
case SbxNULL:
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
case SbxEMPTY:
nRes = 0; break;
case SbxCHAR:
@@ -73,19 +73,19 @@ double ImpGetDouble( const SbxValues* p )
nRes = 0;
#if HAVE_FEATURE_SCRIPTING
if ( SbiRuntime::isVBAEnabled() )// VBA only behaviour
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
#endif
}
else
{
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;
#if HAVE_FEATURE_SCRIPTING
if ( SbiRuntime::isVBAEnabled() )// VBA only behaviour
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
#endif
}
else
@@ -99,7 +99,7 @@ double ImpGetDouble( const SbxValues* p )
nRes = pVal->GetDouble();
else
{
- SbxBase::SetError( SbxERR_NO_OBJECT ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT ); nRes = 0;
}
break;
}
@@ -131,7 +131,7 @@ double ImpGetDouble( const SbxValues* p )
nRes = ImpSalUInt64ToDouble( *p->puInt64 ); break;
default:
- SbxBase::SetError( SbxERR_CONVERSION ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION ); nRes = 0;
}
return nRes;
}
@@ -164,7 +164,7 @@ start:
{
SbxDecimal* pDec = ImpCreateDecimal( p );
if( !pDec->setDouble( n ) )
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
break;
}
direct:
@@ -174,11 +174,11 @@ start:
case SbxCURRENCY:
if( n > SbxMAXCURR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXCURR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXCURR;
}
else if( n < SbxMINCURR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMINCURR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMINCURR;
}
p->nInt64 = ImpDoubleToCurrency( n );
break;
@@ -205,87 +205,87 @@ start:
if( pVal )
pVal->PutDouble( n );
else
- SbxBase::SetError( SbxERR_NO_OBJECT );
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT );
break;
}
case SbxBYREF | SbxCHAR:
if( n > SbxMAXCHAR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXCHAR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXCHAR;
}
else if( n < SbxMINCHAR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMINCHAR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMINCHAR;
}
*p->pChar = (sal_Unicode) n; break;
case SbxBYREF | SbxBYTE:
if( n > SbxMAXBYTE )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXBYTE;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXBYTE;
}
else if( n < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = 0;
}
*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;
}
else if( n < SbxMININT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMININT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMININT;
}
*p->pInteger = (sal_Int16) n; break;
case SbxBYREF | SbxERROR:
case SbxBYREF | SbxUSHORT:
if( n > SbxMAXUINT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXUINT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXUINT;
}
else if( n < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = 0;
}
*p->pUShort = (sal_uInt16) n; break;
case SbxBYREF | SbxLONG:
if( n > SbxMAXLNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXLNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXLNG;
}
else if( n < SbxMINLNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMINLNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMINLNG;
}
*p->pLong = (sal_Int32) n; break;
case SbxBYREF | SbxULONG:
if( n > SbxMAXULNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXULNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXULNG;
}
else if( n < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = 0;
}
*p->pULong = (sal_uInt32) n; break;
case SbxBYREF | SbxSINGLE:
if( n > SbxMAXSNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXSNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXSNG;
}
else if( n < SbxMINSNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMINSNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMINSNG;
}
else if( n > 0 && n < SbxMAXSNG2 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXSNG2;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXSNG2;
}
else if( n < 0 && n > SbxMINSNG2 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMINSNG2;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMINSNG2;
}
*p->pSingle = (float) n; break;
case SbxBYREF | SbxSALINT64:
@@ -298,16 +298,16 @@ start:
case SbxBYREF | SbxCURRENCY:
if( n > SbxMAXCURR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXCURR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXCURR;
}
else if( n < SbxMINCURR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMINCURR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMINCURR;
}
*p->pnInt64 = ImpDoubleToCurrency( n ); break;
default:
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
}
}
diff --git a/basic/source/sbx/sbxdec.cxx b/basic/source/sbx/sbxdec.cxx
index 2c824d7bd902..df561c715319 100644
--- a/basic/source/sbx/sbxdec.cxx
+++ b/basic/source/sbx/sbxdec.cxx
@@ -423,7 +423,7 @@ start:
switch( +eType )
{
case SbxNULL:
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
case SbxEMPTY:
pnDecRes->setShort( 0 ); break;
case SbxCHAR:
@@ -442,24 +442,24 @@ start:
pnDecRes->setULong( p->nULong ); break;
case SbxSINGLE:
if( !pnDecRes->setSingle( p->nSingle ) )
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
break;
case SbxCURRENCY:
{
if( !pnDecRes->setDouble( ImpCurrencyToDouble( p->nInt64 ) ) )
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
break;
}
case SbxSALINT64:
{
if( !pnDecRes->setDouble( (double)p->nInt64 ) )
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
break;
}
case SbxSALUINT64:
{
if( !pnDecRes->setDouble( (double)p->uInt64 ) )
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
break;
}
case SbxDATE:
@@ -467,7 +467,7 @@ start:
{
double dVal = p->nDouble;
if( !pnDecRes->setDouble( dVal ) )
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
break;
}
case SbxLPSTR:
@@ -483,7 +483,7 @@ start:
pnDecRes->setDecimal( pVal->GetDecimal() );
else
{
- SbxBase::SetError( SbxERR_NO_OBJECT );
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT );
pnDecRes->setShort( 0 );
}
break;
@@ -520,7 +520,7 @@ start:
p = &aTmp; goto start;
default:
- SbxBase::SetError( SbxERR_CONVERSION ); pnDecRes->setShort( 0 );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION ); pnDecRes->setShort( 0 );
}
return pnDecRes;
}
@@ -601,21 +601,21 @@ start:
if( pVal )
pVal->PutDecimal( pDec );
else
- SbxBase::SetError( SbxERR_NO_OBJECT );
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT );
break;
}
case SbxBYREF | SbxCHAR:
if( !pDec->getChar( *p->pChar ) )
{
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
*p->pChar = 0;
}
break;
case SbxBYREF | SbxBYTE:
if( !pDec->getChar( *p->pChar ) )
{
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
*p->pByte = 0;
}
break;
@@ -623,7 +623,7 @@ start:
case SbxBYREF | SbxBOOL:
if( !pDec->getShort( *p->pInteger ) )
{
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
*p->pInteger = 0;
}
break;
@@ -631,21 +631,21 @@ start:
case SbxBYREF | SbxUSHORT:
if( !pDec->getUShort( *p->pUShort ) )
{
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
*p->pUShort = 0;
}
break;
case SbxBYREF | SbxLONG:
if( !pDec->getLong( *p->pLong ) )
{
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
*p->pLong = 0;
}
break;
case SbxBYREF | SbxULONG:
if( !pDec->getULong( *p->pULong ) )
{
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
*p->pULong = 0;
}
break;
@@ -653,7 +653,7 @@ start:
{
double d(0.0);
if( !pDec->getDouble( d ) )
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
*p->pnInt64 = ImpDoubleToCurrency( d );
}
break;
@@ -661,7 +661,7 @@ start:
{
double d(0.0);
if( !pDec->getDouble( d ) )
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
else
*p->pnInt64 = ImpDoubleToSalInt64( d );
}
@@ -670,7 +670,7 @@ start:
{
double d(0.0);
if( !pDec->getDouble( d ) )
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
else
*p->puInt64 = ImpDoubleToSalUInt64( d );
}
@@ -678,7 +678,7 @@ start:
case SbxBYREF | SbxSINGLE:
if( !pDec->getSingle( *p->pSingle ) )
{
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
*p->pSingle = 0;
}
break;
@@ -686,12 +686,12 @@ start:
case SbxBYREF | SbxDOUBLE:
if( !pDec->getDouble( *p->pDouble ) )
{
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
*p->pDouble = 0;
}
break;
default:
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
}
}
diff --git a/basic/source/sbx/sbxexec.cxx b/basic/source/sbx/sbxexec.cxx
index ea843ade22a9..ab9a0f029b94 100644
--- a/basic/source/sbx/sbxexec.cxx
+++ b/basic/source/sbx/sbxexec.cxx
@@ -55,7 +55,7 @@ static const sal_Unicode* Symbol( const sal_Unicode* p, OUString& rSym )
// A symbol had to begin with a alphabetic character or an underline
if( !rtl::isAsciiAlpha( *p ) && *p != '_' )
{
- SbxBase::SetError( SbxERR_SYNTAX );
+ SbxBase::SetError( ERRCODE_SBX_SYNTAX );
}
else
{
@@ -105,7 +105,7 @@ static SbxVariable* QualifiedName
}
}
else
- SbxBase::SetError( SbxERR_SYNTAX );
+ SbxBase::SetError( ERRCODE_SBX_SYNTAX );
*ppBuf = p;
if( refVar.Is() )
refVar->AddFirstRef();
@@ -249,7 +249,7 @@ static SbxVariable* Assign( SbxObject* pObj, SbxObject* pGbl, const sal_Unicode*
// Assign only onto properties!
if( refVar->GetClass() != SbxCLASS_PROPERTY )
{
- SbxBase::SetError( SbxERR_BAD_ACTION );
+ SbxBase::SetError( ERRCODE_SBX_BAD_ACTION );
refVar.Clear();
}
else
@@ -335,7 +335,7 @@ static SbxVariable* Element
}
}
else
- SbxBase::SetError( SbxERR_NO_METHOD );
+ SbxBase::SetError( ERRCODE_SBX_NO_METHOD );
}
*ppBuf = p;
if( refVar.Is() )
@@ -358,7 +358,7 @@ SbxVariable* SbxObject::Execute( const OUString& rTxt )
}
if( *p++ != '[' )
{
- SetError( SbxERR_SYNTAX ); break;
+ SetError( ERRCODE_SBX_SYNTAX ); break;
}
pVar = Assign( this, this, &p );
if( !pVar )
@@ -368,7 +368,7 @@ SbxVariable* SbxObject::Execute( const OUString& rTxt )
p = SkipWhitespace( p );
if( *p++ != ']' )
{
- SetError( SbxERR_SYNTAX ); break;
+ SetError( ERRCODE_SBX_SYNTAX ); break;
}
}
return pVar;
@@ -387,7 +387,7 @@ SbxVariable* SbxObject::FindQualified( const OUString& rName, SbxClassType t )
p = SkipWhitespace( p );
if( *p )
{
- SetError( SbxERR_SYNTAX );
+ SetError( ERRCODE_SBX_SYNTAX );
}
return pVar;
}
diff --git a/basic/source/sbx/sbxint.cxx b/basic/source/sbx/sbxint.cxx
index 649bb46f11c6..910b3e618824 100644
--- a/basic/source/sbx/sbxint.cxx
+++ b/basic/source/sbx/sbxint.cxx
@@ -34,7 +34,7 @@ start:
switch( +p->eType )
{
case SbxNULL:
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
case SbxEMPTY:
nRes = 0; break;
case SbxCHAR:
@@ -48,7 +48,7 @@ start:
case SbxUSHORT:
if( p->nUShort > (sal_uInt16) SbxMAXINT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXINT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXINT;
}
else
nRes = (sal_Int16) p->nUShort;
@@ -56,11 +56,11 @@ start:
case SbxLONG:
if( p->nLong > SbxMAXINT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXINT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXINT;
}
else if( p->nLong < SbxMININT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMININT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMININT;
}
else
nRes = (sal_Int16) p->nLong;
@@ -68,7 +68,7 @@ start:
case SbxULONG:
if( p->nULong > SbxMAXINT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXINT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXINT;
}
else
nRes = (sal_Int16) p->nULong;
@@ -76,11 +76,11 @@ start:
case SbxSINGLE:
if( p->nSingle > SbxMAXINT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXINT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXINT;
}
else if( p->nSingle < SbxMININT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMININT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMININT;
}
else
nRes = (sal_Int16) ImpRound( p->nSingle );
@@ -91,11 +91,11 @@ start:
if( tstVal > SbxMAXINT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXINT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXINT;
}
else if( tstVal < SbxMININT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMININT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMININT;
}
else
nRes = (sal_Int16) (tstVal);
@@ -104,11 +104,11 @@ start:
case SbxSALINT64:
if( p->nInt64 > SbxMAXINT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXINT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXINT;
}
else if( p->nInt64 < SbxMININT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMININT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMININT;
}
else
nRes = (sal_Int16) p->nInt64;
@@ -116,7 +116,7 @@ start:
case SbxSALUINT64:
if( p->uInt64 > SbxMAXINT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXINT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXINT;
}
else
nRes = (sal_Int16) p->uInt64;
@@ -137,11 +137,11 @@ start:
if( dVal > SbxMAXINT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXINT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXINT;
}
else if( dVal < SbxMININT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMININT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMININT;
}
else
nRes = (sal_Int16) ImpRound( dVal );
@@ -156,15 +156,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 > SbxMAXINT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXINT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXINT;
}
else if( d < SbxMININT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMININT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMININT;
}
else
nRes = (sal_Int16) ImpRound( d );
@@ -177,7 +177,7 @@ start:
nRes = pVal->GetInteger();
else
{
- SbxBase::SetError( SbxERR_NO_OBJECT ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT ); nRes = 0;
}
break;
}
@@ -213,7 +213,7 @@ start:
p = &aTmp; goto start;
default:
- SbxBase::SetError( SbxERR_CONVERSION ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION ); nRes = 0;
}
return nRes;
}
@@ -273,23 +273,23 @@ start:
if( pVal )
pVal->PutInteger( n );
else
- SbxBase::SetError( SbxERR_NO_OBJECT );
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT );
break;
}
case SbxBYREF | SbxCHAR:
if( n < SbxMINCHAR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMINCHAR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMINCHAR;
}
*p->pChar = (char) n; break;
case SbxBYREF | SbxBYTE:
if( n > SbxMAXBYTE )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXBYTE;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXBYTE;
}
else if( n < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = 0;
}
*p->pByte = (sal_uInt8) n; break;
case SbxBYREF | SbxINTEGER:
@@ -299,7 +299,7 @@ start:
case SbxBYREF | SbxUSHORT:
if( n < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = 0;
}
*p->pUShort = (sal_uInt16) n; break;
case SbxBYREF | SbxLONG:
@@ -307,7 +307,7 @@ start:
case SbxBYREF | SbxULONG:
if( n < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = 0;
}
*p->pULong = (sal_uInt32) n; break;
case SbxBYREF | SbxCURRENCY:
@@ -317,7 +317,7 @@ start:
case SbxBYREF | SbxSALUINT64:
if( n < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
*p->puInt64 = 0;
}
else
@@ -330,7 +330,7 @@ start:
*p->pDouble = (double) n; break;
default:
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
}
}
@@ -342,11 +342,11 @@ sal_Int64 ImpDoubleToSalInt64( double d )
sal_Int64 nRes;
if( d > SbxMAXSALINT64 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXSALINT64;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXSALINT64;
}
else if( d < SbxMINSALINT64 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMINSALINT64;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMINSALINT64;
}
else
nRes = (sal_Int64) ImpRound( d );
@@ -358,11 +358,11 @@ sal_uInt64 ImpDoubleToSalUInt64( double d )
sal_uInt64 nRes;
if( d > SbxMAXSALUINT64 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXSALUINT64;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXSALUINT64;
}
else if( d < 0.0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = 0;
}
else
nRes = (sal_uInt64) ImpRound( d );
@@ -374,7 +374,7 @@ double ImpSalUInt64ToDouble( sal_uInt64 n )
{
double d = 0.0;
if( n > SbxMAXSALINT64 )
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
else
d = (double)(sal_Int64) n;
return d;
@@ -389,7 +389,7 @@ start:
switch( +p->eType )
{
case SbxNULL:
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
case SbxEMPTY:
nRes = 0; break;
case SbxCHAR:
@@ -420,7 +420,7 @@ start:
case SbxSALUINT64:
if( p->uInt64 > SbxMAXSALINT64 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXSALINT64;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXSALINT64;
}
else
nRes = (sal_Int64) p->uInt64;
@@ -441,7 +441,7 @@ start:
// Check if really 0 or invalid conversion
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
nRes = (sal_Int64) d;
@@ -455,7 +455,7 @@ start:
nRes = pVal->GetInt64();
else
{
- SbxBase::SetError( SbxERR_NO_OBJECT ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT ); nRes = 0;
}
break;
}
@@ -493,7 +493,7 @@ start:
p = &aTmp; goto start;
default:
- SbxBase::SetError( SbxERR_CONVERSION ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION ); nRes = 0;
}
return nRes;
}
@@ -554,69 +554,69 @@ start:
if( pVal )
pVal->PutInt64( n );
else
- SbxBase::SetError( SbxERR_NO_OBJECT );
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT );
break;
}
case SbxBYREF | SbxCHAR:
if( n > SbxMAXCHAR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXCHAR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXCHAR;
}
else if( n < SbxMINCHAR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMINCHAR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMINCHAR;
}
*p->pChar = (sal_Unicode) n; break;
case SbxBYREF | SbxBYTE:
if( n > SbxMAXBYTE )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXBYTE;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXBYTE;
}
else if( n < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = 0;
}
*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;
}
else if( n < SbxMININT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMININT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMININT;
}
*p->pInteger = (sal_Int16) n; break;
case SbxBYREF | SbxERROR:
case SbxBYREF | SbxUSHORT:
if( n > SbxMAXUINT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXUINT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXUINT;
}
else if( n < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = 0;
}
*p->pUShort = (sal_uInt16) n; break;
case SbxBYREF | SbxLONG:
if( n > SbxMAXLNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXLNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXLNG;
}
else if( n < SbxMINLNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMINLNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMINLNG;
}
*p->pLong = (sal_Int32) n; break;
case SbxBYREF | SbxULONG:
if( n > SbxMAXULNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXULNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXULNG;
}
else if( n < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = 0;
}
*p->pULong = (sal_uInt32) n; break;
case SbxBYREF | SbxSINGLE:
@@ -631,12 +631,12 @@ start:
case SbxBYREF | SbxSALUINT64:
if( n < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = 0;
}
*p->puInt64 = (sal_Int64) n; break;
default:
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
}
}
@@ -648,7 +648,7 @@ start:
switch( +p->eType )
{
case SbxNULL:
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
case SbxEMPTY:
nRes = 0; break;
case SbxCHAR:
@@ -679,7 +679,7 @@ start:
case SbxSALINT64:
if( p->nInt64 < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = 0;
}
else
nRes = (sal_uInt64) p->nInt64;
@@ -702,22 +702,22 @@ start:
// Check if really 0 or invalid conversion
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 > SbxMAXSALUINT64 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXSALUINT64;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXSALUINT64;
}
else if( d < 0.0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = 0;
}
else
nRes = (sal_uInt64) ImpRound( d );
}
else if( n64 < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = 0;
}
else
{
@@ -732,7 +732,7 @@ start:
nRes = pVal->GetUInt64();
else
{
- SbxBase::SetError( SbxERR_NO_OBJECT ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT ); nRes = 0;
}
break;
}
@@ -768,7 +768,7 @@ start:
p = &aTmp; goto start;
default:
- SbxBase::SetError( SbxERR_CONVERSION ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION ); nRes = 0;
}
return nRes;
}
@@ -818,7 +818,7 @@ start:
if( !p->pOUString )
p->pOUString = new OUString;
if( n > SbxMAXSALINT64 )
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
else
{
::OString aOStr = OString::number( n );
@@ -832,45 +832,45 @@ start:
if( pVal )
pVal->PutUInt64( n );
else
- SbxBase::SetError( SbxERR_NO_OBJECT );
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT );
break;
}
case SbxBYREF | SbxCHAR:
if( n > SbxMAXCHAR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXCHAR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXCHAR;
}
*p->pChar = (sal_Unicode) n; break;
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:
case SbxBYREF | SbxUSHORT:
if( n > SbxMAXUINT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXUINT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXUINT;
}
*p->pUShort = (sal_uInt16) n; break;
case SbxBYREF | SbxLONG:
if( n > SbxMAXLNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXLNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXLNG;
}
*p->pLong = (sal_Int32) n; break;
case SbxBYREF | SbxULONG:
if( n > SbxMAXULNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXULNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXULNG;
}
*p->pULong = (sal_uInt32) n; break;
case SbxBYREF | SbxSINGLE:
@@ -882,7 +882,7 @@ start:
case SbxBYREF | SbxCURRENCY:
if ( n > ( SbxMAXSALINT64 / CURRENCY_FACTOR ) )
{
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
n = SbxMAXSALINT64;
}
*p->pnInt64 = ( sal_Int64) ( n * CURRENCY_FACTOR ); break;
@@ -891,12 +891,12 @@ start:
case SbxBYREF | SbxSALINT64:
if( n > SbxMAXSALINT64 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = 0;
}
*p->pnInt64 = (sal_Int64) n; break;
default:
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
}
}
diff --git a/basic/source/sbx/sbxlng.cxx b/basic/source/sbx/sbxlng.cxx
index 5b633cb0e1e3..e9a9ee96b5fd 100644
--- a/basic/source/sbx/sbxlng.cxx
+++ b/basic/source/sbx/sbxlng.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:
@@ -47,7 +47,7 @@ start:
case SbxULONG:
if( p->nULong > SbxMAXLNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXLNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXLNG;
}
else
nRes = (sal_Int32) p->nULong;
@@ -55,11 +55,11 @@ start:
case SbxSINGLE:
if( p->nSingle > SbxMAXLNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXLNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXLNG;
}
else if( p->nSingle < SbxMINLNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMINLNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMINLNG;
}
else
nRes = (sal_Int32) ImpRound( p->nSingle );
@@ -74,7 +74,7 @@ start:
{
sal_Int64 tstVal = p->nInt64 / CURRENCY_FACTOR;
nRes = (sal_Int32) (tstVal);
- if( tstVal < SbxMINLNG || SbxMAXLNG < tstVal ) SbxBase::SetError( SbxERR_OVERFLOW );
+ if( tstVal < SbxMINLNG || SbxMAXLNG < tstVal ) SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
if( SbxMAXLNG < tstVal ) nRes = SbxMAXLNG;
if( tstVal < SbxMINLNG ) nRes = SbxMINLNG;
break;
@@ -96,11 +96,11 @@ start:
if( dVal > SbxMAXLNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXLNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXLNG;
}
else if( dVal < SbxMINLNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMINLNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMINLNG;
}
else
nRes = (sal_Int32) ImpRound( dVal );
@@ -115,15 +115,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 > SbxMAXLNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXLNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXLNG;
}
else if( d < SbxMINLNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMINLNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMINLNG;
}
else
nRes = (sal_Int32) ImpRound( d );
@@ -136,7 +136,7 @@ start:
nRes = pVal->GetLong();
else
{
- SbxBase::SetError( SbxERR_NO_OBJECT ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT ); nRes = 0;
}
break;
}
@@ -173,7 +173,7 @@ start:
p = &aTmp; goto start;
default:
- SbxBase::SetError( SbxERR_CONVERSION ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION ); nRes = 0;
}
return nRes;
}
@@ -234,49 +234,49 @@ start:
if( pVal )
pVal->PutLong( n );
else
- SbxBase::SetError( SbxERR_NO_OBJECT );
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT );
break;
}
case SbxBYREF | SbxCHAR:
if( n > SbxMAXCHAR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXCHAR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXCHAR;
}
else if( n < SbxMINCHAR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMINCHAR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMINCHAR;
}
*p->pChar = (sal_Unicode) n; break;
case SbxBYREF | SbxBYTE:
if( n > SbxMAXBYTE )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXBYTE;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXBYTE;
}
else if( n < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = 0;
}
*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;
}
else if( n < SbxMININT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMININT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMININT;
}
*p->pInteger = (sal_Int16) n; break;
case SbxBYREF | SbxERROR:
case SbxBYREF | SbxUSHORT:
if( n > SbxMAXUINT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXUINT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXUINT;
}
else if( n < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = 0;
}
*p->pUShort = (sal_uInt16) n; break;
case SbxBYREF | SbxLONG:
@@ -284,7 +284,7 @@ start:
case SbxBYREF | SbxULONG:
if( n < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = 0;
}
*p->pULong = (sal_uInt32) n; break;
case SbxBYREF | SbxSALINT64:
@@ -292,7 +292,7 @@ start:
case SbxBYREF | SbxSALUINT64:
if( n < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); *p->puInt64 = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); *p->puInt64 = 0;
}
else
*p->puInt64 = n;
@@ -305,7 +305,7 @@ start:
case SbxBYREF | SbxCURRENCY:
*p->pnInt64 = (sal_Int64)n * (sal_Int64)CURRENCY_FACTOR; break;
default:
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
}
}
diff --git a/basic/source/sbx/sbxobj.cxx b/basic/source/sbx/sbxobj.cxx
index 64f9557f8f5a..c38737dea8ef 100644
--- a/basic/source/sbx/sbxobj.cxx
+++ b/basic/source/sbx/sbxobj.cxx
@@ -303,7 +303,7 @@ bool SbxObject::Call( const OUString& rName, SbxArray* pParam )
pMeth->SetParameters( NULL );
return true;
}
- SetError( SbxERR_NO_METHOD );
+ SetError( ERRCODE_SBX_NO_METHOD );
return false;
}
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index 8a520b4a450e..45013f58187e 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -256,17 +256,17 @@ SbxError ImpScan( const OUString& rWSrc, double& nVal, SbxDataType& rType,
else if ( SbiRuntime::isVBAEnabled() )
{
OSL_TRACE("Reporting error converting");
- return SbxERR_CONVERSION;
+ return ERRCODE_SBX_CONVERSION;
}
#endif
if( pLen )
*pLen = (sal_uInt16) ( p - pStart );
if( !bRes )
- return SbxERR_CONVERSION;
+ return ERRCODE_SBX_CONVERSION;
if( bMinus )
nVal = -nVal;
rType = eScanType;
- return SbxERR_OK;
+ return ERRCODE_SBX_OK;
}
// port for CDbl in the Basic
@@ -277,9 +277,9 @@ SbxError SbxValue::ScanNumIntnl( const OUString& rSrc, double& nVal, bool bSingl
SbxError nRetError = ImpScan( rSrc, nVal, t, &nLen,
/*bAllowIntntl*/false, /*bOnlyIntntl*/true );
// read completely?
- if( nRetError == SbxERR_OK && nLen != rSrc.getLength() )
+ if( nRetError == ERRCODE_SBX_OK && nLen != rSrc.getLength() )
{
- nRetError = SbxERR_CONVERSION;
+ nRetError = ERRCODE_SBX_CONVERSION;
}
if( bSingle )
{
@@ -532,17 +532,17 @@ static sal_uInt16 printfmtstr( const OUString& rStr, OUString& rRes, const OUStr
bool SbxValue::Scan( const OUString& rSrc, sal_uInt16* pLen )
{
- SbxError eRes = SbxERR_OK;
+ SbxError eRes = ERRCODE_SBX_OK;
if( !CanWrite() )
{
- eRes = SbxERR_PROP_READONLY;
+ eRes = ERRCODE_SBX_PROP_READONLY;
}
else
{
double n;
SbxDataType t;
eRes = ImpScan( rSrc, n, t, pLen );
- if( eRes == SbxERR_OK )
+ if( eRes == ERRCODE_SBX_OK )
{
if( !IsFixed() )
{
diff --git a/basic/source/sbx/sbxsng.cxx b/basic/source/sbx/sbxsng.cxx
index a90dd61784c6..fb7e228f440a 100644
--- a/basic/source/sbx/sbxsng.cxx
+++ b/basic/source/sbx/sbxsng.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:
@@ -73,23 +73,23 @@ start:
if( dVal > SbxMAXSNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
nRes = static_cast< float >(SbxMAXSNG);
}
else if( dVal < SbxMINSNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
nRes = static_cast< float >(SbxMINSNG);
}
// tests for underflow - storing value too small for precision of single
else if( dVal > 0 && dVal < SbxMAXSNG2 )
{
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
nRes = static_cast< float >(SbxMAXSNG2);
}
else if( dVal < 0 && dVal > SbxMINSNG2 )
{
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
nRes = static_cast< float >(SbxMINSNG2);
}
else
@@ -105,16 +105,16 @@ 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 > SbxMAXSNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
nRes = static_cast< float >(SbxMAXSNG);
}
else if( d < SbxMINSNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
nRes = static_cast< float >(SbxMINSNG);
}
else
@@ -128,7 +128,7 @@ start:
nRes = pVal->GetSingle();
else
{
- SbxBase::SetError( SbxERR_NO_OBJECT ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT ); nRes = 0;
}
break;
}
@@ -163,7 +163,7 @@ start:
p = &aTmp; goto start;
default:
- SbxBase::SetError( SbxERR_CONVERSION ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION ); nRes = 0;
}
return nRes;
}
@@ -198,7 +198,7 @@ start:
{
SbxDecimal* pDec = ImpCreateDecimal( p );
if( !pDec->setSingle( n ) )
- SbxBase::SetError( SbxERR_OVERFLOW );
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW );
break;
}
direct:
@@ -227,49 +227,49 @@ start:
if( pVal )
pVal->PutSingle( n );
else
- SbxBase::SetError( SbxERR_NO_OBJECT );
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT );
break;
}
case SbxBYREF | SbxCHAR:
if( n > SbxMAXCHAR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXCHAR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXCHAR;
}
else if( n < SbxMINCHAR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMINCHAR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMINCHAR;
}
*p->pChar = (sal_Unicode) n; break;
case SbxBYREF | SbxBYTE:
if( n > SbxMAXBYTE )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXBYTE;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXBYTE;
}
else if( n < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = 0;
}
*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;
}
else if( n < SbxMININT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMININT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMININT;
}
*p->pInteger = (sal_Int16) n; break;
case SbxBYREF | SbxERROR:
case SbxBYREF | SbxUSHORT:
if( n > SbxMAXUINT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXUINT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXUINT;
}
else if( n < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = 0;
}
*p->pUShort = (sal_uInt16) n; break;
case SbxBYREF | SbxLONG:
@@ -277,11 +277,11 @@ start:
sal_Int32 i;
if( n > SbxMAXLNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); i = SbxMAXLNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); i = SbxMAXLNG;
}
else if( n < SbxMINLNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); i = SbxMINLNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); i = SbxMINLNG;
}
else
{
@@ -294,11 +294,11 @@ start:
sal_uInt32 i;
if( n > SbxMAXULNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); i = SbxMAXULNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); i = SbxMAXULNG;
}
else if( n < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); i = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); i = 0;
}
else
{
@@ -319,11 +319,11 @@ start:
double d;
if( n > SbxMAXCURR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); d = SbxMAXCURR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); d = SbxMAXCURR;
}
else if( n < SbxMINCURR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); d = SbxMINCURR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); d = SbxMINCURR;
}
else
{
@@ -332,7 +332,7 @@ start:
*p->pnInt64 = ImpDoubleToCurrency( d ); break;
default:
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
}
}
diff --git a/basic/source/sbx/sbxstr.cxx b/basic/source/sbx/sbxstr.cxx
index b59b6c7a3461..0db3d0493758 100644
--- a/basic/source/sbx/sbxstr.cxx
+++ b/basic/source/sbx/sbxstr.cxx
@@ -38,7 +38,7 @@ OUString ImpGetString( const SbxValues* p )
switch( +p->eType )
{
case SbxNULL:
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
case SbxEMPTY:
break;
case SbxCHAR:
@@ -95,7 +95,7 @@ OUString ImpGetString( const SbxValues* p )
}
else
{
- SbxBase::SetError( SbxERR_NO_OBJECT );
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT );
}
break;
}
@@ -132,7 +132,7 @@ OUString ImpGetString( const SbxValues* p )
case SbxBYREF | SbxSALUINT64:
ImpPutUInt64( &aTmp, *p->puInt64 ); break;
default:
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
}
return aRes;
}
@@ -218,7 +218,7 @@ void ImpPutString( SbxValues* p, const OUString* n )
if( pVal )
pVal->PutString( *n );
else
- SbxBase::SetError( SbxERR_NO_OBJECT );
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT );
break;
}
case SbxBYREF | SbxCHAR:
@@ -250,7 +250,7 @@ void ImpPutString( SbxValues* p, const OUString* n )
case SbxBYREF | SbxSALUINT64:
*p->puInt64 = ImpGetUInt64( p ); break;
default:
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
}
delete pTmp;
}
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 );
}
}
diff --git a/basic/source/sbx/sbxulng.cxx b/basic/source/sbx/sbxulng.cxx
index b96d8b41a420..892d5f3e6603 100644
--- a/basic/source/sbx/sbxulng.cxx
+++ b/basic/source/sbx/sbxulng.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,7 +53,7 @@ start:
case SbxLONG:
if( p->nLong < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = 0;
}
else
nRes = p->nLong;
@@ -63,11 +63,11 @@ start:
case SbxSINGLE:
if( p->nSingle > SbxMAXULNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXULNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXULNG;
}
else if( p->nSingle < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = 0;
}
else
nRes = (sal_uInt32) ( p->nSingle + 0.5 );
@@ -98,11 +98,11 @@ start:
if( dVal > SbxMAXULNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXULNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXULNG;
}
else if( dVal < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = 0;
}
else
nRes = (sal_uInt32) ( dVal + 0.5 );
@@ -117,15 +117,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 > SbxMAXULNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = SbxMAXULNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = SbxMAXULNG;
}
else if( d < 0 )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); nRes = 0;
}
else
nRes = (sal_uInt32) ( d + 0.5 );
@@ -138,7 +138,7 @@ start:
nRes = pVal->GetULong();
else
{
- SbxBase::SetError( SbxERR_NO_OBJECT ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT ); nRes = 0;
}
break;
}
@@ -174,7 +174,7 @@ start:
p = &aTmp; goto start;
default:
- SbxBase::SetError( SbxERR_CONVERSION ); nRes = 0;
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION ); nRes = 0;
}
return nRes;
}
@@ -232,39 +232,39 @@ start:
if( pVal )
pVal->PutULong( n );
else
- SbxBase::SetError( SbxERR_NO_OBJECT );
+ SbxBase::SetError( ERRCODE_SBX_NO_OBJECT );
break;
}
case SbxBYREF | SbxCHAR:
if( n > SbxMAXCHAR )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXCHAR;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXCHAR;
}
*p->pChar = (sal_Unicode) n; break;
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:
case SbxBYREF | SbxUSHORT:
if( n > SbxMAXUINT )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXUINT;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXUINT;
}
*p->pUShort = (sal_uInt16) n; break;
case SbxBYREF | SbxLONG:
if( n > SbxMAXLNG )
{
- SbxBase::SetError( SbxERR_OVERFLOW ); n = SbxMAXLNG;
+ SbxBase::SetError( ERRCODE_SBX_OVERFLOW ); n = SbxMAXLNG;
}
*p->pLong = (sal_Int32) n; break;
case SbxBYREF | SbxULONG:
@@ -282,7 +282,7 @@ start:
*p->puInt64 = n; break;
default:
- SbxBase::SetError( SbxERR_CONVERSION );
+ SbxBase::SetError( ERRCODE_SBX_CONVERSION );
}
}
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index ec52b6d022b7..476e4c224345 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -91,7 +91,7 @@ SbxValue::SbxValue( const SbxValue& r )
{
if( !r.CanRead() )
{
- SetError( SbxERR_PROP_WRITEONLY );
+ SetError( ERRCODE_SBX_PROP_WRITEONLY );
if( !IsFixed() )
aData.eType = SbxNULL;
}
@@ -124,7 +124,7 @@ SbxValue& SbxValue::operator=( const SbxValue& r )
if( &r != this )
{
if( !CanWrite() )
- SetError( SbxERR_PROP_READONLY );
+ SetError( ERRCODE_SBX_PROP_READONLY );
else
{
// string -> byte array
@@ -267,7 +267,7 @@ SbxValue* SbxValue::TheRealValue( bool bObjInObjError ) const
#endif
if( !bSuccess )
{
- SetError( SbxERR_BAD_PROP_VALUE );
+ SetError( ERRCODE_SBX_BAD_PROP_VALUE );
p = NULL;
}
}
@@ -312,11 +312,11 @@ bool SbxValue::Get( SbxValues& rRes ) const
{
bool bRes = false;
SbxError eOld = GetError();
- if( eOld != SbxERR_OK )
+ if( eOld != ERRCODE_SBX_OK )
ResetError();
if( !CanRead() )
{
- SetError( SbxERR_PROP_WRITEONLY );
+ SetError( ERRCODE_SBX_PROP_WRITEONLY );
rRes.pObj = NULL;
}
else
@@ -375,7 +375,7 @@ bool SbxValue::Get( SbxValues& rRes ) const
rRes.pObj = p->aData.pObj;
else
{
- SetError( SbxERR_NO_OBJECT );
+ SetError( ERRCODE_SBX_NO_OBJECT );
rRes.pObj = NULL;
}
break;
@@ -384,7 +384,7 @@ bool SbxValue::Get( SbxValues& rRes ) const
rRes = p->aData;
else
{
- SetError( SbxERR_CONVERSION );
+ SetError( ERRCODE_SBX_CONVERSION );
rRes.pObj = NULL;
}
}
@@ -400,7 +400,7 @@ bool SbxValue::Get( SbxValues& rRes ) const
if( !IsError() )
{
bRes = true;
- if( eOld != SbxERR_OK )
+ if( eOld != ERRCODE_SBX_OK )
SetError( eOld );
}
return bRes;
@@ -466,12 +466,12 @@ bool SbxValue::Put( const SbxValues& rVal )
{
bool bRes = false;
SbxError eOld = GetError();
- if( eOld != SbxERR_OK )
+ if( eOld != ERRCODE_SBX_OK )
ResetError();
if( !CanWrite() )
- SetError( SbxERR_PROP_READONLY );
+ SetError( ERRCODE_SBX_PROP_READONLY );
else if( rVal.eType & 0xF000 )
- SetError( SbxERR_NOTIMP );
+ SetError( ERRCODE_SBX_NOTIMP );
else
{
// If an object is requested, don't search the real values
@@ -481,7 +481,7 @@ bool SbxValue::Put( const SbxValues& rVal )
if( p )
{
if( !p->CanWrite() )
- SetError( SbxERR_PROP_READONLY );
+ SetError( ERRCODE_SBX_PROP_READONLY );
else if( p->IsFixed() || p->SetType( (SbxDataType) ( rVal.eType & 0x0FFF ) ) )
switch( rVal.eType & 0x0FFF )
{
@@ -547,14 +547,14 @@ bool SbxValue::Put( const SbxValues& rVal )
}
}
else
- SetError( SbxERR_CONVERSION );
+ SetError( ERRCODE_SBX_CONVERSION );
break;
default:
if( p->aData.eType == rVal.eType )
p->aData = rVal;
else
{
- SetError( SbxERR_CONVERSION );
+ SetError( ERRCODE_SBX_CONVERSION );
if( !p->IsFixed() )
p->aData.eType = SbxNULL;
}
@@ -563,7 +563,7 @@ bool SbxValue::Put( const SbxValues& rVal )
{
p->SetModified( true );
p->Broadcast( SBX_HINT_DATACHANGED );
- if( eOld != SbxERR_OK )
+ if( eOld != ERRCODE_SBX_OK )
SetError( eOld );
bRes = true;
}
@@ -729,7 +729,7 @@ bool SbxValue::ImpIsNumeric( bool bOnlyIntntl ) const
if( !CanRead() )
{
- SetError( SbxERR_PROP_WRITEONLY );
+ SetError( ERRCODE_SBX_PROP_WRITEONLY );
return false;
}
// Test downcast!!!
@@ -744,7 +744,7 @@ bool SbxValue::ImpIsNumeric( bool bOnlyIntntl ) const
double n;
SbxDataType t2;
sal_uInt16 nLen = 0;
- if( ImpScan( s, n, t2, &nLen, /*bAllowIntntl*/false, bOnlyIntntl ) == SbxERR_OK )
+ if( ImpScan( s, n, t2, &nLen, /*bAllowIntntl*/false, bOnlyIntntl ) == ERRCODE_SBX_OK )
return nLen == s.getLength();
}
return false;
@@ -778,7 +778,7 @@ bool SbxValue::SetType( SbxDataType t )
ResetFlag( SbxFlagBits::Fixed );
if( IsFixed() )
{
- SetError( SbxERR_CONVERSION );
+ SetError( ERRCODE_SBX_CONVERSION );
return false;
}
t = SbxEMPTY;
@@ -787,7 +787,7 @@ bool SbxValue::SetType( SbxDataType t )
{
if( !CanWrite() || IsFixed() )
{
- SetError( SbxERR_CONVERSION );
+ SetError( ERRCODE_SBX_CONVERSION );
return false;
}
else
@@ -836,7 +836,7 @@ bool SbxValue::Convert( SbxDataType eTo )
ResetFlag( SbxFlagBits::Fixed );
if( IsFixed() )
{
- SetError( SbxERR_CONVERSION );
+ SetError( ERRCODE_SBX_CONVERSION );
return false;
}
else
@@ -845,7 +845,7 @@ bool SbxValue::Convert( SbxDataType eTo )
// Converting from null doesn't work. Once null, always null!
if( aData.eType == SbxNULL )
{
- SetError( SbxERR_CONVERSION );
+ SetError( ERRCODE_SBX_CONVERSION );
return false;
}
@@ -880,12 +880,12 @@ bool SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp )
SbxDataType eThisType = GetType();
SbxDataType eOpType = rOp.GetType();
SbxError eOld = GetError();
- if( eOld != SbxERR_OK )
+ if( eOld != ERRCODE_SBX_OK )
ResetError();
if( !CanWrite() )
- SetError( SbxERR_PROP_READONLY );
+ SetError( ERRCODE_SBX_PROP_READONLY );
else if( !rOp.CanRead() )
- SetError( SbxERR_PROP_WRITEONLY );
+ SetError( ERRCODE_SBX_PROP_WRITEONLY );
// Special rule 1: If one operand is null, the result is null
else if( eThisType == SbxNULL || eOpType == SbxNULL )
SetType( SbxNULL );
@@ -930,11 +930,11 @@ bool SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp )
Put( aL );
}
else
- SetError( SbxERR_CONVERSION );
+ SetError( ERRCODE_SBX_CONVERSION );
}
else if( eOpType == SbxSTRING && rOp.IsFixed() )
{ // Numeric: there is no String allowed on the right side
- SetError( SbxERR_CONVERSION );
+ SetError( ERRCODE_SBX_CONVERSION );
// falls all the way out
}
else if( ( eOp >= SbxIDIV && eOp <= SbxNOT ) || eOp == SbxMOD )
@@ -963,36 +963,36 @@ bool SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp )
{
case SbxIDIV:
if( aL.eType == SbxCURRENCY )
- if( !aR.nInt64 ) SetError( SbxERR_ZERODIV );
+ if( !aR.nInt64 ) SetError( ERRCODE_SBX_ZERODIV );
else {
aL.nInt64 /= aR.nInt64;
aL.nInt64 *= CURRENCY_FACTOR;
}
else if( aL.eType == SbxSALUINT64 )
- if( !aR.uInt64 ) SetError( SbxERR_ZERODIV );
+ if( !aR.uInt64 ) SetError( ERRCODE_SBX_ZERODIV );
else aL.uInt64 /= aR.uInt64;
else if( aL.eType == SbxSALINT64 )
- if( !aR.nInt64 ) SetError( SbxERR_ZERODIV );
+ if( !aR.nInt64 ) SetError( ERRCODE_SBX_ZERODIV );
else aL.nInt64 /= aR.nInt64;
else if( aL.eType == SbxLONG )
- if( !aR.nLong ) SetError( SbxERR_ZERODIV );
+ if( !aR.nLong ) SetError( ERRCODE_SBX_ZERODIV );
else aL.nLong /= aR.nLong;
else
- if( !aR.nULong ) SetError( SbxERR_ZERODIV );
+ if( !aR.nULong ) SetError( ERRCODE_SBX_ZERODIV );
else aL.nULong /= aR.nULong;
break;
case SbxMOD:
if( aL.eType == SbxCURRENCY || aL.eType == SbxSALINT64 )
- if( !aR.nInt64 ) SetError( SbxERR_ZERODIV );
+ if( !aR.nInt64 ) SetError( ERRCODE_SBX_ZERODIV );
else aL.nInt64 %= aR.nInt64;
else if( aL.eType == SbxSALUINT64 )
- if( !aR.uInt64 ) SetError( SbxERR_ZERODIV );
+ if( !aR.uInt64 ) SetError( ERRCODE_SBX_ZERODIV );
else aL.uInt64 %= aR.uInt64;
else if( aL.eType == SbxLONG )
- if( !aR.nLong ) SetError( SbxERR_ZERODIV );
+ if( !aR.nLong ) SetError( ERRCODE_SBX_ZERODIV );
else aL.nLong %= aR.nLong;
else
- if( !aR.nULong ) SetError( SbxERR_ZERODIV );
+ if( !aR.nULong ) SetError( ERRCODE_SBX_ZERODIV );
else aL.nULong %= aR.nULong;
break;
case SbxAND:
@@ -1064,7 +1064,7 @@ bool SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp )
break;
case SbxDIV:
if( aR.pDecimal->isZero() )
- SetError( SbxERR_ZERODIV );
+ SetError( ERRCODE_SBX_ZERODIV );
else
bOk = ( *(aL.pDecimal) /= *(aR.pDecimal) );
break;
@@ -1078,14 +1078,14 @@ bool SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp )
bOk = ( aL.pDecimal->neg() );
break;
default:
- SetError( SbxERR_NOTIMP );
+ SetError( ERRCODE_SBX_NOTIMP );
}
if( !bOk )
- SetError( SbxERR_OVERFLOW );
+ SetError( ERRCODE_SBX_OVERFLOW );
}
else
{
- SetError( SbxERR_CONVERSION );
+ SetError( ERRCODE_SBX_CONVERSION );
}
}
}
@@ -1110,7 +1110,7 @@ bool SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp )
{
aL.nInt64 = SAL_MAX_INT64;
if( dTest < SbxMINCURR ) aL.nInt64 = SAL_MIN_INT64;
- SetError( SbxERR_OVERFLOW );
+ SetError( ERRCODE_SBX_OVERFLOW );
break;
}
// second overflow check: see if unscaled product overflows - if so use doubles
@@ -1128,14 +1128,14 @@ bool SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp )
case SbxDIV:
if( !aR.nInt64 )
{
- SetError( SbxERR_ZERODIV );
+ SetError( ERRCODE_SBX_ZERODIV );
break;
}
// first overflow check: see if quotient will fit - calc real value of quotient (curr factors cancel)
dTest = (double)aL.nInt64 / (double)aR.nInt64;
if( dTest < SbxMINCURR || SbxMAXCURR < dTest)
{
- SetError( SbxERR_OVERFLOW );
+ SetError( ERRCODE_SBX_OVERFLOW );
break;
}
// second overflow check: see if scaled dividend overflows - if so use doubles
@@ -1154,7 +1154,7 @@ bool SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp )
dTest = ( (double)aL.nInt64 + (double)aR.nInt64 ) / (double)CURRENCY_FACTOR;
if( dTest < SbxMINCURR || SbxMAXCURR < dTest)
{
- SetError( SbxERR_OVERFLOW );
+ SetError( ERRCODE_SBX_OVERFLOW );
break;
}
aL.nInt64 += aR.nInt64;
@@ -1164,7 +1164,7 @@ bool SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp )
dTest = ( (double)aL.nInt64 - (double)aR.nInt64 ) / (double)CURRENCY_FACTOR;
if( dTest < SbxMINCURR || SbxMAXCURR < dTest)
{
- SetError( SbxERR_OVERFLOW );
+ SetError( ERRCODE_SBX_OVERFLOW );
break;
}
aL.nInt64 -= aR.nInt64;
@@ -1173,7 +1173,7 @@ bool SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp )
aL.nInt64 = -aL.nInt64;
break;
default:
- SetError( SbxERR_NOTIMP );
+ SetError( ERRCODE_SBX_NOTIMP );
}
}
}
@@ -1198,7 +1198,7 @@ Lbl_OpIsDouble:
case SbxMUL:
aL.nDouble *= aR.nDouble; break;
case SbxDIV:
- if( !aR.nDouble ) SetError( SbxERR_ZERODIV );
+ if( !aR.nDouble ) SetError( ERRCODE_SBX_ZERODIV );
else aL.nDouble /= aR.nDouble; break;
case SbxPLUS:
aL.nDouble += aR.nDouble; break;
@@ -1207,7 +1207,7 @@ Lbl_OpIsDouble:
case SbxNEG:
aL.nDouble = -aL.nDouble; break;
default:
- SetError( SbxERR_NOTIMP );
+ SetError( ERRCODE_SBX_NOTIMP );
}
// Date with "+" or "-" needs special handling that
// forces the Date type. If the operation is '+' the
@@ -1235,7 +1235,7 @@ Lbl_OpIsDouble:
Lbl_OpIsEmpty:
bool bRes = !IsError();
- if( bRes && eOld != SbxERR_OK )
+ if( bRes && eOld != ERRCODE_SBX_OK )
SetError( eOld );
return bRes;
}
@@ -1252,10 +1252,10 @@ bool SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const
bool bRes = false;
SbxError eOld = GetError();
- if( eOld != SbxERR_OK )
+ if( eOld != ERRCODE_SBX_OK )
ResetError();
if( !CanRead() || !rOp.CanRead() )
- SetError( SbxERR_PROP_WRITEONLY );
+ SetError( ERRCODE_SBX_PROP_WRITEONLY );
else if( GetType() == SbxNULL && rOp.GetType() == SbxNULL && !bVBAInterop )
{
bRes = true;
@@ -1299,7 +1299,7 @@ bool SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const
case SbxGE:
bRes = ( *aL.pOUString >= *aR.pOUString ); break;
default:
- SetError( SbxERR_NOTIMP );
+ SetError( ERRCODE_SBX_NOTIMP );
}
}
// From 1995-12-19: If SbxSINGLE participate, then convert to SINGLE,
@@ -1323,7 +1323,7 @@ bool SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const
case SbxGE:
bRes = ( aL.nSingle >= aR.nSingle ); break;
default:
- SetError( SbxERR_NOTIMP );
+ SetError( ERRCODE_SBX_NOTIMP );
}
}
else if( GetType() == SbxDECIMAL && rOp.GetType() == SbxDECIMAL )
@@ -1349,12 +1349,12 @@ bool SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const
case SbxGE:
bRes = ( eRes != SbxDecimal::LT ); break;
default:
- SetError( SbxERR_NOTIMP );
+ SetError( ERRCODE_SBX_NOTIMP );
}
}
else
{
- SetError( SbxERR_CONVERSION );
+ SetError( ERRCODE_SBX_CONVERSION );
}
releaseDecimalPtr( aL.pDecimal );
releaseDecimalPtr( aR.pDecimal );
@@ -1381,14 +1381,14 @@ bool SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const
case SbxGE:
bRes = ( aL.nDouble >= aR.nDouble ); break;
default:
- SetError( SbxERR_NOTIMP );
+ SetError( ERRCODE_SBX_NOTIMP );
}
// at least one value was got
// if this is VBA then a conversion error for one
// side will yield a false result of an equality test
else if ( bGetR || bGetL )
{
- if ( bVBAInterop && eOp == SbxEQ && GetError() == SbxERR_CONVERSION )
+ if ( bVBAInterop && eOp == SbxEQ && GetError() == ERRCODE_SBX_CONVERSION )
{
ResetError();
bRes = false;
@@ -1396,7 +1396,7 @@ bool SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const
}
}
}
- if( eOld != SbxERR_OK )
+ if( eOld != ERRCODE_SBX_OK )
SetError( eOld );
return bRes;
}
@@ -1425,7 +1425,7 @@ bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
RTL_TEXTENCODING_ASCII_US);
double d;
SbxDataType t;
- if( ImpScan( aVal, d, t, NULL ) != SbxERR_OK || t == SbxDOUBLE )
+ if( ImpScan( aVal, d, t, NULL ) != ERRCODE_SBX_OK || t == SbxDOUBLE )
{
aData.nSingle = 0.0F;
return false;
@@ -1440,7 +1440,7 @@ bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
OUString aVal = read_uInt16_lenPrefixed_uInt8s_ToOUString(r,
RTL_TEXTENCODING_ASCII_US);
SbxDataType t;
- if( ImpScan( aVal, aData.nDouble, t, NULL ) != SbxERR_OK )
+ if( ImpScan( aVal, aData.nDouble, t, NULL ) != ERRCODE_SBX_OK )
{
aData.nDouble = 0.0;
return false;
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index f49a0685406e..671c42c0793d 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -522,7 +522,7 @@ bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
rStrm, RTL_TEXTENCODING_ASCII_US);
double d;
SbxDataType t;
- if( ImpScan( aTmpString, d, t, NULL ) != SbxERR_OK || t == SbxDOUBLE )
+ if( ImpScan( aTmpString, d, t, NULL ) != ERRCODE_SBX_OK || t == SbxDOUBLE )
{
aTmp.nSingle = 0;
return false;
@@ -537,7 +537,7 @@ bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
aTmpString = read_uInt16_lenPrefixed_uInt8s_ToOUString(rStrm,
RTL_TEXTENCODING_ASCII_US);
SbxDataType t;
- if( ImpScan( aTmpString, aTmp.nDouble, t, NULL ) != SbxERR_OK )
+ if( ImpScan( aTmpString, aTmp.nDouble, t, NULL ) != ERRCODE_SBX_OK )
{
aTmp.nDouble = 0;
return false;