summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-10-14 10:03:05 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-10-14 10:59:46 +0100
commit15e75e05001bae7601d0d47a9eae809b14199392 (patch)
treebd01157b5e15eaf9dfb0eb24230c96653cfcbcf3 /sw
parent841a3106c5826cfc834ea18411595f875dba3235 (diff)
coverity#735962 Unchecked dynamic_cast
Change-Id: Ied30c917600d503ebcad2bcab01e38f26f7d30b3
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/xml/xmlexpit.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx
index d7f758f3af5b..637ec9e17a83 100644
--- a/sw/source/filter/xml/xmlexpit.cxx
+++ b/sw/source/filter/xml/xmlexpit.cxx
@@ -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!