summaryrefslogtreecommitdiff
path: root/sw/source/filter/xml/xmlimpit.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-10-14 09:54:46 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-10-14 10:59:44 +0100
commite8a93a14039801598f0619d34afc84eec01de6d6 (patch)
tree6c031760733844db9d597cf940ce21f0e1aa2761 /sw/source/filter/xml/xmlimpit.cxx
parent7c7d42b6ebe477876b56d97069e0f05a9847ff7b (diff)
coverity#735971 Unchecked dynamic_cast
Change-Id: Iefd64baa09c3f6bfaf1cc43483ae1451e5b2c6ad
Diffstat (limited to 'sw/source/filter/xml/xmlimpit.cxx')
-rw-r--r--sw/source/filter/xml/xmlimpit.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index a905f9602952..e86068ed0ad3 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -822,14 +822,13 @@ bool SvXMLImportItemMapper::PutXMLValue(
case RES_HORI_ORIENT:
{
- SwFormatHoriOrient* pHoriOrient = dynamic_cast<SwFormatHoriOrient*>( &rItem );
- OSL_ENSURE( pHoriOrient != NULL, "Wrong Which-ID" );
+ SwFormatHoriOrient& rHoriOrient = dynamic_cast<SwFormatHoriOrient&>(rItem);
sal_uInt16 nValue;
bOk = SvXMLUnitConverter::convertEnum( nValue, rValue,
aXMLTableAlignMap );
if( bOk )
- pHoriOrient->SetHoriOrient( nValue );
+ rHoriOrient.SetHoriOrient( nValue );
}
break;