diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-11 13:17:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-11 21:55:45 +0200 |
commit | cfb15d06e82ff9af6a9de2dab815b15e9724c9c6 (patch) | |
tree | f080e3976d9fc3e5d8bd39cc2bdb5c5742de4fc7 /basic/source/classes | |
parent | cde416fea13c6020805ac663e254a50b2c885abd (diff) |
in SbUnoObject constructor, only query for XTypeProvider
if we're going to use the result
Change-Id: I49ad11e287f58c1021e509f56d934aa3ce745b0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134201
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic/source/classes')
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 3dc1b8f643a0..8968f19161c5 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -2311,12 +2311,9 @@ SbUnoObject::SbUnoObject( const OUString& aName_, const Any& aUnoObj_ ) return; } - Reference< XTypeProvider > xTypeProvider; // Did the object have an invocation itself? mxInvocation.set( x, UNO_QUERY ); - xTypeProvider.set( x, UNO_QUERY ); - if( mxInvocation.is() ) { @@ -2324,6 +2321,7 @@ SbUnoObject::SbUnoObject( const OUString& aName_, const Any& aUnoObj_ ) mxExactNameInvocation.set( mxInvocation, UNO_QUERY ); // The remainder refers only to the introspection + Reference< XTypeProvider > xTypeProvider( x, UNO_QUERY ); if( !xTypeProvider.is() ) { bNeedIntrospection = false; |