diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-13 20:52:00 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-13 22:38:34 +0100 |
commit | 95ddc77f197124d1792ead85e81546b6fc68285f (patch) | |
tree | fb2ef47b6e8632ab94991cedd33300fda644082a /sw/source | |
parent | 216297f06ba0153017382eed7bfe2cc571ea67a1 (diff) |
coverity#1326228 Unchecked dynamic_cast
Change-Id: Idcbf27362e13d9f8a71db17c38e93b24fb1fbfc0
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/filter/xml/xmlexpit.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx index a7b65e0c037f..1e612667ee8a 100644 --- a/sw/source/filter/xml/xmlexpit.cxx +++ b/sw/source/filter/xml/xmlexpit.cxx @@ -839,15 +839,14 @@ bool SvXMLExportItemMapper::QueryXMLValue( case RES_BREAK: { - const SvxFormatBreakItem* pFormatBreak = dynamic_cast<const SvxFormatBreakItem*>( &rItem ); - OSL_ENSURE( pFormatBreak != NULL, "Wrong Which-ID" ); + const SvxFormatBreakItem& rFormatBreak = dynamic_cast<const SvxFormatBreakItem&>(rItem); unsigned int eEnum = 0; switch( nMemberId ) { case MID_BREAK_BEFORE: - switch( pFormatBreak->GetValue() ) + switch (rFormatBreak.GetValue()) { case SVX_BREAK_COLUMN_BEFORE: eEnum = 1; @@ -863,7 +862,7 @@ bool SvXMLExportItemMapper::QueryXMLValue( } break; case MID_BREAK_AFTER: - switch( pFormatBreak->GetValue() ) + switch (rFormatBreak.GetValue()) { case SVX_BREAK_COLUMN_AFTER: eEnum = 1; |