From 5f70b0b9f6bc4ab145ddbd9155590ed4a3b1b9ec Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 15 Dec 2022 14:49:35 +0100 Subject: loplugin:unocast (SvXMLImport) (See the upcoming commit introducing that loplugin:unocast on why such dynamic_casts from UNO types are dangerous.) Change-Id: I773095e51958a0a050bcece6f44fe3847f962eaf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144333 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx') diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx index eb3da46309f8..3f919548d47d 100644 --- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx +++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -339,7 +340,7 @@ void SAL_CALL ImportDocumentHandler::initialize( const uno::Sequence< uno::Any > if (!m_xDocumentHandler.is() || !m_xModel.is()) throw uno::Exception("no delegatee and no model", nullptr); - m_xDelegatee.set(new SvXMLLegacyToFastDocHandler(dynamic_cast(m_xDocumentHandler.get()))); + m_xDelegatee.set(new SvXMLLegacyToFastDocHandler(comphelper::getFromUnoTunnel(m_xDocumentHandler))); m_xDatabaseDataProvider.set(m_xModel->getDataProvider(),uno::UNO_QUERY); if ( !m_xDatabaseDataProvider.is() ) -- cgit v1.2.3