Kaydet (Commit) 6900730a authored tarafından Eike Rathke's avatar Eike Rathke

Resolves: tdf#114232 call GetObject() only if IsObject()

 This is a combination of 2 commits.

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
(cherry picked from commit 863e269c)

Rather call GetObject() only if IsObject(), tdf#112571 follow-up

Which effectively is what GetObject() internally also does to
determine whether to set an error, so resetting an error here is
moot (or might even hide a nested error?).

Change-Id: I8736d16e386d1833126965538f96aaa1fd73dfd6
(cherry picked from commit d1cd68fa)
Reviewed-on: https://gerrit.libreoffice.org/45904Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
Tested-by: 's avatarJenkins <ci@libreoffice.org>
üst 11667a8d
...@@ -2461,7 +2461,7 @@ void SbRtl_IsError(StarBASIC *, SbxArray & rPar, bool) ...@@ -2461,7 +2461,7 @@ void SbRtl_IsError(StarBASIC *, SbxArray & rPar, bool)
SbUnoObject* pObj = dynamic_cast<SbUnoObject*>( pVar ); SbUnoObject* pObj = dynamic_cast<SbUnoObject*>( pVar );
if ( !pObj ) if ( !pObj )
{ {
if ( SbxBase* pBaseObj = pVar->GetObject() ) if ( SbxBase* pBaseObj = (pVar->IsObject() ? pVar->GetObject() : nullptr) )
{ {
pObj = dynamic_cast<SbUnoObject*>( pBaseObj ); pObj = dynamic_cast<SbUnoObject*>( pBaseObj );
} }
......
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