diff options
Diffstat (limited to 'sfx2/source/doc/objitem.cxx')
-rw-r--r-- | sfx2/source/doc/objitem.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sfx2/source/doc/objitem.cxx b/sfx2/source/doc/objitem.cxx index 8e907b7602fc..5b5483df5ce8 100644 --- a/sfx2/source/doc/objitem.cxx +++ b/sfx2/source/doc/objitem.cxx @@ -32,7 +32,8 @@ SfxPoolItem* SfxObjectItem::CreateDefault() { return new SfxObjectItem; } bool SfxObjectShellItem::operator==( const SfxPoolItem &rItem ) const { - return dynamic_cast<const SfxObjectShellItem&>(rItem).pObjSh == pObjSh; + return SfxPoolItem::operator==(rItem) && + static_cast<const SfxObjectShellItem&>(rItem).pObjSh == pObjSh; } SfxPoolItem* SfxObjectShellItem::Clone( SfxItemPool *) const @@ -92,8 +93,8 @@ SfxObjectItem::SfxObjectItem( sal_uInt16 nWhichId, SfxShell *pSh ) bool SfxObjectItem::operator==( const SfxPoolItem &rItem ) const { - const SfxObjectItem& rOther = dynamic_cast<const SfxObjectItem&>(rItem); - return rOther._pSh == _pSh; + return SfxPoolItem::operator==(rItem) && + static_cast<const SfxObjectItem&>(rItem)._pSh == _pSh; } SfxPoolItem* SfxObjectItem::Clone( SfxItemPool *) const |