summaryrefslogtreecommitdiff
path: root/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-12-15 14:49:35 +0100
committerStephan Bergmann <sbergman@redhat.com>2022-12-16 22:03:14 +0000
commit5f70b0b9f6bc4ab145ddbd9155590ed4a3b1b9ec (patch)
tree53bddedafac5e0e7e9178ebbe63e39d3014dc802 /reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
parentd6d15a2a4fd05af0cb66a69a789fcb1e81b59c05 (diff)
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 <sbergman@redhat.com>
Diffstat (limited to 'reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx')
-rw-r--r--reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx3
1 files changed, 2 insertions, 1 deletions
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 <com/sun/star/reflection/ProxyFactory.hpp>
#include <comphelper/sequenceashashmap.hxx>
#include <comphelper/namedvaluecollection.hxx>
+#include <comphelper/servicehelper.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <utility>
#include <xmloff/attrlist.hxx>
@@ -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<SvXMLImport*>(m_xDocumentHandler.get())));
+ m_xDelegatee.set(new SvXMLLegacyToFastDocHandler(comphelper::getFromUnoTunnel<SvXMLImport>(m_xDocumentHandler)));
m_xDatabaseDataProvider.set(m_xModel->getDataProvider(),uno::UNO_QUERY);
if ( !m_xDatabaseDataProvider.is() )