summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2023-08-17 15:42:01 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2023-08-18 11:03:02 +0200
commit7fc6063914432d58d86cfcbd728d967e7c86ebfd (patch)
treef71fe9f99edaa4e896c78cdf32e34b516194d748 /basic
parentdb83c41d460103df5d80f5bd99816575c4ead5cd (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 'basic')
-rw-r--r--basic/source/classes/sbxmod.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 15e4719569ba..020f3814ec8c 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -395,8 +395,8 @@ static uno::Reference< vba::XVBACompatibility > getVBACompatibility( const uno::
uno::Reference< vba::XVBACompatibility > xVBACompat;
try
{
- uno::Reference< beans::XPropertySet > xModelProps( rxModel, uno::UNO_QUERY_THROW );
- xVBACompat.set( xModelProps->getPropertyValue( "BasicLibraries" ), uno::UNO_QUERY );
+ if (auto xModelProps = rxModel.query<beans::XPropertySet>() )
+ xVBACompat.set( xModelProps->getPropertyValue( "BasicLibraries" ), uno::UNO_QUERY );
}
catch(const uno::Exception& )
{