diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2022-12-15 14:49:35 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2022-12-16 22:03:14 +0000 |
commit | 5f70b0b9f6bc4ab145ddbd9155590ed4a3b1b9ec (patch) | |
tree | 53bddedafac5e0e7e9178ebbe63e39d3014dc802 /sdext/source | |
parent | d6d15a2a4fd05af0cb66a69a789fcb1e81b59c05 (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 'sdext/source')
-rw-r--r-- | sdext/source/pdfimport/sax/emitcontext.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sdext/source/pdfimport/sax/emitcontext.cxx b/sdext/source/pdfimport/sax/emitcontext.cxx index a923488d688d..59f110191bfd 100644 --- a/sdext/source/pdfimport/sax/emitcontext.cxx +++ b/sdext/source/pdfimport/sax/emitcontext.cxx @@ -25,6 +25,7 @@ #include <rtl/strbuf.hxx> #include <osl/diagnose.h> #include <com/sun/star/xml/sax/SAXException.hpp> +#include <comphelper/servicehelper.hxx> #include <xmloff/xmlimp.hxx> #if OSL_DEBUG_LEVEL > 0 @@ -42,7 +43,7 @@ SaxEmitter::SaxEmitter( const uno::Reference< xml::sax::XDocumentHandler >& xDoc m_xDocHdl( xDocHdl ) { OSL_PRECOND(m_xDocHdl.is(), "SaxEmitter(): invalid doc handler"); - if (SvXMLImport *pFastHandler = dynamic_cast<SvXMLImport*>(m_xDocHdl.get())) + if (SvXMLImport *pFastHandler = comphelper::getFromUnoTunnel<SvXMLImport>(m_xDocHdl)) m_xDocHdl.set( new SvXMLLegacyToFastDocHandler( pFastHandler ) ); try { |