summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-10-01 14:17:08 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-10-01 14:41:31 +0100
commit369d1e420b8b884f4a4ee5b9141ee864bec12b8c (patch)
tree1ac2df8dba755b66441d7ad61f03af8a4f9fe873 /xmloff
parent6f7e93b9488c41a2b43d897c1e2d3fb527ef3b36 (diff)
coverity#1325246 Unchecked dynamic_cast
Change-Id: Ifa8f9ce23c9c737d7bed9e24c9c32641d915ac76
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/text/txtparaimphint.hxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/xmloff/source/text/txtparaimphint.hxx b/xmloff/source/text/txtparaimphint.hxx
index 7d58e65addd4..78b7cdde8482 100644
--- a/xmloff/source/text/txtparaimphint.hxx
+++ b/xmloff/source/text/txtparaimphint.hxx
@@ -230,14 +230,12 @@ public:
{
bool bRet = false;
SvXMLImportContext *pContext = &xContext;
- if( 0 != dynamic_cast<const XMLTextFrameContext*>(pContext) )
+ if (XMLTextFrameContext *pFrameContext = dynamic_cast<XMLTextFrameContext*>(pContext))
bRet = css::text::TextContentAnchorType_AT_CHARACTER ==
- dynamic_cast<const XMLTextFrameContext*>( pContext )
- ->GetAnchorType();
- else if( 0 != dynamic_cast<const XMLTextFrameHyperlinkContext*>( pContext) )
+ pFrameContext->GetAnchorType();
+ else if (XMLTextFrameHyperlinkContext *pLinkContext = dynamic_cast<XMLTextFrameHyperlinkContext*>(pContext))
bRet = css::text::TextContentAnchorType_AT_CHARACTER ==
- dynamic_cast<const XMLTextFrameHyperlinkContext*>( pContext )
- ->GetAnchorType();
+ pLinkContext->GetAnchorType();
return bRet;
}
};