coverity#1325248 Unchecked dynamic_cast

Change-Id: Iff328c85e859cae2d99f95c3c56ba3585638dd23
This commit is contained in:
Caolán McNamara
2015-10-01 14:14:51 +01:00
parent 192c05c532
commit 40c7d2719a

View File

@@ -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;
}