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 /sw/source/filter | |
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 'sw/source/filter')
-rw-r--r-- | sw/source/filter/xml/wrtxml.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx index a5b0560c1c5a..b302c91c9388 100644 --- a/sw/source/filter/xml/wrtxml.cxx +++ b/sw/source/filter/xml/wrtxml.cxx @@ -307,9 +307,8 @@ ErrCode SwXMLWriter::Write_(const SfxItemSet* pMediumItemSet) && Version != ODFVER_010_TEXT && Version != ODFVER_011_TEXT) { - const uno::Reference<rdf::XDocumentMetadataAccess> xDMA( - xModelComp, uno::UNO_QUERY_THROW); - xDMA->storeMetadataToStorage(m_xStg); + if (auto xDMA = xModelComp.query<rdf::XDocumentMetadataAccess>()) + xDMA->storeMetadataToStorage(m_xStg); } } catch (beans::UnknownPropertyException &) |