From f5733be2365312698c7599730f78d70d68fc5f78 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 14 Oct 2015 12:21:56 +0100 Subject: coverity#7359797 Unchecked dynamic_cast Change-Id: Ib91d29da570f81879c8afc1e0fc035f2cfe52c9b --- sw/source/filter/xml/xmlimpit.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sw/source') 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( &rItem ); - OSL_ENSURE( pSplit != NULL, "Wrong Which-ID" ); + SfxBoolItem& rSplit = dynamic_cast(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; } } -- cgit