[Libreoffice-commits] core.git: basctl/source basic/source include/basic scripting/source

Noel Grandin noel.grandin at collabora.co.uk
Wed Jun 21 18:59:00 UTC 2017


 basctl/source/basicide/baside2b.cxx    |    4 ++--
 basic/source/classes/sb.cxx            |    4 ++--
 basic/source/runtime/methods1.cxx      |    4 ++--
 basic/source/runtime/runtime.cxx       |    2 +-
 basic/source/sbx/sbxarray.cxx          |    2 +-
 basic/source/sbx/sbxbase.cxx           |    8 ++++----
 basic/source/sbx/sbxbool.cxx           |    2 +-
 basic/source/sbx/sbxbyte.cxx           |    2 +-
 basic/source/sbx/sbxchar.cxx           |    2 +-
 basic/source/sbx/sbxdbl.cxx            |    2 +-
 basic/source/sbx/sbxint.cxx            |    6 +++---
 basic/source/sbx/sbxlng.cxx            |    2 +-
 basic/source/sbx/sbxscan.cxx           |    8 ++++----
 basic/source/sbx/sbxsng.cxx            |    2 +-
 basic/source/sbx/sbxuint.cxx           |    2 +-
 basic/source/sbx/sbxulng.cxx           |    2 +-
 basic/source/sbx/sbxvalue.cxx          |   22 +++++++++++-----------
 basic/source/sbx/sbxvar.cxx            |    4 ++--
 include/basic/sbxdef.hxx               |    2 --
 scripting/source/basprov/basscript.cxx |    4 ++--
 20 files changed, 42 insertions(+), 44 deletions(-)

New commits:
commit 14c763e793780fec3f4e6280db437e4cda8bbd7c
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Wed Jun 21 12:45:21 2017 +0200

    s/ERRCODE_SBX_OK/ERRCODE_NONE
    
    adds no value
    
    Change-Id: Iedf7a6a7be28fed4059b576312890be8cbb980d7
    Reviewed-on: https://gerrit.libreoffice.org/39056
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index b4e449b99fa9..6c025eec93b6 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -1945,7 +1945,7 @@ void StackWindow::UpdateCalls()
         }
 
         SbxBase::ResetError();
-        if( eOld != ERRCODE_SBX_OK )
+        if( eOld != ERRCODE_NONE )
             SbxBase::SetError( eOld );
     }
     else
@@ -2581,7 +2581,7 @@ void WatchTreeListBox::UpdateWatches( bool bBasicStopped )
     Invalidate();
 
     SbxBase::ResetError();
-    if( eOld != ERRCODE_SBX_OK )
+    if( eOld != ERRCODE_NONE )
         SbxBase::SetError( eOld );
     setBasicWatchMode( false );
 }
diff --git a/basic/source/classes/sb.cxx b/basic/source/classes/sb.cxx
index af541630b8de..4a37061eafd4 100644
--- a/basic/source/classes/sb.cxx
+++ b/basic/source/classes/sb.cxx
@@ -986,7 +986,7 @@ StarBASIC::~StarBASIC()
         lclRemoveDocBasicItem( *this );
 
         SbxBase::ResetError();
-        if( eOld != ERRCODE_SBX_OK )
+        if( eOld != ERRCODE_NONE )
         {
             SbxBase::SetError( eOld );
         }
@@ -1357,7 +1357,7 @@ bool StarBASIC::Call( const OUString& rName, SbxArray* pParam )
     {
         ErrCode eErr = SbxBase::GetError();
         SbxBase::ResetError();
-        if( eErr != ERRCODE_SBX_OK )
+        if( eErr != ERRCODE_NONE )
         {
             RTError( eErr, OUString(), 0, 0, 0 );
         }
diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx
index f8ad651fae30..d6badbf225c9 100644
--- a/basic/source/runtime/methods1.cxx
+++ b/basic/source/runtime/methods1.cxx
@@ -334,7 +334,7 @@ RTLFUNC(CDbl)  // JSM
             // #41690
             OUString aScanStr = pSbxVariable->GetOUString();
             ErrCode Error = SbxValue::ScanNumIntnl( aScanStr, nVal );
-            if( Error != ERRCODE_SBX_OK )
+            if( Error != ERRCODE_NONE )
             {
                 StarBASIC::Error( Error );
             }
@@ -403,7 +403,7 @@ RTLFUNC(CSng)  // JSM
             double dVal = 0.0;
             OUString aScanStr = pSbxVariable->GetOUString();
             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 );
             }
diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index f8c8ed9aec2d..998e61133fb3 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -1604,7 +1604,7 @@ inline bool checkUnoStructCopy( bool bVBA, SbxVariableRef& refVal, SbxVariableRe
         // Alternatively it is possible that the same scenario
         // could overwrite and existing error. Lets prevent that
         SbxObjectRef xVarObj = static_cast<SbxObject*>(refVar->GetObject());
-        if ( eOldErr != ERRCODE_SBX_OK )
+        if ( eOldErr != ERRCODE_NONE )
             SbxBase::SetError( eOldErr );
         else
             SbxBase::ResetError();
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;
diff --git a/include/basic/sbxdef.hxx b/include/basic/sbxdef.hxx
index e524f7e225c6..2e87cf6f196d 100644
--- a/include/basic/sbxdef.hxx
+++ b/include/basic/sbxdef.hxx
@@ -128,8 +128,6 @@ enum class SbxNameType {          // Type of the questioned name of a variable
 
 
 // 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_NOTIMP              ErrCode(2UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_NOTSUPPORTED)
 #define ERRCODE_SBX_OVERFLOW            ErrCode(3UL | ERRCODE_AREA_SBX | ERRCODE_CLASS_SBX)        // overflow
diff --git a/scripting/source/basprov/basscript.cxx b/scripting/source/basprov/basscript.cxx
index 565f54d89be2..41471369e4f4 100644
--- a/scripting/source/basprov/basscript.cxx
+++ b/scripting/source/basprov/basscript.cxx
@@ -217,7 +217,7 @@ namespace basprov
 
             // call method
             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
             Any aOldThisComponent;
@@ -236,7 +236,7 @@ namespace basprov
             if ( m_documentBasicManager && m_xDocumentScriptContext.is() )
                 m_documentBasicManager->SetGlobalUNOConstant( "ThisComponent", aOldThisComponent );
 
-            if ( nErr != ERRCODE_SBX_OK )
+            if ( nErr != ERRCODE_NONE )
             {
                 // TODO: throw InvocationTargetException ?
             }


More information about the Libreoffice-commits mailing list