diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-14 12:21:56 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-14 15:02:44 +0100 |
commit | f5733be2365312698c7599730f78d70d68fc5f78 (patch) | |
tree | 5f8dfe06a3054345bef0de42cba2f154c01857c6 /sw/source | |
parent | eac7e540d1caa6526d4e5b00c335e2c4e0839585 (diff) |
coverity#7359797 Unchecked dynamic_cast
Change-Id: Ib91d29da570f81879c8afc1e0fc035f2cfe52c9b
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 053c034bf6f4..4285702c8903 100644 --- a/sw/source/filter/xml/xmlimpit.cxx +++ b/sw/source/filter/xml/xmlimpit.cxx @@ -798,19 +798,18 @@ bool SvXMLImportItemMapper::PutXMLValue( case RES_LAYOUT_SPLIT: case RES_ROW_SPLIT: { - SfxBoolItem* pSplit = dynamic_cast<SfxBoolItem*>( &rItem ); - OSL_ENSURE( pSplit != NULL, "Wrong Which-ID" ); + SfxBoolItem& rSplit = dynamic_cast<SfxBoolItem&>(rItem); if( IsXMLToken( rValue, XML_AUTO ) || IsXMLToken( rValue, XML_TRUE ) ) { - pSplit->SetValue( true ); + rSplit.SetValue( true ); bOk = true; } else if( IsXMLToken( rValue, XML_ALWAYS ) || IsXMLToken( rValue, XML_FALSE ) ) { - pSplit->SetValue( false ); + rSplit.SetValue( false ); bOk = true; } } |