Kaydet (Commit) 7c7d42b6 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#735972 Unchecked dynamic_cast

Change-Id: I4839b4598216eda9ac2db2ebe2aff3f5baaae9e8
üst bbc91b7a
......@@ -835,18 +835,17 @@ bool SvXMLImportItemMapper::PutXMLValue(
case RES_VERT_ORIENT:
{
SwFormatVertOrient* pVertOrient = dynamic_cast<SwFormatVertOrient*>( &rItem );
OSL_ENSURE( pVertOrient != NULL, "Wrong Which-ID" );
SwFormatVertOrient& rVertOrient = dynamic_cast<SwFormatVertOrient&>(rItem);
sal_uInt16 nValue;
bOk = SvXMLUnitConverter::convertEnum( nValue, rValue,
aXMLTableVAlignMap );
if( bOk )
pVertOrient->SetVertOrient( nValue );
rVertOrient.SetVertOrient( nValue );
//#i8855# text::VertOrientation::NONE is stored as empty string and should be applied here
else if(rValue.isEmpty())
{
pVertOrient->SetVertOrient( text::VertOrientation::NONE );
rVertOrient.SetVertOrient( text::VertOrientation::NONE );
bOk = true;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment