diff options
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/chart/SchXMLTableContext.cxx | 8 | ||||
-rw-r--r-- | xmloff/source/core/XMLEmbeddedObjectImportContext.cxx | 14 |
2 files changed, 15 insertions, 7 deletions
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<beans::XPropertySet>() ) - { - 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& ) { diff --git a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx index f55edf062e74..980dd8e0572d 100644 --- a/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx +++ b/xmloff/source/core/XMLEmbeddedObjectImportContext.cxx @@ -122,8 +122,14 @@ void XMLEmbeddedObjectImportContext::SetComponent( Reference< XComponent > const SvXMLImport *pFastHandler = dynamic_cast<SvXMLImport*>(xFilter.get()); mxFastHandler = pFastHandler; - if (auto xModifiable2 = rComp.query<XModifiable2>() ) + try + { + Reference < XModifiable2 > xModifiable2( rComp, UNO_QUERY_THROW ); xModifiable2->disableSetModified(); + } + catch( Exception& ) + { + } Reference < XImporter > xImporter( mxFastHandler, UNO_QUERY ); xImporter->setTargetDocument( rComp ); @@ -236,11 +242,15 @@ void XMLEmbeddedObjectImportContext::endFastElement(sal_Int32 nElement) mxFastHandler->endFastElement( nElement ); mxFastHandler->endDocument(); - if (auto xModifiable2 = xComp.query<XModifiable2>() ) + try { + Reference < XModifiable2 > xModifiable2( xComp, UNO_QUERY_THROW ); xModifiable2->enableSetModified(); xModifiable2->setModified( true ); // trigger new replacement image generation } + catch( Exception& ) + { + } } void XMLEmbeddedObjectImportContext::characters( const OUString& rChars ) |