diff options
author | Noel Grandin <noel@peralex.com> | 2015-07-27 13:04:00 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-07-28 08:35:34 +0200 |
commit | b1c25a0d8fa2f8effc501cc100b0c07f79437e8e (patch) | |
tree | a9d0dac27fd41ebb88775fdf3605fb1aabb8299e /basic/source | |
parent | 4eeeec899f44d2010189251c0f09120ade202dd8 (diff) |
inline "old" SbERR constants
Change-Id: I3e6665351de97692ae70207e8b623ad008ca8c9a
Diffstat (limited to 'basic/source')
27 files changed, 843 insertions, 843 deletions
diff --git a/basic/source/classes/eventatt.cxx b/basic/source/classes/eventatt.cxx index 9f53f8991aa8..2744f44024c5 100644 --- a/basic/source/classes/eventatt.cxx +++ b/basic/source/classes/eventatt.cxx @@ -426,7 +426,7 @@ void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, bool bWrite ) // We need at least 1 parameter if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -434,7 +434,7 @@ void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, bool bWrite ) SbxBaseRef pObj = rPar.Get( 1 )->GetObject(); if( !(pObj && pObj->ISA(SbUnoObject)) ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } SbUnoObject* pUnoObj = static_cast<SbUnoObject*>(static_cast<SbxBase*>(pObj)); @@ -443,7 +443,7 @@ void RTL_Impl_CreateUnoDialog( StarBASIC* pBasic, SbxArray& rPar, bool bWrite ) if( eType != TypeClass_INTERFACE ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } diff --git a/basic/source/classes/propacc.cxx b/basic/source/classes/propacc.cxx index 9f3fc9ea34bc..b093e50fcc7e 100644 --- a/basic/source/classes/propacc.cxx +++ b/basic/source/classes/propacc.cxx @@ -272,7 +272,7 @@ void RTL_Impl_CreatePropertySet( StarBASIC* pBasic, SbxArray& rPar, bool bWrite // TODO: In this case < 2 is not correct ;-) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index fb8fd46377dd..c4d76ce89988 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -281,128 +281,128 @@ struct SFX_VB_ErrorItem const SFX_VB_ErrorItem SFX_VB_ErrorTab[] = { - { 1, SbERR_BASIC_EXCEPTION }, // #87844 Map exception to error code 1 - { 2, SbERR_SYNTAX }, - { 3, SbERR_NO_GOSUB }, - { 4, SbERR_REDO_FROM_START }, - { 5, SbERR_BAD_ARGUMENT }, - { 6, SbERR_MATH_OVERFLOW }, - { 7, SbERR_NO_MEMORY }, - { 8, SbERR_ALREADY_DIM }, - { 9, SbERR_OUT_OF_RANGE }, - { 10, SbERR_DUPLICATE_DEF }, - { 11, SbERR_ZERODIV }, - { 12, SbERR_VAR_UNDEFINED }, - { 13, SbERR_CONVERSION }, - { 14, SbERR_BAD_PARAMETER }, - { 18, SbERR_USER_ABORT }, - { 20, SbERR_BAD_RESUME }, - { 28, SbERR_STACK_OVERFLOW }, - { 35, SbERR_PROC_UNDEFINED }, - { 48, SbERR_BAD_DLL_LOAD }, - { 49, SbERR_BAD_DLL_CALL }, - { 51, SbERR_INTERNAL_ERROR }, - { 52, SbERR_BAD_CHANNEL }, - { 53, SbERR_FILE_NOT_FOUND }, - { 54, SbERR_BAD_FILE_MODE }, - { 55, SbERR_FILE_ALREADY_OPEN }, - { 57, SbERR_IO_ERROR }, - { 58, SbERR_FILE_EXISTS }, - { 59, SbERR_BAD_RECORD_LENGTH }, - { 61, SbERR_DISK_FULL }, - { 62, SbERR_READ_PAST_EOF }, - { 63, SbERR_BAD_RECORD_NUMBER }, - { 67, SbERR_TOO_MANY_FILES }, - { 68, SbERR_NO_DEVICE }, - { 70, SbERR_ACCESS_DENIED }, - { 71, SbERR_NOT_READY }, - { 73, SbERR_NOT_IMPLEMENTED }, - { 74, SbERR_DIFFERENT_DRIVE }, - { 75, SbERR_ACCESS_ERROR }, - { 76, SbERR_PATH_NOT_FOUND }, - { 91, SbERR_NO_OBJECT }, - { 93, SbERR_BAD_PATTERN }, - { 94, SBERR_IS_NULL }, - { 250, SbERR_DDE_ERROR }, - { 280, SbERR_DDE_WAITINGACK }, - { 281, SbERR_DDE_OUTOFCHANNELS }, - { 282, SbERR_DDE_NO_RESPONSE }, - { 283, SbERR_DDE_MULT_RESPONSES }, - { 284, SbERR_DDE_CHANNEL_LOCKED }, - { 285, SbERR_DDE_NOTPROCESSED }, - { 286, SbERR_DDE_TIMEOUT }, - { 287, SbERR_DDE_USER_INTERRUPT }, - { 288, SbERR_DDE_BUSY }, - { 289, SbERR_DDE_NO_DATA }, - { 290, SbERR_DDE_WRONG_DATA_FORMAT }, - { 291, SbERR_DDE_PARTNER_QUIT }, - { 292, SbERR_DDE_CONV_CLOSED }, - { 293, SbERR_DDE_NO_CHANNEL }, - { 294, SbERR_DDE_INVALID_LINK }, - { 295, SbERR_DDE_QUEUE_OVERFLOW }, - { 296, SbERR_DDE_LINK_ALREADY_EST }, - { 297, SbERR_DDE_LINK_INV_TOPIC }, - { 298, SbERR_DDE_DLL_NOT_FOUND }, - { 323, SbERR_CANNOT_LOAD }, - { 341, SbERR_BAD_INDEX }, - { 366, SbERR_NO_ACTIVE_OBJECT }, - { 380, SbERR_BAD_PROP_VALUE }, - { 382, SbERR_PROP_READONLY }, - { 394, SbERR_PROP_WRITEONLY }, - { 420, SbERR_INVALID_OBJECT }, - { 423, SbERR_NO_METHOD }, - { 424, SbERR_NEEDS_OBJECT }, - { 425, SbERR_INVALID_USAGE_OBJECT }, - { 430, SbERR_NO_OLE }, - { 438, SbERR_BAD_METHOD }, - { 440, SbERR_OLE_ERROR }, - { 445, SbERR_BAD_ACTION }, - { 446, SbERR_NO_NAMED_ARGS }, - { 447, SbERR_BAD_LOCALE }, - { 448, SbERR_NAMED_NOT_FOUND }, - { 449, SbERR_NOT_OPTIONAL }, - { 450, SbERR_WRONG_ARGS }, - { 451, SbERR_NOT_A_COLL }, - { 452, SbERR_BAD_ORDINAL }, - { 453, SbERR_DLLPROC_NOT_FOUND }, - { 460, SbERR_BAD_CLIPBD_FORMAT }, - { 951, SbERR_UNEXPECTED }, - { 952, SbERR_EXPECTED }, - { 953, SbERR_SYMBOL_EXPECTED }, - { 954, SbERR_VAR_EXPECTED }, - { 955, SbERR_LABEL_EXPECTED }, - { 956, SbERR_LVALUE_EXPECTED }, - { 957, SbERR_VAR_DEFINED }, - { 958, SbERR_PROC_DEFINED }, - { 959, SbERR_LABEL_DEFINED }, - { 960, SbERR_UNDEF_VAR }, - { 961, SbERR_UNDEF_ARRAY }, - { 962, SbERR_UNDEF_PROC }, - { 963, SbERR_UNDEF_LABEL }, - { 964, SbERR_UNDEF_TYPE }, - { 965, SbERR_BAD_EXIT }, - { 966, SbERR_BAD_BLOCK }, - { 967, SbERR_BAD_BRACKETS }, - { 968, SbERR_BAD_DECLARATION }, - { 969, SbERR_BAD_PARAMETERS }, - { 970, SbERR_BAD_CHAR_IN_NUMBER }, - { 971, SbERR_MUST_HAVE_DIMS }, - { 972, SbERR_NO_IF }, - { 973, SbERR_NOT_IN_SUBR }, - { 974, SbERR_NOT_IN_MAIN }, - { 975, SbERR_WRONG_DIMS }, - { 976, SbERR_BAD_OPTION }, - { 977, SbERR_CONSTANT_REDECLARED }, - { 978, SbERR_PROG_TOO_LARGE }, - { 979, SbERR_NO_STRINGS_ARRAYS }, - { 1000, SbERR_PROPERTY_NOT_FOUND }, - { 1001, SbERR_METHOD_NOT_FOUND }, - { 1002, SbERR_ARG_MISSING }, - { 1003, SbERR_BAD_NUMBER_OF_ARGS }, - { 1004, SbERR_METHOD_FAILED }, - { 1005, SbERR_SETPROP_FAILED }, - { 1006, SbERR_GETPROP_FAILED }, - { 1007, SbERR_BASIC_COMPAT }, + { 1, ERRCODE_BASIC_EXCEPTION }, // #87844 Map exception to error code 1 + { 2, ERRCODE_BASIC_SYNTAX }, + { 3, ERRCODE_BASIC_NO_GOSUB }, + { 4, ERRCODE_BASIC_REDO_FROM_START }, + { 5, ERRCODE_BASIC_BAD_ARGUMENT }, + { 6, ERRCODE_BASIC_MATH_OVERFLOW }, + { 7, ERRCODE_BASIC_NO_MEMORY }, + { 8, ERRCODE_BASIC_ALREADY_DIM }, + { 9, ERRCODE_BASIC_OUT_OF_RANGE }, + { 10, ERRCODE_BASIC_DUPLICATE_DEF }, + { 11, ERRCODE_BASIC_ZERODIV }, + { 12, ERRCODE_BASIC_VAR_UNDEFINED }, + { 13, ERRCODE_BASIC_CONVERSION }, + { 14, ERRCODE_BASIC_BAD_PARAMETER }, + { 18, ERRCODE_BASIC_USER_ABORT }, + { 20, ERRCODE_BASIC_BAD_RESUME }, + { 28, ERRCODE_BASIC_STACK_OVERFLOW }, + { 35, ERRCODE_BASIC_PROC_UNDEFINED }, + { 48, ERRCODE_BASIC_BAD_DLL_LOAD }, + { 49, ERRCODE_BASIC_BAD_DLL_CALL }, + { 51, ERRCODE_BASIC_INTERNAL_ERROR }, + { 52, ERRCODE_BASIC_BAD_CHANNEL }, + { 53, ERRCODE_BASIC_FILE_NOT_FOUND }, + { 54, ERRCODE_BASIC_BAD_FILE_MODE }, + { 55, ERRCODE_BASIC_FILE_ALREADY_OPEN }, + { 57, ERRCODE_BASIC_IO_ERROR }, + { 58, ERRCODE_BASIC_FILE_EXISTS }, + { 59, ERRCODE_BASIC_BAD_RECORD_LENGTH }, + { 61, ERRCODE_BASIC_DISK_FULL }, + { 62, ERRCODE_BASIC_READ_PAST_EOF }, + { 63, ERRCODE_BASIC_BAD_RECORD_NUMBER }, + { 67, ERRCODE_BASIC_TOO_MANY_FILES }, + { 68, ERRCODE_BASIC_NO_DEVICE }, + { 70, ERRCODE_BASIC_ACCESS_DENIED }, + { 71, ERRCODE_BASIC_NOT_READY }, + { 73, ERRCODE_BASIC_NOT_IMPLEMENTED }, + { 74, ERRCODE_BASIC_DIFFERENT_DRIVE }, + { 75, ERRCODE_BASIC_ACCESS_ERROR }, + { 76, ERRCODE_BASIC_PATH_NOT_FOUND }, + { 91, ERRCODE_BASIC_NO_OBJECT }, + { 93, ERRCODE_BASIC_BAD_PATTERN }, + { 94, ERRCODE_BASIC_IS_NULL }, + { 250, ERRCODE_BASIC_DDE_ERROR }, + { 280, ERRCODE_BASIC_DDE_WAITINGACK }, + { 281, ERRCODE_BASIC_DDE_OUTOFCHANNELS }, + { 282, ERRCODE_BASIC_DDE_NO_RESPONSE }, + { 283, ERRCODE_BASIC_DDE_MULT_RESPONSES }, + { 284, ERRCODE_BASIC_DDE_CHANNEL_LOCKED }, + { 285, ERRCODE_BASIC_DDE_NOTPROCESSED }, + { 286, ERRCODE_BASIC_DDE_TIMEOUT }, + { 287, ERRCODE_BASIC_DDE_USER_INTERRUPT }, + { 288, ERRCODE_BASIC_DDE_BUSY }, + { 289, ERRCODE_BASIC_DDE_NO_DATA }, + { 290, ERRCODE_BASIC_DDE_WRONG_DATA_FORMAT }, + { 291, ERRCODE_BASIC_DDE_PARTNER_QUIT }, + { 292, ERRCODE_BASIC_DDE_CONV_CLOSED }, + { 293, ERRCODE_BASIC_DDE_NO_CHANNEL }, + { 294, ERRCODE_BASIC_DDE_INVALID_LINK }, + { 295, ERRCODE_BASIC_DDE_QUEUE_OVERFLOW }, + { 296, ERRCODE_BASIC_DDE_LINK_ALREADY_EST }, + { 297, ERRCODE_BASIC_DDE_LINK_INV_TOPIC }, + { 298, ERRCODE_BASIC_DDE_DLL_NOT_FOUND }, + { 323, ERRCODE_BASIC_CANNOT_LOAD }, + { 341, ERRCODE_BASIC_BAD_INDEX }, + { 366, ERRCODE_BASIC_NO_ACTIVE_OBJECT }, + { 380, ERRCODE_BASIC_BAD_PROP_VALUE }, + { 382, ERRCODE_BASIC_PROP_READONLY }, + { 394, ERRCODE_BASIC_PROP_WRITEONLY }, + { 420, ERRCODE_BASIC_INVALID_OBJECT }, + { 423, ERRCODE_BASIC_NO_METHOD }, + { 424, ERRCODE_BASIC_NEEDS_OBJECT }, + { 425, ERRCODE_BASIC_INVALID_USAGE_OBJECT }, + { 430, ERRCODE_BASIC_NO_OLE }, + { 438, ERRCODE_BASIC_BAD_METHOD }, + { 440, ERRCODE_BASIC_OLE_ERROR }, + { 445, ERRCODE_BASIC_BAD_ACTION }, + { 446, ERRCODE_BASIC_NO_NAMED_ARGS }, + { 447, ERRCODE_BASIC_BAD_LOCALE }, + { 448, ERRCODE_BASIC_NAMED_NOT_FOUND }, + { 449, ERRCODE_BASIC_NOT_OPTIONAL }, + { 450, ERRCODE_BASIC_WRONG_ARGS }, + { 451, ERRCODE_BASIC_NOT_A_COLL }, + { 452, ERRCODE_BASIC_BAD_ORDINAL }, + { 453, ERRCODE_BASIC_DLLPROC_NOT_FOUND }, + { 460, ERRCODE_BASIC_BAD_CLIPBD_FORMAT }, + { 951, ERRCODE_BASIC_UNEXPECTED }, + { 952, ERRCODE_BASIC_EXPECTED }, + { 953, ERRCODE_BASIC_SYMBOL_EXPECTED }, + { 954, ERRCODE_BASIC_VAR_EXPECTED }, + { 955, ERRCODE_BASIC_LABEL_EXPECTED }, + { 956, ERRCODE_BASIC_LVALUE_EXPECTED }, + { 957, ERRCODE_BASIC_VAR_DEFINED }, + { 958, ERRCODE_BASIC_PROC_DEFINED }, + { 959, ERRCODE_BASIC_LABEL_DEFINED }, + { 960, ERRCODE_BASIC_UNDEF_VAR }, + { 961, ERRCODE_BASIC_UNDEF_ARRAY }, + { 962, ERRCODE_BASIC_UNDEF_PROC }, + { 963, ERRCODE_BASIC_UNDEF_LABEL }, + { 964, ERRCODE_BASIC_UNDEF_TYPE }, + { 965, ERRCODE_BASIC_BAD_EXIT }, + { 966, ERRCODE_BASIC_BAD_BLOCK }, + { 967, ERRCODE_BASIC_BAD_BRACKETS }, + { 968, ERRCODE_BASIC_BAD_DECLARATION }, + { 969, ERRCODE_BASIC_BAD_PARAMETERS }, + { 970, ERRCODE_BASIC_BAD_CHAR_IN_NUMBER }, + { 971, ERRCODE_BASIC_MUST_HAVE_DIMS }, + { 972, ERRCODE_BASIC_NO_IF }, + { 973, ERRCODE_BASIC_NOT_IN_SUBR }, + { 974, ERRCODE_BASIC_NOT_IN_MAIN }, + { 975, ERRCODE_BASIC_WRONG_DIMS }, + { 976, ERRCODE_BASIC_BAD_OPTION }, + { 977, ERRCODE_BASIC_CONSTANT_REDECLARED }, + { 978, ERRCODE_BASIC_PROG_TOO_LARGE }, + { 979, ERRCODE_BASIC_NO_STRINGS_ARRAYS }, + { 1000, ERRCODE_BASIC_PROPERTY_NOT_FOUND }, + { 1001, ERRCODE_BASIC_METHOD_NOT_FOUND }, + { 1002, ERRCODE_BASIC_ARG_MISSING }, + { 1003, ERRCODE_BASIC_BAD_NUMBER_OF_ARGS }, + { 1004, ERRCODE_BASIC_METHOD_FAILED }, + { 1005, ERRCODE_BASIC_SETPROP_FAILED }, + { 1006, ERRCODE_BASIC_GETPROP_FAILED }, + { 1007, ERRCODE_BASIC_COMPAT }, { 0xFFFF, 0xFFFFFFFFL } // End mark }; @@ -1538,17 +1538,17 @@ sal_uInt16 StarBASIC::GetVBErrorCode( SbError nError ) { switch( nError ) { - case SbERR_BASIC_ARRAY_FIX: + case ERRCODE_BASIC_ARRAY_FIX: return 10; - case SbERR_BASIC_STRING_OVERFLOW: + case ERRCODE_BASIC_STRING_OVERFLOW: return 14; - case SbERR_BASIC_EXPR_TOO_COMPLEX: + case ERRCODE_BASIC_EXPR_TOO_COMPLEX: return 16; - case SbERR_BASIC_OPER_NOT_PERFORM: + case ERRCODE_BASIC_OPER_NOT_PERFORM: return 17; - case SbERR_BASIC_TOO_MANY_DLL: + case ERRCODE_BASIC_TOO_MANY_DLL: return 47; - case SbERR_BASIC_LOOP_NOT_INIT: + case ERRCODE_BASIC_LOOP_NOT_INIT: return 92; default: nRet = 0; @@ -1588,17 +1588,17 @@ SbError StarBASIC::GetSfxFromVBError( sal_uInt16 nError ) case 73: return 0L; case 10: - return SbERR_BASIC_ARRAY_FIX; + return ERRCODE_BASIC_ARRAY_FIX; case 14: - return SbERR_BASIC_STRING_OVERFLOW; + return ERRCODE_BASIC_STRING_OVERFLOW; case 16: - return SbERR_BASIC_EXPR_TOO_COMPLEX; + return ERRCODE_BASIC_EXPR_TOO_COMPLEX; case 17: - return SbERR_BASIC_OPER_NOT_PERFORM; + return ERRCODE_BASIC_OPER_NOT_PERFORM; case 47: - return SbERR_BASIC_TOO_MANY_DLL; + return ERRCODE_BASIC_TOO_MANY_DLL; case 92: - return SbERR_BASIC_LOOP_NOT_INIT; + return ERRCODE_BASIC_LOOP_NOT_INIT; default: nRet = 0L; } @@ -1753,7 +1753,7 @@ bool StarBASIC::RTError( SbError code, const OUString& rMsg, sal_Int32 l, sal_In // seems that this is not used ( if rMsg already has content ) // In the case of VBA MakeErrorText also formats the error to be a little more // like vba ( adds an error number etc ) - if ( SbiRuntime::isVBAEnabled() && ( code == SbERR_BASIC_COMPAT ) ) + if ( SbiRuntime::isVBAEnabled() && ( code == ERRCODE_BASIC_COMPAT ) ) { OUString aTmp = "\'" + OUString::number(SbxErrObject::getUnoErrObject()->getNumber()) + "\'\n" + OUString(!GetSbData()->aErrMsg.isEmpty() ? GetSbData()->aErrMsg : rMsg); @@ -2232,14 +2232,14 @@ void BasicCollection::CollAdd( SbxArray* pPar_ ) { if( !( pBefore->IsErr() || ( pBefore->GetType() == SbxEMPTY ) ) ) { - SetError( SbERR_BAD_ARGUMENT ); + SetError( ERRCODE_BASIC_BAD_ARGUMENT ); return; } SbxVariable* pAfter = pPar_->Get(4); sal_Int32 nAfterIndex = implGetIndex( pAfter ); if( nAfterIndex == -1 ) { - SetError( SbERR_BAD_ARGUMENT ); + SetError( ERRCODE_BASIC_BAD_ARGUMENT ); return; } nNextIndex = nAfterIndex + 1; @@ -2249,7 +2249,7 @@ void BasicCollection::CollAdd( SbxArray* pPar_ ) sal_Int32 nBeforeIndex = implGetIndex( pBefore ); if( nBeforeIndex == -1 ) { - SetError( SbERR_BAD_ARGUMENT ); + SetError( ERRCODE_BASIC_BAD_ARGUMENT ); return; } nNextIndex = nBeforeIndex; @@ -2264,13 +2264,13 @@ void BasicCollection::CollAdd( SbxArray* pPar_ ) { if( pKey->GetType() != SbxSTRING ) { - SetError( SbERR_BAD_ARGUMENT ); + SetError( ERRCODE_BASIC_BAD_ARGUMENT ); return; } OUString aKey = pKey->GetOUString(); if( implGetIndexForName( aKey ) != -1 ) { - SetError( SbERR_BAD_ARGUMENT ); + SetError( ERRCODE_BASIC_BAD_ARGUMENT ); return; } pNewItem->SetName( aKey ); @@ -2281,7 +2281,7 @@ void BasicCollection::CollAdd( SbxArray* pPar_ ) } else { - SetError( SbERR_BAD_ARGUMENT ); + SetError( ERRCODE_BASIC_BAD_ARGUMENT ); return; } } @@ -2302,7 +2302,7 @@ void BasicCollection::CollItem( SbxArray* pPar_ ) } if( !pRes ) { - SetError( SbERR_BAD_ARGUMENT ); + SetError( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -2341,7 +2341,7 @@ void BasicCollection::CollRemove( SbxArray* pPar_ ) } else { - SetError( SbERR_BAD_ARGUMENT ); + SetError( ERRCODE_BASIC_BAD_ARGUMENT ); } } diff --git a/basic/source/classes/sb.src b/basic/source/classes/sb.src index 50d8e1471fa6..e3da1c48b728 100644 --- a/basic/source/classes/sb.src +++ b/basic/source/classes/sb.src @@ -23,484 +23,484 @@ Resource RID_BASIC_START { - String SbERR_SYNTAX & ERRCODE_RES_MASK + String ERRCODE_BASIC_SYNTAX & ERRCODE_RES_MASK { Text [ en-US ] = "Syntax error." ; }; - String SbERR_NO_GOSUB & ERRCODE_RES_MASK + String ERRCODE_BASIC_NO_GOSUB & ERRCODE_RES_MASK { Text [ en-US ] = "Return without Gosub." ; }; - String SbERR_REDO_FROM_START & ERRCODE_RES_MASK + String ERRCODE_BASIC_REDO_FROM_START & ERRCODE_RES_MASK { Text [ en-US ] = "Incorrect entry; please retry." ; }; - String SbERR_BAD_ARGUMENT & ERRCODE_RES_MASK + String ERRCODE_BASIC_BAD_ARGUMENT & ERRCODE_RES_MASK { Text [ en-US ] = "Invalid procedure call." ; }; - String SbERR_MATH_OVERFLOW & ERRCODE_RES_MASK + String ERRCODE_BASIC_MATH_OVERFLOW & ERRCODE_RES_MASK { Text [ en-US ] = "Overflow." ; }; - String SbERR_NO_MEMORY & ERRCODE_RES_MASK + String ERRCODE_BASIC_NO_MEMORY & ERRCODE_RES_MASK { Text [ en-US ] = "Not enough memory." ; }; - String SbERR_ALREADY_DIM & ERRCODE_RES_MASK + String ERRCODE_BASIC_ALREADY_DIM & ERRCODE_RES_MASK { Text [ en-US ] = "Array already dimensioned." ; }; - String SbERR_OUT_OF_RANGE & ERRCODE_RES_MASK + String ERRCODE_BASIC_OUT_OF_RANGE & ERRCODE_RES_MASK { Text [ en-US ] = "Index out of defined range." ; }; - String SbERR_DUPLICATE_DEF & ERRCODE_RES_MASK + String ERRCODE_BASIC_DUPLICATE_DEF & ERRCODE_RES_MASK { Text [ en-US ] = "Duplicate definition." ; }; - String SbERR_ZERODIV & ERRCODE_RES_MASK + String ERRCODE_BASIC_ZERODIV & ERRCODE_RES_MASK { Text [ en-US ] = "Division by zero." ; }; - String SbERR_VAR_UNDEFINED & ERRCODE_RES_MASK + String ERRCODE_BASIC_VAR_UNDEFINED & ERRCODE_RES_MASK { Text [ en-US ] = "Variable not defined." ; }; - String SbERR_CONVERSION & ERRCODE_RES_MASK + String ERRCODE_BASIC_CONVERSION & ERRCODE_RES_MASK { Text [ en-US ] = "Data type mismatch." ; }; - String SbERR_BAD_PARAMETER & ERRCODE_RES_MASK + String ERRCODE_BASIC_BAD_PARAMETER & ERRCODE_RES_MASK { Text [ en-US ] = "Invalid parameter." ; }; - String SbERR_USER_ABORT & ERRCODE_RES_MASK + String ERRCODE_BASIC_USER_ABORT & ERRCODE_RES_MASK { Text [ en-US ] = "Process interrupted by user." ; }; - String SbERR_BAD_RESUME & ERRCODE_RES_MASK + String ERRCODE_BASIC_BAD_RESUME & ERRCODE_RES_MASK { Text [ en-US ] = "Resume without error." ; }; - String SbERR_STACK_OVERFLOW & ERRCODE_RES_MASK + String ERRCODE_BASIC_STACK_OVERFLOW & ERRCODE_RES_MASK { Text [ en-US ] = "Not enough stack memory." ; }; - String SbERR_PROC_UNDEFINED & ERRCODE_RES_MASK + String ERRCODE_BASIC_PROC_UNDEFINED & ERRCODE_RES_MASK { Text [ en-US ] = "Sub-procedure or function procedure not defined." ; }; - String SbERR_BAD_DLL_LOAD & ERRCODE_RES_MASK + String ERRCODE_BASIC_BAD_DLL_LOAD & ERRCODE_RES_MASK { Text [ en-US ] = "Error loading DLL file." ; }; - String SbERR_BAD_DLL_CALL & ERRCODE_RES_MASK + String ERRCODE_BASIC_BAD_DLL_CALL & ERRCODE_RES_MASK { Text [ en-US ] = "Wrong DLL call convention." ; }; - String SbERR_INTERNAL_ERROR & ERRCODE_RES_MASK + String ERRCODE_BASIC_INTERNAL_ERROR & ERRCODE_RES_MASK { Text [ en-US ] = "Internal error $(ARG1)." ; }; - String SbERR_BAD_CHANNEL & ERRCODE_RES_MASK + String ERRCODE_BASIC_BAD_CHANNEL & ERRCODE_RES_MASK { Text [ en-US ] = "Invalid file name or file number." ; }; - String SbERR_FILE_NOT_FOUND & ERRCODE_RES_MASK + String ERRCODE_BASIC_FILE_NOT_FOUND & ERRCODE_RES_MASK { Text [ en-US ] = "File not found." ; }; - String SbERR_BAD_FILE_MODE & ERRCODE_RES_MASK + String ERRCODE_BASIC_BAD_FILE_MODE & ERRCODE_RES_MASK { Text [ en-US ] = "Incorrect file mode." ; }; - String SbERR_FILE_ALREADY_OPEN & ERRCODE_RES_MASK + String ERRCODE_BASIC_FILE_ALREADY_OPEN & ERRCODE_RES_MASK { Text [ en-US ] = "File already open." ; }; - String SbERR_IO_ERROR & ERRCODE_RES_MASK + String ERRCODE_BASIC_IO_ERROR & ERRCODE_RES_MASK { Text [ en-US ] = "Device I/O error." ; }; - String SbERR_FILE_EXISTS & ERRCODE_RES_MASK + String ERRCODE_BASIC_FILE_EXISTS & ERRCODE_RES_MASK { Text [ en-US ] = "File already exists." ; }; - String SbERR_BAD_RECORD_LENGTH & ERRCODE_RES_MASK + String ERRCODE_BASIC_BAD_RECORD_LENGTH & ERRCODE_RES_MASK { Text [ en-US ] = "Incorrect record length." ; }; - String SbERR_DISK_FULL & ERRCODE_RES_MASK + String ERRCODE_BASIC_DISK_FULL & ERRCODE_RES_MASK { Text [ en-US ] = "Disk or hard drive full." ; }; - String SbERR_READ_PAST_EOF & ERRCODE_RES_MASK + String ERRCODE_BASIC_READ_PAST_EOF & ERRCODE_RES_MASK { Text [ en-US ] = "Reading exceeds EOF." ; }; - String SbERR_BAD_RECORD_NUMBER & ERRCODE_RES_MASK + String ERRCODE_BASIC_BAD_RECORD_NUMBER & ERRCODE_RES_MASK { Text [ en-US ] = "Incorrect record number." ; }; - String SbERR_TOO_MANY_FILES & ERRCODE_RES_MASK + String ERRCODE_BASIC_TOO_MANY_FILES & ERRCODE_RES_MASK { Text [ en-US ] = "Too many files." ; }; - String SbERR_NO_DEVICE & ERRCODE_RES_MASK + String ERRCODE_BASIC_NO_DEVICE & ERRCODE_RES_MASK { Text [ en-US ] = "Device not available." ; }; - String SbERR_ACCESS_DENIED & ERRCODE_RES_MASK + String ERRCODE_BASIC_ACCESS_DENIED & ERRCODE_RES_MASK { Text [ en-US ] = "Access denied." ; }; - String SbERR_NOT_READY & ERRCODE_RES_MASK + String ERRCODE_BASIC_NOT_READY & ERRCODE_RES_MASK { Text [ en-US ] = "Disk not ready." ; }; - String SbERR_NOT_IMPLEMENTED & ERRCODE_RES_MASK + String ERRCODE_BASIC_NOT_IMPLEMENTED & ERRCODE_RES_MASK { Text [ en-US ] = "Not implemented." ; }; - String SbERR_DIFFERENT_DRIVE & ERRCODE_RES_MASK + String ERRCODE_BASIC_DIFFERENT_DRIVE & ERRCODE_RES_MASK { Text [ en-US ] = "Renaming on different drives impossible." ; }; - String SbERR_ACCESS_ERROR & ERRCODE_RES_MASK + String ERRCODE_BASIC_ACCESS_ERROR & ERRCODE_RES_MASK { Text [ en-US ] = "Path/File access error." ; }; - String SbERR_PATH_NOT_FOUND & ERRCODE_RES_MASK + String ERRCODE_BASIC_PATH_NOT_FOUND & ERRCODE_RES_MASK { Text [ en-US ] = "Path not found." ; }; - String SbERR_NO_OBJECT & ERRCODE_RES_MASK + String ERRCODE_BASIC_NO_OBJECT & ERRCODE_RES_MASK { Text [ en-US ] = "Object variable not set." ; }; - String SbERR_BAD_PATTERN & ERRCODE_RES_MASK + String ERRCODE_BASIC_BAD_PATTERN & ERRCODE_RES_MASK { Text [ en-US ] = "Invalid string pattern." ; }; - String SBERR_IS_NULL & ERRCODE_RES_MASK + String ERRCODE_BASIC_IS_NULL & ERRCODE_RES_MASK { Text [ en-US ] = "Use of zero not permitted." ; }; - String SbERR_DDE_ERROR & ERRCODE_RES_MASK + String ERRCODE_BASIC_DDE_ERROR & ERRCODE_RES_MASK { Text [ en-US ] = "DDE Error." ; }; - String SbERR_DDE_WAITINGACK & ERRCODE_RES_MASK + String ERRCODE_BASIC_DDE_WAITINGACK & ERRCODE_RES_MASK { Text [ en-US ] = "Awaiting response to DDE connection." ; }; - String SbERR_DDE_OUTOFCHANNELS & ERRCODE_RES_MASK + String ERRCODE_BASIC_DDE_OUTOFCHANNELS & ERRCODE_RES_MASK { Text [ en-US ] = "No DDE channels available." ; }; - String SbERR_DDE_NO_RESPONSE & ERRCODE_RES_MASK + String ERRCODE_BASIC_DDE_NO_RESPONSE & ERRCODE_RES_MASK { Text [ en-US ] = "No application responded to DDE connect initiation." ; }; - String SbERR_DDE_MULT_RESPONSES & ERRCODE_RES_MASK + String ERRCODE_BASIC_DDE_MULT_RESPONSES & ERRCODE_RES_MASK { Text [ en-US ] = "Too many applications responded to DDE connect initiation." ; }; - String SbERR_DDE_CHANNEL_LOCKED & ERRCODE_RES_MASK + String ERRCODE_BASIC_DDE_CHANNEL_LOCKED & ERRCODE_RES_MASK { Text [ en-US ] = "DDE channel locked." ; }; - String SbERR_DDE_NOTPROCESSED & ERRCODE_RES_MASK + String ERRCODE_BASIC_DDE_NOTPROCESSED & ERRCODE_RES_MASK { Text [ en-US ] = "External application cannot execute DDE operation." ; }; - String SbERR_DDE_TIMEOUT & ERRCODE_RES_MASK + String ERRCODE_BASIC_DDE_TIMEOUT & ERRCODE_RES_MASK { Text [ en-US ] = "Timeout while waiting for DDE response." ; }; - String SbERR_DDE_USER_INTERRUPT & ERRCODE_RES_MASK + String ERRCODE_BASIC_DDE_USER_INTERRUPT & ERRCODE_RES_MASK { Text [ en-US ] = "User pressed ESCAPE during DDE operation." ; }; - String SbERR_DDE_BUSY & ERRCODE_RES_MASK + String ERRCODE_BASIC_DDE_BUSY & ERRCODE_RES_MASK { Text [ en-US ] = "External application busy." ; }; - String SbERR_DDE_NO_DATA & ERRCODE_RES_MASK + String ERRCODE_BASIC_DDE_NO_DATA & ERRCODE_RES_MASK { Text [ en-US ] = "DDE operation without data." ; }; - String SbERR_DDE_WRONG_DATA_FORMAT & ERRCODE_RES_MASK + String ERRCODE_BASIC_DDE_WRONG_DATA_FORMAT & ERRCODE_RES_MASK { Text [ en-US ] = "Data are in wrong format." ; }; - String SbERR_DDE_PARTNER_QUIT & ERRCODE_RES_MASK + String ERRCODE_BASIC_DDE_PARTNER_QUIT & ERRCODE_RES_MASK { Text [ en-US ] = "External application has been terminated." ; }; - String SbERR_DDE_CONV_CLOSED & ERRCODE_RES_MASK + String ERRCODE_BASIC_DDE_CONV_CLOSED & ERRCODE_RES_MASK { Text [ en-US ] = "DDE connection interrupted or modified." ; }; - String SbERR_DDE_NO_CHANNEL & ERRCODE_RES_MASK + String ERRCODE_BASIC_DDE_NO_CHANNEL & ERRCODE_RES_MASK { Text [ en-US ] = "DDE method invoked with no channel open." ; }; - String SbERR_DDE_INVALID_LINK & ERRCODE_RES_MASK + String ERRCODE_BASIC_DDE_INVALID_LINK & ERRCODE_RES_MASK { Text [ en-US ] = "Invalid DDE link format." ; }; - String SbERR_DDE_QUEUE_OVERFLOW & ERRCODE_RES_MASK + String ERRCODE_BASIC_DDE_QUEUE_OVERFLOW & ERRCODE_RES_MASK { Text [ en-US ] = "DDE message has been lost." ; }; - String SbERR_DDE_LINK_ALREADY_EST & ERRCODE_RES_MASK + String ERRCODE_BASIC_DDE_LINK_ALREADY_EST & ERRCODE_RES_MASK { Text [ en-US ] = "Paste link already performed." ; }; - String SbERR_DDE_LINK_INV_TOPIC & ERRCODE_RES_MASK + String ERRCODE_BASIC_DDE_LINK_INV_TOPIC & ERRCODE_RES_MASK { Text [ en-US ] = "Link mode cannot be set due to invalid link topic." ; }; - String SbERR_DDE_DLL_NOT_FOUND & ERRCODE_RES_MASK + String ERRCODE_BASIC_DDE_DLL_NOT_FOUND & ERRCODE_RES_MASK { Text [ en-US ] = "DDE requires the DDEML.DLL file." ; }; - String SbERR_CANNOT_LOAD & ERRCODE_RES_MASK + String ERRCODE_BASIC_CANNOT_LOAD & ERRCODE_RES_MASK { Text [ en-US ] = "Module cannot be loaded; invalid format." ; }; - String SbERR_BAD_INDEX & ERRCODE_RES_MASK + String ERRCODE_BASIC_BAD_INDEX & ERRCODE_RES_MASK { Text [ en-US ] = "Invalid object index." ; }; - String SbERR_NO_ACTIVE_OBJECT & ERRCODE_RES_MASK + String ERRCODE_BASIC_NO_ACTIVE_OBJECT & ERRCODE_RES_MASK { Text [ en-US ] = "Object is not available." ; }; - String SbERR_BAD_PROP_VALUE & ERRCODE_RES_MASK + String ERRCODE_BASIC_BAD_PROP_VALUE & ERRCODE_RES_MASK { Text [ en-US ] = "Incorrect property value." ; }; - String SbERR_PROP_READONLY & ERRCODE_RES_MASK + String ERRCODE_BASIC_PROP_READONLY & ERRCODE_RES_MASK { Text [ en-US ] = "This property is read-only." ; }; - String SbERR_PROP_WRITEONLY & ERRCODE_RES_MASK + String ERRCODE_BASIC_PROP_WRITEONLY & ERRCODE_RES_MASK { Text [ en-US ] = "This property is write only." ; }; - String SbERR_INVALID_OBJECT & ERRCODE_RES_MASK + String ERRCODE_BASIC_INVALID_OBJECT & ERRCODE_RES_MASK { Text [ en-US ] = "Invalid object reference." ; }; - String SbERR_NO_METHOD & ERRCODE_RES_MASK + String ERRCODE_BASIC_NO_METHOD & ERRCODE_RES_MASK { Text [ en-US ] = "Property or method not found: $(ARG1)." ; }; - String SbERR_NEEDS_OBJECT & ERRCODE_RES_MASK + String ERRCODE_BASIC_NEEDS_OBJECT & ERRCODE_RES_MASK { Text [ en-US ] = "Object required." ; }; - String SbERR_INVALID_USAGE_OBJECT & ERRCODE_RES_MASK + String ERRCODE_BASIC_INVALID_USAGE_OBJECT & ERRCODE_RES_MASK { Text [ en-US ] = "Invalid use of an object." ; }; - String SbERR_NO_OLE & ERRCODE_RES_MASK + String ERRCODE_BASIC_NO_OLE & ERRCODE_RES_MASK { Text [ en-US ] = "OLE Automation is not supported by this object." ; }; - String SbERR_BAD_METHOD & ERRCODE_RES_MASK + String ERRCODE_BASIC_BAD_METHOD & ERRCODE_RES_MASK { Text [ en-US ] = "This property or method is not supported by the object." ; }; - String SbERR_OLE_ERROR & ERRCODE_RES_MASK + String ERRCODE_BASIC_OLE_ERROR & ERRCODE_RES_MASK { Text [ en-US ] = "OLE Automation Error." ; }; - String SbERR_BAD_ACTION & ERRCODE_RES_MASK + String ERRCODE_BASIC_BAD_ACTION & ERRCODE_RES_MASK { Text [ en-US ] = "This action is not supported by given object." ; }; - String SbERR_NO_NAMED_ARGS & ERRCODE_RES_MASK + String ERRCODE_BASIC_NO_NAMED_ARGS & ERRCODE_RES_MASK { Text [ en-US ] = "Named arguments are not supported by given object." ; }; - String SbERR_BAD_LOCALE & ERRCODE_RES_MASK + String ERRCODE_BASIC_BAD_LOCALE & ERRCODE_RES_MASK { Text [ en-US ] = "The current locale setting is not supported by the given object." ; }; - String SbERR_NAMED_NOT_FOUND & ERRCODE_RES_MASK + String ERRCODE_BASIC_NAMED_NOT_FOUND & ERRCODE_RES_MASK { Text [ en-US ] = "Named argument not found." ; }; - String SbERR_NOT_OPTIONAL & ERRCODE_RES_MASK + String ERRCODE_BASIC_NOT_OPTIONAL & ERRCODE_RES_MASK { Text [ en-US ] = "Argument is not optional." ; }; - String SbERR_WRONG_ARGS & ERRCODE_RES_MASK + String ERRCODE_BASIC_WRONG_ARGS & ERRCODE_RES_MASK { Text [ en-US ] = "Invalid number of arguments." ; }; - String SbERR_NOT_A_COLL & ERRCODE_RES_MASK + String ERRCODE_BASIC_NOT_A_COLL & ERRCODE_RES_MASK { Text [ en-US ] = "Object is not a list." ; }; - String SbERR_BAD_ORDINAL & ERRCODE_RES_MASK + String ERRCODE_BASIC_BAD_ORDINAL & ERRCODE_RES_MASK { Text [ en-US ] = "Invalid ordinal number." ; }; - String SbERR_DLLPROC_NOT_FOUND & ERRCODE_RES_MASK + String ERRCODE_BASIC_DLLPROC_NOT_FOUND & ERRCODE_RES_MASK { Text [ en-US ] = "Specified DLL function not found." ; }; - String SbERR_BAD_CLIPBD_FORMAT & ERRCODE_RES_MASK + String ERRCODE_BASIC_BAD_CLIPBD_FORMAT & ERRCODE_RES_MASK { Text [ en-US ] = "Invalid clipboard format." ; }; - String SbERR_PROPERTY_NOT_FOUND & ERRCODE_RES_MASK + String ERRCODE_BASIC_PROPERTY_NOT_FOUND & ERRCODE_RES_MASK { Text [ en-US ] = "Object does not have this property." ; }; - String SbERR_METHOD_NOT_FOUND & ERRCODE_RES_MASK + String ERRCODE_BASIC_METHOD_NOT_FOUND & ERRCODE_RES_MASK { Text [ en-US ] = "Object does not have this method." ; }; - String SbERR_ARG_MISSING & ERRCODE_RES_MASK + String ERRCODE_BASIC_ARG_MISSING & ERRCODE_RES_MASK { Text [ en-US ] = "Required argument lacking." ; }; - String SbERR_BAD_NUMBER_OF_ARGS & ERRCODE_RES_MASK + String ERRCODE_BASIC_BAD_NUMBER_OF_ARGS & ERRCODE_RES_MASK { Text [ en-US ] = "Invalid number of arguments." ; }; - String SbERR_METHOD_FAILED & ERRCODE_RES_MASK + String ERRCODE_BASIC_METHOD_FAILED & ERRCODE_RES_MASK { Text [ en-US ] = "Error executing a method." ; }; - String SbERR_SETPROP_FAILED & ERRCODE_RES_MASK + String ERRCODE_BASIC_SETPROP_FAILED & ERRCODE_RES_MASK { Text [ en-US ] = "Unable to set property." ; }; - String SbERR_GETPROP_FAILED & ERRCODE_RES_MASK + String ERRCODE_BASIC_GETPROP_FAILED & ERRCODE_RES_MASK { Text [ en-US ] = "Unable to determine property." ; }; // Compiler errors. These are not runtime errors. - String SbERR_UNEXPECTED & ERRCODE_RES_MASK + String ERRCODE_BASIC_UNEXPECTED & ERRCODE_RES_MASK { Text [ en-US ] = "Unexpected symbol: $(ARG1)." ; }; - String SbERR_EXPECTED & ERRCODE_RES_MASK + String ERRCODE_BASIC_EXPECTED & ERRCODE_RES_MASK { Text [ en-US ] = "Expected: $(ARG1)." ; }; - String SbERR_SYMBOL_EXPECTED & ERRCODE_RES_MASK + String ERRCODE_BASIC_SYMBOL_EXPECTED & ERRCODE_RES_MASK { Text [ en-US ] = "Symbol expected." ; }; - String SbERR_VAR_EXPECTED & ERRCODE_RES_MASK + String ERRCODE_BASIC_VAR_EXPECTED & ERRCODE_RES_MASK { Text [ en-US ] = "Variable expected." ; }; - String SbERR_LABEL_EXPECTED & ERRCODE_RES_MASK + String ERRCODE_BASIC_LABEL_EXPECTED & ERRCODE_RES_MASK { Text [ en-US ] = "Label expected." ; }; - String SbERR_LVALUE_EXPECTED & ERRCODE_RES_MASK + String ERRCODE_BASIC_LVALUE_EXPECTED & ERRCODE_RES_MASK { Text [ en-US ] = "Value cannot be applied." ; }; - String SbERR_VAR_DEFINED & ERRCODE_RES_MASK + String ERRCODE_BASIC_VAR_DEFINED & ERRCODE_RES_MASK { Text [ en-US ] = "Variable $(ARG1) already defined." ; }; - String SbERR_PROC_DEFINED & ERRCODE_RES_MASK + String ERRCODE_BASIC_PROC_DEFINED & ERRCODE_RES_MASK { Text [ en-US ] = "Sub procedure or function procedure $(ARG1) already defined." ; }; - String SbERR_LABEL_DEFINED & ERRCODE_RES_MASK + String ERRCODE_BASIC_LABEL_DEFINED & ERRCODE_RES_MASK { Text [ en-US ] = "Label $(ARG1) already defined." ; }; - String SbERR_UNDEF_VAR & ERRCODE_RES_MASK + String ERRCODE_BASIC_UNDEF_VAR & ERRCODE_RES_MASK { Text [ en-US ] = "Variable $(ARG1) not found." ; }; - String SbERR_UNDEF_ARRAY & ERRCODE_RES_MASK + String ERRCODE_BASIC_UNDEF_ARRAY & ERRCODE_RES_MASK { Text [ en-US ] = "Array or procedure $(ARG1) not found." ; }; - String SbERR_UNDEF_PROC & ERRCODE_RES_MASK + String ERRCODE_BASIC_UNDEF_PROC & ERRCODE_RES_MASK { Text [ en-US ] = "Procedure $(ARG1) not found." ; }; - String SbERR_UNDEF_LABEL & ERRCODE_RES_MASK + String ERRCODE_BASIC_UNDEF_LABEL & ERRCODE_RES_MASK { Text [ en-US ] = "Label $(ARG1) undefined." ; }; - String SbERR_UNDEF_TYPE & ERRCODE_RES_MASK + String ERRCODE_BASIC_UNDEF_TYPE & ERRCODE_RES_MASK { Text [ en-US ] = "Unknown data type $(ARG1)." ; }; - String SbERR_BAD_EXIT & ERRCODE_RES_MASK + String ERRCODE_BASIC_BAD_EXIT & ERRCODE_RES_MASK { Text [ en-US ] = "Exit $(ARG1) expected." ; }; - String SbERR_BAD_BLOCK & ERRCODE_RES_MASK + String ERRCODE_BASIC_BAD_BLOCK & ERRCODE_RES_MASK { Text [ en-US ] = "Statement block still open: $(ARG1) missing." ; }; - String SbERR_BAD_BRACKETS & ERRCODE_RES_MASK + String ERRCODE_BASIC_BAD_BRACKETS & ERRCODE_RES_MASK { Text [ en-US ] = "Parentheses do not match." ; }; - String SbERR_BAD_DECLARATION & ERRCODE_RES_MASK + String ERRCODE_BASIC_BAD_DECLARATION & ERRCODE_RES_MASK { Text [ en-US ] = "Symbol $(ARG1) already defined differently." ; }; - String SbERR_BAD_PARAMETERS & ERRCODE_RES_MASK + String ERRCODE_BASIC_BAD_PARAMETERS & ERRCODE_RES_MASK { Text [ en-US ] = "Parameters do not correspond to procedure." ; }; - String SbERR_BAD_CHAR_IN_NUMBER & ERRCODE_RES_MASK + String ERRCODE_BASIC_BAD_CHAR_IN_NUMBER & ERRCODE_RES_MASK { Text [ en-US ] = "Invalid character in number." ; }; - String SbERR_MUST_HAVE_DIMS & ERRCODE_RES_MASK + String ERRCODE_BASIC_MUST_HAVE_DIMS & ERRCODE_RES_MASK { Text [ en-US ] = "Array must be dimensioned." ; }; - String SbERR_NO_IF & ERRCODE_RES_MASK + String ERRCODE_BASIC_NO_IF & ERRCODE_RES_MASK { Text [ en-US ] = "Else/Endif without If." ; }; - String SbERR_NOT_IN_SUBR & ERRCODE_RES_MASK + String ERRCODE_BASIC_NOT_IN_SUBR & ERRCODE_RES_MASK { Text [ en-US ] = "$(ARG1) not allowed within a procedure." ; }; - String SbERR_NOT_IN_MAIN & ERRCODE_RES_MASK + String ERRCODE_BASIC_NOT_IN_MAIN & ERRCODE_RES_MASK { Text [ en-US ] = "$(ARG1) not allowed outside a procedure." ; }; - String SbERR_WRONG_DIMS & ERRCODE_RES_MASK + String ERRCODE_BASIC_WRONG_DIMS & ERRCODE_RES_MASK { Text [ en-US ] = "Dimension specifications do not match." ; }; - String SbERR_BAD_OPTION & ERRCODE_RES_MASK + String ERRCODE_BASIC_BAD_OPTION & ERRCODE_RES_MASK { Text [ en-US ] = "Unknown option: $(ARG1)." ; }; - String SbERR_CONSTANT_REDECLARED & ERRCODE_RES_MASK + String ERRCODE_BASIC_CONSTANT_REDECLARED & ERRCODE_RES_MASK { Text [ en-US ] = "Constant $(ARG1) redefined." ; }; - String SbERR_PROG_TOO_LARGE & ERRCODE_RES_MASK + String ERRCODE_BASIC_PROG_TOO_LARGE & ERRCODE_RES_MASK { Text [ en-US ] = "Program too large." ; }; - String SbERR_NO_STRINGS_ARRAYS & ERRCODE_RES_MASK + String ERRCODE_BASIC_NO_STRINGS_ARRAYS & ERRCODE_RES_MASK { Text [ en-US ] = "Strings or arrays not permitted." ; }; diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 1812ac49af7b..92d59521042f 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -585,7 +585,7 @@ static void implSequenceToMultiDimArray( SbxDimArray*& pArray, Sequence< sal_Int // should equal number of dimensions in the array ) // And that should at least be 1 ! // #QUESTION is there a better error? - StarBASIC::Error( SbERR_INVALID_OBJECT ); + StarBASIC::Error( ERRCODE_BASIC_INVALID_OBJECT ); return; } @@ -1152,7 +1152,7 @@ static Any implRekMultiDimArrayToSequence( SbxDimArray* pArray, } catch (const IndexOutOfBoundsException&) { - StarBASIC::Error( SbERR_OUT_OF_RANGE ); + StarBASIC::Error( ERRCODE_BASIC_OUT_OF_RANGE ); } } return aRetVal; @@ -1368,7 +1368,7 @@ Any sbxToUnoValue( const SbxValue* pVar, const Type& rType, Property* pUnoProper } catch (const IndexOutOfBoundsException&) { - StarBASIC::Error( SbERR_OUT_OF_RANGE ); + StarBASIC::Error( ERRCODE_BASIC_OUT_OF_RANGE ); } } } @@ -2080,7 +2080,7 @@ void SbUnoObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) StructRefInfo aMember = maStructInfo->getStructMember( pProp->GetName() ); if ( aMember.isEmpty() ) { - StarBASIC::Error( SbERR_PROPERTY_NOT_FOUND ); + StarBASIC::Error( ERRCODE_BASIC_PROPERTY_NOT_FOUND ); } else { @@ -2149,7 +2149,7 @@ void SbUnoObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) { if( pProp->aUnoProp.Attributes & PropertyAttribute::READONLY ) { - StarBASIC::Error( SbERR_PROP_READONLY ); + StarBASIC::Error( ERRCODE_BASIC_PROP_READONLY ); return; } if ( maStructInfo.get() ) @@ -2157,7 +2157,7 @@ void SbUnoObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) StructRefInfo aMember = maStructInfo->getStructMember( pProp->GetName() ); if ( aMember.isEmpty() ) { - StarBASIC::Error( SbERR_PROPERTY_NOT_FOUND ); + StarBASIC::Error( ERRCODE_BASIC_PROPERTY_NOT_FOUND ); } else { @@ -2237,7 +2237,7 @@ void SbUnoObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) if( rxClass->getTypeClass() != TypeClass_ANY ) { bError = true; - StarBASIC::Error( SbERR_NOT_OPTIONAL ); + StarBASIC::Error( ERRCODE_BASIC_NOT_OPTIONAL ); } } if( !bError ) @@ -2969,7 +2969,7 @@ void RTL_Impl_CreateUnoStruct( StarBASIC* pBasic, SbxArray& rPar, bool bWrite ) // We need 1 parameter minimum if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -2995,7 +2995,7 @@ void RTL_Impl_CreateUnoService( StarBASIC* pBasic, SbxArray& rPar, bool bWrite ) // We need 1 Parameter minimum if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -3046,7 +3046,7 @@ void RTL_Impl_CreateUnoServiceWithArguments( StarBASIC* pBasic, SbxArray& rPar, // We need 2 parameter minimum if ( rPar.Count() < 3 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -3119,7 +3119,7 @@ void RTL_Impl_HasInterfaces( StarBASIC* pBasic, SbxArray& rPar, bool bWrite ) sal_uInt16 nParCount = rPar.Count(); if( nParCount < 3 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -3180,7 +3180,7 @@ void RTL_Impl_IsUnoStruct( StarBASIC* pBasic, SbxArray& rPar, bool bWrite ) // We need 1 parameter minimum if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -3215,7 +3215,7 @@ void RTL_Impl_EqualUnoObjects( StarBASIC* pBasic, SbxArray& rPar, bool bWrite ) if ( rPar.Count() < 3 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -3673,7 +3673,7 @@ void SbUnoService::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) if( !bRestParameterMode || nDiff > 1 ) { bParameterError = true; - StarBASIC::Error( SbERR_NOT_OPTIONAL ); + StarBASIC::Error( ERRCODE_BASIC_NOT_OPTIONAL ); } } @@ -3856,7 +3856,7 @@ void SbUnoSingleton::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) if( nParamCount > nAllowedParamCount ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -4157,7 +4157,7 @@ void SbRtl_CreateUnoListener( StarBASIC* pBasic, SbxArray& rPar, bool bWrite ) // We need 2 parameters if ( rPar.Count() != 3 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -4237,7 +4237,7 @@ void RTL_Impl_CreateUnoValue( StarBASIC* pBasic, SbxArray& rPar, bool bWrite ) // 2 parameters needed if ( rPar.Count() != 3 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -4390,7 +4390,7 @@ void SAL_CALL ModuleInvocationProxy::setValue(const OUString& rProperty, const A if( pMeth == NULL ) { // TODO: Check vba behavior concernig missing function - //StarBASIC::Error( SbERR_NO_METHOD, aFunctionName ); + //StarBASIC::Error( ERRCODE_BASIC_NO_METHOD, aFunctionName ); throw UnknownPropertyException(); } @@ -4430,7 +4430,7 @@ Any SAL_CALL ModuleInvocationProxy::getValue(const OUString& rProperty) if( pMeth == NULL ) { // TODO: Check vba behavior concernig missing function - //StarBASIC::Error( SbERR_NO_METHOD, aFunctionName ); + //StarBASIC::Error( ERRCODE_BASIC_NO_METHOD, aFunctionName ); throw UnknownPropertyException(); } @@ -4487,7 +4487,7 @@ Any SAL_CALL ModuleInvocationProxy::invoke( const OUString& rFunction, if( pMeth == NULL ) { // TODO: Check vba behavior concernig missing function - //StarBASIC::Error( SbERR_NO_METHOD, aFunctionName ); + //StarBASIC::Error( ERRCODE_BASIC_NO_METHOD, aFunctionName ); return aRet; } @@ -5055,7 +5055,7 @@ void SbUnoStructRefObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) unoToSbxValue( pVar, aRetAny ); } else - StarBASIC::Error( SbERR_PROPERTY_NOT_FOUND ); + StarBASIC::Error( ERRCODE_BASIC_PROPERTY_NOT_FOUND ); } else if( pHint->GetId() == SBX_HINT_DATACHANGED ) { @@ -5066,7 +5066,7 @@ void SbUnoStructRefObject::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) it->second->setValue( aAnyValue ); } else - StarBASIC::Error( SbERR_PROPERTY_NOT_FOUND ); + StarBASIC::Error( ERRCODE_BASIC_PROPERTY_NOT_FOUND ); } } else diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx index 7e04ce1a0d19..3ced4948fe60 100644 --- a/basic/source/classes/sbxmod.cxx +++ b/basic/source/classes/sbxmod.cxx @@ -833,7 +833,7 @@ void SbModule::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) if( pMeth->bInvalid && !Compile() ) { // auto compile has not worked! - StarBASIC::Error( SbERR_BAD_PROP_VALUE ); + StarBASIC::Error( ERRCODE_BASIC_BAD_PROP_VALUE ); } else { @@ -1245,7 +1245,7 @@ void SbModule::Run( SbMethod* pMeth ) else { GetSbData()->pInst->nCallLvl--; // Call-Level down again - StarBASIC::FatalError( SbERR_STACK_OVERFLOW ); + StarBASIC::FatalError( ERRCODE_BASIC_STACK_OVERFLOW ); } StarBASIC* pBasic = PTR_CAST(StarBASIC,GetParent()); @@ -1517,7 +1517,7 @@ const sal_uInt8* SbModule::FindNextStmnt( const sal_uInt8* p, sal_uInt16& nLine, p += 8, nPC += 8; else if( !( eOp >= SbOP0_START && eOp <= SbOP0_END ) ) { - StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); + StarBASIC::FatalError( ERRCODE_BASIC_INTERNAL_ERROR ); break; } } @@ -2097,7 +2097,7 @@ ErrCode SbMethod::Call( SbxValue* pRet, SbxVariable* pCaller ) // #104083: Compile BEFORE get if( bInvalid && !pMod_->Compile() ) - StarBASIC::Error( SbERR_BAD_PROP_VALUE ); + StarBASIC::Error( ERRCODE_BASIC_BAD_PROP_VALUE ); Get( aVals ); if ( pRet ) 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; } diff --git a/basic/source/inc/runtime.hxx b/basic/source/inc/runtime.hxx index acf374702f7c..cf4ba44599a7 100644 --- a/basic/source/inc/runtime.hxx +++ b/basic/source/inc/runtime.hxx @@ -415,7 +415,7 @@ public: inline void checkArithmeticOverflow( double d ) { if( !::rtl::math::isFinite( d ) ) - StarBASIC::Error( SbERR_MATH_OVERFLOW ); + StarBASIC::Error( ERRCODE_BASIC_MATH_OVERFLOW ); } inline void checkArithmeticOverflow( SbxVariable* pVar ) diff --git a/basic/source/runtime/ddectrl.cxx b/basic/source/runtime/ddectrl.cxx index d4aab312dd01..7f7d2a792357 100644 --- a/basic/source/runtime/ddectrl.cxx +++ b/basic/source/runtime/ddectrl.cxx @@ -29,24 +29,24 @@ static const SbError nDdeErrMap[] = { - /* DMLERR_ADVACKTIMEOUT */ 0x4000, SbERR_DDE_TIMEOUT, - /* DMLERR_BUSY */ 0x4001, SbERR_DDE_BUSY, - /* DMLERR_DATAACKTIMEOUT */ 0x4002, SbERR_DDE_TIMEOUT, - /* DMLERR_DLL_NOT_INITIALIZED */ 0x4003, SbERR_DDE_ERROR, - /* DMLERR_DLL_USAGE */ 0x4004, SbERR_DDE_ERROR, - /* DMLERR_EXECACKTIMEOUT */ 0x4005, SbERR_DDE_TIMEOUT, - /* DMLERR_INVALIDPARAMETER */ 0x4006, SbERR_DDE_ERROR, - /* DMLERR_LOW_MEMORY */ 0x4007, SbERR_DDE_ERROR, - /* DMLERR_MEMORY_ERROR */ 0x4008, SbERR_DDE_ERROR, - /* DMLERR_NOTPROCESSED */ 0x4009, SbERR_DDE_NOTPROCESSED, - /* DMLERR_NO_CONV_ESTABLISHED */ 0x400a, SbERR_DDE_NO_CHANNEL, - /* DMLERR_POKEACKTIMEOUT */ 0x400b, SbERR_DDE_TIMEOUT, - /* DMLERR_POSTMSG_FAILED */ 0x400c, SbERR_DDE_QUEUE_OVERFLOW, - /* DMLERR_REENTRANCY */ 0x400d, SbERR_DDE_ERROR, - /* DMLERR_SERVER_DIED */ 0x400e, SbERR_DDE_PARTNER_QUIT, - /* DMLERR_SYS_ERROR */ 0x400f, SbERR_DDE_ERROR, - /* DMLERR_UNADVACKTIMEOUT */ 0x4010, SbERR_DDE_TIMEOUT, - /* DMLERR_UNFOUND_QUEUE_ID */ 0x4011, SbERR_DDE_NO_CHANNEL + /* DMLERR_ADVACKTIMEOUT */ 0x4000, ERRCODE_BASIC_DDE_TIMEOUT, + /* DMLERR_BUSY */ 0x4001, ERRCODE_BASIC_DDE_BUSY, + /* DMLERR_DATAACKTIMEOUT */ 0x4002, ERRCODE_BASIC_DDE_TIMEOUT, + /* DMLERR_DLL_NOT_INITIALIZED */ 0x4003, ERRCODE_BASIC_DDE_ERROR, + /* DMLERR_DLL_USAGE */ 0x4004, ERRCODE_BASIC_DDE_ERROR, + /* DMLERR_EXECACKTIMEOUT */ 0x4005, ERRCODE_BASIC_DDE_TIMEOUT, + /* DMLERR_INVALIDPARAMETER */ 0x4006, ERRCODE_BASIC_DDE_ERROR, + /* DMLERR_LOW_MEMORY */ 0x4007, ERRCODE_BASIC_DDE_ERROR, + /* DMLERR_MEMORY_ERROR */ 0x4008, ERRCODE_BASIC_DDE_ERROR, + /* DMLERR_NOTPROCESSED */ 0x4009, ERRCODE_BASIC_DDE_NOTPROCESSED, + /* DMLERR_NO_CONV_ESTABLISHED */ 0x400a, ERRCODE_BASIC_DDE_NO_CHANNEL, + /* DMLERR_POKEACKTIMEOUT */ 0x400b, ERRCODE_BASIC_DDE_TIMEOUT, + /* DMLERR_POSTMSG_FAILED */ 0x400c, ERRCODE_BASIC_DDE_QUEUE_OVERFLOW, + /* DMLERR_REENTRANCY */ 0x400d, ERRCODE_BASIC_DDE_ERROR, + /* DMLERR_SERVER_DIED */ 0x400e, ERRCODE_BASIC_DDE_PARTNER_QUIT, + /* DMLERR_SYS_ERROR */ 0x400f, ERRCODE_BASIC_DDE_ERROR, + /* DMLERR_UNADVACKTIMEOUT */ 0x4010, ERRCODE_BASIC_DDE_TIMEOUT, + /* DMLERR_UNFOUND_QUEUE_ID */ 0x4011, ERRCODE_BASIC_DDE_NO_CHANNEL }; SbError SbiDdeControl::GetLastErr( DdeConnection* pConv ) @@ -62,7 +62,7 @@ SbError SbiDdeControl::GetLastErr( DdeConnection* pConv ) } if( nErr < DDE_FIRSTERR || nErr > DDE_LASTERR ) { - return SbERR_DDE_ERROR; + return ERRCODE_BASIC_DDE_ERROR; } return nDdeErrMap[ 2 * (nErr - DDE_FIRSTERR) + 1 ]; } @@ -123,13 +123,13 @@ SbError SbiDdeControl::Terminate( size_t nChannel ) { if (!nChannel || nChannel > aConvList.size()) { - return SbERR_DDE_NO_CHANNEL; + return ERRCODE_BASIC_DDE_NO_CHANNEL; } DdeConnection* pConv = aConvList[nChannel-1]; if( pConv == DDE_FREECHANNEL ) { - return SbERR_DDE_NO_CHANNEL; + return ERRCODE_BASIC_DDE_NO_CHANNEL; } delete pConv; aConvList[nChannel-1] = DDE_FREECHANNEL; @@ -158,14 +158,14 @@ SbError SbiDdeControl::Request( size_t nChannel, const OUString& rItem, OUString { if (!nChannel || nChannel > aConvList.size()) { - return SbERR_DDE_NO_CHANNEL; + return ERRCODE_BASIC_DDE_NO_CHANNEL; } DdeConnection* pConv = aConvList[nChannel-1]; if( pConv == DDE_FREECHANNEL ) { - return SbERR_DDE_NO_CHANNEL; + return ERRCODE_BASIC_DDE_NO_CHANNEL; } DdeRequest aRequest( *pConv, rItem, 30000 ); @@ -179,14 +179,14 @@ SbError SbiDdeControl::Execute( size_t nChannel, const OUString& rCommand ) { if (!nChannel || nChannel > aConvList.size()) { - return SbERR_DDE_NO_CHANNEL; + return ERRCODE_BASIC_DDE_NO_CHANNEL; } DdeConnection* pConv = aConvList[nChannel-1]; if( pConv == DDE_FREECHANNEL ) { - return SbERR_DDE_NO_CHANNEL; + return ERRCODE_BASIC_DDE_NO_CHANNEL; } DdeExecute aRequest( *pConv, rCommand, 30000 ); aRequest.Execute(); @@ -197,13 +197,13 @@ SbError SbiDdeControl::Poke( size_t nChannel, const OUString& rItem, const OUStr { if (!nChannel || nChannel > aConvList.size()) { - return SbERR_DDE_NO_CHANNEL; + return ERRCODE_BASIC_DDE_NO_CHANNEL; } DdeConnection* pConv = aConvList[nChannel-1]; if( pConv == DDE_FREECHANNEL ) { - return SbERR_DDE_NO_CHANNEL; + return ERRCODE_BASIC_DDE_NO_CHANNEL; } DdePoke aRequest( *pConv, rItem, DdeData(rData), 30000 ); aRequest.Execute(); diff --git a/basic/source/runtime/inputbox.cxx b/basic/source/runtime/inputbox.cxx index e993bed63cb8..787ed43b0570 100644 --- a/basic/source/runtime/inputbox.cxx +++ b/basic/source/runtime/inputbox.cxx @@ -160,7 +160,7 @@ RTLFUNC(InputBox) sal_uInt32 nArgCount = rPar.Count(); if ( nArgCount < 2 ) - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); else { OUString aTitle; @@ -175,7 +175,7 @@ RTLFUNC(InputBox) { if ( nArgCount != 6 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } nX = rPar.Get(4)->GetLong(); diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx index 396d95b449b6..7b1288e64a8b 100644 --- a/basic/source/runtime/iosys.cxx +++ b/basic/source/runtime/iosys.cxx @@ -160,25 +160,25 @@ void SbiStream::MapError() nError = 0; break; case SVSTREAM_FILE_NOT_FOUND: - nError = SbERR_FILE_NOT_FOUND; + nError = ERRCODE_BASIC_FILE_NOT_FOUND; break; case SVSTREAM_PATH_NOT_FOUND: - nError = SbERR_PATH_NOT_FOUND; + nError = ERRCODE_BASIC_PATH_NOT_FOUND; break; case SVSTREAM_TOO_MANY_OPEN_FILES: - nError = SbERR_TOO_MANY_FILES; + nError = ERRCODE_BASIC_TOO_MANY_FILES; break; case SVSTREAM_ACCESS_DENIED: - nError = SbERR_ACCESS_DENIED; + nError = ERRCODE_BASIC_ACCESS_DENIED; break; case SVSTREAM_INVALID_PARAMETER: - nError = SbERR_BAD_ARGUMENT; + nError = ERRCODE_BASIC_BAD_ARGUMENT; break; case SVSTREAM_OUTOFMEMORY: - nError = SbERR_NO_MEMORY; + nError = ERRCODE_BASIC_NO_MEMORY; break; default: - nError = SbERR_IO_ERROR; + nError = ERRCODE_BASIC_IO_ERROR; break; } } @@ -663,7 +663,7 @@ SbError SbiStream::Read(OString& rBuf, sal_uInt16 n, bool bForceReadingPerByte) } if( !n ) { - return nError = SbERR_BAD_RECORD_LENGTH; + return nError = ERRCODE_BASIC_BAD_RECORD_LENGTH; } OStringBuffer aBuffer(read_uInt8s_ToOString(*pStrm, n)); //Pad it out with ' ' to the requested length on short read @@ -674,7 +674,7 @@ SbError SbiStream::Read(OString& rBuf, sal_uInt16 n, bool bForceReadingPerByte) MapError(); if( !nError && pStrm->IsEof() ) { - nError = SbERR_READ_PAST_EOF; + nError = ERRCODE_BASIC_READ_PAST_EOF; } return nError; } @@ -756,7 +756,7 @@ SbError SbiStream::Write( const OString& rBuf, sal_uInt16 n ) } if( !n ) { - return nError = SbERR_BAD_RECORD_LENGTH; + return nError = ERRCODE_BASIC_BAD_RECORD_LENGTH; } pStrm->Write(rBuf.getStr(), n); MapError(); @@ -799,11 +799,11 @@ void SbiIoSystem::Open(short nCh, const OString& rName, StreamMode nMode, short nError = 0; if( nCh >= CHANNELS || !nCh ) { - nError = SbERR_BAD_CHANNEL; + nError = ERRCODE_BASIC_BAD_CHANNEL; } else if( pChan[ nCh ] ) { - nError = SbERR_FILE_ALREADY_OPEN; + nError = ERRCODE_BASIC_FILE_ALREADY_OPEN; } else { @@ -822,11 +822,11 @@ void SbiIoSystem::Close() { if( !nChan ) { - nError = SbERR_BAD_CHANNEL; + nError = ERRCODE_BASIC_BAD_CHANNEL; } else if( !pChan[ nChan ] ) { - nError = SbERR_BAD_CHANNEL; + nError = ERRCODE_BASIC_BAD_CHANNEL; } else { @@ -876,7 +876,7 @@ void SbiIoSystem::Read(OString& rBuf, short n) } else if( !pChan[ nChan ] ) { - nError = SbERR_BAD_CHANNEL; + nError = ERRCODE_BASIC_BAD_CHANNEL; } else { @@ -899,7 +899,7 @@ char SbiIoSystem::Read() } else if( !pChan[ nChan ] ) { - nError = SbERR_BAD_CHANNEL; + nError = ERRCODE_BASIC_BAD_CHANNEL; } else { @@ -916,7 +916,7 @@ void SbiIoSystem::Write(const OUString& rBuf, short n) } else if( !pChan[ nChan ] ) { - nError = SbERR_BAD_CHANNEL; + nError = ERRCODE_BASIC_BAD_CHANNEL; } else { @@ -970,7 +970,7 @@ void SbiIoSystem::ReadCon(OString& rIn) } else { - nError = SbERR_USER_ABORT; + nError = ERRCODE_BASIC_USER_ABORT; } aPrompt.clear(); } @@ -1009,7 +1009,7 @@ void SbiIoSystem::WriteCon(const OUString& rText) WinBits( WB_OK_CANCEL | WB_DEF_OK ), OUString(), s )->Execute() ) { - nError = SbERR_USER_ABORT; + nError = ERRCODE_BASIC_USER_ABORT; } } } diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 424a747ed7cf..d240705608cf 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -186,7 +186,7 @@ RTLFUNC(CreateObject) OUString aClass( rPar.Get( 1 )->GetOUString() ); SbxObjectRef p = SbxBase::CreateObject( aClass ); if( !p ) - StarBASIC::Error( SbERR_CANNOT_LOAD ); + StarBASIC::Error( ERRCODE_BASIC_CANNOT_LOAD ); else { // Convenience: enter BASIC as parent @@ -202,7 +202,7 @@ RTLFUNC(Error) (void)bWrite; if( !pBasic ) - StarBASIC::Error( SbERR_INTERNAL_ERROR ); + StarBASIC::Error( ERRCODE_BASIC_INTERNAL_ERROR ); else { OUString aErrorMsg; @@ -218,7 +218,7 @@ RTLFUNC(Error) nCode = rPar.Get( 1 )->GetLong(); if( nCode > 65535L ) { - StarBASIC::Error( SbERR_CONVERSION ); + StarBASIC::Error( ERRCODE_BASIC_CONVERSION ); } else { @@ -260,7 +260,7 @@ RTLFUNC(Sin) (void)bWrite; if ( rPar.Count() < 2 ) - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); else { SbxVariableRef pArg = rPar.Get( 1 ); @@ -275,7 +275,7 @@ RTLFUNC(Cos) (void)bWrite; if ( rPar.Count() < 2 ) - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); else { SbxVariableRef pArg = rPar.Get( 1 ); @@ -290,7 +290,7 @@ RTLFUNC(Atn) (void)bWrite; if ( rPar.Count() < 2 ) - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); else { SbxVariableRef pArg = rPar.Get( 1 ); @@ -307,7 +307,7 @@ RTLFUNC(Abs) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -324,7 +324,7 @@ RTLFUNC(Asc) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -332,7 +332,7 @@ RTLFUNC(Asc) OUString aStr( pArg->GetOUString() ); if ( aStr.isEmpty()) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); rPar.Get(0)->PutEmpty(); } else @@ -347,7 +347,7 @@ void implChr( SbxArray& rPar, bool bChrW ) { if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -403,7 +403,7 @@ RTLFUNC(CurDir) OUString aDrive = rPar.Get(1)->GetOUString(); if ( aDrive.getLength() != 1 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } else @@ -411,7 +411,7 @@ RTLFUNC(CurDir) nCurDir = (int)aDrive[0]; if ( !isalpha( nCurDir ) ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } else @@ -427,7 +427,7 @@ RTLFUNC(CurDir) } else { - StarBASIC::Error( SbERR_NO_DEVICE ); + StarBASIC::Error( ERRCODE_BASIC_NO_DEVICE ); } delete [] pBuffer; @@ -442,7 +442,7 @@ RTLFUNC(CurDir) pMem.reset(new char[nSize]); if( !pMem ) { - StarBASIC::Error( SbERR_NO_MEMORY ); + StarBASIC::Error( ERRCODE_BASIC_NO_MEMORY ); return; } if( getcwd( pMem.get(), nSize-1 ) != NULL ) @@ -452,7 +452,7 @@ RTLFUNC(CurDir) } if( errno != ERANGE ) { - StarBASIC::Error( SbERR_INTERNAL_ERROR ); + StarBASIC::Error( ERRCODE_BASIC_INTERNAL_ERROR ); return; } nSize += PATH_INCR; @@ -476,7 +476,7 @@ RTLFUNC(ChDir) } else { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } } @@ -488,7 +488,7 @@ RTLFUNC(ChDrive) rPar.Get(0)->PutEmpty(); if (rPar.Count() != 2) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } } @@ -504,14 +504,14 @@ void implStepRenameUCB( const OUString& aSource, const OUString& aDest ) OUString aSourceFullPath = getFullPath( aSource ); if( !xSFI->exists( aSourceFullPath ) ) { - StarBASIC::Error( SbERR_FILE_NOT_FOUND ); + StarBASIC::Error( ERRCODE_BASIC_FILE_NOT_FOUND ); return; } OUString aDestFullPath = getFullPath( aDest ); if( xSFI->exists( aDestFullPath ) ) { - StarBASIC::Error( SbERR_FILE_EXISTS ); + StarBASIC::Error( ERRCODE_BASIC_FILE_EXISTS ); } else { @@ -520,7 +520,7 @@ void implStepRenameUCB( const OUString& aSource, const OUString& aDest ) } catch(const Exception & ) { - StarBASIC::Error( SbERR_FILE_NOT_FOUND ); + StarBASIC::Error( ERRCODE_BASIC_FILE_NOT_FOUND ); } } } @@ -531,7 +531,7 @@ void implStepRenameOSL( const OUString& aSource, const OUString& aDest ) FileBase::RC nRet = File::move( getFullPath( aSource ), getFullPath( aDest ) ); if( nRet != FileBase::E_None ) { - StarBASIC::Error( SbERR_PATH_NOT_FOUND ); + StarBASIC::Error( ERRCODE_BASIC_PATH_NOT_FOUND ); } } @@ -556,7 +556,7 @@ RTLFUNC(FileCopy) } catch(const Exception & ) { - StarBASIC::Error( SbERR_PATH_NOT_FOUND ); + StarBASIC::Error( ERRCODE_BASIC_PATH_NOT_FOUND ); } } } @@ -565,12 +565,12 @@ RTLFUNC(FileCopy) FileBase::RC nRet = File::copy( getFullPath( aSource ), getFullPath( aDest ) ); if( nRet != FileBase::E_None ) { - StarBASIC::Error( SbERR_PATH_NOT_FOUND ); + StarBASIC::Error( ERRCODE_BASIC_PATH_NOT_FOUND ); } } } else - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } RTLFUNC(Kill) @@ -591,7 +591,7 @@ RTLFUNC(Kill) OUString aFullPath = getFullPath( aFileSpec ); if( !xSFI->exists( aFullPath ) || xSFI->isFolder( aFullPath ) ) { - StarBASIC::Error( SbERR_FILE_NOT_FOUND ); + StarBASIC::Error( ERRCODE_BASIC_FILE_NOT_FOUND ); return; } try @@ -611,7 +611,7 @@ RTLFUNC(Kill) } else { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } } @@ -669,7 +669,7 @@ RTLFUNC(MkDir) } else { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } } @@ -689,7 +689,7 @@ void implRemoveDirRecursive( const OUString& aDirPath ) if( !bExists || !bFolder ) { - StarBASIC::Error( SbERR_PATH_NOT_FOUND ); + StarBASIC::Error( ERRCODE_BASIC_PATH_NOT_FOUND ); return; } @@ -697,7 +697,7 @@ void implRemoveDirRecursive( const OUString& aDirPath ) nRet = aDir.open(); if( nRet != FileBase::E_None ) { - StarBASIC::Error( SbERR_PATH_NOT_FOUND ); + StarBASIC::Error( ERRCODE_BASIC_PATH_NOT_FOUND ); return; } @@ -750,7 +750,7 @@ RTLFUNC(RmDir) { if( !xSFI->isFolder( aPath ) ) { - StarBASIC::Error( SbERR_PATH_NOT_FOUND ); + StarBASIC::Error( ERRCODE_BASIC_PATH_NOT_FOUND ); return; } SbiInstance* pInst = GetSbData()->pInst; @@ -761,7 +761,7 @@ RTLFUNC(RmDir) sal_Int32 nCount = aContent.getLength(); if( nCount > 0 ) { - StarBASIC::Error( SbERR_ACCESS_ERROR ); + StarBASIC::Error( ERRCODE_BASIC_ACCESS_ERROR ); return; } } @@ -781,7 +781,7 @@ RTLFUNC(RmDir) } else { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } } @@ -791,7 +791,7 @@ RTLFUNC(SendKeys) (void)bWrite; rPar.Get(0)->PutEmpty(); - StarBASIC::Error(SbERR_NOT_IMPLEMENTED); + StarBASIC::Error(ERRCODE_BASIC_NOT_IMPLEMENTED); } RTLFUNC(Exp) @@ -800,7 +800,7 @@ RTLFUNC(Exp) (void)bWrite; if( rPar.Count() < 2 ) - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); else { double aDouble = rPar.Get( 1 )->GetDouble(); @@ -817,7 +817,7 @@ RTLFUNC(FileLen) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -859,7 +859,7 @@ RTLFUNC(Hex) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -890,7 +890,7 @@ RTLFUNC(FuncCaller) } else { - StarBASIC::Error( SbERR_NOT_IMPLEMENTED ); + StarBASIC::Error( ERRCODE_BASIC_NOT_IMPLEMENTED ); } } @@ -903,7 +903,7 @@ RTLFUNC(InStr) sal_Size nArgCount = rPar.Count()-1; if ( nArgCount < 2 ) - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); else { sal_Int32 nStartPos = 1; @@ -914,7 +914,7 @@ RTLFUNC(InStr) nStartPos = rPar.Get(1)->GetLong(); if( nStartPos <= 0 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); nStartPos = 1; } nFirstStringPos++; @@ -977,7 +977,7 @@ RTLFUNC(InStrRev) sal_Size nArgCount = rPar.Count()-1; if ( nArgCount < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -990,7 +990,7 @@ RTLFUNC(InStrRev) nStartPos = rPar.Get(3)->GetLong(); if( (nStartPos <= 0 && nStartPos != -1)) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); nStartPos = -1; } } @@ -1059,7 +1059,7 @@ RTLFUNC(Int) (void)bWrite; if ( rPar.Count() < 2 ) - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); else { SbxVariableRef pArg = rPar.Get( 1 ); @@ -1081,7 +1081,7 @@ RTLFUNC(Fix) (void)bWrite; if ( rPar.Count() < 2 ) - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); else { SbxVariableRef pArg = rPar.Get( 1 ); @@ -1102,7 +1102,7 @@ RTLFUNC(LCase) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -1120,7 +1120,7 @@ RTLFUNC(Left) if ( rPar.Count() < 3 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -1129,7 +1129,7 @@ RTLFUNC(Left) if( nResultLen < 0 ) { nResultLen = 0; - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else if(nResultLen > aStr.getLength()) { @@ -1147,7 +1147,7 @@ RTLFUNC(Log) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -1160,7 +1160,7 @@ RTLFUNC(Log) } else { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } } } @@ -1172,7 +1172,7 @@ RTLFUNC(LTrim) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -1192,7 +1192,7 @@ RTLFUNC(Mid) int nArgCount = rPar.Count()-1; if ( nArgCount < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -1208,7 +1208,7 @@ RTLFUNC(Mid) sal_Int32 nStartPos = rPar.Get(2)->GetLong(); if ( nStartPos < 1 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -1234,7 +1234,7 @@ RTLFUNC(Mid) sal_Int32 nArgLen = aArgStr.getLength(); if( nStartPos + 1 > nArgLen ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -1312,7 +1312,7 @@ RTLFUNC(Oct) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -1340,7 +1340,7 @@ RTLFUNC(Replace) sal_Size nArgCount = rPar.Count()-1; if ( nArgCount < 3 || nArgCount > 6 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -1357,7 +1357,7 @@ RTLFUNC(Replace) } if( lStartPos < 1) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); lStartPos = 1; } } @@ -1371,7 +1371,7 @@ RTLFUNC(Replace) } if( lCount < -1) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); lCount = -1; } } @@ -1432,7 +1432,7 @@ RTLFUNC(Right) if ( rPar.Count() < 3 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -1441,7 +1441,7 @@ RTLFUNC(Right) if( nResultLen < 0 ) { nResultLen = 0; - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } int nStrLen = rStr.getLength(); if ( nResultLen > nStrLen ) @@ -1468,7 +1468,7 @@ RTLFUNC(RTrim) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -1484,7 +1484,7 @@ RTLFUNC(Sgn) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -1509,7 +1509,7 @@ RTLFUNC(Space) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -1526,7 +1526,7 @@ RTLFUNC(Spc) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -1543,7 +1543,7 @@ RTLFUNC(Sqr) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -1554,7 +1554,7 @@ RTLFUNC(Sqr) } else { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } } } @@ -1566,7 +1566,7 @@ RTLFUNC(Str) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -1630,7 +1630,7 @@ RTLFUNC(StrComp) if ( rPar.Count() < 3 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); rPar.Get(0)->PutEmpty(); return; } @@ -1697,7 +1697,7 @@ RTLFUNC(String) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -1705,7 +1705,7 @@ RTLFUNC(String) sal_Int32 lCount = rPar.Get(1)->GetLong(); if( lCount < 0 || lCount > 0xffff ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } if( rPar.Get(2)->GetType() == SbxINTEGER ) { @@ -1729,7 +1729,7 @@ RTLFUNC(Tan) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -1745,7 +1745,7 @@ RTLFUNC(UCase) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -1764,7 +1764,7 @@ RTLFUNC(Val) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -1799,7 +1799,7 @@ RTLFUNC(Val) sal_Int32 nParseEnd = 0; nResult = ::rtl::math::stringToDouble( aStr, '.', ',', &eStatus, &nParseEnd ); if ( eStatus != rtl_math_ConversionStatus_Ok ) - StarBASIC::Error( SbERR_MATH_OVERFLOW ); + StarBASIC::Error( ERRCODE_BASIC_MATH_OVERFLOW ); /* TODO: we should check whether all characters were parsed here, * but earlier code silently ignored trailing nonsense such as "1x" * resulting in 1 with the side effect that any alpha-only-string @@ -1807,7 +1807,7 @@ RTLFUNC(Val) * user macros may rely on it. */ #if 0 else if ( nParseEnd != aStr.getLength() ) - StarBASIC::Error( SbERR_CONVERSION ); + StarBASIC::Error( ERRCODE_BASIC_CONVERSION ); #endif } @@ -1875,7 +1875,7 @@ RTLFUNC(CDateToUnoDate) if ( rPar.Count() != 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -1890,7 +1890,7 @@ RTLFUNC(CDateFromUnoDate) if ( rPar.Count() != 2 || rPar.Get(1)->GetType() != SbxOBJECT ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -1928,7 +1928,7 @@ RTLFUNC(CDateToUnoTime) if ( rPar.Count() != 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -1943,7 +1943,7 @@ RTLFUNC(CDateFromUnoTime) if ( rPar.Count() != 2 || rPar.Get(1)->GetType() != SbxOBJECT ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -1990,7 +1990,7 @@ RTLFUNC(CDateToUnoDateTime) if ( rPar.Count() != 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -2005,7 +2005,7 @@ RTLFUNC(CDateFromUnoDateTime) if ( rPar.Count() != 2 || rPar.Get(1)->GetType() != SbxOBJECT ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -2037,7 +2037,7 @@ RTLFUNC(CDateToIso) } else { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } } @@ -2064,7 +2064,7 @@ RTLFUNC(CDateFromIso) } else { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } } @@ -2075,7 +2075,7 @@ RTLFUNC(DateSerial) if ( rPar.Count() < 4 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } sal_Int16 nYear = rPar.Get(1)->GetInteger(); @@ -2096,7 +2096,7 @@ RTLFUNC(TimeSerial) if ( rPar.Count() < 4 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } sal_Int16 nHour = rPar.Get(1)->GetInteger(); @@ -2110,7 +2110,7 @@ RTLFUNC(TimeSerial) (nMinute < 0 || nMinute > 59 ) || (nSecond < 0 || nSecond > 59 )) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -2124,7 +2124,7 @@ RTLFUNC(DateValue) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -2178,7 +2178,7 @@ RTLFUNC(DateValue) } else { - StarBASIC::Error( SbERR_CONVERSION ); + StarBASIC::Error( ERRCODE_BASIC_CONVERSION ); } // #39629 pFormatter can be requested itself if( !GetSbData()->pInst ) @@ -2195,7 +2195,7 @@ RTLFUNC(TimeValue) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -2224,7 +2224,7 @@ RTLFUNC(TimeValue) } else { - StarBASIC::Error( SbERR_CONVERSION ); + StarBASIC::Error( ERRCODE_BASIC_CONVERSION ); } if( !GetSbData()->pInst ) { @@ -2240,7 +2240,7 @@ RTLFUNC(Day) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -2259,7 +2259,7 @@ RTLFUNC(Year) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -2288,7 +2288,7 @@ RTLFUNC(Hour) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -2305,7 +2305,7 @@ RTLFUNC(Minute) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -2322,7 +2322,7 @@ RTLFUNC(Month) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -2356,7 +2356,7 @@ RTLFUNC(Second) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -2442,7 +2442,7 @@ RTLFUNC(Time) } else { - StarBASIC::Error( SbERR_NOT_IMPLEMENTED ); + StarBASIC::Error( ERRCODE_BASIC_NOT_IMPLEMENTED ); } } @@ -2503,7 +2503,7 @@ RTLFUNC(Date) } else { - StarBASIC::Error( SbERR_NOT_IMPLEMENTED ); + StarBASIC::Error( ERRCODE_BASIC_NOT_IMPLEMENTED ); } } @@ -2514,7 +2514,7 @@ RTLFUNC(IsArray) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -2529,7 +2529,7 @@ RTLFUNC(IsObject) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -2560,7 +2560,7 @@ RTLFUNC(IsDate) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -2597,7 +2597,7 @@ RTLFUNC(IsEmpty) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -2625,7 +2625,7 @@ RTLFUNC(IsError) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -2661,7 +2661,7 @@ RTLFUNC(IsNull) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -2688,7 +2688,7 @@ RTLFUNC(IsNumeric) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -2705,7 +2705,7 @@ RTLFUNC(IsMissing) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -2835,7 +2835,7 @@ RTLFUNC(Dir) sal_uInt16 nParCount = rPar.Count(); if( nParCount > 3 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -3133,7 +3133,7 @@ RTLFUNC(GetAttr) } else { - StarBASIC::Error( SbERR_FILE_NOT_FOUND ); + StarBASIC::Error( ERRCODE_BASIC_FILE_NOT_FOUND ); } rPar.Get(0)->PutInteger( nFlags ); @@ -3154,7 +3154,7 @@ RTLFUNC(GetAttr) catch(const Exception & ) {} if( !bExists ) { - StarBASIC::Error( SbERR_FILE_NOT_FOUND ); + StarBASIC::Error( ERRCODE_BASIC_FILE_NOT_FOUND ); return; } @@ -3204,7 +3204,7 @@ RTLFUNC(GetAttr) } else { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } } @@ -3216,7 +3216,7 @@ RTLFUNC(FileDateTime) if ( rPar.Count() != 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -3297,7 +3297,7 @@ RTLFUNC(EOF) // No changes for UCB if ( rPar.Count() != 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -3306,7 +3306,7 @@ RTLFUNC(EOF) SbiStream* pSbStrm = pIO->GetStream( nChannel ); if ( !pSbStrm ) { - StarBASIC::Error( SbERR_BAD_CHANNEL ); + StarBASIC::Error( ERRCODE_BASIC_BAD_CHANNEL ); return; } bool bIsEof; @@ -3341,7 +3341,7 @@ RTLFUNC(FileAttr) if ( rPar.Count() != 3 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -3350,7 +3350,7 @@ RTLFUNC(FileAttr) SbiStream* pSbStrm = pIO->GetStream( nChannel ); if ( !pSbStrm ) { - StarBASIC::Error( SbERR_BAD_CHANNEL ); + StarBASIC::Error( ERRCODE_BASIC_BAD_CHANNEL ); return; } sal_Int16 nRet; @@ -3373,7 +3373,7 @@ RTLFUNC(Loc) // No changes for UCB if ( rPar.Count() != 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -3382,7 +3382,7 @@ RTLFUNC(Loc) SbiStream* pSbStrm = pIO->GetStream( nChannel ); if ( !pSbStrm ) { - StarBASIC::Error( SbERR_BAD_CHANNEL ); + StarBASIC::Error( ERRCODE_BASIC_BAD_CHANNEL ); return; } SvStream* pSvStrm = pSbStrm->GetStrm(); @@ -3421,7 +3421,7 @@ RTLFUNC(Lof) // No changes for UCB if ( rPar.Count() != 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -3430,7 +3430,7 @@ RTLFUNC(Lof) SbiStream* pSbStrm = pIO->GetStream( nChannel ); if ( !pSbStrm ) { - StarBASIC::Error( SbERR_BAD_CHANNEL ); + StarBASIC::Error( ERRCODE_BASIC_BAD_CHANNEL ); return; } SvStream* pSvStrm = pSbStrm->GetStrm(); @@ -3451,7 +3451,7 @@ RTLFUNC(Seek) int nArgs = (int)rPar.Count(); if ( nArgs < 2 || nArgs > 3 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } sal_Int16 nChannel = rPar.Get(1)->GetInteger(); @@ -3459,7 +3459,7 @@ RTLFUNC(Seek) SbiStream* pSbStrm = pIO->GetStream( nChannel ); if ( !pSbStrm ) { - StarBASIC::Error( SbERR_BAD_CHANNEL ); + StarBASIC::Error( ERRCODE_BASIC_BAD_CHANNEL ); return; } SvStream* pStrm = pSbStrm->GetStrm(); @@ -3479,7 +3479,7 @@ RTLFUNC(Seek) sal_Int32 nPos = rPar.Get(2)->GetLong(); if ( nPos < 1 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } nPos--; // Basic counts from 1, SvStreams count from 0 @@ -3501,7 +3501,7 @@ RTLFUNC(Format) sal_uInt16 nArgCount = (sal_uInt16)rPar.Count(); if ( nArgCount < 2 || nArgCount > 3 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -3558,7 +3558,7 @@ RTLFUNC(Randomize) if ( rPar.Count() > 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } if( rPar.Count() == 2 ) { @@ -3575,7 +3575,7 @@ RTLFUNC(Rnd) if ( rPar.Count() > 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -3603,7 +3603,7 @@ RTLFUNC(Shell) // No shell command for "virtual" portal users if( needSecurityRestrictions() ) { - StarBASIC::Error(SbERR_NOT_IMPLEMENTED); + StarBASIC::Error(ERRCODE_BASIC_NOT_IMPLEMENTED); return; } @@ -3611,7 +3611,7 @@ RTLFUNC(Shell) if ( nArgCount < 2 || nArgCount > 5 ) { rPar.Get(0)->PutLong(0); - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -3766,7 +3766,7 @@ RTLFUNC(Shell) if( !bSucc ) { - StarBASIC::Error( SbERR_FILE_NOT_FOUND ); + StarBASIC::Error( ERRCODE_BASIC_FILE_NOT_FOUND ); } else { @@ -3782,7 +3782,7 @@ RTLFUNC(VarType) if ( rPar.Count() != 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -3919,7 +3919,7 @@ RTLFUNC(TypeName) if ( rPar.Count() != 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -3950,7 +3950,7 @@ RTLFUNC(Len) if ( rPar.Count() != 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -3967,14 +3967,14 @@ RTLFUNC(DDEInitiate) // No DDE for "virtual" portal users if( needSecurityRestrictions() ) { - StarBASIC::Error(SbERR_NOT_IMPLEMENTED); + StarBASIC::Error(ERRCODE_BASIC_NOT_IMPLEMENTED); return; } int nArgs = (int)rPar.Count(); if ( nArgs != 3 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } const OUString& rApp = rPar.Get(1)->GetOUString(); @@ -4001,7 +4001,7 @@ RTLFUNC(DDETerminate) // No DDE for "virtual" portal users if( needSecurityRestrictions() ) { - StarBASIC::Error(SbERR_NOT_IMPLEMENTED); + StarBASIC::Error(ERRCODE_BASIC_NOT_IMPLEMENTED); return; } @@ -4009,7 +4009,7 @@ RTLFUNC(DDETerminate) int nArgs = (int)rPar.Count(); if ( nArgs != 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } size_t nChannel = rPar.Get(1)->GetInteger(); @@ -4029,7 +4029,7 @@ RTLFUNC(DDETerminateAll) // No DDE for "virtual" portal users if( needSecurityRestrictions() ) { - StarBASIC::Error(SbERR_NOT_IMPLEMENTED); + StarBASIC::Error(ERRCODE_BASIC_NOT_IMPLEMENTED); return; } @@ -4037,7 +4037,7 @@ RTLFUNC(DDETerminateAll) int nArgs = (int)rPar.Count(); if ( nArgs != 1 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -4057,14 +4057,14 @@ RTLFUNC(DDERequest) // No DDE for "virtual" portal users if( needSecurityRestrictions() ) { - StarBASIC::Error(SbERR_NOT_IMPLEMENTED); + StarBASIC::Error(ERRCODE_BASIC_NOT_IMPLEMENTED); return; } int nArgs = (int)rPar.Count(); if ( nArgs != 3 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } size_t nChannel = rPar.Get(1)->GetInteger(); @@ -4090,7 +4090,7 @@ RTLFUNC(DDEExecute) // No DDE for "virtual" portal users if( needSecurityRestrictions() ) { - StarBASIC::Error(SbERR_NOT_IMPLEMENTED); + StarBASIC::Error(ERRCODE_BASIC_NOT_IMPLEMENTED); return; } @@ -4098,7 +4098,7 @@ RTLFUNC(DDEExecute) int nArgs = (int)rPar.Count(); if ( nArgs != 3 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } size_t nChannel = rPar.Get(1)->GetInteger(); @@ -4119,7 +4119,7 @@ RTLFUNC(DDEPoke) // No DDE for "virtual" portal users if( needSecurityRestrictions() ) { - StarBASIC::Error(SbERR_NOT_IMPLEMENTED); + StarBASIC::Error(ERRCODE_BASIC_NOT_IMPLEMENTED); return; } @@ -4127,7 +4127,7 @@ RTLFUNC(DDEPoke) int nArgs = (int)rPar.Count(); if ( nArgs != 4 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } size_t nChannel = rPar.Get(1)->GetInteger(); @@ -4149,7 +4149,7 @@ RTLFUNC(FreeFile) if ( rPar.Count() != 1 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } SbiIoSystem* pIO = GetSbData()->pInst->GetIoSystem(); @@ -4164,7 +4164,7 @@ RTLFUNC(FreeFile) } nChannel++; } - StarBASIC::Error( SbERR_TOO_MANY_FILES ); + StarBASIC::Error( ERRCODE_BASIC_TOO_MANY_FILES ); } RTLFUNC(LBound) @@ -4175,7 +4175,7 @@ RTLFUNC(LBound) sal_uInt16 nParCount = rPar.Count(); if ( nParCount != 3 && nParCount != 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } SbxBase* pParObj = rPar.Get(1)->GetObject(); @@ -4185,12 +4185,12 @@ RTLFUNC(LBound) sal_Int32 nLower, nUpper; short nDim = (nParCount == 3) ? (short)rPar.Get(2)->GetInteger() : 1; if( !pArr->GetDim32( nDim, nLower, nUpper ) ) - StarBASIC::Error( SbERR_OUT_OF_RANGE ); + StarBASIC::Error( ERRCODE_BASIC_OUT_OF_RANGE ); else rPar.Get(0)->PutLong( nLower ); } else - StarBASIC::Error( SbERR_MUST_HAVE_DIMS ); + StarBASIC::Error( ERRCODE_BASIC_MUST_HAVE_DIMS ); } RTLFUNC(UBound) @@ -4201,7 +4201,7 @@ RTLFUNC(UBound) sal_uInt16 nParCount = rPar.Count(); if ( nParCount != 3 && nParCount != 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -4212,12 +4212,12 @@ RTLFUNC(UBound) sal_Int32 nLower, nUpper; short nDim = (nParCount == 3) ? (short)rPar.Get(2)->GetInteger() : 1; if( !pArr->GetDim32( nDim, nLower, nUpper ) ) - StarBASIC::Error( SbERR_OUT_OF_RANGE ); + StarBASIC::Error( ERRCODE_BASIC_OUT_OF_RANGE ); else rPar.Get(0)->PutLong( nUpper ); } else - StarBASIC::Error( SbERR_MUST_HAVE_DIMS ); + StarBASIC::Error( ERRCODE_BASIC_MUST_HAVE_DIMS ); } RTLFUNC(RGB) @@ -4227,7 +4227,7 @@ RTLFUNC(RGB) if ( rPar.Count() != 4 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -4276,14 +4276,14 @@ RTLFUNC(QBColor) if ( rPar.Count() != 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } sal_Int16 nCol = rPar.Get(1)->GetInteger(); if( nCol < 0 || nCol > 15 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } sal_Int32 nRGB = pRGB[ nCol ]; @@ -4299,7 +4299,7 @@ RTLFUNC(StrConv) sal_Size nArgCount = rPar.Count()-1; if( nArgCount < 2 || nArgCount > 3 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -4437,7 +4437,7 @@ RTLFUNC(Beep) if ( rPar.Count() != 1 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } Sound::Beep(); @@ -4450,7 +4450,7 @@ RTLFUNC(Load) if( rPar.Count() != 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -4481,7 +4481,7 @@ RTLFUNC(Unload) rPar.Get(0)->PutEmpty(); if( rPar.Count() != 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -4512,7 +4512,7 @@ RTLFUNC(LoadPicture) if( rPar.Count() != 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -4538,7 +4538,7 @@ RTLFUNC(SavePicture) rPar.Get(0)->PutEmpty(); if( rPar.Count() != 3 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -4581,7 +4581,7 @@ RTLFUNC(MsgBox) sal_uInt16 nArgCount = (sal_uInt16)rPar.Count(); if( nArgCount < 2 || nArgCount > 6 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } WinBits nWinBits; @@ -4715,7 +4715,7 @@ RTLFUNC(SetAttr) } else { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } } @@ -4740,11 +4740,11 @@ RTLFUNC(DumpAllObjects) sal_uInt16 nArgCount = (sal_uInt16)rPar.Count(); if( nArgCount < 2 || nArgCount > 3 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else if( !pBasic ) { - StarBASIC::Error( SbERR_INTERNAL_ERROR ); + StarBASIC::Error( ERRCODE_BASIC_INTERNAL_ERROR ); } else { @@ -4759,7 +4759,7 @@ RTLFUNC(DumpAllObjects) aStrm.Close(); if( aStrm.GetError() != SVSTREAM_OK ) { - StarBASIC::Error( SbERR_IO_ERROR ); + StarBASIC::Error( ERRCODE_BASIC_IO_ERROR ); } } } @@ -4800,7 +4800,7 @@ RTLFUNC(FileExists) } else { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } } @@ -4811,7 +4811,7 @@ RTLFUNC(Partition) if ( rPar.Count() != 5 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -4822,7 +4822,7 @@ RTLFUNC(Partition) if( nStart < 0 || nStop <= nStart || nInterval < 1 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -4935,7 +4935,7 @@ bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, double& if ((nYear < 100 || nYear > 9999) ) { #if HAVE_FEATURE_SCRIPTING - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); #endif return false; } @@ -4948,7 +4948,7 @@ bool implDateSerial( sal_Int16 nYear, sal_Int16 nMonth, sal_Int16 nDay, double& (nDay < 1 || nDay > 31 ) ) { #if HAVE_FEATURE_SCRIPTING - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); #endif return false; } diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index 00cbf15a2dbc..b6c88c05512d 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -116,7 +116,7 @@ RTLFUNC(CallByName) sal_uInt16 nParCount = rPar.Count(); if ( nParCount < 4 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -132,7 +132,7 @@ RTLFUNC(CallByName) } if( !pObj ) { - StarBASIC::Error( SbERR_BAD_PARAMETER ); + StarBASIC::Error( ERRCODE_BASIC_BAD_PARAMETER ); return; } @@ -146,7 +146,7 @@ RTLFUNC(CallByName) SbxVariable* pFindVar = pObj->Find( aNameStr, SbxCLASS_DONTCARE ); if( pFindVar == NULL ) { - StarBASIC::Error( SbERR_PROC_UNDEFINED ); + StarBASIC::Error( ERRCODE_BASIC_PROC_UNDEFINED ); return; } @@ -167,7 +167,7 @@ RTLFUNC(CallByName) { if ( nParCount != 5 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } SbxVariableRef pValVar = rPar.Get(4); @@ -195,7 +195,7 @@ RTLFUNC(CallByName) SbMethod* pMeth = PTR_CAST(SbMethod,pFindVar); if( pMeth == NULL ) { - StarBASIC::Error( SbERR_PROC_UNDEFINED ); + StarBASIC::Error( ERRCODE_BASIC_PROC_UNDEFINED ); return; } @@ -221,7 +221,7 @@ RTLFUNC(CallByName) } break; default: - StarBASIC::Error( SbERR_PROC_UNDEFINED ); + StarBASIC::Error( ERRCODE_BASIC_PROC_UNDEFINED ); } } @@ -238,7 +238,7 @@ RTLFUNC(CBool) // JSM } else { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } rPar.Get(0)->PutBool(bVal); } @@ -256,7 +256,7 @@ RTLFUNC(CByte) // JSM } else { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } rPar.Get(0)->PutByte(nByte); } @@ -274,7 +274,7 @@ RTLFUNC(CCur) } else { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } rPar.Get(0)->PutCurrency( nCur ); } @@ -293,12 +293,12 @@ RTLFUNC(CDec) } else { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } rPar.Get(0)->PutDecimal( pDec ); #else rPar.Get(0)->PutEmpty(); - StarBASIC::Error(SbERR_NOT_IMPLEMENTED); + StarBASIC::Error(ERRCODE_BASIC_NOT_IMPLEMENTED); #endif } @@ -315,7 +315,7 @@ RTLFUNC(CDate) // JSM } else { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } rPar.Get(0)->PutDate(nVal); } @@ -346,7 +346,7 @@ RTLFUNC(CDbl) // JSM } else { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } rPar.Get(0)->PutDouble(nVal); @@ -365,7 +365,7 @@ RTLFUNC(CInt) // JSM } else { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } rPar.Get(0)->PutInteger(nVal); } @@ -383,7 +383,7 @@ RTLFUNC(CLng) // JSM } else { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } rPar.Get(0)->PutLong(nVal); } @@ -416,7 +416,7 @@ RTLFUNC(CSng) // JSM } else { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } rPar.Get(0)->PutSingle(nVal); } @@ -434,7 +434,7 @@ RTLFUNC(CStr) // JSM } else { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } rPar.Get(0)->PutString(aString); } @@ -452,7 +452,7 @@ RTLFUNC(CVar) // JSM } else { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } rPar.Get(0)->Put( aVals ); } @@ -470,7 +470,7 @@ RTLFUNC(CVErr) } else { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } rPar.Get(0)->PutErr( nErrCode ); } @@ -493,7 +493,7 @@ RTLFUNC(Iif) // JSM } else { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } } @@ -504,7 +504,7 @@ RTLFUNC(GetSystemType) if ( rPar.Count() != 1 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -520,7 +520,7 @@ RTLFUNC(GetGUIType) if ( rPar.Count() != 1 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -542,7 +542,7 @@ RTLFUNC(Red) if ( rPar.Count() != 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -560,7 +560,7 @@ RTLFUNC(Green) if ( rPar.Count() != 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -578,7 +578,7 @@ RTLFUNC(Blue) if ( rPar.Count() != 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -598,7 +598,7 @@ RTLFUNC(Switch) if( !(nCount & 0x0001 )) { // number of arguments must be odd - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } sal_uInt16 nCurExpr = 1; while( nCurExpr < (nCount-1) ) @@ -619,7 +619,7 @@ void Wait_Impl( bool bDurationBased, SbxArray& rPar ) { if( rPar.Count() != 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } long nWait = 0; @@ -636,7 +636,7 @@ void Wait_Impl( bool bDurationBased, SbxArray& rPar ) } if( nWait < 0 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -686,7 +686,7 @@ RTLFUNC(GetGUIVersion) if ( rPar.Count() != 1 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -702,7 +702,7 @@ RTLFUNC(Choose) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } sal_Int16 nIndex = rPar.Get(1)->GetInteger(); sal_uInt16 nCount = rPar.Count(); @@ -723,7 +723,7 @@ RTLFUNC(Trim) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -782,7 +782,7 @@ RTLFUNC(FreeLibrary) if ( rPar.Count() != 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } GetSbData()->pInst->GetDllMgr()->FreeDll( rPar.Get(1)->GetOUString() ); } @@ -875,7 +875,7 @@ RTLFUNC(DimArray) sal_Int32 ub = rPar.Get(i+1)->GetLong(); if( ub < 0 ) { - StarBASIC::Error( SbERR_OUT_OF_RANGE ); + StarBASIC::Error( ERRCODE_BASIC_OUT_OF_RANGE ); ub = 0; } pArray->AddDim32( 0, ub ); @@ -924,7 +924,7 @@ RTLFUNC(FindObject) if ( rPar.Count() < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -950,7 +950,7 @@ RTLFUNC(FindPropertyObject) if ( rPar.Count() < 3 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -976,7 +976,7 @@ RTLFUNC(FindPropertyObject) } else { - StarBASIC::Error( SbERR_BAD_PARAMETER ); + StarBASIC::Error( ERRCODE_BASIC_BAD_PARAMETER ); } SbxVariableRef refVar = rPar.Get(0); @@ -1076,7 +1076,7 @@ static bool lcl_WriteSbxVariable( const SbxVariable& rVar, SvStream* pStrm, break; default: - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return false; } @@ -1187,7 +1187,7 @@ static bool lcl_ReadSbxVariable( SbxVariable& rVar, SvStream* pStrm, break; default: - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return false; } @@ -1231,7 +1231,7 @@ void PutGet( SbxArray& rPar, bool bPut ) { if ( rPar.Count() != 4 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } sal_Int16 nFileNo = rPar.Get(1)->GetInteger(); @@ -1241,7 +1241,7 @@ void PutGet( SbxArray& rPar, bool bPut ) long nRecordNo = pVar2->GetLong(); if ( nFileNo < 1 || ( bHasRecordNo && nRecordNo < 1 ) ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } nRecordNo--; @@ -1250,7 +1250,7 @@ void PutGet( SbxArray& rPar, bool bPut ) if ( !pSbStrm || !(pSbStrm->GetMode() & (SBSTRM_BINARY | SBSTRM_RANDOM)) ) { - StarBASIC::Error( SbERR_BAD_CHANNEL ); + StarBASIC::Error( ERRCODE_BASIC_BAD_CHANNEL ); return; } @@ -1297,7 +1297,7 @@ void PutGet( SbxArray& rPar, bool bPut ) bRet = lcl_ReadSbxVariable(*pVar, pStrm, !bRandom, nBlockLen, false); } if( !bRet || pStrm->GetErrorCode() ) - StarBASIC::Error( SbERR_IO_ERROR ); + StarBASIC::Error( ERRCODE_BASIC_IO_ERROR ); } RTLFUNC(Put) @@ -1323,7 +1323,7 @@ RTLFUNC(Environ) if ( rPar.Count() != 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } OUString aResult; @@ -1375,7 +1375,7 @@ RTLFUNC(GetDialogZoomFactorX) if ( rPar.Count() != 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } rPar.Get(0)->PutDouble( GetDialogZoomFactor( true, rPar.Get(1)->GetLong() )); @@ -1388,7 +1388,7 @@ RTLFUNC(GetDialogZoomFactorY) if ( rPar.Count() != 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } rPar.Get(0)->PutDouble( GetDialogZoomFactor( false, rPar.Get(1)->GetLong())); @@ -1402,7 +1402,7 @@ RTLFUNC(EnableReschedule) rPar.Get(0)->PutEmpty(); if ( rPar.Count() != 2 ) - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); if( GetSbData()->pInst ) GetSbData()->pInst->EnableReschedule( rPar.Get(1)->GetBool() ); } @@ -1414,7 +1414,7 @@ RTLFUNC(GetSystemTicks) if ( rPar.Count() != 1 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } rPar.Get(0)->PutLong( tools::Time::GetSystemTicks() ); @@ -1427,7 +1427,7 @@ RTLFUNC(GetPathSeparator) if ( rPar.Count() != 1 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } rPar.Get(0)->PutString( OUString( SAL_PATHDELIMITER ) ); @@ -1445,7 +1445,7 @@ RTLFUNC(ResolvePath) } else { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } } @@ -1456,7 +1456,7 @@ RTLFUNC(TypeLen) if ( rPar.Count() != 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -1658,7 +1658,7 @@ RTLFUNC(ConvertToUrl) } else { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } } @@ -1680,7 +1680,7 @@ RTLFUNC(ConvertFromUrl) } else { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } } @@ -1709,7 +1709,7 @@ RTLFUNC(Join) sal_uInt16 nParCount = rPar.Count(); if ( nParCount != 3 && nParCount != 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } SbxBase* pParObj = rPar.Get(1)->GetObject(); @@ -1718,7 +1718,7 @@ RTLFUNC(Join) { if( pArr->GetDims() != 1 ) { - StarBASIC::Error( SbERR_WRONG_DIMS ); // Syntax Error?! + StarBASIC::Error( ERRCODE_BASIC_WRONG_DIMS ); // Syntax Error?! return; } OUString aDelim; @@ -1747,7 +1747,7 @@ RTLFUNC(Join) } else { - StarBASIC::Error( SbERR_MUST_HAVE_DIMS ); + StarBASIC::Error( ERRCODE_BASIC_MUST_HAVE_DIMS ); } } @@ -1760,7 +1760,7 @@ RTLFUNC(Split) sal_uInt16 nParCount = rPar.Count(); if ( nParCount < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -1853,14 +1853,14 @@ RTLFUNC(MonthName) sal_uInt16 nParCount = rPar.Count(); if( nParCount != 2 && nParCount != 3 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } Reference< XCalendar4 > xCalendar = getLocaleCalendar(); if( !xCalendar.is() ) { - StarBASIC::Error( SbERR_INTERNAL_ERROR ); + StarBASIC::Error( ERRCODE_BASIC_INTERNAL_ERROR ); return; } Sequence< CalendarItem2 > aMonthSeq = xCalendar->getMonths2(); @@ -1869,7 +1869,7 @@ RTLFUNC(MonthName) sal_Int16 nVal = rPar.Get(1)->GetInteger(); if( nVal < 1 || nVal > nMonthCount ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -1893,14 +1893,14 @@ RTLFUNC(WeekdayName) sal_uInt16 nParCount = rPar.Count(); if( nParCount < 2 || nParCount > 4 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } Reference< XCalendar4 > xCalendar = getLocaleCalendar(); if( !xCalendar.is() ) { - StarBASIC::Error( SbERR_INTERNAL_ERROR ); + StarBASIC::Error( ERRCODE_BASIC_INTERNAL_ERROR ); return; } @@ -1913,7 +1913,7 @@ RTLFUNC(WeekdayName) nFirstDay = rPar.Get(3)->GetInteger(); if( nFirstDay < 0 || nFirstDay > 7 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } } @@ -1924,7 +1924,7 @@ RTLFUNC(WeekdayName) nDay = 1 + (nDay + nDayCount + nFirstDay - 2) % nDayCount; if( nDay < 1 || nDay > nDayCount ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -1953,7 +1953,7 @@ RTLFUNC(Weekday) sal_uInt16 nParCount = rPar.Count(); if ( nParCount < 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } else { @@ -2048,7 +2048,7 @@ RTLFUNC(DateAdd) sal_uInt16 nParCount = rPar.Count(); if( nParCount != 4 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -2056,7 +2056,7 @@ RTLFUNC(DateAdd) IntervalInfo const * pInfo = getIntervalInfo( aStringCode ); if( !pInfo ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -2141,7 +2141,7 @@ RTLFUNC(DateAdd) implGetDayMonthYear( nNewYear, nNewMonth, nNewDay, dNewDate ); if( nNewYear > 9999 || nNewYear < 100 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } sal_Int16 nCorrectionDay = nDay; @@ -2173,7 +2173,7 @@ RTLFUNC(DateDiff) sal_uInt16 nParCount = rPar.Count(); if( nParCount < 4 || nParCount > 6 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -2181,7 +2181,7 @@ RTLFUNC(DateDiff) IntervalInfo const * pInfo = getIntervalInfo( aStringCode ); if( !pInfo ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -2241,7 +2241,7 @@ RTLFUNC(DateDiff) nFirstDay = rPar.Get(4)->GetInteger(); if( nFirstDay < 0 || nFirstDay > 7 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } if( nFirstDay == 0 ) @@ -2249,7 +2249,7 @@ RTLFUNC(DateDiff) Reference< XCalendar4 > xCalendar = getLocaleCalendar(); if( !xCalendar.is() ) { - StarBASIC::Error( SbERR_INTERNAL_ERROR ); + StarBASIC::Error( ERRCODE_BASIC_INTERNAL_ERROR ); return; } nFirstDay = sal_Int16( xCalendar->getFirstDayOfWeek() + 1 ); @@ -2299,17 +2299,17 @@ double implGetDateOfFirstDayInFirstWeek { SbError nError = 0; if( nFirstDay < 0 || nFirstDay > 7 ) - nError = SbERR_BAD_ARGUMENT; + nError = ERRCODE_BASIC_BAD_ARGUMENT; if( nFirstWeek < 0 || nFirstWeek > 3 ) - nError = SbERR_BAD_ARGUMENT; + nError = ERRCODE_BASIC_BAD_ARGUMENT; Reference< XCalendar4 > xCalendar; if( nFirstDay == 0 || nFirstWeek == 0 ) { xCalendar = getLocaleCalendar(); if( !xCalendar.is() ) - nError = SbERR_BAD_ARGUMENT; + nError = ERRCODE_BASIC_BAD_ARGUMENT; } if( nError != 0 ) @@ -2370,7 +2370,7 @@ RTLFUNC(DatePart) sal_uInt16 nParCount = rPar.Count(); if( nParCount < 3 || nParCount > 5 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -2378,7 +2378,7 @@ RTLFUNC(DatePart) IntervalInfo const * pInfo = getIntervalInfo( aStringCode ); if( !pInfo ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -2489,7 +2489,7 @@ RTLFUNC(FormatDateTime) sal_uInt16 nParCount = rPar.Count(); if( nParCount < 2 || nParCount > 3 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -2500,7 +2500,7 @@ RTLFUNC(FormatDateTime) nNamedFormat = rPar.Get(2)->GetInteger(); if( nNamedFormat < 0 || nNamedFormat > 4 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } } @@ -2508,7 +2508,7 @@ RTLFUNC(FormatDateTime) Reference< XCalendar4 > xCalendar = getLocaleCalendar(); if( !xCalendar.is() ) { - StarBASIC::Error( SbERR_INTERNAL_ERROR ); + StarBASIC::Error( ERRCODE_BASIC_INTERNAL_ERROR ); return; } @@ -2598,7 +2598,7 @@ RTLFUNC(Frac) sal_uInt16 nParCount = rPar.Count(); if( nParCount != 2) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -2618,7 +2618,7 @@ RTLFUNC(Round) sal_uInt16 nParCount = rPar.Count(); if( nParCount != 2 && nParCount != 3 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -2640,7 +2640,7 @@ RTLFUNC(Round) numdecimalplaces = rPar.Get(2)->GetInteger(); if( numdecimalplaces < 0 || numdecimalplaces > 22 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } } @@ -2683,7 +2683,7 @@ void CallFunctionAccessFunction( const Sequence< Any >& aArgs, const OUString& s } catch(const Exception& ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); } } @@ -2696,7 +2696,7 @@ RTLFUNC(SYD) if ( nArgCount < 4 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -2720,7 +2720,7 @@ RTLFUNC(SLN) if ( nArgCount < 3 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -2743,7 +2743,7 @@ RTLFUNC(Pmt) if ( nArgCount < 3 || nArgCount > 5 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } // retrieve non-optional params @@ -2788,7 +2788,7 @@ RTLFUNC(PPmt) if ( nArgCount < 4 || nArgCount > 6 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } // retrieve non-optional params @@ -2835,7 +2835,7 @@ RTLFUNC(PV) if ( nArgCount < 3 || nArgCount > 5 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } // retrieve non-optional params @@ -2880,7 +2880,7 @@ RTLFUNC(NPV) if ( nArgCount < 1 || nArgCount > 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -2908,7 +2908,7 @@ RTLFUNC(NPer) if ( nArgCount < 3 || nArgCount > 5 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } // retrieve non-optional params @@ -2953,7 +2953,7 @@ RTLFUNC(MIRR) if ( nArgCount < 3 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -2984,7 +2984,7 @@ RTLFUNC(IRR) if ( nArgCount < 1 || nArgCount > 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } // retrieve non-optional params @@ -3021,7 +3021,7 @@ RTLFUNC(IPmt) if ( nArgCount < 4 || nArgCount > 6 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } // retrieve non-optional params @@ -3068,7 +3068,7 @@ RTLFUNC(FV) if ( nArgCount < 3 || nArgCount > 5 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } // retrieve non-optional params @@ -3113,7 +3113,7 @@ RTLFUNC(DDB) if ( nArgCount < 4 || nArgCount > 5 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } // retrieve non-optional params @@ -3152,7 +3152,7 @@ RTLFUNC(Rate) if ( nArgCount < 3 || nArgCount > 6 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } // retrieve non-optional params @@ -3209,14 +3209,14 @@ RTLFUNC(StrReverse) if ( rPar.Count() != 2 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } SbxVariable *pSbxVariable = rPar.Get(1); if( pSbxVariable->IsNull() ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -3232,7 +3232,7 @@ RTLFUNC(CompatibilityMode) bool bEnabled = false; sal_uInt16 nCount = rPar.Count(); if ( nCount != 1 && nCount != 2 ) - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); SbiInstance* pInst = GetSbData()->pInst; if( pInst ) @@ -3254,7 +3254,7 @@ RTLFUNC(Input) // 2 parameters needed if ( rPar.Count() < 3 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -3265,7 +3265,7 @@ RTLFUNC(Input) SbiStream* pSbStrm = pIosys->GetStream( nFileNumber ); if ( !pSbStrm || !(pSbStrm->GetMode() & (SBSTRM_BINARY | SBSTRM_INPUT)) ) { - StarBASIC::Error( SbERR_BAD_CHANNEL ); + StarBASIC::Error( ERRCODE_BASIC_BAD_CHANNEL ); return; } @@ -3296,7 +3296,7 @@ RTLFUNC(Me) if ( pMod ) refVar->PutObject( pMod ); else - StarBASIC::Error( SbERR_INVALID_USAGE_OBJECT ); + StarBASIC::Error( ERRCODE_BASIC_INVALID_USAGE_OBJECT ); } else refVar->PutObject( pClassModuleObject ); @@ -3323,7 +3323,7 @@ sal_Int16 implGetWeekDay( double aDate, bool bFirstDayParam, sal_Int16 nFirstDay if( nFirstDay < 0 || nFirstDay > 7 ) { #if HAVE_FEATURE_SCRIPTING - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); #endif return 0; } @@ -3333,7 +3333,7 @@ sal_Int16 implGetWeekDay( double aDate, bool bFirstDayParam, sal_Int16 nFirstDay if( !xCalendar.is() ) { #if HAVE_FEATURE_SCRIPTING - StarBASIC::Error( SbERR_INTERNAL_ERROR ); + StarBASIC::Error( ERRCODE_BASIC_INTERNAL_ERROR ); #endif return 0; } diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 68634592ccc5..cca71b092bce 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -485,7 +485,7 @@ void SbiInstance::ErrorVB( sal_Int32 nVBNumber, const OUString& rMsg ) SbiRuntime::translateErrorToVba( n, aErrorMsg ); bool bVBATranslationAlreadyDone = true; - pRun->Error( SbERR_BASIC_COMPAT, bVBATranslationAlreadyDone ); + pRun->Error( ERRCODE_BASIC_COMPAT, bVBATranslationAlreadyDone ); } } @@ -706,7 +706,7 @@ void SbiRuntime::SetParameters( SbxArray* pParams ) { if( p && (p->eType & SbxARRAY) ) { - Error( SbERR_CONVERSION ); + Error( ERRCODE_BASIC_CONVERSION ); } else { @@ -786,7 +786,7 @@ bool SbiRuntime::Step() } else { - StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); + StarBASIC::FatalError( ERRCODE_BASIC_INTERNAL_ERROR ); } SbError nSbError = SbxBase::GetError(); @@ -904,7 +904,7 @@ void SbiRuntime::Error( SbError n, bool bVBATranslationAlreadyDone ) pGlobErr->setNumberAndDescription( nVBAErrorNumber, aMsg ); } pInst->aErrorMsg = aMsg; - nError = SbERR_BASIC_COMPAT; + nError = ERRCODE_BASIC_COMPAT; } } } @@ -985,7 +985,7 @@ SbxVariableRef SbiRuntime::PopVar() #ifdef DBG_UTIL if( !nExprLvl ) { - StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); + StarBASIC::FatalError( ERRCODE_BASIC_INTERNAL_ERROR ); return new SbxVariable; } #endif @@ -1022,7 +1022,7 @@ SbxVariable* SbiRuntime::GetTOS( short n ) #ifdef DBG_UTIL if( n < 0 ) { - StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); + StarBASIC::FatalError( ERRCODE_BASIC_INTERNAL_ERROR ); return new SbxVariable; } #endif @@ -1064,7 +1064,7 @@ void SbiRuntime::PushGosub( const sal_uInt8* pc ) { if( ++nGosubLvl > MAXRECURSION ) { - StarBASIC::FatalError( SbERR_STACK_OVERFLOW ); + StarBASIC::FatalError( ERRCODE_BASIC_STACK_OVERFLOW ); } SbiGosubStack* p = new SbiGosubStack; p->pCode = pc; @@ -1077,7 +1077,7 @@ void SbiRuntime::PopGosub() { if( !pGosubStk ) { - Error( SbERR_NO_GOSUB ); + Error( ERRCODE_BASIC_NO_GOSUB ); } else { @@ -1162,7 +1162,7 @@ void SbiRuntime::PushForEach() SbxBase* pObj = xObjVar.Is() ? xObjVar->GetObject() : NULL; if( pObj == NULL ) { - Error( SbERR_NO_OBJECT ); + Error( ERRCODE_BASIC_NO_OBJECT ); return; } @@ -1233,7 +1233,7 @@ void SbiRuntime::PushForEach() if( bError_ ) { - Error( SbERR_CONVERSION ); + Error( ERRCODE_BASIC_CONVERSION ); return; } @@ -1293,7 +1293,7 @@ void SbiRuntime::DllCall // No DllCall for "virtual" portal users if( needSecurityRestrictions() ) { - StarBASIC::Error(SbERR_NOT_IMPLEMENTED); + StarBASIC::Error(ERRCODE_BASIC_NOT_IMPLEMENTED); return; } @@ -1606,7 +1606,7 @@ void SbiRuntime::StepIS() bool bRes = ( eType1 == SbxOBJECT && eType2 == SbxOBJECT ); if ( bVBAEnabled && !bRes ) { - Error( SbERR_INVALID_USAGE_OBJECT ); + Error( ERRCODE_BASIC_INVALID_USAGE_OBJECT ); } bRes = ( bRes && refVar1->GetObject() == refVar2->GetObject() ); SbxVariable* pRes = new SbxVariable; @@ -1811,7 +1811,7 @@ void SbiRuntime::StepSET_Impl( SbxVariableRef& refVal, SbxVariableRef& refVar, b SbxDataType eVarType = refVar->GetType(); if( !bHandleDefaultProp && eVarType != SbxOBJECT && !(eVarType & SbxARRAY) && refVar->IsFixed() ) { - Error( SbERR_INVALID_USAGE_OBJECT ); + Error( ERRCODE_BASIC_INVALID_USAGE_OBJECT ); return; } @@ -1819,7 +1819,7 @@ void SbiRuntime::StepSET_Impl( SbxVariableRef& refVal, SbxVariableRef& refVar, b SbxDataType eValType = refVal->GetType(); if( !bHandleDefaultProp && eValType != SbxOBJECT && !(eValType & SbxARRAY) && refVal->IsFixed() ) { - Error( SbERR_INVALID_USAGE_OBJECT ); + Error( ERRCODE_BASIC_INVALID_USAGE_OBJECT ); return; } @@ -1849,7 +1849,7 @@ void SbiRuntime::StepSET_Impl( SbxVariableRef& refVal, SbxVariableRef& refVar, b // as an object! if( !refVal ) { - Error( SbERR_INVALID_USAGE_OBJECT ); + Error( ERRCODE_BASIC_INVALID_USAGE_OBJECT ); } else { @@ -2051,7 +2051,7 @@ void SbiRuntime::StepLSET() if( refVar->GetType() != SbxSTRING || refVal->GetType() != SbxSTRING ) { - Error( SbERR_INVALID_USAGE_OBJECT ); + Error( ERRCODE_BASIC_INVALID_USAGE_OBJECT ); } else { @@ -2087,7 +2087,7 @@ void SbiRuntime::StepRSET() SbxVariableRef refVar = PopVar(); if( refVar->GetType() != SbxSTRING || refVal->GetType() != SbxSTRING ) { - Error( SbERR_INVALID_USAGE_OBJECT ); + Error( ERRCODE_BASIC_INVALID_USAGE_OBJECT ); } else { @@ -2159,7 +2159,7 @@ void SbiRuntime::DimImpl( SbxVariableRef refVar ) // have in mind that Arg[0] does not count! if( pDims && !( pDims->Count() & 1 ) ) { - StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); + StarBASIC::FatalError( ERRCODE_BASIC_INTERNAL_ERROR ); } else { @@ -2176,7 +2176,7 @@ void SbiRuntime::DimImpl( SbxVariableRef refVar ) sal_Int32 ub = pDims->Get( i++ )->GetLong(); if( ub < lb ) { - Error( SbERR_OUT_OF_RANGE ), ub = lb; + Error( ERRCODE_BASIC_OUT_OF_RANGE ), ub = lb; } pArray->AddDim32( lb, ub ); if ( lb != ub ) @@ -2258,7 +2258,7 @@ void SbiRuntime::StepREDIMP() if( nDimsOld != nDimsNew ) { - StarBASIC::Error( SbERR_OUT_OF_RANGE ); + StarBASIC::Error( ERRCODE_BASIC_OUT_OF_RANGE ); } else if (nDims > 0) { @@ -2401,7 +2401,7 @@ void SbiRuntime::StepARRAYACCESS() { if( !refArgv ) { - StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); + StarBASIC::FatalError( ERRCODE_BASIC_INTERNAL_ERROR ); } SbxVariableRef refVar = PopVar(); refVar->SetParameters( refArgv ); @@ -2438,7 +2438,7 @@ void SbiRuntime::StepARGV() { if( !refArgv ) { - StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); + StarBASIC::FatalError( ERRCODE_BASIC_INTERNAL_ERROR ); } else { @@ -2536,7 +2536,7 @@ void SbiRuntime::StepINPUT() SbxBase::ResetError(); if( !err ) { - err = SbERR_CONVERSION; + err = ERRCODE_BASIC_CONVERSION; } } } @@ -2547,7 +2547,7 @@ void SbiRuntime::StepINPUT() SbxBase::ResetError(); } } - if( err == SbERR_USER_ABORT ) + if( err == ERRCODE_BASIC_USER_ABORT ) { Error( err ); } @@ -2604,7 +2604,7 @@ void SbiRuntime::StepNEXT() { if( !pForStk ) { - StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); + StarBASIC::FatalError( ERRCODE_BASIC_INTERNAL_ERROR ); return; } if( pForStk->eForType == FOR_TO ) @@ -2631,7 +2631,7 @@ void SbiRuntime::StepENDCASE() { if( !refCaseStk || !refCaseStk->Count() ) { - StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); + StarBASIC::FatalError( ERRCODE_BASIC_INTERNAL_ERROR ); } else { @@ -2779,7 +2779,7 @@ void SbiRuntime::StepRESTART() void SbiRuntime::StepEMPTY() { // #57915 The semantics of StepEMPTY() is the representation of a missing argument. - // This is represented by the value 448 (SbERR_NAMED_NOT_FOUND) of the type error + // This is represented by the value 448 (ERRCODE_BASIC_NAMED_NOT_FOUND) of the type error // in VB. StepEmpty should now rather be named StepMISSING() but the name is kept // to simplify matters. SbxVariableRef xVar = new SbxVariable( SbxVARIANT ); @@ -2847,7 +2847,7 @@ void SbiRuntime::StepLOADI( sal_uInt32 nOp1 ) void SbiRuntime::StepARGN( sal_uInt32 nOp1 ) { if( !refArgv ) - StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); + StarBASIC::FatalError( ERRCODE_BASIC_INTERNAL_ERROR ); else { OUString aAlias( pImg->GetString( static_cast<short>( nOp1 ) ) ); @@ -2871,7 +2871,7 @@ void SbiRuntime::StepARGN( sal_uInt32 nOp1 ) void SbiRuntime::StepARGTYP( sal_uInt32 nOp1 ) { if( !refArgv ) - StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); + StarBASIC::FatalError( ERRCODE_BASIC_INTERNAL_ERROR ); else { bool bByVal = (nOp1 & 0x8000) != 0; // Ist BYVAL requested? @@ -2898,7 +2898,7 @@ void SbiRuntime::StepARGTYP( sal_uInt32 nOp1 ) if( bByVal ) pVar->ResetFlag( SbxFlagBits::Reference ); // no reference -> OK else - Error( SbERR_BAD_PARAMETERS ); // reference needed + Error( ERRCODE_BASIC_BAD_PARAMETERS ); // reference needed } if( pVar->GetType() != t ) @@ -2941,7 +2941,7 @@ void SbiRuntime::StepJUMP( sal_uInt32 nOp1 ) // #QUESTION shouln't this be // if( (sal_uInt8*)( nOp1+pImagGetCode() ) >= pImg->GetCodeSize() ) if( nOp1 >= pImg->GetCodeSize() ) - StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); + StarBASIC::FatalError( ERRCODE_BASIC_INTERNAL_ERROR ); #endif pCode = reinterpret_cast<const sal_uInt8*>(pImg->GetCode()) + nOp1; } @@ -2995,7 +2995,7 @@ void SbiRuntime::StepGOSUB( sal_uInt32 nOp1 ) { PushGosub( pCode ); if( nOp1 >= pImg->GetCodeSize() ) - StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); + StarBASIC::FatalError( ERRCODE_BASIC_INTERNAL_ERROR ); pCode = reinterpret_cast<const sal_uInt8*>(pImg->GetCode()) + nOp1; } @@ -3014,7 +3014,7 @@ void SbiRuntime::StepTESTFOR( sal_uInt32 nOp1 ) { if( !pForStk ) { - StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); + StarBASIC::FatalError( ERRCODE_BASIC_INTERNAL_ERROR ); return; } @@ -3115,7 +3115,7 @@ void SbiRuntime::StepTESTFOR( sal_uInt32 nOp1 ) void SbiRuntime::StepCASETO( sal_uInt32 nOp1 ) { if( !refCaseStk || !refCaseStk->Count() ) - StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); + StarBASIC::FatalError( ERRCODE_BASIC_INTERNAL_ERROR ); else { SbxVariableRef xTo = PopVar(); @@ -3147,7 +3147,7 @@ void SbiRuntime::StepRESUME( sal_uInt32 nOp1 ) // #32714 Resume without error? -> error if( !bInError ) { - Error( SbERR_BAD_RESUME ); + Error( ERRCODE_BASIC_BAD_RESUME ); return; } if( nOp1 ) @@ -3261,7 +3261,7 @@ bool SbiRuntime::checkClass_Impl( const SbxVariableRef& refVal, if ( !bOk ) { if( bRaiseErrors ) - Error( SbERR_INVALID_USAGE_OBJECT ); + Error( ERRCODE_BASIC_INVALID_USAGE_OBJECT ); } } else @@ -3279,7 +3279,7 @@ bool SbiRuntime::checkClass_Impl( const SbxVariableRef& refVal, if ( !bVBAEnabled ) { if( bRaiseErrors ) - Error( SbERR_NEEDS_OBJECT ); + Error( ERRCODE_BASIC_NEEDS_OBJECT ); bOk = false; } } @@ -3366,7 +3366,7 @@ SbxVariable* SbiRuntime::FindElement( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt SbxVariable* pElem = NULL; if( !pObj ) { - Error( SbERR_NO_OBJECT ); + Error( ERRCODE_BASIC_NO_OBJECT ); pElem = new SbxVariable; } else @@ -3496,9 +3496,9 @@ SbxVariable* SbiRuntime::FindElement( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt bFatalError = true; - if( !( nOp1 & 0x8000 ) && nNotFound == SbERR_PROC_UNDEFINED ) + if( !( nOp1 & 0x8000 ) && nNotFound == ERRCODE_BASIC_PROC_UNDEFINED ) { - nNotFound = SbERR_VAR_UNDEFINED; + nNotFound = ERRCODE_BASIC_VAR_UNDEFINED; } } if( bFatalError ) @@ -3668,7 +3668,7 @@ void SbiRuntime::SetupArgs( SbxVariable* p, sal_uInt32 nOp1 ) { if( !refArgv ) { - StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); + StarBASIC::FatalError( ERRCODE_BASIC_INTERNAL_ERROR ); } bool bHasNamed = false; sal_uInt16 i; @@ -3755,7 +3755,7 @@ void SbiRuntime::SetupArgs( SbxVariable* p, sal_uInt32 nOp1 ) } if( bError_ ) { - Error( SbERR_NO_NAMED_ARGS ); + Error( ERRCODE_BASIC_NO_NAMED_ARGS ); } } else @@ -3782,7 +3782,7 @@ void SbiRuntime::SetupArgs( SbxVariable* p, sal_uInt32 nOp1 ) } if( !pParam ) { - Error( SbERR_NAMED_NOT_FOUND ); break; + Error( ERRCODE_BASIC_NAMED_NOT_FOUND ); break; } } pArg->Put( pVar, nCurPar++ ); @@ -3825,7 +3825,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem ) { if( !pPar ) { - Error( SbERR_OUT_OF_RANGE ); + Error( ERRCODE_BASIC_OUT_OF_RANGE ); pElem = new SbxVariable; } else @@ -3867,7 +3867,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem ) sal_uInt32 nParamCount = (sal_uInt32)pPar->Count() - 1; if( nParamCount != 1 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return pElem; } @@ -3886,7 +3886,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem ) catch (const IndexOutOfBoundsException&) { // usually expect converting problem - StarBASIC::Error( SbERR_OUT_OF_RANGE ); + StarBASIC::Error( ERRCODE_BASIC_OUT_OF_RANGE ); } // #57847 always create a new variable, else error @@ -3975,7 +3975,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem ) SbxArray* pParam = pElem->GetParameters(); if( pParam != NULL && !pElem->IsSet( SbxFlagBits::VarToDim ) ) { - Error( SbERR_NO_OBJECT ); + Error( ERRCODE_BASIC_NO_OBJECT ); } } } @@ -3988,7 +3988,7 @@ SbxVariable* SbiRuntime::CheckArray( SbxVariable* pElem ) void SbiRuntime::StepRTL( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { - PushVar( FindElement( rBasic.pRtl, nOp1, nOp2, SbERR_PROC_UNDEFINED, false ) ); + PushVar( FindElement( rBasic.pRtl, nOp1, nOp2, ERRCODE_BASIC_PROC_UNDEFINED, false ) ); } void SbiRuntime::StepFIND_Impl( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt32 nOp2, @@ -4004,7 +4004,7 @@ void SbiRuntime::StepFIND_Impl( SbxObject* pObj, sal_uInt32 nOp1, sal_uInt32 nOp void SbiRuntime::StepFIND( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { - StepFIND_Impl( pMod, nOp1, nOp2, SbERR_PROC_UNDEFINED, true ); + StepFIND_Impl( pMod, nOp1, nOp2, ERRCODE_BASIC_PROC_UNDEFINED, true ); } // Search inside a class module (CM) to enable global search in time @@ -4016,7 +4016,7 @@ void SbiRuntime::StepFIND_CM( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { pMod->SetFlag( SbxFlagBits::GlobalSearch ); } - StepFIND_Impl( pMod, nOp1, nOp2, SbERR_PROC_UNDEFINED, true ); + StepFIND_Impl( pMod, nOp1, nOp2, ERRCODE_BASIC_PROC_UNDEFINED, true ); if( pClassModuleObject ) { @@ -4026,7 +4026,7 @@ void SbiRuntime::StepFIND_CM( sal_uInt32 nOp1, sal_uInt32 nOp2 ) void SbiRuntime::StepFIND_STATIC( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { - StepFIND_Impl( pMod, nOp1, nOp2, SbERR_PROC_UNDEFINED, true, true ); + StepFIND_Impl( pMod, nOp1, nOp2, ERRCODE_BASIC_PROC_UNDEFINED, true, true ); } // loading an object-element (+StringID+type) @@ -4051,7 +4051,7 @@ void SbiRuntime::StepELEM( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { SaveRef( static_cast<SbxVariable*>(pObj) ); } - PushVar( FindElement( pObj, nOp1, nOp2, SbERR_NO_METHOD, false ) ); + PushVar( FindElement( pObj, nOp1, nOp2, ERRCODE_BASIC_NO_METHOD, false ) ); } // loading a parameter (+offset+type) @@ -4088,7 +4088,7 @@ void SbiRuntime::StepPARAM( sal_uInt32 nOp1, sal_uInt32 nOp2 ) } else { - p->PutErr( 448 ); // like in VB: Error-Code 448 (SbERR_NAMED_NOT_FOUND) + p->PutErr( 448 ); // like in VB: Error-Code 448 (ERRCODE_BASIC_NAMED_NOT_FOUND) } refParams->Put( p, iLoop ); iLoop--; @@ -4123,7 +4123,7 @@ void SbiRuntime::StepPARAM( sal_uInt32 nOp1, sal_uInt32 nOp2 ) } if( !bOpt ) { - Error( SbERR_NOT_OPTIONAL ); + Error( ERRCODE_BASIC_NOT_OPTIONAL ); } } else if( t != SbxVARIANT && (SbxDataType)(p->GetType() & 0x0FFF ) != t ) @@ -4147,7 +4147,7 @@ void SbiRuntime::StepCASEIS( sal_uInt32 nOp1, sal_uInt32 nOp2 ) { if( !refCaseStk || !refCaseStk->Count() ) { - StarBASIC::FatalError( SbERR_INTERNAL_ERROR ); + StarBASIC::FatalError( ERRCODE_BASIC_INTERNAL_ERROR ); } else { @@ -4229,7 +4229,7 @@ void SbiRuntime::StepSTMNT( sal_uInt32 nOp1, sal_uInt32 nOp2 ) // would be wrong later otherwise! if( bFatalExpr) { - StarBASIC::FatalError( SbERR_NO_METHOD, sUnknownMethodName ); + StarBASIC::FatalError( ERRCODE_BASIC_NO_METHOD, sUnknownMethodName ); return; } pStmnt = pCode - 9; @@ -4320,7 +4320,7 @@ void SbiRuntime::StepCREATE( sal_uInt32 nOp1, sal_uInt32 nOp2 ) SbxObject *pObj = SbxBase::CreateObject( aClass ); if( !pObj ) { - Error( SbERR_INVALID_OBJECT ); + Error( ERRCODE_BASIC_INVALID_OBJECT ); } else { @@ -4376,7 +4376,7 @@ void SbiRuntime::StepDCREATE_IMPL( sal_uInt32 nOp1, sal_uInt32 nOp2 ) SbxBaseRef xObj = refVar->GetObject(); if( !xObj ) { - StarBASIC::Error( SbERR_INVALID_OBJECT ); + StarBASIC::Error( ERRCODE_BASIC_INVALID_OBJECT ); return; } @@ -4413,7 +4413,7 @@ void SbiRuntime::StepDCREATE_IMPL( sal_uInt32 nOp1, sal_uInt32 nOp2 ) SbxObject *pClassObj = SbxBase::CreateObject( aClass ); if( !pClassObj ) { - Error( SbERR_INVALID_OBJECT ); + Error( ERRCODE_BASIC_INVALID_OBJECT ); break; } else @@ -4463,7 +4463,7 @@ void SbiRuntime::StepDCREATE_IMPL( sal_uInt32 nOp1, sal_uInt32 nOp2 ) if( bRangeError ) { - StarBASIC::Error( SbERR_OUT_OF_RANGE ); + StarBASIC::Error( ERRCODE_BASIC_OUT_OF_RANGE ); } else { diff --git a/basic/source/runtime/stdobj1.cxx b/basic/source/runtime/stdobj1.cxx index 18efe8328c57..49779705178f 100644 --- a/basic/source/runtime/stdobj1.cxx +++ b/basic/source/runtime/stdobj1.cxx @@ -63,7 +63,7 @@ void SbStdPicture::PropType( SbxVariable* pVar, SbxArray*, bool bWrite ) { if( bWrite ) { - StarBASIC::Error( SbERR_PROP_READONLY ); + StarBASIC::Error( ERRCODE_BASIC_PROP_READONLY ); return; } @@ -83,7 +83,7 @@ void SbStdPicture::PropWidth( SbxVariable* pVar, SbxArray*, bool bWrite ) { if( bWrite ) { - StarBASIC::Error( SbERR_PROP_READONLY ); + StarBASIC::Error( ERRCODE_BASIC_PROP_READONLY ); return; } @@ -98,7 +98,7 @@ void SbStdPicture::PropHeight( SbxVariable* pVar, SbxArray*, bool bWrite ) { if( bWrite ) { - StarBASIC::Error( SbERR_PROP_READONLY ); + StarBASIC::Error( ERRCODE_BASIC_PROP_READONLY ); return; } @@ -306,7 +306,7 @@ void SbStdClipboard::MethClear( SbxVariable*, SbxArray* pPar_, bool ) { if( pPar_ && (pPar_->Count() > 1) ) { - StarBASIC::Error( SbERR_BAD_NUMBER_OF_ARGS ); + StarBASIC::Error( ERRCODE_BASIC_BAD_NUMBER_OF_ARGS ); return; } @@ -318,14 +318,14 @@ void SbStdClipboard::MethGetData( SbxVariable* pVar, SbxArray* pPar_, bool ) if( !pPar_ || (pPar_->Count() != 2) ) { - StarBASIC::Error( SbERR_BAD_NUMBER_OF_ARGS ); + StarBASIC::Error( ERRCODE_BASIC_BAD_NUMBER_OF_ARGS ); return; } sal_uInt16 nFormat = pPar_->Get(1)->GetInteger(); if( !nFormat || nFormat > 3 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -335,14 +335,14 @@ void SbStdClipboard::MethGetFormat( SbxVariable* pVar, SbxArray* pPar_, bool ) { if( !pPar_ || (pPar_->Count() != 2) ) { - StarBASIC::Error( SbERR_BAD_NUMBER_OF_ARGS ); + StarBASIC::Error( ERRCODE_BASIC_BAD_NUMBER_OF_ARGS ); return; } sal_uInt16 nFormat = pPar_->Get(1)->GetInteger(); if( !nFormat || nFormat > 3 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -353,7 +353,7 @@ void SbStdClipboard::MethGetText( SbxVariable* pVar, SbxArray* pPar_, bool ) { if( pPar_ && (pPar_->Count() > 1) ) { - StarBASIC::Error( SbERR_BAD_NUMBER_OF_ARGS ); + StarBASIC::Error( ERRCODE_BASIC_BAD_NUMBER_OF_ARGS ); return; } @@ -366,14 +366,14 @@ void SbStdClipboard::MethSetData( SbxVariable* pVar, SbxArray* pPar_, bool ) if( !pPar_ || (pPar_->Count() != 3) ) { - StarBASIC::Error( SbERR_BAD_NUMBER_OF_ARGS ); + StarBASIC::Error( ERRCODE_BASIC_BAD_NUMBER_OF_ARGS ); return; } sal_uInt16 nFormat = pPar_->Get(2)->GetInteger(); if( !nFormat || nFormat > 3 ) { - StarBASIC::Error( SbERR_BAD_ARGUMENT ); + StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT ); return; } @@ -385,7 +385,7 @@ void SbStdClipboard::MethSetText( SbxVariable* pVar, SbxArray* pPar_, bool ) if( !pPar_ || (pPar_->Count() != 2) ) { - StarBASIC::Error( SbERR_BAD_NUMBER_OF_ARGS ); + StarBASIC::Error( ERRCODE_BASIC_BAD_NUMBER_OF_ARGS ); return; } |