summaryrefslogtreecommitdiff
path: root/basic/source/runtime/step0.cxx
diff options
context:
space:
mode:
authorRuediger Timm <rt@openoffice.org>2010-05-28 13:55:18 +0200
committerRuediger Timm <rt@openoffice.org>2010-05-28 13:55:18 +0200
commit51881945f7a8a4d7a35e3c93621df79d8b011d50 (patch)
tree31973e45fe5cec6b799d62386a248552841631fb /basic/source/runtime/step0.cxx
parent29d32d9a1be08bbe1a59812c0323a4dc5f035b14 (diff)
parent53663a5b057105466ceaa1de74bd866229a21e66 (diff)
Merge CWS rt38 to DEV300 m79
Diffstat (limited to 'basic/source/runtime/step0.cxx')
-rw-r--r--basic/source/runtime/step0.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/basic/source/runtime/step0.cxx b/basic/source/runtime/step0.cxx
index 83b610eef1..96a3e80a84 100644
--- a/basic/source/runtime/step0.cxx
+++ b/basic/source/runtime/step0.cxx
@@ -30,6 +30,7 @@
#include <vcl/msgbox.hxx>
#include <tools/fsys.hxx>
+#include "errobject.hxx"
#include "runtime.hxx"
#include "sbintern.hxx"
#include "iosys.hxx"
@@ -1116,6 +1117,7 @@ void SbiRuntime::StepSTDERROR()
pInst->nErr = 0L;
pInst->nErl = 0;
nError = 0L;
+ SbxErrObject::getUnoErrObject()->Clear();
}
void SbiRuntime::StepNOERROR()
@@ -1124,6 +1126,7 @@ void SbiRuntime::StepNOERROR()
pInst->nErr = 0L;
pInst->nErl = 0;
nError = 0L;
+ SbxErrObject::getUnoErrObject()->Clear();
bError = FALSE;
}
@@ -1132,6 +1135,9 @@ void SbiRuntime::StepNOERROR()
void SbiRuntime::StepLEAVE()
{
bRun = FALSE;
+ // If VBA and we are leaving an ErrorHandler then clear the error ( it's been processed )
+ if ( bInError && pError )
+ SbxErrObject::getUnoErrObject()->Clear();
}
void SbiRuntime::StepCHANNEL() // TOS = Kanalnummer
@@ -1265,6 +1271,9 @@ void SbiRuntime::StepERROR()
SbxVariableRef refCode = PopVar();
USHORT n = refCode->GetUShort();
SbError error = StarBASIC::GetSfxFromVBError( n );
- Error( error );
+ if ( bVBAEnabled )
+ pInst->Error( error );
+ else
+ Error( error );
}