Kaydet (Commit) 863e269c authored tarafından Eike Rathke's avatar Eike Rathke

Resolves: tdf#114232 reset error after unsuccessful GetObject() query

Probably broken already since

    commit 0b21b8b1
    Date:   Wed Oct 6 10:16:27 2010 +0100

        initial commit for vba blob ( not including container_control stuff )

Change-Id: Iecce564851a76921b491ff101365c70883ad7475
üst 8c8fa078
...@@ -2461,10 +2461,18 @@ void SbRtl_IsError(StarBASIC *, SbxArray & rPar, bool) ...@@ -2461,10 +2461,18 @@ void SbRtl_IsError(StarBASIC *, SbxArray & rPar, bool)
SbUnoObject* pObj = dynamic_cast<SbUnoObject*>( pVar ); SbUnoObject* pObj = dynamic_cast<SbUnoObject*>( pVar );
if ( !pObj ) 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() ) if ( SbxBase* pBaseObj = pVar->GetObject() )
{ {
pObj = dynamic_cast<SbUnoObject*>( pBaseObj ); pObj = dynamic_cast<SbUnoObject*>( pBaseObj );
} }
else
{
SbxBase::ResetError();
SbxBase::SetError( eOld );
}
} }
uno::Reference< script::XErrorQuery > xError; uno::Reference< script::XErrorQuery > xError;
if ( pObj ) if ( pObj )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment