diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-01 14:14:51 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-01 14:41:30 +0100 |
commit | 40c7d2719ae2a60f849ec8cdbcb4fc0f84abbffc (patch) | |
tree | 90bf3a73b3c18397c6715cae5809576afc80d9d8 /xmloff | |
parent | 192c05c532dbfe905ab520683abb4f04e85b5745 (diff) |
coverity#1325248 Unchecked dynamic_cast
Change-Id: Iff328c85e859cae2d99f95c3c56ba3585638dd23
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/text/txtparaimphint.hxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xmloff/source/text/txtparaimphint.hxx b/xmloff/source/text/txtparaimphint.hxx index a46ad8bbc96f..a447fd71846d 100644 --- a/xmloff/source/text/txtparaimphint.hxx +++ b/xmloff/source/text/txtparaimphint.hxx @@ -219,10 +219,10 @@ public: { css::uno::Reference < css::drawing::XShape > xShape; SvXMLImportContext *pContext = &xContext; - if( 0 != dynamic_cast<const XMLTextFrameContext*>(pContext) ) - xShape = dynamic_cast< XMLTextFrameContext*>( pContext )->GetShape(); - else if( 0 != dynamic_cast<const XMLTextFrameHyperlinkContext*>(pContext) ) - xShape = dynamic_cast<XMLTextFrameHyperlinkContext*>( pContext )->GetShape(); + if (XMLTextFrameContext *pFrameContext = dynamic_cast<XMLTextFrameContext*>(pContext) ) + xShape = pFrameContext->GetShape(); + else if(XMLTextFrameHyperlinkContext *pLinkContext = dynamic_cast<XMLTextFrameHyperlinkContext*>(pContext)) + xShape = pLinkContext->GetShape(); return xShape; } |