s/ERRCODE_SBX_OK/ERRCODE_NONE
adds no value Change-Id: Iedf7a6a7be28fed4059b576312890be8cbb980d7 Reviewed-on: https://gerrit.libreoffice.org/39056 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
6580e171ad
commit
14c763e793
@ -1945,7 +1945,7 @@ void StackWindow::UpdateCalls()
|
|||||||
}
|
}
|
||||||
|
|
||||||
SbxBase::ResetError();
|
SbxBase::ResetError();
|
||||||
if( eOld != ERRCODE_SBX_OK )
|
if( eOld != ERRCODE_NONE )
|
||||||
SbxBase::SetError( eOld );
|
SbxBase::SetError( eOld );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -2581,7 +2581,7 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped )
|
|||||||
Invalidate();
|
Invalidate();
|
||||||
|
|
||||||
SbxBase::ResetError();
|
SbxBase::ResetError();
|
||||||
if( eOld != ERRCODE_SBX_OK )
|
if( eOld != ERRCODE_NONE )
|
||||||
SbxBase::SetError( eOld );
|
SbxBase::SetError( eOld );
|
||||||
setBasicWatchMode( false );
|
setBasicWatchMode( false );
|
||||||
}
|
}
|
||||||
|
@ -986,7 +986,7 @@ StarBASIC::~StarBASIC()
|
|||||||
lclRemoveDocBasicItem( *this );
|
lclRemoveDocBasicItem( *this );
|
||||||
|
|
||||||
SbxBase::ResetError();
|
SbxBase::ResetError();
|
||||||
if( eOld != ERRCODE_SBX_OK )
|
if( eOld != ERRCODE_NONE )
|
||||||
{
|
{
|
||||||
SbxBase::SetError( eOld );
|
SbxBase::SetError( eOld );
|
||||||
}
|
}
|
||||||
@ -1357,7 +1357,7 @@ bool StarBASIC::Call( const OUString& rName, SbxArray* pParam )
|
|||||||
{
|
{
|
||||||
ErrCode eErr = SbxBase::GetError();
|
ErrCode eErr = SbxBase::GetError();
|
||||||
SbxBase::ResetError();
|
SbxBase::ResetError();
|
||||||
if( eErr != ERRCODE_SBX_OK )
|
if( eErr != ERRCODE_NONE )
|
||||||
{
|
{
|
||||||
RTError( eErr, OUString(), 0, 0, 0 );
|
RTError( eErr, OUString(), 0, 0, 0 );
|
||||||
}
|
}
|
||||||
|
@ -334,7 +334,7 @@ RTLFUNC(CDbl) // JSM
|
|||||||
// #41690
|
// #41690
|
||||||
OUString aScanStr = pSbxVariable->GetOUString();
|
OUString aScanStr = pSbxVariable->GetOUString();
|
||||||
ErrCode Error = SbxValue::ScanNumIntnl( aScanStr, nVal );
|
ErrCode Error = SbxValue::ScanNumIntnl( aScanStr, nVal );
|
||||||
if( Error != ERRCODE_SBX_OK )
|
if( Error != ERRCODE_NONE )
|
||||||
{
|
{
|
||||||
StarBASIC::Error( Error );
|
StarBASIC::Error( Error );
|
||||||
}
|
}
|
||||||
@ -403,7 +403,7 @@ RTLFUNC(CSng) // JSM
|
|||||||
double dVal = 0.0;
|
double dVal = 0.0;
|
||||||
OUString aScanStr = pSbxVariable->GetOUString();
|
OUString aScanStr = pSbxVariable->GetOUString();
|
||||||
ErrCode Error = SbxValue::ScanNumIntnl( aScanStr, dVal, /*bSingle=*/true );
|
ErrCode Error = SbxValue::ScanNumIntnl( aScanStr, dVal, /*bSingle=*/true );
|
||||||
if( SbxBase::GetError() == ERRCODE_SBX_OK && Error != ERRCODE_SBX_OK )
|
if( SbxBase::GetError() == ERRCODE_NONE && Error != ERRCODE_NONE )
|
||||||
{
|
{
|
||||||
StarBASIC::Error( Error );
|
StarBASIC::Error( Error );
|
||||||
}
|
}
|
||||||
|
@ -1604,7 +1604,7 @@ inline bool checkUnoStructCopy( bool bVBA, SbxVariableRef& refVal, SbxVariableRe
|
|||||||
// Alternatively it is possible that the same scenario
|
// Alternatively it is possible that the same scenario
|
||||||
// could overwrite and existing error. Lets prevent that
|
// could overwrite and existing error. Lets prevent that
|
||||||
SbxObjectRef xVarObj = static_cast<SbxObject*>(refVar->GetObject());
|
SbxObjectRef xVarObj = static_cast<SbxObject*>(refVar->GetObject());
|
||||||
if ( eOldErr != ERRCODE_SBX_OK )
|
if ( eOldErr != ERRCODE_NONE )
|
||||||
SbxBase::SetError( eOldErr );
|
SbxBase::SetError( eOldErr );
|
||||||
else
|
else
|
||||||
SbxBase::ResetError();
|
SbxBase::ResetError();
|
||||||
|
@ -551,7 +551,7 @@ void SbxDimArray::Clear()
|
|||||||
|
|
||||||
void SbxDimArray::AddDimImpl32( sal_Int32 lb, sal_Int32 ub, bool bAllowSize0 )
|
void SbxDimArray::AddDimImpl32( sal_Int32 lb, sal_Int32 ub, bool bAllowSize0 )
|
||||||
{
|
{
|
||||||
ErrCode eRes = ERRCODE_SBX_OK;
|
ErrCode eRes = ERRCODE_NONE;
|
||||||
if( ub < lb && !bAllowSize0 )
|
if( ub < lb && !bAllowSize0 )
|
||||||
{
|
{
|
||||||
eRes = ERRCODE_SBX_BOUNDS;
|
eRes = ERRCODE_SBX_BOUNDS;
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
|
|
||||||
SbxAppData::SbxAppData()
|
SbxAppData::SbxAppData()
|
||||||
: eErrCode(ERRCODE_SBX_OK)
|
: eErrCode(ERRCODE_NONE)
|
||||||
, pBasicFormater(nullptr)
|
, pBasicFormater(nullptr)
|
||||||
, eBasicFormaterLangType(LANGUAGE_DONTKNOW)
|
, eBasicFormaterLangType(LANGUAGE_DONTKNOW)
|
||||||
{
|
{
|
||||||
@ -102,18 +102,18 @@ ErrCode SbxBase::GetError()
|
|||||||
void SbxBase::SetError( ErrCode e )
|
void SbxBase::SetError( ErrCode e )
|
||||||
{
|
{
|
||||||
SbxAppData& r = GetSbxData_Impl();
|
SbxAppData& r = GetSbxData_Impl();
|
||||||
if( e && r.eErrCode == ERRCODE_SBX_OK )
|
if( e && r.eErrCode == ERRCODE_NONE )
|
||||||
r.eErrCode = e;
|
r.eErrCode = e;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SbxBase::IsError()
|
bool SbxBase::IsError()
|
||||||
{
|
{
|
||||||
return GetSbxData_Impl().eErrCode != ERRCODE_SBX_OK;
|
return GetSbxData_Impl().eErrCode != ERRCODE_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SbxBase::ResetError()
|
void SbxBase::ResetError()
|
||||||
{
|
{
|
||||||
GetSbxData_Impl().eErrCode = ERRCODE_SBX_OK;
|
GetSbxData_Impl().eErrCode = ERRCODE_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SbxBase::AddFactory( SbxFactory* pFac )
|
void SbxBase::AddFactory( SbxFactory* pFac )
|
||||||
|
@ -80,7 +80,7 @@ enum SbxBOOL ImpGetBool( const SbxValues* p )
|
|||||||
double n;
|
double n;
|
||||||
SbxDataType t;
|
SbxDataType t;
|
||||||
sal_uInt16 nLen = 0;
|
sal_uInt16 nLen = 0;
|
||||||
if( ImpScan( *p->pOUString, n, t, &nLen ) == ERRCODE_SBX_OK )
|
if( ImpScan( *p->pOUString, n, t, &nLen ) == ERRCODE_NONE )
|
||||||
{
|
{
|
||||||
if( nLen == p->pOUString->getLength() )
|
if( nLen == p->pOUString->getLength() )
|
||||||
{
|
{
|
||||||
|
@ -161,7 +161,7 @@ start:
|
|||||||
{
|
{
|
||||||
double d;
|
double d;
|
||||||
SbxDataType t;
|
SbxDataType t;
|
||||||
if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_SBX_OK )
|
if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_NONE )
|
||||||
nRes = 0;
|
nRes = 0;
|
||||||
else if( d > SbxMAXBYTE )
|
else if( d > SbxMAXBYTE )
|
||||||
{
|
{
|
||||||
|
@ -147,7 +147,7 @@ start:
|
|||||||
{
|
{
|
||||||
double d;
|
double d;
|
||||||
SbxDataType t;
|
SbxDataType t;
|
||||||
if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_SBX_OK )
|
if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_NONE )
|
||||||
nRes = 0;
|
nRes = 0;
|
||||||
else if( d > SbxMAXCHAR )
|
else if( d > SbxMAXCHAR )
|
||||||
{
|
{
|
||||||
|
@ -81,7 +81,7 @@ double ImpGetDouble( const SbxValues* p )
|
|||||||
{
|
{
|
||||||
double d;
|
double d;
|
||||||
SbxDataType t;
|
SbxDataType t;
|
||||||
if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_SBX_OK )
|
if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_NONE )
|
||||||
{
|
{
|
||||||
nRes = 0;
|
nRes = 0;
|
||||||
#if HAVE_FEATURE_SCRIPTING
|
#if HAVE_FEATURE_SCRIPTING
|
||||||
|
@ -154,7 +154,7 @@ start:
|
|||||||
{
|
{
|
||||||
double d;
|
double d;
|
||||||
SbxDataType t;
|
SbxDataType t;
|
||||||
if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_SBX_OK )
|
if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_NONE )
|
||||||
nRes = 0;
|
nRes = 0;
|
||||||
else if( d > SbxMAXINT )
|
else if( d > SbxMAXINT )
|
||||||
{
|
{
|
||||||
@ -440,7 +440,7 @@ start:
|
|||||||
// Check if really 0 or invalid conversion
|
// Check if really 0 or invalid conversion
|
||||||
double d;
|
double d;
|
||||||
SbxDataType t;
|
SbxDataType t;
|
||||||
if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_SBX_OK )
|
if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_NONE )
|
||||||
nRes = 0;
|
nRes = 0;
|
||||||
else
|
else
|
||||||
nRes = (sal_Int64) d;
|
nRes = (sal_Int64) d;
|
||||||
@ -702,7 +702,7 @@ start:
|
|||||||
// Check if really 0 or invalid conversion
|
// Check if really 0 or invalid conversion
|
||||||
double d;
|
double d;
|
||||||
SbxDataType t;
|
SbxDataType t;
|
||||||
if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_SBX_OK )
|
if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_NONE )
|
||||||
nRes = 0;
|
nRes = 0;
|
||||||
else if( d > SbxMAXSALUINT64 )
|
else if( d > SbxMAXSALUINT64 )
|
||||||
{
|
{
|
||||||
|
@ -118,7 +118,7 @@ start:
|
|||||||
{
|
{
|
||||||
double d;
|
double d;
|
||||||
SbxDataType t;
|
SbxDataType t;
|
||||||
if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_SBX_OK )
|
if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_NONE )
|
||||||
nRes = 0;
|
nRes = 0;
|
||||||
else if( d > SbxMAXLNG )
|
else if( d > SbxMAXLNG )
|
||||||
{
|
{
|
||||||
|
@ -268,7 +268,7 @@ ErrCode ImpScan( const OUString& rWSrc, double& nVal, SbxDataType& rType,
|
|||||||
if( bMinus )
|
if( bMinus )
|
||||||
nVal = -nVal;
|
nVal = -nVal;
|
||||||
rType = eScanType;
|
rType = eScanType;
|
||||||
return ERRCODE_SBX_OK;
|
return ERRCODE_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// port for CDbl in the Basic
|
// port for CDbl in the Basic
|
||||||
@ -279,7 +279,7 @@ ErrCode SbxValue::ScanNumIntnl( const OUString& rSrc, double& nVal, bool bSingle
|
|||||||
ErrCode nRetError = ImpScan( rSrc, nVal, t, &nLen,
|
ErrCode nRetError = ImpScan( rSrc, nVal, t, &nLen,
|
||||||
/*bAllowIntntl*/false, /*bOnlyIntntl*/true );
|
/*bAllowIntntl*/false, /*bOnlyIntntl*/true );
|
||||||
// read completely?
|
// read completely?
|
||||||
if( nRetError == ERRCODE_SBX_OK && nLen != rSrc.getLength() )
|
if( nRetError == ERRCODE_NONE && nLen != rSrc.getLength() )
|
||||||
{
|
{
|
||||||
nRetError = ERRCODE_SBX_CONVERSION;
|
nRetError = ERRCODE_SBX_CONVERSION;
|
||||||
}
|
}
|
||||||
@ -550,7 +550,7 @@ static sal_uInt16 printfmtstr( const OUString& rStr, OUString& rRes, const OUStr
|
|||||||
|
|
||||||
bool SbxValue::Scan( const OUString& rSrc, sal_uInt16* pLen )
|
bool SbxValue::Scan( const OUString& rSrc, sal_uInt16* pLen )
|
||||||
{
|
{
|
||||||
ErrCode eRes = ERRCODE_SBX_OK;
|
ErrCode eRes = ERRCODE_NONE;
|
||||||
if( !CanWrite() )
|
if( !CanWrite() )
|
||||||
{
|
{
|
||||||
eRes = ERRCODE_SBX_PROP_READONLY;
|
eRes = ERRCODE_SBX_PROP_READONLY;
|
||||||
@ -560,7 +560,7 @@ bool SbxValue::Scan( const OUString& rSrc, sal_uInt16* pLen )
|
|||||||
double n;
|
double n;
|
||||||
SbxDataType t;
|
SbxDataType t;
|
||||||
eRes = ImpScan( rSrc, n, t, pLen );
|
eRes = ImpScan( rSrc, n, t, pLen );
|
||||||
if( eRes == ERRCODE_SBX_OK )
|
if( eRes == ERRCODE_NONE )
|
||||||
{
|
{
|
||||||
if( !IsFixed() )
|
if( !IsFixed() )
|
||||||
{
|
{
|
||||||
|
@ -106,7 +106,7 @@ start:
|
|||||||
{
|
{
|
||||||
double d;
|
double d;
|
||||||
SbxDataType t;
|
SbxDataType t;
|
||||||
if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_SBX_OK )
|
if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_NONE )
|
||||||
nRes = 0;
|
nRes = 0;
|
||||||
else if( d > SbxMAXSNG )
|
else if( d > SbxMAXSNG )
|
||||||
{
|
{
|
||||||
|
@ -151,7 +151,7 @@ start:
|
|||||||
{
|
{
|
||||||
double d;
|
double d;
|
||||||
SbxDataType t;
|
SbxDataType t;
|
||||||
if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_SBX_OK )
|
if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_NONE )
|
||||||
nRes = 0;
|
nRes = 0;
|
||||||
else if( d > SbxMAXUINT )
|
else if( d > SbxMAXUINT )
|
||||||
{
|
{
|
||||||
|
@ -118,7 +118,7 @@ start:
|
|||||||
{
|
{
|
||||||
double d;
|
double d;
|
||||||
SbxDataType t;
|
SbxDataType t;
|
||||||
if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_SBX_OK )
|
if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_NONE )
|
||||||
nRes = 0;
|
nRes = 0;
|
||||||
else if( d > SbxMAXULNG )
|
else if( d > SbxMAXULNG )
|
||||||
{
|
{
|
||||||
|
@ -269,7 +269,7 @@ bool SbxValue::Get( SbxValues& rRes ) const
|
|||||||
{
|
{
|
||||||
bool bRes = false;
|
bool bRes = false;
|
||||||
ErrCode eOld = GetError();
|
ErrCode eOld = GetError();
|
||||||
if( eOld != ERRCODE_SBX_OK )
|
if( eOld != ERRCODE_NONE )
|
||||||
ResetError();
|
ResetError();
|
||||||
if( !CanRead() )
|
if( !CanRead() )
|
||||||
{
|
{
|
||||||
@ -357,7 +357,7 @@ bool SbxValue::Get( SbxValues& rRes ) const
|
|||||||
if( !IsError() )
|
if( !IsError() )
|
||||||
{
|
{
|
||||||
bRes = true;
|
bRes = true;
|
||||||
if( eOld != ERRCODE_SBX_OK )
|
if( eOld != ERRCODE_NONE )
|
||||||
SetError( eOld );
|
SetError( eOld );
|
||||||
}
|
}
|
||||||
return bRes;
|
return bRes;
|
||||||
@ -423,7 +423,7 @@ bool SbxValue::Put( const SbxValues& rVal )
|
|||||||
{
|
{
|
||||||
bool bRes = false;
|
bool bRes = false;
|
||||||
ErrCode eOld = GetError();
|
ErrCode eOld = GetError();
|
||||||
if( eOld != ERRCODE_SBX_OK )
|
if( eOld != ERRCODE_NONE )
|
||||||
ResetError();
|
ResetError();
|
||||||
if( !CanWrite() )
|
if( !CanWrite() )
|
||||||
SetError( ERRCODE_SBX_PROP_READONLY );
|
SetError( ERRCODE_SBX_PROP_READONLY );
|
||||||
@ -520,7 +520,7 @@ bool SbxValue::Put( const SbxValues& rVal )
|
|||||||
{
|
{
|
||||||
p->SetModified( true );
|
p->SetModified( true );
|
||||||
p->Broadcast( SfxHintId::BasicDataChanged );
|
p->Broadcast( SfxHintId::BasicDataChanged );
|
||||||
if( eOld != ERRCODE_SBX_OK )
|
if( eOld != ERRCODE_NONE )
|
||||||
SetError( eOld );
|
SetError( eOld );
|
||||||
bRes = true;
|
bRes = true;
|
||||||
}
|
}
|
||||||
@ -699,7 +699,7 @@ bool SbxValue::ImpIsNumeric( bool bOnlyIntntl ) const
|
|||||||
double n;
|
double n;
|
||||||
SbxDataType t2;
|
SbxDataType t2;
|
||||||
sal_uInt16 nLen = 0;
|
sal_uInt16 nLen = 0;
|
||||||
if( ImpScan( s, n, t2, &nLen, /*bAllowIntntl*/false, bOnlyIntntl ) == ERRCODE_SBX_OK )
|
if( ImpScan( s, n, t2, &nLen, /*bAllowIntntl*/false, bOnlyIntntl ) == ERRCODE_NONE )
|
||||||
return nLen == s.getLength();
|
return nLen == s.getLength();
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -835,7 +835,7 @@ bool SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp )
|
|||||||
SbxDataType eThisType = GetType();
|
SbxDataType eThisType = GetType();
|
||||||
SbxDataType eOpType = rOp.GetType();
|
SbxDataType eOpType = rOp.GetType();
|
||||||
ErrCode eOld = GetError();
|
ErrCode eOld = GetError();
|
||||||
if( eOld != ERRCODE_SBX_OK )
|
if( eOld != ERRCODE_NONE )
|
||||||
ResetError();
|
ResetError();
|
||||||
if( !CanWrite() )
|
if( !CanWrite() )
|
||||||
SetError( ERRCODE_SBX_PROP_READONLY );
|
SetError( ERRCODE_SBX_PROP_READONLY );
|
||||||
@ -1196,7 +1196,7 @@ Lbl_OpIsDouble:
|
|||||||
Lbl_OpIsEmpty:
|
Lbl_OpIsEmpty:
|
||||||
|
|
||||||
bool bRes = !IsError();
|
bool bRes = !IsError();
|
||||||
if( bRes && eOld != ERRCODE_SBX_OK )
|
if( bRes && eOld != ERRCODE_NONE )
|
||||||
SetError( eOld );
|
SetError( eOld );
|
||||||
return bRes;
|
return bRes;
|
||||||
}
|
}
|
||||||
@ -1213,7 +1213,7 @@ bool SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const
|
|||||||
|
|
||||||
bool bRes = false;
|
bool bRes = false;
|
||||||
ErrCode eOld = GetError();
|
ErrCode eOld = GetError();
|
||||||
if( eOld != ERRCODE_SBX_OK )
|
if( eOld != ERRCODE_NONE )
|
||||||
ResetError();
|
ResetError();
|
||||||
if( !CanRead() || !rOp.CanRead() )
|
if( !CanRead() || !rOp.CanRead() )
|
||||||
SetError( ERRCODE_SBX_PROP_WRITEONLY );
|
SetError( ERRCODE_SBX_PROP_WRITEONLY );
|
||||||
@ -1357,7 +1357,7 @@ bool SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( eOld != ERRCODE_SBX_OK )
|
if( eOld != ERRCODE_NONE )
|
||||||
SetError( eOld );
|
SetError( eOld );
|
||||||
return bRes;
|
return bRes;
|
||||||
}
|
}
|
||||||
@ -1386,7 +1386,7 @@ bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
|
|||||||
RTL_TEXTENCODING_ASCII_US);
|
RTL_TEXTENCODING_ASCII_US);
|
||||||
double d;
|
double d;
|
||||||
SbxDataType t;
|
SbxDataType t;
|
||||||
if( ImpScan( aVal, d, t, nullptr ) != ERRCODE_SBX_OK || t == SbxDOUBLE )
|
if( ImpScan( aVal, d, t, nullptr ) != ERRCODE_NONE || t == SbxDOUBLE )
|
||||||
{
|
{
|
||||||
aData.nSingle = 0.0F;
|
aData.nSingle = 0.0F;
|
||||||
return false;
|
return false;
|
||||||
@ -1401,7 +1401,7 @@ bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
|
|||||||
OUString aVal = read_uInt16_lenPrefixed_uInt8s_ToOUString(r,
|
OUString aVal = read_uInt16_lenPrefixed_uInt8s_ToOUString(r,
|
||||||
RTL_TEXTENCODING_ASCII_US);
|
RTL_TEXTENCODING_ASCII_US);
|
||||||
SbxDataType t;
|
SbxDataType t;
|
||||||
if( ImpScan( aVal, aData.nDouble, t, nullptr ) != ERRCODE_SBX_OK )
|
if( ImpScan( aVal, aData.nDouble, t, nullptr ) != ERRCODE_NONE )
|
||||||
{
|
{
|
||||||
aData.nDouble = 0.0;
|
aData.nDouble = 0.0;
|
||||||
return false;
|
return false;
|
||||||
|
@ -512,7 +512,7 @@ bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
|
|||||||
rStrm, RTL_TEXTENCODING_ASCII_US);
|
rStrm, RTL_TEXTENCODING_ASCII_US);
|
||||||
double d;
|
double d;
|
||||||
SbxDataType t;
|
SbxDataType t;
|
||||||
if( ImpScan( aTmpString, d, t, nullptr ) != ERRCODE_SBX_OK || t == SbxDOUBLE )
|
if( ImpScan( aTmpString, d, t, nullptr ) != ERRCODE_NONE || t == SbxDOUBLE )
|
||||||
{
|
{
|
||||||
aTmp.nSingle = 0;
|
aTmp.nSingle = 0;
|
||||||
return false;
|
return false;
|
||||||
@ -527,7 +527,7 @@ bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
|
|||||||
aTmpString = read_uInt16_lenPrefixed_uInt8s_ToOUString(rStrm,
|
aTmpString = read_uInt16_lenPrefixed_uInt8s_ToOUString(rStrm,
|
||||||
RTL_TEXTENCODING_ASCII_US);
|
RTL_TEXTENCODING_ASCII_US);
|
||||||
SbxDataType t;
|
SbxDataType t;
|
||||||
if( ImpScan( aTmpString, aTmp.nDouble, t, nullptr ) != ERRCODE_SBX_OK )
|
if( ImpScan( aTmpString, aTmp.nDouble, t, nullptr ) != ERRCODE_NONE )
|
||||||
{
|
{
|
||||||
aTmp.nDouble = 0;
|
aTmp.nDouble = 0;
|
||||||
return false;
|
return false;
|
||||||
|
@ -128,8 +128,6 @@ enum class SbxNameType { // Type of the questioned name of a variable
|
|||||||
|
|
||||||
|
|
||||||
// New error codes per define
|
// New error codes per define
|
||||||
#define ERRCODE_SBX_OK ERRCODE_NONE // processed
|
|
||||||
|
|
||||||
#define ERRCODE_SBX_SYNTAX ErrCode(1UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_COMPILER)
|
#define ERRCODE_SBX_SYNTAX ErrCode(1UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_COMPILER)
|
||||||
#define ERRCODE_SBX_NOTIMP ErrCode(2UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_NOTSUPPORTED)
|
#define ERRCODE_SBX_NOTIMP ErrCode(2UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_NOTSUPPORTED)
|
||||||
#define ERRCODE_SBX_OVERFLOW ErrCode(3UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_SBX) // overflow
|
#define ERRCODE_SBX_OVERFLOW ErrCode(3UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_SBX) // overflow
|
||||||
|
@ -217,7 +217,7 @@ namespace basprov
|
|||||||
|
|
||||||
// call method
|
// call method
|
||||||
SbxVariableRef xReturn = new SbxVariable;
|
SbxVariableRef xReturn = new SbxVariable;
|
||||||
ErrCode nErr = ERRCODE_SBX_OK;
|
ErrCode nErr = ERRCODE_NONE;
|
||||||
|
|
||||||
// if it's a document-based script, temporarily reset ThisComponent to the script invocation context
|
// if it's a document-based script, temporarily reset ThisComponent to the script invocation context
|
||||||
Any aOldThisComponent;
|
Any aOldThisComponent;
|
||||||
@ -236,7 +236,7 @@ namespace basprov
|
|||||||
if ( m_documentBasicManager && m_xDocumentScriptContext.is() )
|
if ( m_documentBasicManager && m_xDocumentScriptContext.is() )
|
||||||
m_documentBasicManager->SetGlobalUNOConstant( "ThisComponent", aOldThisComponent );
|
m_documentBasicManager->SetGlobalUNOConstant( "ThisComponent", aOldThisComponent );
|
||||||
|
|
||||||
if ( nErr != ERRCODE_SBX_OK )
|
if ( nErr != ERRCODE_NONE )
|
||||||
{
|
{
|
||||||
// TODO: throw InvocationTargetException ?
|
// TODO: throw InvocationTargetException ?
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user