diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-09-23 09:55:04 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2005-09-23 09:55:04 +0000 |
commit | d959b2f2b9d726062fa576167e974bbf52bbde6e (patch) | |
tree | 4aa66856def7396007b2a59a282743fcbb36ac9e /sd | |
parent | ad0d4b7ea6508e481c885add0d8329f23e1acebc (diff) |
INTEGRATION: CWS impress49 (1.31.110); FILE MERGED
2005/05/19 12:27:35 cl 1.31.110.1: #i44843# use safer dynamic_cast in SdOptionsPrintItem::operator==
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/app/optsitem.cxx | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sd/source/ui/app/optsitem.cxx b/sd/source/ui/app/optsitem.cxx index 42737ad4f79d..e9e632e6a187 100644 --- a/sd/source/ui/app/optsitem.cxx +++ b/sd/source/ui/app/optsitem.cxx @@ -4,9 +4,9 @@ * * $RCSfile: optsitem.cxx,v $ * - * $Revision: 1.32 $ + * $Revision: 1.33 $ * - * last change: $Author: rt $ $Date: 2005-09-09 03:43:01 $ + * last change: $Author: hr $ $Date: 2005-09-23 10:55:04 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -1685,8 +1685,15 @@ SfxPoolItem* SdOptionsPrintItem::Clone( SfxItemPool* ) const int SdOptionsPrintItem::operator==( const SfxPoolItem& rAttr ) const { - DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unterschiedliche Typen" ); - return( (SdOptionsPrint&) *this == (const SdOptionsPrint&)(const SdOptionsPrintItem&) rAttr ); + DBG_ASSERT( SfxPoolItem::operator==(rAttr), "SdOptionsPrintItem::operator==(), differen pool item type!" ); + + const SdOptionsPrintItem* pRHS = dynamic_cast<const SdOptionsPrintItem *>(&rAttr); + DBG_ASSERT( pRHS, "SdOptionsPrintItem::operator==(), compare not possible for non SdOptionsPrintItem" ); + + if( pRHS ) + return SdOptionsPrint::operator==(*pRHS); + else + return 0; } // ----------------------------------------------------------------------- |