coverity#1326228 Unchecked dynamic_cast

Change-Id: Idcbf27362e13d9f8a71db17c38e93b24fb1fbfc0
This commit is contained in:
Caolán McNamara
2015-10-13 20:52:00 +01:00
parent 216297f06b
commit 95ddc77f19

View File

@@ -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;