diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-14 12:20:08 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-14 15:02:43 +0100 |
commit | 025be45eb126c65db5eed301cd623cffcf726efd (patch) | |
tree | ad2b3298bb454bba8d8ddc692a7585b057a92311 /sw/source | |
parent | e00d88cb397374c7891850d4a447a9c477acb022 (diff) |
coverity#735979 Unchecked dynamic_cast
Change-Id: Id1739bdb702b9ae7002f8ddcd06e47babad8b8c3
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/filter/xml/xmlimpit.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx index ba243faafbb6..105199fb1219 100644 --- a/sw/source/filter/xml/xmlimpit.cxx +++ b/sw/source/filter/xml/xmlimpit.cxx @@ -326,8 +326,7 @@ bool SvXMLImportItemMapper::PutXMLValue( case RES_UL_SPACE: { - SvxULSpaceItem* pULSpace = dynamic_cast<SvxULSpaceItem*>( &rItem ); - OSL_ENSURE( pULSpace != NULL, "Wrong Which-ID!" ); + SvxULSpaceItem& rULSpace = dynamic_cast<SvxULSpaceItem&>(rItem); sal_Int32 nProp = 100; sal_Int32 nAbs = 0; @@ -340,10 +339,10 @@ bool SvXMLImportItemMapper::PutXMLValue( switch( nMemberId ) { case MID_UP_MARGIN: - pULSpace->SetUpper( (sal_uInt16)nAbs, (sal_uInt16)nProp ); + rULSpace.SetUpper( (sal_uInt16)nAbs, (sal_uInt16)nProp ); break; case MID_LO_MARGIN: - pULSpace->SetLower( (sal_uInt16)nAbs, (sal_uInt16)nProp ); + rULSpace.SetLower( (sal_uInt16)nAbs, (sal_uInt16)nProp ); break; default: OSL_FAIL("unknown MemberId"); |