From 135c63c8f9cc363c0895542b0f3bed48b61ea836 Mon Sep 17 00:00:00 2001 From: Thomas Arnhold Date: Fri, 4 May 2012 15:51:56 +0200 Subject: fdo#48253 Expand SAL_STATIC_CAST and SAL_CONST_CAST Change-Id: I50f0887ceb4517d7ef234f970ca2ba679d533382 --- svl/source/items/cintitem.cxx | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'svl/source/items/cintitem.cxx') diff --git a/svl/source/items/cintitem.cxx b/svl/source/items/cintitem.cxx index 4584d993dc2f..ea64d6448457 100644 --- a/svl/source/items/cintitem.cxx +++ b/svl/source/items/cintitem.cxx @@ -48,7 +48,7 @@ int CntByteItem::operator ==(const SfxPoolItem & rItem) const DBG_CHKTHIS(CntByteItem, 0); DBG_ASSERT(rItem.ISA(CntByteItem), "CntByteItem::operator ==(): Bad type"); - return m_nValue == SAL_STATIC_CAST(const CntByteItem *, &rItem)->m_nValue; + return m_nValue == (static_cast< const CntByteItem * >(&rItem))->m_nValue; } //============================================================================ @@ -57,9 +57,9 @@ int CntByteItem::Compare(const SfxPoolItem & rWith) const { DBG_CHKTHIS(CntByteItem, 0); DBG_ASSERT(rWith.ISA(CntByteItem), "CntByteItem::Compare(): Bad type"); - return SAL_STATIC_CAST(const CntByteItem *, &rWith)->m_nValue < m_nValue ? + return (static_cast< const CntByteItem * >(&rWith))->m_nValue < m_nValue ? -1 : - SAL_STATIC_CAST(const CntByteItem *, &rWith)->m_nValue + (static_cast< const CntByteItem * >(&rWith))->m_nValue == m_nValue ? 0 : 1; } @@ -179,7 +179,7 @@ int CntUInt16Item::operator ==(const SfxPoolItem & rItem) const DBG_CHKTHIS(CntUInt16Item, 0); DBG_ASSERT(rItem.ISA(CntUInt16Item), "CntUInt16Item::operator ==(): Bad type"); - return m_nValue == SAL_STATIC_CAST(const CntUInt16Item *, &rItem)-> + return m_nValue == (static_cast< const CntUInt16Item * >(&rItem))-> m_nValue; } @@ -190,10 +190,10 @@ int CntUInt16Item::Compare(const SfxPoolItem & rWith) const DBG_CHKTHIS(CntUInt16Item, 0); DBG_ASSERT(rWith.ISA(CntUInt16Item), "CntUInt16Item::Compare(): Bad type"); - return SAL_STATIC_CAST(const CntUInt16Item *, &rWith)->m_nValue + return (static_cast< const CntUInt16Item * >(&rWith))->m_nValue < m_nValue ? -1 : - SAL_STATIC_CAST(const CntUInt16Item *, &rWith)->m_nValue + (static_cast< const CntUInt16Item * >(&rWith))->m_nValue == m_nValue ? 0 : 1; } @@ -312,7 +312,7 @@ int CntInt32Item::operator ==(const SfxPoolItem & rItem) const DBG_CHKTHIS(CntInt32Item, 0); DBG_ASSERT(rItem.ISA(CntInt32Item), "CntInt32Item::operator ==(): Bad type"); - return m_nValue == SAL_STATIC_CAST(const CntInt32Item *, &rItem)-> + return m_nValue == (static_cast< const CntInt32Item * >(&rItem))-> m_nValue; } @@ -322,10 +322,10 @@ int CntInt32Item::Compare(const SfxPoolItem & rWith) const { DBG_CHKTHIS(CntInt32Item, 0); DBG_ASSERT(rWith.ISA(CntInt32Item), "CntInt32Item::Compare(): Bad type"); - return SAL_STATIC_CAST(const CntInt32Item *, &rWith)->m_nValue + return (static_cast< const CntInt32Item * >(&rWith))->m_nValue < m_nValue ? -1 : - SAL_STATIC_CAST(const CntInt32Item *, &rWith)->m_nValue + (static_cast< const CntInt32Item * >(&rWith))->m_nValue == m_nValue ? 0 : 1; } @@ -444,7 +444,7 @@ int CntUInt32Item::operator ==(const SfxPoolItem & rItem) const DBG_CHKTHIS(CntUInt32Item, 0); DBG_ASSERT(rItem.ISA(CntUInt32Item), "CntUInt32Item::operator ==(): Bad type"); - return m_nValue == SAL_STATIC_CAST(const CntUInt32Item *, &rItem)-> + return m_nValue == (static_cast< const CntUInt32Item * >(&rItem))-> m_nValue; } @@ -455,10 +455,10 @@ int CntUInt32Item::Compare(const SfxPoolItem & rWith) const DBG_CHKTHIS(CntUInt32Item, 0); DBG_ASSERT(rWith.ISA(CntUInt32Item), "CntUInt32Item::operator ==(): Bad type"); - return SAL_STATIC_CAST(const CntUInt32Item *, &rWith)->m_nValue + return (static_cast< const CntUInt32Item * >(&rWith))->m_nValue < m_nValue ? -1 : - SAL_STATIC_CAST(const CntUInt32Item *, &rWith)->m_nValue + (static_cast< const CntUInt32Item * >(&rWith))->m_nValue == m_nValue ? 0 : 1; } -- cgit