summaryrefslogtreecommitdiff
path: root/writerperfect/source
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 /writerperfect/source
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 'writerperfect/source')
-rw-r--r--writerperfect/source/common/DocumentHandler.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/writerperfect/source/common/DocumentHandler.cxx b/writerperfect/source/common/DocumentHandler.cxx
index 6b5ffe58ad9e..6cf42c168a51 100644
--- a/writerperfect/source/common/DocumentHandler.cxx
+++ b/writerperfect/source/common/DocumentHandler.cxx
@@ -15,6 +15,7 @@
#include <com/sun/star/xml/sax/XDocumentHandler.hpp>
#include <com/sun/star/xml/sax/XAttributeList.hpp>
+#include <comphelper/servicehelper.hxx>
#include <xmloff/attrlist.hxx>
#include <xmloff/xmlimp.hxx>
@@ -115,7 +116,7 @@ using com::sun::star::xml::sax::XDocumentHandler;
DocumentHandler::DocumentHandler(Reference<XDocumentHandler> const& xHandler)
: mxHandler(xHandler)
{
- if (SvXMLImport* pFastHandler = dynamic_cast<SvXMLImport*>(mxHandler.get()))
+ if (SvXMLImport* pFastHandler = comphelper::getFromUnoTunnel<SvXMLImport>(mxHandler))
mxHandler.set(new SvXMLLegacyToFastDocHandler(pFastHandler));
}