summaryrefslogtreecommitdiff
path: root/sdext
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 /sdext
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 'sdext')
-rw-r--r--sdext/source/pdfimport/sax/emitcontext.cxx3
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
{