[Libreoffice-commits] core.git: basic/source
Eike Rathke
erack at redhat.com
Tue Dec 5 16:29:26 UTC 2017
basic/source/runtime/methods.cxx | 8 ++++++++
1 file changed, 8 insertions(+)
New commits:
commit 863e269cd3d37034e634d9ad730d8e87a46ceb76
Author: Eike Rathke <erack at redhat.com>
Date: Tue Dec 5 17:26:35 2017 +0100
Resolves: tdf#114232 reset error after unsuccessful GetObject() query
Probably broken already since
commit 0b21b8b146fc4b982c7c9bbb866b9ff18a29332a
Date: Wed Oct 6 10:16:27 2010 +0100
initial commit for vba blob ( not including container_control stuff )
Change-Id: Iecce564851a76921b491ff101365c70883ad7475
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index e91893d76d50..161fa4887d48 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -2461,10 +2461,18 @@ void SbRtl_IsError(StarBASIC *, SbxArray & rPar, bool)
SbUnoObject* pObj = dynamic_cast<SbUnoObject*>( pVar );
if ( !pObj )
{
+ // GetObject() sets error if the variable was not an object, so
+ // remember and reset if it isn't.
+ ErrCode eOld = SbxBase::GetError();
if ( SbxBase* pBaseObj = pVar->GetObject() )
{
pObj = dynamic_cast<SbUnoObject*>( pBaseObj );
}
+ else
+ {
+ SbxBase::ResetError();
+ SbxBase::SetError( eOld );
+ }
}
uno::Reference< script::XErrorQuery > xError;
if ( pObj )
More information about the Libreoffice-commits
mailing list