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 /sd/source/filter/eppt/epptso.cxx | |
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 'sd/source/filter/eppt/epptso.cxx')
-rw-r--r-- | sd/source/filter/eppt/epptso.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx index e794d9600e06..219cf9ebf785 100644 --- a/sd/source/filter/eppt/epptso.cxx +++ b/sd/source/filter/eppt/epptso.cxx @@ -1944,8 +1944,8 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a try { // try to get the aspect when available - css::uno::Reference< css::beans::XPropertySet > xShapeProps( mXShape, css::uno::UNO_QUERY_THROW ); - xShapeProps->getPropertyValue("Aspect") >>= nAspect; + if (auto xShapeProps = mXShape.query<css::beans::XPropertySet>() ) + xShapeProps->getPropertyValue("Aspect") >>= nAspect; } catch( css::uno::Exception& ) {} @@ -2527,8 +2527,8 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a try { // try to get the aspect when available - css::uno::Reference< css::beans::XPropertySet > xShapeProps( mXShape, css::uno::UNO_QUERY_THROW ); - xShapeProps->getPropertyValue("Aspect") >>= nAspect; + if (auto xShapeProps = mXShape.query<css::beans::XPropertySet>() ) + xShapeProps->getPropertyValue("Aspect") >>= nAspect; } catch( css::uno::Exception& ) {} |