summaryrefslogtreecommitdiff
path: root/sw/source/filter/xml
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-10-14 09:54:06 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-10-14 10:59:44 +0100
commit7c7d42b6ebe477876b56d97069e0f05a9847ff7b (patch)
treeb74a5f7e976b7a805340b88f53e81b029dcd6760 /sw/source/filter/xml
parentbbc91b7a0c309c5022a8f34fd7e5310dbc0411a0 (diff)
coverity#735972 Unchecked dynamic_cast
Change-Id: I4839b4598216eda9ac2db2ebe2aff3f5baaae9e8
Diffstat (limited to 'sw/source/filter/xml')
-rw-r--r--sw/source/filter/xml/xmlimpit.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index d68c979c0a2b..a905f9602952 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -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;
}
}