diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-08-17 15:42:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-08-18 11:03:02 +0200 |
commit | 7fc6063914432d58d86cfcbd728d967e7c86ebfd (patch) | |
tree | f71fe9f99edaa4e896c78cdf32e34b516194d748 /scripting | |
parent | db83c41d460103df5d80f5bd99816575c4ead5cd (diff) |
use more Reference::query instead of UNO_QUERY_THROW
since querying with exceptions is consideably more expensive
Change-Id: I968a9a40766b2abb0d3058549b0ed44011fd5716
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155791
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'scripting')
-rw-r--r-- | scripting/source/vbaevents/eventhelper.cxx | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/scripting/source/vbaevents/eventhelper.cxx b/scripting/source/vbaevents/eventhelper.cxx index 420161a22ee1..c139f7d17916 100644 --- a/scripting/source/vbaevents/eventhelper.cxx +++ b/scripting/source/vbaevents/eventhelper.cxx @@ -353,15 +353,8 @@ ScriptEventHelper::~ScriptEventHelper() // dispose control ( and remove any associated event registrations ) if ( m_bDispose ) { - try - { - uno::Reference< lang::XComponent > xComp( m_xControl, uno::UNO_QUERY_THROW ); + if (auto xComp = m_xControl.query<lang::XComponent>() ) xComp->dispose(); - } - // destructor can't throw - catch( uno::Exception& ) - { - } } } |