summaryrefslogtreecommitdiff
path: root/basic/source/sbx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-21 12:45:21 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-21 20:58:36 +0200
commit14c763e793780fec3f4e6280db437e4cda8bbd7c (patch)
tree48ce5fdc506b70ee7856677052759d3c9802d890 /basic/source/sbx
parent6580e171ad054dca38f55822e67a400191cecdf5 (diff)
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>
Diffstat (limited to 'basic/source/sbx')
-rw-r--r--basic/source/sbx/sbxarray.cxx2
-rw-r--r--basic/source/sbx/sbxbase.cxx8
-rw-r--r--basic/source/sbx/sbxbool.cxx2
-rw-r--r--basic/source/sbx/sbxbyte.cxx2
-rw-r--r--basic/source/sbx/sbxchar.cxx2
-rw-r--r--basic/source/sbx/sbxdbl.cxx2
-rw-r--r--basic/source/sbx/sbxint.cxx6
-rw-r--r--basic/source/sbx/sbxlng.cxx2
-rw-r--r--basic/source/sbx/sbxscan.cxx8
-rw-r--r--basic/source/sbx/sbxsng.cxx2
-rw-r--r--basic/source/sbx/sbxuint.cxx2
-rw-r--r--basic/source/sbx/sbxulng.cxx2
-rw-r--r--basic/source/sbx/sbxvalue.cxx22
-rw-r--r--basic/source/sbx/sbxvar.cxx4
14 files changed, 33 insertions, 33 deletions
diff --git a/basic/source/sbx/sbxarray.cxx b/basic/source/sbx/sbxarray.cxx
index 43b970ce1ee2..ae20542c798d 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 )
{
- ErrCode eRes = ERRCODE_SBX_OK;
+ ErrCode eRes = ERRCODE_NONE;
if( ub < lb && !bAllowSize0 )
{
eRes = ERRCODE_SBX_BOUNDS;
diff --git a/basic/source/sbx/sbxbase.cxx b/basic/source/sbx/sbxbase.cxx
index 2b591093d67e..a17d2c336016 100644
--- a/basic/source/sbx/sbxbase.cxx
+++ b/basic/source/sbx/sbxbase.cxx
@@ -34,7 +34,7 @@
SbxAppData::SbxAppData()
- : eErrCode(ERRCODE_SBX_OK)
+ : eErrCode(ERRCODE_NONE)
, pBasicFormater(nullptr)
, eBasicFormaterLangType(LANGUAGE_DONTKNOW)
{
@@ -102,18 +102,18 @@ ErrCode SbxBase::GetError()
void SbxBase::SetError( ErrCode e )
{
SbxAppData& r = GetSbxData_Impl();
- if( e && r.eErrCode == ERRCODE_SBX_OK )
+ if( e && r.eErrCode == ERRCODE_NONE )
r.eErrCode = e;
}
bool SbxBase::IsError()
{
- return GetSbxData_Impl().eErrCode != ERRCODE_SBX_OK;
+ return GetSbxData_Impl().eErrCode != ERRCODE_NONE;
}
void SbxBase::ResetError()
{
- GetSbxData_Impl().eErrCode = ERRCODE_SBX_OK;
+ GetSbxData_Impl().eErrCode = ERRCODE_NONE;
}
void SbxBase::AddFactory( SbxFactory* pFac )
diff --git a/basic/source/sbx/sbxbool.cxx b/basic/source/sbx/sbxbool.cxx
index fc8c78205fbf..902b1eb88e9c 100644
--- a/basic/source/sbx/sbxbool.cxx
+++ b/basic/source/sbx/sbxbool.cxx
@@ -80,7 +80,7 @@ enum SbxBOOL ImpGetBool( const SbxValues* p )
double n;
SbxDataType t;
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() )
{
diff --git a/basic/source/sbx/sbxbyte.cxx b/basic/source/sbx/sbxbyte.cxx
index 9c4e0e00f3e6..2cd4657eb037 100644
--- a/basic/source/sbx/sbxbyte.cxx
+++ b/basic/source/sbx/sbxbyte.cxx
@@ -161,7 +161,7 @@ start:
{
double d;
SbxDataType t;
- if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_SBX_OK )
+ if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_NONE )
nRes = 0;
else if( d > SbxMAXBYTE )
{
diff --git a/basic/source/sbx/sbxchar.cxx b/basic/source/sbx/sbxchar.cxx
index d4df0fed3d04..bad4903b6121 100644
--- a/basic/source/sbx/sbxchar.cxx
+++ b/basic/source/sbx/sbxchar.cxx
@@ -147,7 +147,7 @@ start:
{
double d;
SbxDataType t;
- if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_SBX_OK )
+ if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_NONE )
nRes = 0;
else if( d > SbxMAXCHAR )
{
diff --git a/basic/source/sbx/sbxdbl.cxx b/basic/source/sbx/sbxdbl.cxx
index e40d8dd55362..e4f8b16a9d9c 100644
--- a/basic/source/sbx/sbxdbl.cxx
+++ b/basic/source/sbx/sbxdbl.cxx
@@ -81,7 +81,7 @@ double ImpGetDouble( const SbxValues* p )
{
double d;
SbxDataType t;
- if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_SBX_OK )
+ if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_NONE )
{
nRes = 0;
#if HAVE_FEATURE_SCRIPTING
diff --git a/basic/source/sbx/sbxint.cxx b/basic/source/sbx/sbxint.cxx
index 81624fe64a4b..8c7760bcbb46 100644
--- a/basic/source/sbx/sbxint.cxx
+++ b/basic/source/sbx/sbxint.cxx
@@ -154,7 +154,7 @@ start:
{
double d;
SbxDataType t;
- if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_SBX_OK )
+ if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_NONE )
nRes = 0;
else if( d > SbxMAXINT )
{
@@ -440,7 +440,7 @@ start:
// Check if really 0 or invalid conversion
double d;
SbxDataType t;
- if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_SBX_OK )
+ if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_NONE )
nRes = 0;
else
nRes = (sal_Int64) d;
@@ -702,7 +702,7 @@ start:
// Check if really 0 or invalid conversion
double d;
SbxDataType t;
- if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_SBX_OK )
+ if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_NONE )
nRes = 0;
else if( d > SbxMAXSALUINT64 )
{
diff --git a/basic/source/sbx/sbxlng.cxx b/basic/source/sbx/sbxlng.cxx
index 5aba02cc484e..db0f2504d173 100644
--- a/basic/source/sbx/sbxlng.cxx
+++ b/basic/source/sbx/sbxlng.cxx
@@ -118,7 +118,7 @@ start:
{
double d;
SbxDataType t;
- if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_SBX_OK )
+ if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_NONE )
nRes = 0;
else if( d > SbxMAXLNG )
{
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index b39dba8a0e3e..eff6720951f5 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -268,7 +268,7 @@ ErrCode ImpScan( const OUString& rWSrc, double& nVal, SbxDataType& rType,
if( bMinus )
nVal = -nVal;
rType = eScanType;
- return ERRCODE_SBX_OK;
+ return ERRCODE_NONE;
}
// 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,
/*bAllowIntntl*/false, /*bOnlyIntntl*/true );
// read completely?
- if( nRetError == ERRCODE_SBX_OK && nLen != rSrc.getLength() )
+ if( nRetError == ERRCODE_NONE && nLen != rSrc.getLength() )
{
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 )
{
- ErrCode eRes = ERRCODE_SBX_OK;
+ ErrCode eRes = ERRCODE_NONE;
if( !CanWrite() )
{
eRes = ERRCODE_SBX_PROP_READONLY;
@@ -560,7 +560,7 @@ bool SbxValue::Scan( const OUString& rSrc, sal_uInt16* pLen )
double n;
SbxDataType t;
eRes = ImpScan( rSrc, n, t, pLen );
- if( eRes == ERRCODE_SBX_OK )
+ if( eRes == ERRCODE_NONE )
{
if( !IsFixed() )
{
diff --git a/basic/source/sbx/sbxsng.cxx b/basic/source/sbx/sbxsng.cxx
index 3877fd35ffd4..582a11db7ea9 100644
--- a/basic/source/sbx/sbxsng.cxx
+++ b/basic/source/sbx/sbxsng.cxx
@@ -106,7 +106,7 @@ start:
{
double d;
SbxDataType t;
- if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_SBX_OK )
+ if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_NONE )
nRes = 0;
else if( d > SbxMAXSNG )
{
diff --git a/basic/source/sbx/sbxuint.cxx b/basic/source/sbx/sbxuint.cxx
index f3546ebc0805..a02464dc6cf0 100644
--- a/basic/source/sbx/sbxuint.cxx
+++ b/basic/source/sbx/sbxuint.cxx
@@ -151,7 +151,7 @@ start:
{
double d;
SbxDataType t;
- if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_SBX_OK )
+ if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_NONE )
nRes = 0;
else if( d > SbxMAXUINT )
{
diff --git a/basic/source/sbx/sbxulng.cxx b/basic/source/sbx/sbxulng.cxx
index 6a8ac1f866e2..c694b50cecb6 100644
--- a/basic/source/sbx/sbxulng.cxx
+++ b/basic/source/sbx/sbxulng.cxx
@@ -118,7 +118,7 @@ start:
{
double d;
SbxDataType t;
- if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_SBX_OK )
+ if( ImpScan( *p->pOUString, d, t, nullptr ) != ERRCODE_NONE )
nRes = 0;
else if( d > SbxMAXULNG )
{
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index e18e4afa7180..89430af80530 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -269,7 +269,7 @@ bool SbxValue::Get( SbxValues& rRes ) const
{
bool bRes = false;
ErrCode eOld = GetError();
- if( eOld != ERRCODE_SBX_OK )
+ if( eOld != ERRCODE_NONE )
ResetError();
if( !CanRead() )
{
@@ -357,7 +357,7 @@ bool SbxValue::Get( SbxValues& rRes ) const
if( !IsError() )
{
bRes = true;
- if( eOld != ERRCODE_SBX_OK )
+ if( eOld != ERRCODE_NONE )
SetError( eOld );
}
return bRes;
@@ -423,7 +423,7 @@ bool SbxValue::Put( const SbxValues& rVal )
{
bool bRes = false;
ErrCode eOld = GetError();
- if( eOld != ERRCODE_SBX_OK )
+ if( eOld != ERRCODE_NONE )
ResetError();
if( !CanWrite() )
SetError( ERRCODE_SBX_PROP_READONLY );
@@ -520,7 +520,7 @@ bool SbxValue::Put( const SbxValues& rVal )
{
p->SetModified( true );
p->Broadcast( SfxHintId::BasicDataChanged );
- if( eOld != ERRCODE_SBX_OK )
+ if( eOld != ERRCODE_NONE )
SetError( eOld );
bRes = true;
}
@@ -699,7 +699,7 @@ bool SbxValue::ImpIsNumeric( bool bOnlyIntntl ) const
double n;
SbxDataType t2;
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 false;
@@ -835,7 +835,7 @@ bool SbxValue::Compute( SbxOperator eOp, const SbxValue& rOp )
SbxDataType eThisType = GetType();
SbxDataType eOpType = rOp.GetType();
ErrCode eOld = GetError();
- if( eOld != ERRCODE_SBX_OK )
+ if( eOld != ERRCODE_NONE )
ResetError();
if( !CanWrite() )
SetError( ERRCODE_SBX_PROP_READONLY );
@@ -1196,7 +1196,7 @@ Lbl_OpIsDouble:
Lbl_OpIsEmpty:
bool bRes = !IsError();
- if( bRes && eOld != ERRCODE_SBX_OK )
+ if( bRes && eOld != ERRCODE_NONE )
SetError( eOld );
return bRes;
}
@@ -1213,7 +1213,7 @@ bool SbxValue::Compare( SbxOperator eOp, const SbxValue& rOp ) const
bool bRes = false;
ErrCode eOld = GetError();
- if( eOld != ERRCODE_SBX_OK )
+ if( eOld != ERRCODE_NONE )
ResetError();
if( !CanRead() || !rOp.CanRead() )
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 );
return bRes;
}
@@ -1386,7 +1386,7 @@ bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
RTL_TEXTENCODING_ASCII_US);
double d;
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;
return false;
@@ -1401,7 +1401,7 @@ bool SbxValue::LoadData( SvStream& r, sal_uInt16 )
OUString aVal = read_uInt16_lenPrefixed_uInt8s_ToOUString(r,
RTL_TEXTENCODING_ASCII_US);
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;
return false;
diff --git a/basic/source/sbx/sbxvar.cxx b/basic/source/sbx/sbxvar.cxx
index 9af2d714cfcb..2e0d49c927a2 100644
--- a/basic/source/sbx/sbxvar.cxx
+++ b/basic/source/sbx/sbxvar.cxx
@@ -512,7 +512,7 @@ bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
rStrm, RTL_TEXTENCODING_ASCII_US);
double d;
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;
return false;
@@ -527,7 +527,7 @@ bool SbxVariable::LoadData( SvStream& rStrm, sal_uInt16 nVer )
aTmpString = read_uInt16_lenPrefixed_uInt8s_ToOUString(rStrm,
RTL_TEXTENCODING_ASCII_US);
SbxDataType t;
- if( ImpScan( aTmpString, aTmp.nDouble, t, nullptr ) != ERRCODE_SBX_OK )
+ if( ImpScan( aTmpString, aTmp.nDouble, t, nullptr ) != ERRCODE_NONE )
{
aTmp.nDouble = 0;
return false;