diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-01 14:16:08 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-01 14:41:30 +0100 |
commit | 6f7e93b9488c41a2b43d897c1e2d3fb527ef3b36 (patch) | |
tree | 1e0b4634a7dae5c0c6c06226ae03832fc81acbab /xmloff/source | |
parent | 40c7d2719ae2a60f849ec8cdbcb4fc0f84abbffc (diff) |
coverity#1325247 Unchecked dynamic_cast
Change-Id: I86e3387c277767018565ed0708d35682ba2de3ae
Diffstat (limited to 'xmloff/source')
-rw-r--r-- | xmloff/source/text/txtparaimphint.hxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/xmloff/source/text/txtparaimphint.hxx b/xmloff/source/text/txtparaimphint.hxx index a447fd71846d..7d58e65addd4 100644 --- a/xmloff/source/text/txtparaimphint.hxx +++ b/xmloff/source/text/txtparaimphint.hxx @@ -205,11 +205,10 @@ public: { css::uno::Reference < css::text::XTextContent > xTxt; SvXMLImportContext *pContext = &xContext; - if( 0 != dynamic_cast<const XMLTextFrameContext*>(pContext) ) - xTxt = dynamic_cast< XMLTextFrameContext*>( pContext )->GetTextContent(); - else if( 0 != dynamic_cast<const XMLTextFrameHyperlinkContext*>(pContext) ) - xTxt = dynamic_cast< XMLTextFrameHyperlinkContext* >( pContext ) - ->GetTextContent(); + if (XMLTextFrameContext *pFrameContext = dynamic_cast<XMLTextFrameContext*>(pContext)) + xTxt = pFrameContext->GetTextContent(); + else if (XMLTextFrameHyperlinkContext *pLinkContext = dynamic_cast<XMLTextFrameHyperlinkContext*>(pContext)) + xTxt = pLinkContext->GetTextContent(); return xTxt; } @@ -219,7 +218,7 @@ public: { css::uno::Reference < css::drawing::XShape > xShape; SvXMLImportContext *pContext = &xContext; - if (XMLTextFrameContext *pFrameContext = dynamic_cast<XMLTextFrameContext*>(pContext) ) + if (XMLTextFrameContext *pFrameContext = dynamic_cast<XMLTextFrameContext*>(pContext)) xShape = pFrameContext->GetShape(); else if(XMLTextFrameHyperlinkContext *pLinkContext = dynamic_cast<XMLTextFrameHyperlinkContext*>(pContext)) xShape = pLinkContext->GetShape(); |