coverity#704563 Unchecked dynamic cast

Change-Id: I314d1110a45275be905c60b36e3e3a560a052272
This commit is contained in:
Norbert Thiebaud
2014-03-07 20:33:55 -06:00
parent 335a8a84fe
commit 57b89ea1c2
@@ -176,7 +176,13 @@ void DrawCommandDispatch::setAttributes( SdrObject* pObj )
pObj->SetMergedItem( SdrTextVertAdjustItem( SDRTEXTVERTADJUST_CENTER ) );
pObj->SetMergedItem( SdrTextHorzAdjustItem( SDRTEXTHORZADJUST_BLOCK ) );
pObj->SetMergedItem( SdrTextAutoGrowHeightItem( sal_False ) );
( dynamic_cast< SdrObjCustomShape* >( pObj ) )->MergeDefaultAttributes( &m_aCustomShapeType );
SdrObjCustomShape* pShape(dynamic_cast< SdrObjCustomShape* >( pObj ));
assert(pShape);
if(pShape)
{
pShape->MergeDefaultAttributes( &m_aCustomShapeType );
}
}
}
}