summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-10-13 20:49:54 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-10-13 22:38:34 +0100
commit432fe1f30c1c28b0fb51022533e4b93276c640ce (patch)
tree05b47242b6a60658a3d5a341811d859420790f2e
parent9381ca578de26aa75bb0d4439221c3439cf99616 (diff)
coverity#1326251 Unchecked dynamic_cast
Change-Id: Iabdc2f4e0b7af49650e07a9035a425f96cd035c7
-rw-r--r--sw/source/filter/xml/xmlimpit.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index 58b5d27ddc33..61e93022fe46 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -625,19 +625,18 @@ bool SvXMLImportItemMapper::PutXMLValue(
case RES_KEEP:
{
- SvxFormatKeepItem* pFormatKeep = dynamic_cast<SvxFormatKeepItem*>( &rItem );
- OSL_ENSURE( pFormatKeep != NULL, "Wrong Which-ID" );
+ SvxFormatKeepItem& rFormatKeep = dynamic_cast<SvxFormatKeepItem&>(rItem);
if( IsXMLToken( rValue, XML_ALWAYS ) ||
IsXMLToken( rValue, XML_TRUE ) )
{
- pFormatKeep->SetValue( true );
+ rFormatKeep.SetValue( true );
bOk = true;
}
else if( IsXMLToken( rValue, XML_AUTO ) ||
IsXMLToken( rValue, XML_FALSE ) )
{
- pFormatKeep->SetValue( false );
+ rFormatKeep.SetValue( false );
bOk = true;
}
}