summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorMichael Brauer <mib@openoffice.org>2010-08-13 12:52:17 +0200
committerMichael Brauer <mib@openoffice.org>2010-08-13 12:52:17 +0200
commita768f3921b60caae5af40b305540a47aaedad275 (patch)
treed6696d8530c5b7d15122bd1388f24155c692d13d /basic
parent4aea598fb6ddfcfc883101be59ce5e3185d186e0 (diff)
mib18: #163285#: Set correct error code in Collection.item and Collection.remove
Diffstat (limited to 'basic')
-rwxr-xr-xbasic/source/classes/sb.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index 3e83948fca..d2857f1901 100755
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -2086,7 +2086,7 @@ void BasicCollection::CollItem( SbxArray* pPar_ )
if( nIndex >= 0 && nIndex < (INT32)xItemArray->Count32() )
pRes = xItemArray->Get32( nIndex );
if( !pRes )
- SetError( SbxERR_BAD_INDEX );
+ SetError( SbERR_BAD_ARGUMENT );
else
*(pPar_->Get(0)) = *pRes;
}
@@ -2104,6 +2104,6 @@ void BasicCollection::CollRemove( SbxArray* pPar_ )
if( nIndex >= 0 && nIndex < (INT32)xItemArray->Count32() )
xItemArray->Remove32( nIndex );
else
- SetError( SbxERR_BAD_INDEX );
+ SetError( SbERR_BAD_ARGUMENT );
}