diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-04 12:02:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-09-04 19:21:07 +0200 |
commit | 41a46a306f40a7296c56bdeea0ba8a6d630aa15c (patch) | |
tree | 6dfa116917069cc48976ee005429f7da01028382 /xmloff/source/text | |
parent | 50238bddf0e95169007cb90479cca86849a19007 (diff) |
dynamic_cast -> static_cast (tdf#130795)
the dynamic_cast is hot here,
and none of these dynamic_casts are necessary, we already assert that
they must succeed, so just use static_cast
Change-Id: I88ade90431c4da4792c778b5cdab22332ed1c428
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121637
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/text')
-rw-r--r-- | xmloff/source/text/XMLTextFrameContext.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx index fdf40897e563..0100a25ef03e 100644 --- a/xmloff/source/text/XMLTextFrameContext.cxx +++ b/xmloff/source/text/XMLTextFrameContext.cxx @@ -1636,7 +1636,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLTextFrameContext::c // note: no more draw:image can be added once we get here m_xImplContext = solveMultipleImages(); } - xContext = &dynamic_cast<SvXMLImportContext&>(*m_xImplContext->createFastChildContext( nElement, xAttrList )); + xContext = static_cast<SvXMLImportContext*>(m_xImplContext->createFastChildContext( nElement, xAttrList ).get()); } else if (nElement == XML_ELEMENT(LO_EXT, XML_SIGNATURELINE)) { @@ -1645,7 +1645,7 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLTextFrameContext::c // note: no more draw:image can be added once we get here m_xImplContext = solveMultipleImages(); } - xContext = &dynamic_cast<SvXMLImportContext&>(*m_xImplContext->createFastChildContext(nElement, xAttrList)); + xContext = static_cast<SvXMLImportContext*>(m_xImplContext->createFastChildContext(nElement, xAttrList).get()); } else if (nElement == XML_ELEMENT(LO_EXT, XML_QRCODE)) { @@ -1654,11 +1654,11 @@ css::uno::Reference< css::xml::sax::XFastContextHandler > XMLTextFrameContext::c // note: no more draw:image can be added once we get here m_xImplContext = solveMultipleImages(); } - xContext = &dynamic_cast<SvXMLImportContext&>(*m_xImplContext->createFastChildContext(nElement, xAttrList)); + xContext = static_cast<SvXMLImportContext*>(m_xImplContext->createFastChildContext(nElement, xAttrList).get()); } else if (nElement == XML_ELEMENT(DRAW, XML_A)) { - xContext = &dynamic_cast<SvXMLImportContext&>(*m_xImplContext->createFastChildContext(nElement, xAttrList)); + xContext = static_cast<SvXMLImportContext*>(m_xImplContext->createFastChildContext(nElement, xAttrList).get()); } else { |