summaryrefslogtreecommitdiff
path: root/basic/source/comp
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-07-27 13:04:00 +0200
committerNoel Grandin <noel@peralex.com>2015-07-28 08:35:34 +0200
commitb1c25a0d8fa2f8effc501cc100b0c07f79437e8e (patch)
treea9d0dac27fd41ebb88775fdf3605fb1aabb8299e /basic/source/comp
parent4eeeec899f44d2010189251c0f09120ade202dd8 (diff)
inline "old" SbERR constants
Change-Id: I3e6665351de97692ae70207e8b623ad008ca8c9a
Diffstat (limited to 'basic/source/comp')
-rw-r--r--basic/source/comp/buffer.cxx4
-rw-r--r--basic/source/comp/codegen.cxx6
-rw-r--r--basic/source/comp/dim.cxx84
-rw-r--r--basic/source/comp/exprgen.cxx4
-rw-r--r--basic/source/comp/exprnode.cxx14
-rw-r--r--basic/source/comp/exprtree.cxx44
-rw-r--r--basic/source/comp/io.cxx16
-rw-r--r--basic/source/comp/loops.cxx36
-rw-r--r--basic/source/comp/parser.cxx66
-rw-r--r--basic/source/comp/sbcomp.cxx4
-rw-r--r--basic/source/comp/scanner.cxx26
-rw-r--r--basic/source/comp/symtbl.cxx8
-rw-r--r--basic/source/comp/token.cxx2
13 files changed, 157 insertions, 157 deletions
diff --git a/basic/source/comp/buffer.cxx b/basic/source/comp/buffer.cxx
index a21ad03358a6..141186f8007d 100644
--- a/basic/source/comp/buffer.cxx
+++ b/basic/source/comp/buffer.cxx
@@ -87,7 +87,7 @@ bool SbiBuffer::Check( sal_Int32 n )
}
if( !p )
{
- pParser->Error( SbERR_PROG_TOO_LARGE );
+ pParser->Error( ERRCODE_BASIC_PROG_TOO_LARGE );
nInc = 0;
delete[] pBuf; pBuf = NULL;
return false;
@@ -140,7 +140,7 @@ void SbiBuffer::Chain( sal_uInt32 off )
if( i >= nOff )
{
- pParser->Error( SbERR_INTERNAL_ERROR, "BACKCHAIN" );
+ pParser->Error( ERRCODE_BASIC_INTERNAL_ERROR, "BACKCHAIN" );
break;
}
*ip++ = (char) ( val1 & 0xFF );
diff --git a/basic/source/comp/codegen.cxx b/basic/source/comp/codegen.cxx
index 7a9dc0223a8f..cd7c197fa3ec 100644
--- a/basic/source/comp/codegen.cxx
+++ b/basic/source/comp/codegen.cxx
@@ -85,7 +85,7 @@ sal_uInt32 SbiCodeGen::Gen( SbiOpcode eOpcode )
#ifdef DBG_UTIL
if( eOpcode < SbOP0_START || eOpcode > SbOP0_END )
- pParser->Error( SbERR_INTERNAL_ERROR, "OPCODE1" );
+ pParser->Error( ERRCODE_BASIC_INTERNAL_ERROR, "OPCODE1" );
#endif
GenStmnt();
aCode += (sal_uInt8) eOpcode;
@@ -99,7 +99,7 @@ sal_uInt32 SbiCodeGen::Gen( SbiOpcode eOpcode, sal_uInt32 nOpnd )
#ifdef DBG_UTIL
if( eOpcode < SbOP1_START || eOpcode > SbOP1_END )
- pParser->Error( SbERR_INTERNAL_ERROR, "OPCODE2" );
+ pParser->Error( ERRCODE_BASIC_INTERNAL_ERROR, "OPCODE2" );
#endif
GenStmnt();
aCode += (sal_uInt8) eOpcode;
@@ -115,7 +115,7 @@ sal_uInt32 SbiCodeGen::Gen( SbiOpcode eOpcode, sal_uInt32 nOpnd1, sal_uInt32 nOp
#ifdef DBG_UTIL
if( eOpcode < SbOP2_START || eOpcode > SbOP2_END )
- pParser->Error( SbERR_INTERNAL_ERROR, "OPCODE3" );
+ pParser->Error( ERRCODE_BASIC_INTERNAL_ERROR, "OPCODE3" );
#endif
GenStmnt();
aCode += (sal_uInt8) eOpcode;
diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx
index b9f7aefe87c5..eaeea2ce2128 100644
--- a/basic/source/comp/dim.cxx
+++ b/basic/source/comp/dim.cxx
@@ -67,7 +67,7 @@ SbiSymDef* SbiParser::VarDecl( SbiDimList** ppDim, bool bStatic, bool bConst )
if( !ppDim && pDim )
{
if(pDim->GetDims() )
- Error( SbERR_EXPECTED, "()" );
+ Error( ERRCODE_BASIC_EXPECTED, "()" );
delete pDim;
}
else if( ppDim )
@@ -97,7 +97,7 @@ void SbiParser::TypeDecl( SbiSymDef& rDef, bool bAsNewAlreadyParsed )
{
case ANY:
if( rDef.IsNew() )
- Error( SbERR_SYNTAX );
+ Error( ERRCODE_BASIC_SYNTAX );
eType = SbxVARIANT; break;
case TINTEGER:
case TLONG:
@@ -112,7 +112,7 @@ void SbiParser::TypeDecl( SbiSymDef& rDef, bool bAsNewAlreadyParsed )
case TVARIANT:
case TBYTE:
if( rDef.IsNew() )
- Error( SbERR_SYNTAX );
+ Error( ERRCODE_BASIC_SYNTAX );
eType = (eTok==TBYTE) ? SbxBYTE : SbxDataType( eTok - TINTEGER + SbxINTEGER );
if( eType == SbxSTRING )
{
@@ -123,7 +123,7 @@ void SbiParser::TypeDecl( SbiSymDef& rDef, bool bAsNewAlreadyParsed )
SbiConstExpression aSize( this );
nSize = aSize.GetShortValue();
if( nSize < 0 || (bVBASupportOn && nSize <= 0) )
- Error( SbERR_OUT_OF_RANGE );
+ Error( ERRCODE_BASIC_OUT_OF_RANGE );
else
rDef.SetFixedStringLength( nSize );
}
@@ -131,7 +131,7 @@ void SbiParser::TypeDecl( SbiSymDef& rDef, bool bAsNewAlreadyParsed )
break;
case SYMBOL: // can only be a TYPE or a object class!
if( eScanType != SbxVARIANT )
- Error( SbERR_SYNTAX );
+ Error( ERRCODE_BASIC_SYNTAX );
else
{
OUString aCompleteName = aSym;
@@ -153,7 +153,7 @@ void SbiParser::TypeDecl( SbiSymDef& rDef, bool bAsNewAlreadyParsed )
else
{
Next();
- Error( SbERR_UNEXPECTED, SYMBOL );
+ Error( ERRCODE_BASIC_UNEXPECTED, SYMBOL );
break;
}
}
@@ -177,16 +177,16 @@ void SbiParser::TypeDecl( SbiSymDef& rDef, bool bAsNewAlreadyParsed )
eType = SbxOBJECT;
break;
default:
- Error( SbERR_UNEXPECTED, eTok );
+ Error( ERRCODE_BASIC_UNEXPECTED, eTok );
Next();
}
// The variable could have been declared with a suffix
if( rDef.GetType() != SbxVARIANT )
{
if( rDef.GetType() != eType )
- Error( SbERR_VAR_DEFINED, rDef.GetName() );
+ Error( ERRCODE_BASIC_VAR_DEFINED, rDef.GetName() );
else if( eType == SbxSTRING && rDef.GetLen() != nSize )
- Error( SbERR_VAR_DEFINED, rDef.GetName() );
+ Error( ERRCODE_BASIC_VAR_DEFINED, rDef.GetName() );
}
rDef.SetType( eType );
rDef.SetLen( nSize );
@@ -209,7 +209,7 @@ void SbiParser::DefVar( SbiOpcode eOp, bool bStatic )
SbiToken eFirstTok = eCurTok;
if( pProc && ( eCurTok == GLOBAL || eCurTok == PUBLIC || eCurTok == PRIVATE ) )
- Error( SbERR_NOT_IN_SUBR, eCurTok );
+ Error( ERRCODE_BASIC_NOT_IN_SUBR, eCurTok );
if( eCurTok == PUBLIC || eCurTok == GLOBAL )
{
bSwitchPool = true; // at the right moment switch to the global pool
@@ -291,7 +291,7 @@ void SbiParser::DefVar( SbiOpcode eOp, bool bStatic )
if( eOp == _REDIM )
eOp = _REDIMP;
else
- Error( SbERR_UNEXPECTED, eCurTok );
+ Error( ERRCODE_BASIC_UNEXPECTED, eCurTok );
}
SbiSymDef* pDef;
SbiDimList* pDim;
@@ -346,10 +346,10 @@ void SbiParser::DefVar( SbiOpcode eOp, bool bStatic )
bError_ = true;
}
if( bError_ )
- Error( SbERR_VAR_DEFINED, pDef->GetName() );
+ Error( ERRCODE_BASIC_VAR_DEFINED, pDef->GetName() );
}
else
- Error( SbERR_VAR_DEFINED, pDef->GetName() );
+ Error( ERRCODE_BASIC_VAR_DEFINED, pDef->GetName() );
delete pDef; pDef = pOld;
}
else
@@ -409,16 +409,16 @@ void SbiParser::DefVar( SbiOpcode eOp, bool bStatic )
if( CodeCompleteOptions::IsExtendedTypeDeclaration() )
{
if(!IsUnoInterface(aTypeName))
- Error( SbERR_UNDEF_TYPE, aTypeName );
+ Error( ERRCODE_BASIC_UNDEF_TYPE, aTypeName );
}
else
- Error( SbERR_UNDEF_TYPE, aTypeName );
+ Error( ERRCODE_BASIC_UNDEF_TYPE, aTypeName );
}
}
if( bConst )
{
- Error( SbERR_SYNTAX );
+ Error( ERRCODE_BASIC_SYNTAX );
}
if( pDim )
@@ -461,7 +461,7 @@ void SbiParser::DefVar( SbiOpcode eOp, bool bStatic )
// Definition of the constants
if( pDim )
{
- Error( SbERR_SYNTAX );
+ Error( ERRCODE_BASIC_SYNTAX );
delete pDim;
}
SbiExpression aVar( this, *pDef );
@@ -582,7 +582,7 @@ void SbiParser::DefType( bool bPrivate )
if (rTypeArray->Find(aSym,SbxCLASS_OBJECT))
{
- Error( SbERR_VAR_DEFINED, aSym );
+ Error( ERRCODE_BASIC_VAR_DEFINED, aSym );
return;
}
@@ -617,7 +617,7 @@ void SbiParser::DefType( bool bPrivate )
OUString aElemName = pElem->GetName();
if( pTypeMembers->Find( aElemName, SbxCLASS_DONTCARE) )
{
- Error (SbERR_VAR_DEFINED);
+ Error (ERRCODE_BASIC_VAR_DEFINED);
}
else
{
@@ -638,7 +638,7 @@ void SbiParser::DefType( bool bPrivate )
if ( !pDim->Get( i )->IsBased() ) // each dim is low/up
{
if ( ++i >= pDim->GetSize() ) // trouble
- StarBASIC::FatalError( SbERR_INTERNAL_ERROR );
+ StarBASIC::FatalError( ERRCODE_BASIC_INTERNAL_ERROR );
pNode = pDim->Get(i)->GetExprNode();
lb = ub;
ub = pNode->GetNumber();
@@ -703,7 +703,7 @@ void SbiParser::DefEnum( bool bPrivate )
OUString aEnumName = aSym;
if( rEnumArray->Find(aEnumName,SbxCLASS_OBJECT) )
{
- Error( SbERR_VAR_DEFINED, aSym );
+ Error( ERRCODE_BASIC_VAR_DEFINED, aSym );
return;
}
@@ -747,7 +747,7 @@ void SbiParser::DefEnum( bool bPrivate )
else if( pDim )
{
delete pDim;
- Error( SbERR_SYNTAX );
+ Error( ERRCODE_BASIC_SYNTAX );
bDone = true; // Error occurred
break;
}
@@ -777,7 +777,7 @@ void SbiParser::DefEnum( bool bPrivate )
SbiSymDef* pOld = pPoolToUse->Find( pElem->GetName() );
if( pOld )
{
- Error( SbERR_VAR_DEFINED, pElem->GetName() );
+ Error( ERRCODE_BASIC_VAR_DEFINED, pElem->GetName() );
bDone = true; // Error occurred
break;
}
@@ -848,7 +848,7 @@ SbiProcDef* SbiParser::ProcDecl( bool bDecl )
}
else
{
- Error( SbERR_SYNTAX );
+ Error( ERRCODE_BASIC_SYNTAX );
}
}
if( Peek() == ALIAS )
@@ -860,7 +860,7 @@ SbiProcDef* SbiParser::ProcDecl( bool bDecl )
}
else
{
- Error( SbERR_SYNTAX );
+ Error( ERRCODE_BASIC_SYNTAX );
}
}
if( !bDecl )
@@ -868,15 +868,15 @@ SbiProcDef* SbiParser::ProcDecl( bool bDecl )
// CDECL, LIB and ALIAS are invalid
if( !pDef->GetLib().isEmpty() )
{
- Error( SbERR_UNEXPECTED, LIB );
+ Error( ERRCODE_BASIC_UNEXPECTED, LIB );
}
if( !pDef->GetAlias().isEmpty() )
{
- Error( SbERR_UNEXPECTED, ALIAS );
+ Error( ERRCODE_BASIC_UNEXPECTED, ALIAS );
}
if( pDef->IsCdecl() )
{
- Error( SbERR_UNEXPECTED, _CDECL_ );
+ Error( ERRCODE_BASIC_UNEXPECTED, _CDECL_ );
}
pDef->SetCdecl( false );
pDef->GetLib().clear();
@@ -887,11 +887,11 @@ SbiProcDef* SbiParser::ProcDecl( bool bDecl )
// ALIAS and CDECL only together with LIB
if( !pDef->GetAlias().isEmpty() )
{
- Error( SbERR_UNEXPECTED, ALIAS );
+ Error( ERRCODE_BASIC_UNEXPECTED, ALIAS );
}
if( pDef->IsCdecl() )
{
- Error( SbERR_UNEXPECTED, _CDECL_ );
+ Error( ERRCODE_BASIC_UNEXPECTED, _CDECL_ );
}
pDef->SetCdecl( false );
pDef->GetAlias().clear();
@@ -931,7 +931,7 @@ SbiProcDef* SbiParser::ProcDecl( bool bDecl )
{
if( bByVal || bOptional )
{
- Error( SbERR_UNEXPECTED, PARAMARRAY );
+ Error( ERRCODE_BASIC_UNEXPECTED, PARAMARRAY );
}
Next();
bParamArray = true;
@@ -983,7 +983,7 @@ SbiProcDef* SbiParser::ProcDecl( bool bDecl )
}
if( bError2 )
{
- Error( SbERR_EXPECTED, RPAREN );
+ Error( ERRCODE_BASIC_EXPECTED, RPAREN );
break;
}
}
@@ -997,7 +997,7 @@ SbiProcDef* SbiParser::ProcDecl( bool bDecl )
TypeDecl( *pDef );
if( eType != SbxVARIANT && pDef->GetType() != eType )
{
- Error( SbERR_BAD_DECLARATION, aName );
+ Error( ERRCODE_BASIC_BAD_DECLARATION, aName );
}
if( pDef->GetType() == SbxVARIANT && !( bFunc || bProp ) )
{
@@ -1018,7 +1018,7 @@ void SbiParser::DefDeclare( bool bPrivate )
Next();
if( eCurTok != SUB && eCurTok != FUNCTION )
{
- Error( SbERR_UNEXPECTED, eCurTok );
+ Error( ERRCODE_BASIC_UNEXPECTED, eCurTok );
}
else
{
@@ -1029,7 +1029,7 @@ void SbiParser::DefDeclare( bool bPrivate )
{
if( pDef->GetLib().isEmpty() )
{
- Error( SbERR_EXPECTED, LIB );
+ Error( ERRCODE_BASIC_EXPECTED, LIB );
}
// Is it already there?
SbiSymDef* pOld = aPublics.Find( pDef->GetName() );
@@ -1039,7 +1039,7 @@ void SbiParser::DefDeclare( bool bPrivate )
if( !p )
{
// Declared as a variable
- Error( SbERR_BAD_DECLARATION, pDef->GetName() );
+ Error( ERRCODE_BASIC_BAD_DECLARATION, pDef->GetName() );
delete pDef;
pDef = NULL;
}
@@ -1140,7 +1140,7 @@ void SbiParser::Attribute()
if( eCurTok != EQ )
{
- Error( SbERR_SYNTAX );
+ Error( ERRCODE_BASIC_SYNTAX );
}
else
{
@@ -1190,7 +1190,7 @@ void SbiParser::DefProc( bool bStatic, bool bPrivate )
}
else
{
- Error( SbERR_EXPECTED, "Get or Let or Set" );
+ Error( ERRCODE_BASIC_EXPECTED, "Get or Let or Set" );
}
}
@@ -1212,7 +1212,7 @@ void SbiParser::DefProc( bool bStatic, bool bPrivate )
if( !pProc )
{
// Declared as a variable
- Error( SbERR_BAD_DECLARATION, pDef->GetName() );
+ Error( ERRCODE_BASIC_BAD_DECLARATION, pDef->GetName() );
delete pDef;
pProc = NULL;
bError_ = true;
@@ -1224,7 +1224,7 @@ void SbiParser::DefProc( bool bStatic, bool bPrivate )
PropertyMode ePropMode = pDef->getPropertyMode();
if( ePropMode == PropertyMode::NONE || ePropMode == pProc->getPropertyMode() )
{
- Error( SbERR_PROC_DEFINED, pDef->GetName() );
+ Error( ERRCODE_BASIC_PROC_DEFINED, pDef->GetName() );
delete pDef;
pProc = NULL;
bError_ = true;
@@ -1259,7 +1259,7 @@ void SbiParser::DefProc( bool bStatic, bool bPrivate )
}
else
{
- Error( SbERR_NOT_IMPLEMENTED ); // STATIC SUB ...
+ Error( ERRCODE_BASIC_NOT_IMPLEMENTED ); // STATIC SUB ...
}
}
else
@@ -1314,7 +1314,7 @@ void SbiParser::DefStatic( bool bPrivate )
default:
if( !pProc )
{
- Error( SbERR_NOT_IN_SUBR );
+ Error( ERRCODE_BASIC_NOT_IN_SUBR );
}
// Reset the Pool, so that STATIC-Declarations go into the
// global Pool
diff --git a/basic/source/comp/exprgen.cxx b/basic/source/comp/exprgen.cxx
index c0e619c0d10d..cfce00682668 100644
--- a/basic/source/comp/exprgen.cxx
+++ b/basic/source/comp/exprgen.cxx
@@ -173,7 +173,7 @@ void SbiExprNode::GenElement( SbiCodeGen& rGen, SbiOpcode eOp )
{
#ifdef DBG_UTIL
if ((eOp < _RTL || eOp > _CALLC) && eOp != _FIND_G && eOp != _FIND_CM && eOp != _FIND_STATIC)
- rGen.GetParser()->Error( SbERR_INTERNAL_ERROR, "Opcode" );
+ rGen.GetParser()->Error( ERRCODE_BASIC_INTERNAL_ERROR, "Opcode" );
#endif
SbiSymDef* pDef = aVar.pDef;
// The ID is either the position or the String-ID
@@ -228,7 +228,7 @@ void SbiExprList::Gen()
if( pProc )
{
// For the present: trigger an error
- pParser->Error( SbERR_NO_NAMED_ARGS );
+ pParser->Error( ERRCODE_BASIC_NO_NAMED_ARGS );
// Later, if Named Args at DECLARE is possible
//for( sal_uInt16 i = 1 ; i < nParAnz ; i++ )
diff --git a/basic/source/comp/exprnode.cxx b/basic/source/comp/exprnode.cxx
index fecf64263875..cb1f429c384c 100644
--- a/basic/source/comp/exprnode.cxx
+++ b/basic/source/comp/exprnode.cxx
@@ -288,7 +288,7 @@ void SbiExprNode::FoldConstants(SbiParser* pParser)
nVal = ( eRes >= 0 ) ? SbxTRUE : SbxFALSE;
break;
default:
- pParser->Error( SbERR_CONVERSION );
+ pParser->Error( ERRCODE_BASIC_CONVERSION );
bError = true;
break;
}
@@ -314,7 +314,7 @@ void SbiExprNode::FoldConstants(SbiParser* pParser)
lrMod = static_cast<long>(nr);
if( err )
{
- pParser->Error( SbERR_MATH_OVERFLOW );
+ pParser->Error( ERRCODE_BASIC_MATH_OVERFLOW );
bError = true;
}
}
@@ -336,7 +336,7 @@ void SbiExprNode::FoldConstants(SbiParser* pParser)
case DIV:
if( !nr )
{
- pParser->Error( SbERR_ZERODIV ); nVal = HUGE_VAL;
+ pParser->Error( ERRCODE_BASIC_ZERODIV ); nVal = HUGE_VAL;
bError = true;
} else nVal = nl / nr;
break;
@@ -367,14 +367,14 @@ void SbiExprNode::FoldConstants(SbiParser* pParser)
case IDIV:
if( !lr )
{
- pParser->Error( SbERR_ZERODIV ); nVal = HUGE_VAL;
+ pParser->Error( ERRCODE_BASIC_ZERODIV ); nVal = HUGE_VAL;
bError = true;
} else nVal = ll / lr;
eType = SbxLONG; break;
case MOD:
if( !lr )
{
- pParser->Error( SbERR_ZERODIV ); nVal = HUGE_VAL;
+ pParser->Error( ERRCODE_BASIC_ZERODIV ); nVal = HUGE_VAL;
bError = true;
} else nVal = llMod - lrMod * (llMod/lrMod);
eType = SbxLONG; break;
@@ -392,7 +392,7 @@ void SbiExprNode::FoldConstants(SbiParser* pParser)
}
if( !::rtl::math::isFinite( nVal ) )
- pParser->Error( SbERR_MATH_OVERFLOW );
+ pParser->Error( ERRCODE_BASIC_MATH_OVERFLOW );
// Recover the data type to kill rounding error
if( bCheckType && bBothInt
@@ -424,7 +424,7 @@ void SbiExprNode::FoldConstants(SbiParser* pParser)
else if( nVal < SbxMINLNG ) err = true, nVal = SbxMINLNG;
if( err )
{
- pParser->Error( SbERR_MATH_OVERFLOW );
+ pParser->Error( ERRCODE_BASIC_MATH_OVERFLOW );
bError = true;
}
nVal = (double) ~((long) nVal);
diff --git a/basic/source/comp/exprtree.cxx b/basic/source/comp/exprtree.cxx
index f5483f6d5fda..190822c9b639 100644
--- a/basic/source/comp/exprtree.cxx
+++ b/basic/source/comp/exprtree.cxx
@@ -44,11 +44,11 @@ SbiExpression::SbiExpression( SbiParser* p, SbiExprType t,
}
if( t == SbLVALUE && !pExpr->IsLvalue() )
{
- p->Error( SbERR_LVALUE_EXPECTED );
+ p->Error( ERRCODE_BASIC_LVALUE_EXPECTED );
}
if( t == SbOPERAND && !IsVariable() )
{
- p->Error( SbERR_VAR_EXPECTED );
+ p->Error( ERRCODE_BASIC_VAR_EXPECTED );
}
}
@@ -191,7 +191,7 @@ SbiExprNode* SbiExpression::Term( const KeywordSymbolInfo* pKeywordSymbolInfo )
}
if( !pNd )
{
- pParser->Error( SbERR_UNEXPECTED, DOT );
+ pParser->Error( ERRCODE_BASIC_UNEXPECTED, DOT );
pNd = new SbiExprNode( 1.0, SbxDOUBLE );
}
return pNd;
@@ -223,7 +223,7 @@ SbiExprNode* SbiExpression::Term( const KeywordSymbolInfo* pKeywordSymbolInfo )
}
else
{
- pParser->Error( SbERR_SYNTAX );
+ pParser->Error( ERRCODE_BASIC_SYNTAX );
bError = true;
}
}
@@ -265,7 +265,7 @@ SbiExprNode* SbiExpression::Term( const KeywordSymbolInfo* pKeywordSymbolInfo )
else
{
// Name%. really does not work!
- pParser->Error( SbERR_BAD_DECLARATION, aSym );
+ pParser->Error( ERRCODE_BASIC_BAD_DECLARATION, aSym );
bError = true;
}
}
@@ -324,7 +324,7 @@ SbiExprNode* SbiExpression::Term( const KeywordSymbolInfo* pKeywordSymbolInfo )
{
if( pPar && pPar->GetSize() && pPar->GetSize() != pDef->GetDims() )
{
- pParser->Error( SbERR_WRONG_DIMS );
+ pParser->Error( ERRCODE_BASIC_WRONG_DIMS );
}
}
if( pDef->IsDefinedAs() )
@@ -334,7 +334,7 @@ SbiExprNode* SbiExpression::Term( const KeywordSymbolInfo* pKeywordSymbolInfo )
if( eType >= SbxINTEGER && eType <= SbxSTRING && eType != eDefType )
{
// How? Define with AS first and take a Suffix then?
- pParser->Error( SbERR_BAD_DECLARATION, aSym );
+ pParser->Error( ERRCODE_BASIC_BAD_DECLARATION, aSym );
bError = true;
}
else if ( eType == SbxVARIANT )
@@ -361,7 +361,7 @@ SbiExprNode* SbiExpression::Term( const KeywordSymbolInfo* pKeywordSymbolInfo )
}
else
{
- pParser->Error( SbERR_BAD_DECLARATION, aSym );
+ pParser->Error( ERRCODE_BASIC_BAD_DECLARATION, aSym );
bError = true;
}
}
@@ -385,7 +385,7 @@ SbiExprNode* SbiExpression::Term( const KeywordSymbolInfo* pKeywordSymbolInfo )
// defer error until runtime if in vba mode
if ( !pParser->IsVBASupportOn() )
{
- pParser->Error( SbERR_BAD_DECLARATION, aSym );
+ pParser->Error( ERRCODE_BASIC_BAD_DECLARATION, aSym );
bError = true;
}
}
@@ -413,7 +413,7 @@ SbiExprNode* SbiExpression::ObjTerm( SbiSymDef& rObj )
if( eTok != MOD && eTok != NOT && eTok != AND && eTok != OR &&
eTok != XOR && eTok != EQV && eTok != IMP && eTok != IS )
{
- pParser->Error( SbERR_VAR_EXPECTED );
+ pParser->Error( ERRCODE_BASIC_VAR_EXPECTED );
bError = true;
}
}
@@ -458,7 +458,7 @@ SbiExprNode* SbiExpression::ObjTerm( SbiSymDef& rObj )
else
{
// Name%. does really not work!
- pParser->Error( SbERR_BAD_DECLARATION, aSym );
+ pParser->Error( ERRCODE_BASIC_BAD_DECLARATION, aSym );
bError = true;
}
}
@@ -484,7 +484,7 @@ SbiExprNode* SbiExpression::ObjTerm( SbiSymDef& rObj )
}
if( pDef->GetType() != SbxOBJECT )
{
- pParser->Error( SbERR_BAD_DECLARATION, aSym );
+ pParser->Error( ERRCODE_BASIC_BAD_DECLARATION, aSym );
bError = true;
}
if( !bError )
@@ -550,7 +550,7 @@ SbiExprNode* SbiExpression::Operand( bool bUsedForTypeOf )
}
else
{
- pParser->Error( SbERR_BAD_BRACKETS );
+ pParser->Error( ERRCODE_BASIC_BAD_BRACKETS );
}
}
else
@@ -581,7 +581,7 @@ SbiExprNode* SbiExpression::Operand( bool bUsedForTypeOf )
{
pParser->Next();
pRes = new SbiExprNode( 1.0, SbxDOUBLE );
- pParser->Error( SbERR_UNEXPECTED, eTok );
+ pParser->Error( ERRCODE_BASIC_UNEXPECTED, eTok );
}
break;
}
@@ -798,7 +798,7 @@ SbiExprNode* SbiExpression::Like()
// multiple operands in a row does not work
if( nCount > 1 && !pParser->IsVBASupportOn() )
{
- pParser->Error( SbERR_SYNTAX );
+ pParser->Error( ERRCODE_BASIC_SYNTAX );
bError = true;
}
}
@@ -879,7 +879,7 @@ SbiConstExpression::SbiConstExpression( SbiParser* p ) : SbiExpression( p )
if( !bIsBool )
{
- pParser->Error( SbERR_SYNTAX );
+ pParser->Error( ERRCODE_BASIC_SYNTAX );
eType = SbxDOUBLE;
nVal = 0;
}
@@ -908,12 +908,12 @@ short SbiConstExpression::GetShortValue()
if( n > SbxMAXINT )
{
n = SbxMAXINT;
- pParser->Error( SbERR_OUT_OF_RANGE );
+ pParser->Error( ERRCODE_BASIC_OUT_OF_RANGE );
}
else if( n < SbxMININT )
{
n = SbxMININT;
- pParser->Error( SbERR_OUT_OF_RANGE );
+ pParser->Error( ERRCODE_BASIC_OUT_OF_RANGE );
}
return (short) n;
@@ -1120,7 +1120,7 @@ SbiParameters::SbiParameters( SbiParser* p, bool bStandaloneExpression, bool bPa
{
break;
}
- pParser->Error( bBracket ? SbERR_BAD_BRACKETS : SbERR_EXPECTED, COMMA );
+ pParser->Error( bBracket ? ERRCODE_BASIC_BAD_BRACKETS : ERRCODE_BASIC_EXPECTED, COMMA );
bError = true;
}
else
@@ -1140,7 +1140,7 @@ SbiParameters::SbiParameters( SbiParser* p, bool bStandaloneExpression, bool bPa
pParser->Peek();
if( !bBracket )
{
- pParser->Error( SbERR_BAD_BRACKETS );
+ pParser->Error( ERRCODE_BASIC_BAD_BRACKETS );
bError = true;
}
}
@@ -1163,7 +1163,7 @@ SbiDimList::SbiDimList( SbiParser* p ) : SbiExprList( p )
if( pParser->Next() != LPAREN )
{
- pParser->Error( SbERR_EXPECTED, LPAREN );
+ pParser->Error( ERRCODE_BASIC_EXPECTED, LPAREN );
bError = true; return;
}
@@ -1213,7 +1213,7 @@ SbiDimList::SbiDimList( SbiParser* p ) : SbiExprList( p )
if( eTok == RPAREN ) break;
if( eTok != COMMA )
{
- pParser->Error( SbERR_BAD_BRACKETS );
+ pParser->Error( ERRCODE_BASIC_BAD_BRACKETS );
pParser->Next();
break;
}
diff --git a/basic/source/comp/io.cxx b/basic/source/comp/io.cxx
index d1dd481270d7..45b3cafa5407 100644
--- a/basic/source/comp/io.cxx
+++ b/basic/source/comp/io.cxx
@@ -37,7 +37,7 @@ bool SbiParser::Channel( bool bAlways )
bRes = true;
}
else if( bAlways )
- Error( SbERR_EXPECTED, "#" );
+ Error( ERRCODE_BASIC_EXPECTED, "#" );
return bRes;
}
@@ -132,9 +132,9 @@ void SbiParser::LineInput()
Channel( true );
boost::scoped_ptr<SbiExpression> pExpr(new SbiExpression( this, SbOPERAND ));
if( !pExpr->IsVariable() )
- Error( SbERR_VAR_EXPECTED );
+ Error( ERRCODE_BASIC_VAR_EXPECTED );
if( pExpr->GetType() != SbxVARIANT && pExpr->GetType() != SbxSTRING )
- Error( SbERR_CONVERSION );
+ Error( ERRCODE_BASIC_CONVERSION );
pExpr->Gen();
aGen.Gen( _LINPUT );
pExpr.reset();
@@ -151,7 +151,7 @@ void SbiParser::Input()
while( !bAbort )
{
if( !pExpr->IsVariable() )
- Error( SbERR_VAR_EXPECTED );
+ Error( ERRCODE_BASIC_VAR_EXPECTED );
pExpr->Gen();
aGen.Gen( _INPUT );
if( Peek() == COMMA )
@@ -188,7 +188,7 @@ void SbiParser::Open()
case BINARY:
nMode = StreamMode::READ | StreamMode::WRITE; nFlags |= SBSTRM_BINARY; break;
default:
- Error( SbERR_SYNTAX );
+ Error( ERRCODE_BASIC_SYNTAX );
}
if( Peek() == ACCESS )
{
@@ -209,7 +209,7 @@ void SbiParser::Open()
else if( eTok == WRITE )
nMode |= StreamMode::WRITE;
else
- Error( SbERR_SYNTAX );
+ Error( ERRCODE_BASIC_SYNTAX );
}
switch( Peek() )
{
@@ -234,7 +234,7 @@ void SbiParser::Open()
else if( eTok == WRITE )
nMode |= StreamMode::SHARE_DENYWRITE;
else
- Error( SbERR_SYNTAX );
+ Error( ERRCODE_BASIC_SYNTAX );
break;
default: break;
}
@@ -242,7 +242,7 @@ void SbiParser::Open()
// channel number
boost::scoped_ptr<SbiExpression> pChan(new SbiExpression( this ));
if( !pChan )
- Error( SbERR_SYNTAX );
+ Error( ERRCODE_BASIC_SYNTAX );
boost::scoped_ptr<SbiExpression> pLen;
if( Peek() == SYMBOL )
{
diff --git a/basic/source/comp/loops.cxx b/basic/source/comp/loops.cxx
index b545ae7e69ae..cdc3f21ac844 100644
--- a/basic/source/comp/loops.cxx
+++ b/basic/source/comp/loops.cxx
@@ -49,7 +49,7 @@ void SbiParser::If()
eTok = Peek();
if( IsEof() )
{
- Error( SbERR_BAD_BLOCK, IF ); bAbort = true; return;
+ Error( ERRCODE_BASIC_BAD_BLOCK, IF ); bAbort = true; return;
}
}
while( eTok == ELSEIF )
@@ -57,7 +57,7 @@ void SbiParser::If()
// jump to ENDIF in case of a successful IF/ELSEIF
if( iJmp >= JMP_TABLE_SIZE )
{
- Error( SbERR_PROG_TOO_LARGE ); bAbort = true; return;
+ Error( ERRCODE_BASIC_PROG_TOO_LARGE ); bAbort = true; return;
}
pnJmpToEndLbl[iJmp++] = aGen.Gen( _JUMP, 0 );
@@ -77,7 +77,7 @@ void SbiParser::If()
eTok = Peek();
if( IsEof() )
{
- Error( SbERR_BAD_BLOCK, ELSEIF ); bAbort = true; return;
+ Error( ERRCODE_BASIC_BAD_BLOCK, ELSEIF ); bAbort = true; return;
}
}
}
@@ -137,7 +137,7 @@ void SbiParser::If()
void SbiParser::NoIf()
{
- Error( SbERR_NO_IF );
+ Error( ERRCODE_BASIC_NO_IF );
StmntBlock( ENDIF );
}
@@ -163,7 +163,7 @@ void SbiParser::DoLoop()
if (eTok == EOLN || eTok == REM)
aGen.Gen (_JUMP, nStartLbl);
else
- Error( SbERR_EXPECTED, WHILE );
+ Error( ERRCODE_BASIC_EXPECTED, WHILE );
}
else
{
@@ -250,7 +250,7 @@ void SbiParser::For()
{
SbiExpression aVar( this, SbOPERAND );
if( aVar.GetRealVar() != aLvalue.GetRealVar() )
- Error( SbERR_EXPECTED, aLvalue.GetRealVar()->GetName() );
+ Error( ERRCODE_BASIC_EXPECTED, aLvalue.GetRealVar()->GetName() );
}
aGen.BackChain( nEndTarget );
CloseBlock();
@@ -268,7 +268,7 @@ void SbiParser::With()
if( pDef->GetType() == SbxVARIANT || pDef->GetType() == SbxEMPTY )
pDef->SetType( SbxOBJECT );
else if( pDef->GetType() != SbxOBJECT )
- Error( SbERR_NEEDS_OBJECT );
+ Error( ERRCODE_BASIC_NEEDS_OBJECT );
pNode->SetType( SbxOBJECT );
@@ -283,9 +283,9 @@ void SbiParser::With()
void SbiParser::BadBlock()
{
if( eEndTok )
- Error( SbERR_BAD_BLOCK, eEndTok );
+ Error( ERRCODE_BASIC_BAD_BLOCK, eEndTok );
else
- Error( SbERR_BAD_BLOCK, "Loop/Next/Wend" );
+ Error( ERRCODE_BASIC_BAD_BLOCK, "Loop/Next/Wend" );
}
// On expr Goto/Gosub n,n,n...
@@ -298,7 +298,7 @@ void SbiParser::OnGoto()
SbiToken eTok = Next();
if( eTok != GOTO && eTok != GOSUB )
{
- Error( SbERR_EXPECTED, "GoTo/GoSub" );
+ Error( ERRCODE_BASIC_EXPECTED, "GoTo/GoSub" );
eTok = GOTO;
}
@@ -312,7 +312,7 @@ void SbiParser::OnGoto()
aGen.Gen( _JUMP, nOff );
nLbl++;
}
- else Error( SbERR_LABEL_EXPECTED );
+ else Error( ERRCODE_BASIC_LABEL_EXPECTED );
}
while( !bAbort && TestComma() );
if( eTok == GOSUB )
@@ -331,7 +331,7 @@ void SbiParser::Goto()
sal_uInt32 nOff = pProc->GetLabels().Reference( aSym );
aGen.Gen( eOp, nOff );
}
- else Error( SbERR_LABEL_EXPECTED );
+ else Error( ERRCODE_BASIC_LABEL_EXPECTED );
}
// RETURN [label]
@@ -381,7 +381,7 @@ void SbiParser::Select()
else while( !bDone )
{
if( bElse )
- Error( SbERR_SYNTAX );
+ Error( ERRCODE_BASIC_SYNTAX );
SbiToken eTok2 = Peek();
if( eTok2 == IS || ( eTok2 >= EQ && eTok2 <= GE ) )
{ // CASE [IS] operator expr
@@ -389,7 +389,7 @@ void SbiParser::Select()
Next();
eTok2 = Peek();
if( eTok2 < EQ || eTok2 > GE )
- Error( SbERR_SYNTAX );
+ Error( ERRCODE_BASIC_SYNTAX );
else Next();
SbiExpression aCompare( this );
aCompare.Gen();
@@ -443,7 +443,7 @@ void SbiParser::Select()
}
done:
if( eTok != ENDSELECT )
- Error( SbERR_EXPECTED, ENDSELECT );
+ Error( ERRCODE_BASIC_EXPECTED, ENDSELECT );
if( nNextTarget )
aGen.BackChain( nNextTarget );
aGen.BackChain( nDoneTarget );
@@ -504,7 +504,7 @@ void SbiParser::On()
}
if( bError_ )
{
- Error( SbERR_LABEL_EXPECTED );
+ Error( ERRCODE_BASIC_LABEL_EXPECTED );
}
}
else if( eCurTok == RESUME )
@@ -512,7 +512,7 @@ void SbiParser::On()
TestToken( NEXT );
aGen.Gen( _NOERROR );
}
- else Error( SbERR_EXPECTED, "GoTo/Resume" );
+ else Error( ERRCODE_BASIC_EXPECTED, "GoTo/Resume" );
}
}
@@ -547,7 +547,7 @@ void SbiParser::Resume()
break;
} // fall through
default:
- Error( SbERR_LABEL_EXPECTED );
+ Error( ERRCODE_BASIC_LABEL_EXPECTED );
}
}
diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx
index df1b4893c714..e62273b1f366 100644
--- a/basic/source/comp/parser.cxx
+++ b/basic/source/comp/parser.cxx
@@ -240,9 +240,9 @@ void SbiParser::Exit()
}
}
if( pStack )
- Error( SbERR_EXPECTED, pStack->eExitTok );
+ Error( ERRCODE_BASIC_EXPECTED, pStack->eExitTok );
else
- Error( SbERR_BAD_EXIT );
+ Error( ERRCODE_BASIC_BAD_EXIT );
}
bool SbiParser::TestSymbol( bool bKwdOk )
@@ -252,7 +252,7 @@ bool SbiParser::TestSymbol( bool bKwdOk )
{
Next(); return true;
}
- Error( SbERR_SYMBOL_EXPECTED );
+ Error( ERRCODE_BASIC_SYMBOL_EXPECTED );
return false;
}
@@ -266,7 +266,7 @@ bool SbiParser::TestToken( SbiToken t )
}
else
{
- Error( SbERR_EXPECTED, t );
+ Error( ERRCODE_BASIC_EXPECTED, t );
return false;
}
}
@@ -283,7 +283,7 @@ bool SbiParser::TestComma()
}
else if( eTok != COMMA )
{
- Error( SbERR_EXPECTED, COMMA );
+ Error( ERRCODE_BASIC_EXPECTED, COMMA );
return false;
}
Next();
@@ -296,7 +296,7 @@ void SbiParser::TestEoln()
{
if( !IsEoln( Next() ) )
{
- Error( SbERR_EXPECTED, EOLN );
+ Error( ERRCODE_BASIC_EXPECTED, EOLN );
while( !IsEoln( Next() ) ) {}
}
}
@@ -311,7 +311,7 @@ void SbiParser::StmntBlock( SbiToken eEnd )
eEndTok = xe;
if( IsEof() )
{
- Error( SbERR_BAD_BLOCK, eEnd );
+ Error( ERRCODE_BASIC_BAD_BLOCK, eEnd );
bAbort = true;
}
}
@@ -353,7 +353,7 @@ bool SbiParser::Parse()
{
// is a label
if( !pProc )
- Error( SbERR_NOT_IN_MAIN, aSym );
+ Error( ERRCODE_BASIC_NOT_IN_MAIN, aSym );
else
pProc->GetLabels().Define( aSym );
Next(); Peek();
@@ -400,7 +400,7 @@ bool SbiParser::Parse()
if( eCurTok == SYMBOL || eCurTok == DOT )
{
if( !pProc )
- Error( SbERR_EXPECTED, SUB );
+ Error( ERRCODE_BASIC_EXPECTED, SUB );
else
{
// for correct line and column...
@@ -423,9 +423,9 @@ bool SbiParser::Parse()
if( p->eTok != NIL )
{
if( !pProc && !p->bMain )
- Error( SbERR_NOT_IN_MAIN, eCurTok );
+ Error( ERRCODE_BASIC_NOT_IN_MAIN, eCurTok );
else if( pProc && !p->bSubr )
- Error( SbERR_NOT_IN_SUBR, eCurTok );
+ Error( ERRCODE_BASIC_NOT_IN_SUBR, eCurTok );
else
{
// AB #41606/#40689: Due to the new static-handling there
@@ -447,7 +447,7 @@ bool SbiParser::Parse()
}
}
else
- Error( SbERR_UNEXPECTED, eCurTok );
+ Error( ERRCODE_BASIC_UNEXPECTED, eCurTok );
}
// test for the statement's end -
@@ -459,7 +459,7 @@ bool SbiParser::Parse()
if( !IsEos() && eCurTok != ELSE )
{
// if the parsing has been aborted, jump over to the ":"
- Error( SbERR_UNEXPECTED, eCurTok );
+ Error( ERRCODE_BASIC_UNEXPECTED, eCurTok );
while( !IsEos() ) Next();
}
}
@@ -495,7 +495,7 @@ void SbiParser::Symbol( const KeywordSymbolInfo* pKeywordSymbolInfo )
bool bEQ = ( Peek() == EQ );
if( !bEQ && bVBASupportOn && aVar.IsBracket() )
- Error( SbERR_EXPECTED, "=" );
+ Error( ERRCODE_BASIC_EXPECTED, "=" );
RecursiveMode eRecMode = ( bEQ ? PREVENT_CALL : FORCE_CALL );
bool bSpecialMidHandling = false;
@@ -534,7 +534,7 @@ void SbiParser::Symbol( const KeywordSymbolInfo* pKeywordSymbolInfo )
{
// so it must be an assignment!
if( !aVar.IsLvalue() )
- Error( SbERR_LVALUE_EXPECTED );
+ Error( ERRCODE_BASIC_LVALUE_EXPECTED );
TestToken( EQ );
SbiExpression aExpr( this );
aExpr.Gen();
@@ -542,7 +542,7 @@ void SbiParser::Symbol( const KeywordSymbolInfo* pKeywordSymbolInfo )
if( pDef )
{
if( pDef->GetConstDef() )
- Error( SbERR_DUPLICATE_DEF, pDef->GetName() );
+ Error( ERRCODE_BASIC_DUPLICATE_DEF, pDef->GetName() );
if( pDef->GetType() == SbxOBJECT )
{
eOp = _SET;
@@ -570,7 +570,7 @@ void SbiParser::Assign()
SbiSymDef* pDef = aLvalue.GetRealVar();
{
if( pDef->GetConstDef() )
- Error( SbERR_DUPLICATE_DEF, pDef->GetName() );
+ Error( ERRCODE_BASIC_DUPLICATE_DEF, pDef->GetName() );
nLen = aLvalue.GetRealVar()->GetLen();
}
if( nLen )
@@ -585,11 +585,11 @@ void SbiParser::Set()
SbiExpression aLvalue( this, SbLVALUE );
SbxDataType eType = aLvalue.GetType();
if( eType != SbxOBJECT && eType != SbxEMPTY && eType != SbxVARIANT )
- Error( SbERR_INVALID_OBJECT );
+ Error( ERRCODE_BASIC_INVALID_OBJECT );
TestToken( EQ );
SbiSymDef* pDef = aLvalue.GetRealVar();
if( pDef->GetConstDef() )
- Error( SbERR_DUPLICATE_DEF, pDef->GetName() );
+ Error( ERRCODE_BASIC_DUPLICATE_DEF, pDef->GetName() );
SbiToken eTok = Peek();
if( eTok == NEW )
@@ -636,13 +636,13 @@ void SbiParser::LSet()
SbiExpression aLvalue( this, SbLVALUE );
if( aLvalue.GetType() != SbxSTRING )
{
- Error( SbERR_INVALID_OBJECT );
+ Error( ERRCODE_BASIC_INVALID_OBJECT );
}
TestToken( EQ );
SbiSymDef* pDef = aLvalue.GetRealVar();
if( pDef && pDef->GetConstDef() )
{
- Error( SbERR_DUPLICATE_DEF, pDef->GetName() );
+ Error( ERRCODE_BASIC_DUPLICATE_DEF, pDef->GetName() );
}
SbiExpression aExpr( this );
aLvalue.Gen();
@@ -656,12 +656,12 @@ void SbiParser::RSet()
SbiExpression aLvalue( this, SbLVALUE );
if( aLvalue.GetType() != SbxSTRING )
{
- Error( SbERR_INVALID_OBJECT );
+ Error( ERRCODE_BASIC_INVALID_OBJECT );
}
TestToken( EQ );
SbiSymDef* pDef = aLvalue.GetRealVar();
if( pDef && pDef->GetConstDef() )
- Error( SbERR_DUPLICATE_DEF, pDef->GetName() );
+ Error( ERRCODE_BASIC_DUPLICATE_DEF, pDef->GetName() );
SbiExpression aExpr( this );
aLvalue.Gen();
aExpr.Gen();
@@ -683,11 +683,11 @@ void SbiParser::DefXXX()
if( Peek() == MINUS )
{
Next();
- if( Next() != SYMBOL ) Error( SbERR_SYMBOL_EXPECTED );
+ if( Next() != SYMBOL ) Error( ERRCODE_BASIC_SYMBOL_EXPECTED );
else
{
ch2 = aSym.toAsciiUpperCase()[0];
- if( ch2 < ch1 ) Error( SbERR_SYNTAX ), ch2 = 0;
+ if( ch2 < ch1 ) Error( ERRCODE_BASIC_SYNTAX ), ch2 = 0;
}
}
if (!ch2) ch2 = ch1;
@@ -711,14 +711,14 @@ void SbiParser::Implements()
{
if( !bClassModule )
{
- Error( SbERR_UNEXPECTED, IMPLEMENTS );
+ Error( ERRCODE_BASIC_UNEXPECTED, IMPLEMENTS );
return;
}
Peek();
if( eCurTok != SYMBOL )
{
- Error( SbERR_SYMBOL_EXPECTED );
+ Error( ERRCODE_BASIC_SYMBOL_EXPECTED );
return;
}
@@ -740,7 +740,7 @@ void SbiParser::Implements()
else
{
Next();
- Error( SbERR_SYMBOL_EXPECTED );
+ Error( ERRCODE_BASIC_SYMBOL_EXPECTED );
break;
}
}
@@ -772,14 +772,14 @@ void SbiParser::Option()
break;
}
}
- Error( SbERR_EXPECTED, "0/1" );
+ Error( ERRCODE_BASIC_EXPECTED, "0/1" );
break;
case PRIVATE:
{
OUString aString = SbiTokenizer::Symbol(Next());
if( !aString.equalsIgnoreAsciiCase("Module") )
{
- Error( SbERR_EXPECTED, "Module" );
+ Error( ERRCODE_BASIC_EXPECTED, "Module" );
}
break;
}
@@ -796,7 +796,7 @@ void SbiParser::Option()
}
else
{
- Error( SbERR_EXPECTED, "Text/Binary" );
+ Error( ERRCODE_BASIC_EXPECTED, "Text/Binary" );
}
break;
}
@@ -827,10 +827,10 @@ void SbiParser::Option()
break;
}
}
- Error( SbERR_EXPECTED, "0/1" );
+ Error( ERRCODE_BASIC_EXPECTED, "0/1" );
break;
default:
- Error( SbERR_BAD_OPTION, eCurTok );
+ Error( ERRCODE_BASIC_BAD_OPTION, eCurTok );
}
}
diff --git a/basic/source/comp/sbcomp.cxx b/basic/source/comp/sbcomp.cxx
index 95f5b7f927a1..9c2298eb8e97 100644
--- a/basic/source/comp/sbcomp.cxx
+++ b/basic/source/comp/sbcomp.cxx
@@ -871,7 +871,7 @@ void RTL_Impl_TraceCommand( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite )
if ( rPar.Count() < 2 )
{
- StarBASIC::Error( SbERR_BAD_ARGUMENT );
+ StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
@@ -897,7 +897,7 @@ void RTL_Impl_TraceCommand( StarBASIC* pBasic, SbxArray& rPar, sal_Bool bWrite )
{
if ( rPar.Count() < 3 )
{
- StarBASIC::Error( SbERR_BAD_ARGUMENT );
+ StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
return;
}
diff --git a/basic/source/comp/scanner.cxx b/basic/source/comp/scanner.cxx
index 35e9ed886593..85b6c823d501 100644
--- a/basic/source/comp/scanner.cxx
+++ b/basic/source/comp/scanner.cxx
@@ -85,17 +85,17 @@ void SbiScanner::GenError( SbError code )
sal_Int32 nc = nColLock ? nSavedCol1 : nCol1;
switch( code )
{
- case SbERR_EXPECTED:
- case SbERR_UNEXPECTED:
- case SbERR_SYMBOL_EXPECTED:
- case SbERR_LABEL_EXPECTED:
+ case ERRCODE_BASIC_EXPECTED:
+ case ERRCODE_BASIC_UNEXPECTED:
+ case ERRCODE_BASIC_SYMBOL_EXPECTED:
+ case ERRCODE_BASIC_LABEL_EXPECTED:
nc = nCol1;
if( nc > nCol2 ) nCol2 = nc;
break;
}
bRes = pBasic->CError( code, aError, nLine, nc, nCol2 );
}
- bAbort = bAbort || !bRes || ( code == SbERR_NO_MEMORY || code == SbERR_PROG_TOO_LARGE );
+ bAbort = bAbort || !bRes || ( code == ERRCODE_BASIC_NO_MEMORY || code == ERRCODE_BASIC_PROG_TOO_LARGE );
}
nErrors++;
}
@@ -359,7 +359,7 @@ bool SbiScanner::NextSym()
{
--pLine, --nCol;
aError = OUString( aLine[nCol]);
- nError = SbERR_BAD_CHAR_IN_NUMBER;
+ nError = ERRCODE_BASIC_BAD_CHAR_IN_NUMBER;
}
rtl_math_ConversionStatus eStatus = rtl_math_ConversionStatus_Ok;
@@ -378,13 +378,13 @@ bool SbiScanner::NextSym()
// Copy error position from original string, not the buffer
// replacement where "12dE" => "12EE".
aError = aLine.copy( nCol, nChars);
- nError = SbERR_BAD_CHAR_IN_NUMBER;
+ nError = ERRCODE_BASIC_BAD_CHAR_IN_NUMBER;
}
else if (eStatus != rtl_math_ConversionStatus_Ok)
{
// Keep the scan error and character at position, if any.
if (!nError)
- nError = SbERR_MATH_OVERFLOW;
+ nError = ERRCODE_BASIC_MATH_OVERFLOW;
}
if (nError)
@@ -399,7 +399,7 @@ bool SbiScanner::NextSym()
}
if( bBufOverflow )
- GenError( SbERR_MATH_OVERFLOW );
+ GenError( ERRCODE_BASIC_MATH_OVERFLOW );
// type recognition?
if( nCol < aLine.getLength() )
@@ -457,7 +457,7 @@ bool SbiScanner::NextSym()
else
{
aError = OUString(ch);
- GenError( SbERR_BAD_CHAR_IN_NUMBER );
+ GenError( ERRCODE_BASIC_BAD_CHAR_IN_NUMBER );
}
}
if(nCol < aLine.getLength() && aLine[nCol] == '&') ++pLine, ++nCol;
@@ -465,7 +465,7 @@ bool SbiScanner::NextSym()
nVal = (double) ls;
eScanType = ( ls >= SbxMININT && ls <= SbxMAXINT ) ? SbxINTEGER : SbxLONG;
if( bOverflow )
- GenError( SbERR_MATH_OVERFLOW );
+ GenError( ERRCODE_BASIC_MATH_OVERFLOW );
}
// Strings:
@@ -502,13 +502,13 @@ bool SbiScanner::NextSym()
eScanType = ( cSep == '#' ) ? SbxDATE : SbxSTRING;
break;
}
- } else aError = OUString(cSep), GenError( SbERR_EXPECTED );
+ } else aError = OUString(cSep), GenError( ERRCODE_BASIC_EXPECTED );
}
}
// invalid characters:
else if( *pLine >= 0x7F )
{
- GenError( SbERR_SYNTAX ); pLine++; nCol++;
+ GenError( ERRCODE_BASIC_SYNTAX ); pLine++; nCol++;
}
// other groups:
else
diff --git a/basic/source/comp/symtbl.cxx b/basic/source/comp/symtbl.cxx
index 7a79de8d3fa6..db6b1505b3a5 100644
--- a/basic/source/comp/symtbl.cxx
+++ b/basic/source/comp/symtbl.cxx
@@ -147,7 +147,7 @@ void SbiSymPool::Add( SbiSymDef* pDef )
{
#ifdef DBG_UTIL
- pParser->Error( SbERR_INTERNAL_ERROR, "Dbl Pool" );
+ pParser->Error( ERRCODE_BASIC_INTERNAL_ERROR, "Dbl Pool" );
#endif
return;
}
@@ -221,7 +221,7 @@ sal_uInt32 SbiSymPool::Define( const OUString& rName )
{
if( p->IsDefined() )
{
- pParser->Error( SbERR_LABEL_DEFINED, rName );
+ pParser->Error( ERRCODE_BASIC_LABEL_DEFINED, rName );
}
}
else
@@ -251,7 +251,7 @@ void SbiSymPool::CheckRefs()
SbiSymDef &r = aData[ i ];
if( !r.IsDefined() )
{
- pParser->Error( SbERR_UNDEF_LABEL, r.GetName() );
+ pParser->Error( ERRCODE_BASIC_UNDEF_LABEL, r.GetName() );
}
}
}
@@ -451,7 +451,7 @@ void SbiProcDef::Match( SbiProcDef* pOld )
{
// mark the whole line
pOld->pIn->GetParser()->SetCol1( 0 );
- pOld->pIn->GetParser()->Error( SbERR_BAD_DECLARATION, aName );
+ pOld->pIn->GetParser()->Error( ERRCODE_BASIC_BAD_DECLARATION, aName );
}
if( !pIn && pOld->pIn )
{
diff --git a/basic/source/comp/token.cxx b/basic/source/comp/token.cxx
index e1b2026485c7..d6131e25eb2d 100644
--- a/basic/source/comp/token.cxx
+++ b/basic/source/comp/token.cxx
@@ -240,7 +240,7 @@ SbiTokenizer::~SbiTokenizer()
void SbiTokenizer::Push( SbiToken t )
{
if( ePush != NIL )
- Error( SbERR_INTERNAL_ERROR, "PUSH" );
+ Error( ERRCODE_BASIC_INTERNAL_ERROR, "PUSH" );
else ePush = t;
}