From 87db52ab1e9c39ad8319aaf9c0c59d4435b6ffb5 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 25 Aug 2023 11:30:42 +0200 Subject: Revert "use more Reference::query instead of UNO_QUERY_THROW" This reverts commit 7fc6063914432d58d86cfcbd728d967e7c86ebfd. sberg noticed that there is a difference now: there's a subtle difference now, in that if y was null originally, it would have thrown a (caught) exception, whereas now it will crash in the y.query() call. Change-Id: Idbb5a08d635d15b5ca63f4822eddf05fb0a5afa0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156002 Tested-by: Jenkins Reviewed-by: Noel Grandin --- xmloff/source/chart/SchXMLTableContext.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'xmloff/source/chart') diff --git a/xmloff/source/chart/SchXMLTableContext.cxx b/xmloff/source/chart/SchXMLTableContext.cxx index b13394b54fdb..b12f5886e69b 100644 --- a/xmloff/source/chart/SchXMLTableContext.cxx +++ b/xmloff/source/chart/SchXMLTableContext.cxx @@ -765,11 +765,9 @@ void SchXMLTableHelper::applyTableToInternalDataProvider( { try { - if (auto xProps = xChartDoc.query() ) - { - xProps->setPropertyValue( "DisableDataTableDialog", uno::Any( true ) ); - xProps->setPropertyValue( "DisableComplexChartTypes", uno::Any( true ) ); - } + Reference< beans::XPropertySet > xProps( xChartDoc, uno::UNO_QUERY_THROW ); + xProps->setPropertyValue( "DisableDataTableDialog", uno::Any( true ) ); + xProps->setPropertyValue( "DisableComplexChartTypes", uno::Any( true ) ); } catch ( uno::Exception& ) { -- cgit