Kaydet (Commit) 15e75e05 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#735962 Unchecked dynamic_cast

Change-Id: Ied30c917600d503ebcad2bcab01e38f26f7d30b3
üst 841a3106
......@@ -1010,12 +1010,11 @@ bool SvXMLExportItemMapper::QueryXMLValue(
case RES_PAGEDESC:
{
const SwFormatPageDesc* pPageDesc = dynamic_cast<const SwFormatPageDesc*>( &rItem );
OSL_ENSURE( pPageDesc != NULL, "Wrong Which-ID" );
const SwFormatPageDesc& rPageDesc = dynamic_cast<const SwFormatPageDesc&>(rItem);
if( MID_PAGEDESC_PAGENUMOFFSET==nMemberId )
{
::boost::optional<sal_uInt16> oNumOffset = pPageDesc->GetNumOffset();
::boost::optional<sal_uInt16> oNumOffset = rPageDesc.GetNumOffset();
if (oNumOffset && oNumOffset.get() > 0)
{
// #i114163# positiveInteger only!
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment