summaryrefslogtreecommitdiffstats
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-10-14 10:14:14 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-10-14 10:59:49 +0100
commite55d2a31260ac1eeb45468c7b8f077de5a93060a (patch)
treebf7837760f1764ae94482d2348e32305948f3cfc /sfx2
parentcoverity#735862 Unchecked dynamic_cast (diff)
downloadcore-e55d2a31260ac1eeb45468c7b8f077de5a93060a.tar.gz
core-e55d2a31260ac1eeb45468c7b8f077de5a93060a.zip
coverity#735849 Unchecked dynamic_cast
Change-Id: Ia8f6b24db5d83337d56599214d0acdb9b144cfc3
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/objitem.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/sfx2/source/doc/objitem.cxx b/sfx2/source/doc/objitem.cxx
index 1b446c4d0ce7..20192a9c16e8 100644
--- a/sfx2/source/doc/objitem.cxx
+++ b/sfx2/source/doc/objitem.cxx
@@ -88,12 +88,10 @@ SfxObjectItem::SfxObjectItem( sal_uInt16 nWhichId, SfxShell *pSh )
bool SfxObjectItem::operator==( const SfxPoolItem &rItem ) const
{
- const SfxObjectItem *pOther = dynamic_cast<const SfxObjectItem*>( &rItem );
- return pOther->_pSh == _pSh;
+ const SfxObjectItem& rOther = dynamic_cast<const SfxObjectItem&>(rItem);
+ return rOther._pSh == _pSh;
}
-
-
SfxPoolItem* SfxObjectItem::Clone( SfxItemPool *) const
{
return new SfxObjectItem( Which(), _pSh );