diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-15 08:40:10 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-15 09:48:11 +0200 |
commit | 7aee0ea7c5a780bca5193382b6f73599c2f025eb (patch) | |
tree | c6f7c110b53a5460a10ee1145e95f19ce08be27e /basic/source | |
parent | 5ea13cb3b9ec19fe2d88f91585f433c81e6b1f2e (diff) |
replace SbxError typedef with ErrCode
part of a larger patch to convert ErrCode to strong_int
Change-Id: Ia56e5d6d8c4217d6f258e2113d20ce737977892f
Reviewed-on: https://gerrit.libreoffice.org/38813
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic/source')
-rw-r--r-- | basic/source/classes/sb.cxx | 6 | ||||
-rw-r--r-- | basic/source/comp/parser.cxx | 4 | ||||
-rw-r--r-- | basic/source/runtime/methods.cxx | 2 | ||||
-rw-r--r-- | basic/source/runtime/runtime.cxx | 2 | ||||
-rw-r--r-- | basic/source/sbx/sbxarray.cxx | 2 | ||||
-rw-r--r-- | basic/source/sbx/sbxbase.cxx | 16 | ||||
-rw-r--r-- | basic/source/sbx/sbxconv.hxx | 2 | ||||
-rw-r--r-- | basic/source/sbx/sbxscan.cxx | 8 | ||||
-rw-r--r-- | basic/source/sbx/sbxvalue.cxx | 8 |
9 files changed, 25 insertions, 25 deletions
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx index 2474beb9bd48..23f6244ec28d 100644 --- a/basic/source/classes/sb.cxx +++ b/basic/source/classes/sb.cxx @@ -984,7 +984,7 @@ StarBASIC::~StarBASIC() } else if( bDocBasic ) { - SbxError eOld = SbxBase::GetError(); + ErrCode eOld = SbxBase::GetError(); lclRemoveDocBasicItem( *this ); @@ -1358,11 +1358,11 @@ bool StarBASIC::Call( const OUString& rName, SbxArray* pParam ) bool bRes = SbxObject::Call( rName, pParam ); if( !bRes ) { - SbxError eErr = SbxBase::GetError(); + ErrCode eErr = SbxBase::GetError(); SbxBase::ResetError(); if( eErr != ERRCODE_SBX_OK ) { - RTError( (ErrCode)eErr, OUString(), 0, 0, 0 ); + RTError( eErr, OUString(), 0, 0, 0 ); } } return bRes; diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx index 21131edbf6f8..45e1b49c9537 100644 --- a/basic/source/comp/parser.cxx +++ b/basic/source/comp/parser.cxx @@ -434,11 +434,11 @@ bool SbiParser::Parse() eCurTok == SUB || eCurTok == FUNCTION ) aGen.Statement(); (this->*( p->Func ) )(); - SbxError nSbxErr = SbxBase::GetError(); + ErrCode nSbxErr = SbxBase::GetError(); if( nSbxErr ) { SbxBase::ResetError(); - Error( (ErrCode)nSbxErr ); + Error( nSbxErr ); } } } diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 59b02467ab37..15f357c9950f 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -2635,7 +2635,7 @@ RTLFUNC(IsDate) } else if( eType == SbxSTRING ) { - SbxError nPrevError = SbxBase::GetError(); + ErrCode nPrevError = SbxBase::GetError(); SbxBase::ResetError(); // force conversion of the parameter to SbxDATE diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 13244e39de7d..f43e882d87a4 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -1606,7 +1606,7 @@ inline bool checkUnoStructCopy( bool bVBA, SbxVariableRef& refVal, SbxVariableRe if ( aAny.getValueType().getTypeClass() == TypeClass_STRUCT ) { refVar->SetType( SbxOBJECT ); - SbxError eOldErr = SbxBase::GetError(); + ErrCode eOldErr = SbxBase::GetError(); // There are some circumstances when calling GetObject // will trigger an error, we need to squash those here. // Alternatively it is possible that the same scenario diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx index db4655dace63..43b970ce1ee2 100644 --- a/basic/source/sbx/sbxarray.cxx +++ b/basic/source/sbx/sbxarray.cxx @@ -551,7 +551,7 @@ void SbxDimArray::Clear() void SbxDimArray::AddDimImpl32( sal_Int32 lb, sal_Int32 ub, bool bAllowSize0 ) { - SbxError eRes = ERRCODE_SBX_OK; + ErrCode eRes = ERRCODE_SBX_OK; if( ub < lb && !bAllowSize0 ) { eRes = ERRCODE_SBX_BOUNDS; diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx index 6c8148e00022..2b591093d67e 100644 --- a/basic/source/sbx/sbxbase.cxx +++ b/basic/source/sbx/sbxbase.cxx @@ -34,7 +34,7 @@ SbxAppData::SbxAppData() - : eSbxError(ERRCODE_SBX_OK) + : eErrCode(ERRCODE_SBX_OK) , pBasicFormater(nullptr) , eBasicFormaterLangType(LANGUAGE_DONTKNOW) { @@ -94,26 +94,26 @@ void SbxBase::SetModified( bool b ) ResetFlag( SbxFlagBits::Modified ); } -SbxError SbxBase::GetError() +ErrCode SbxBase::GetError() { - return GetSbxData_Impl().eSbxError; + return GetSbxData_Impl().eErrCode; } -void SbxBase::SetError( SbxError e ) +void SbxBase::SetError( ErrCode e ) { SbxAppData& r = GetSbxData_Impl(); - if( e && r.eSbxError == ERRCODE_SBX_OK ) - r.eSbxError = e; + if( e && r.eErrCode == ERRCODE_SBX_OK ) + r.eErrCode = e; } bool SbxBase::IsError() { - return GetSbxData_Impl().eSbxError != ERRCODE_SBX_OK; + return GetSbxData_Impl().eErrCode != ERRCODE_SBX_OK; } void SbxBase::ResetError() { - GetSbxData_Impl().eSbxError = ERRCODE_SBX_OK; + GetSbxData_Impl().eErrCode = ERRCODE_SBX_OK; } void SbxBase::AddFactory( SbxFactory* pFac ) diff --git a/basic/source/sbx/sbxconv.hxx b/basic/source/sbx/sbxconv.hxx index 08fa296f2c8f..25edf9bc2163 100644 --- a/basic/source/sbx/sbxconv.hxx +++ b/basic/source/sbx/sbxconv.hxx @@ -26,7 +26,7 @@ class SbxArray; // SBXSCAN.CXX extern void ImpCvtNum( double nNum, short nPrec, OUString& rRes, bool bCoreString=false ); -extern SbxError ImpScan +extern ErrCode ImpScan ( const OUString& rSrc, double& nVal, SbxDataType& rType, sal_uInt16* pLen, bool bAllowIntntl=false, bool bOnlyIntntl=false ); diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx index 8a5d59573d2d..b39dba8a0e3e 100644 --- a/basic/source/sbx/sbxscan.cxx +++ b/basic/source/sbx/sbxscan.cxx @@ -82,7 +82,7 @@ bool ImpStrChr( const sal_Unicode* p, sal_Unicode c ) // but exponent may also be a D, so data type is SbxDOUBLE // conversion error if data type is fixed and it doesn't fit -SbxError ImpScan( const OUString& rWSrc, double& nVal, SbxDataType& rType, +ErrCode ImpScan( const OUString& rWSrc, double& nVal, SbxDataType& rType, sal_uInt16* pLen, bool bAllowIntntl, bool bOnlyIntntl ) { sal_Unicode cIntntlDecSep, cIntntlGrpSep; @@ -272,11 +272,11 @@ SbxError ImpScan( const OUString& rWSrc, double& nVal, SbxDataType& rType, } // port for CDbl in the Basic -SbxError SbxValue::ScanNumIntnl( const OUString& rSrc, double& nVal, bool bSingle ) +ErrCode SbxValue::ScanNumIntnl( const OUString& rSrc, double& nVal, bool bSingle ) { SbxDataType t; sal_uInt16 nLen = 0; - SbxError nRetError = ImpScan( rSrc, nVal, t, &nLen, + ErrCode nRetError = ImpScan( rSrc, nVal, t, &nLen, /*bAllowIntntl*/false, /*bOnlyIntntl*/true ); // read completely? if( nRetError == ERRCODE_SBX_OK && nLen != rSrc.getLength() ) @@ -550,7 +550,7 @@ static sal_uInt16 printfmtstr( const OUString& rStr, OUString& rRes, const OUStr bool SbxValue::Scan( const OUString& rSrc, sal_uInt16* pLen ) { - SbxError eRes = ERRCODE_SBX_OK; + ErrCode eRes = ERRCODE_SBX_OK; if( !CanWrite() ) { eRes = ERRCODE_SBX_PROP_READONLY; diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx index 7ff177d8a736..10c3e0620016 100644 --- a/basic/source/sbx/sbxvalue.cxx +++ b/basic/source/sbx/sbxvalue.cxx @@ -268,7 +268,7 @@ SbxValue* SbxValue::TheRealValue( bool bObjInObjError ) const bool SbxValue::Get( SbxValues& rRes ) const { bool bRes = false; - SbxError eOld = GetError(); + ErrCode eOld = GetError(); if( eOld != ERRCODE_SBX_OK ) ResetError(); if( !CanRead() ) @@ -422,7 +422,7 @@ GET( GetDecimal, SbxDECIMAL, SbxDecimal*, pDecimal ) bool SbxValue::Put( const SbxValues& rVal ) { bool bRes = false; - SbxError eOld = GetError(); + ErrCode eOld = GetError(); if( eOld != ERRCODE_SBX_OK ) ResetError(); if( !CanWrite() ) @@ -834,7 +834,7 @@ bool SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp ) #endif SbxDataType eThisType = GetType(); SbxDataType eOpType = rOp.GetType(); - SbxError eOld = GetError(); + ErrCode eOld = GetError(); if( eOld != ERRCODE_SBX_OK ) ResetError(); if( !CanWrite() ) @@ -1212,7 +1212,7 @@ bool SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const #endif bool bRes = false; - SbxError eOld = GetError(); + ErrCode eOld = GetError(); if( eOld != ERRCODE_SBX_OK ) ResetError(); if( !CanRead() || !rOp.CanRead() ) |