summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2012-05-04 15:51:56 +0200
committerThomas Arnhold <thomas@arnhold.org>2012-05-04 15:52:57 +0200
commit135c63c8f9cc363c0895542b0f3bed48b61ea836 (patch)
tree5afa3bcc304e246b38058c2ad7b0d1fd1e76a05f /svl
parentc48fe716225b1b784d657685396b6cf5fee4fc3d (diff)
fdo#48253 Expand SAL_STATIC_CAST and SAL_CONST_CAST
Change-Id: I50f0887ceb4517d7ef234f970ca2ba679d533382
Diffstat (limited to 'svl')
-rw-r--r--svl/inc/svl/ilstitem.hxx2
-rw-r--r--svl/source/items/cintitem.cxx24
-rw-r--r--svl/source/items/cntwall.cxx2
-rw-r--r--svl/source/items/ctypeitm.cxx4
-rw-r--r--svl/source/items/custritm.cxx2
-rw-r--r--svl/source/items/intitem.cxx6
-rw-r--r--svl/source/items/sfontitm.cxx4
-rw-r--r--svl/source/items/slstitm.cxx2
-rw-r--r--svl/source/items/visitem.cxx2
9 files changed, 24 insertions, 24 deletions
diff --git a/svl/inc/svl/ilstitem.hxx b/svl/inc/svl/ilstitem.hxx
index 2973c066c4d8..55abfbb13c7d 100644
--- a/svl/inc/svl/ilstitem.hxx
+++ b/svl/inc/svl/ilstitem.hxx
@@ -50,7 +50,7 @@ public:
::com::sun::star::uno::Sequence < sal_Int32 > GetSequence()
{ return m_aList; }
::com::sun::star::uno::Sequence < sal_Int32 > GetConstSequence() const
- { return SAL_CONST_CAST(SfxIntegerListItem *, this)->GetSequence(); }
+ { return (const_cast< SfxIntegerListItem * >(this))->GetSequence(); }
void GetList( ::std::vector < sal_Int32 >& rList ) const;
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;
}
diff --git a/svl/source/items/cntwall.cxx b/svl/source/items/cntwall.cxx
index 3eb89d8b7abe..92bdff92508d 100644
--- a/svl/source/items/cntwall.cxx
+++ b/svl/source/items/cntwall.cxx
@@ -133,7 +133,7 @@ SvStream& CntWallpaperItem::Store( SvStream& rStream, sal_uInt16 ) const
// !!! Color stream operators do not work - they discard any
// transparency info !!!
// ??? Why the hell Color::Write(...) isn't const ???
- SAL_CONST_CAST( CntWallpaperItem*, this )->_nColor.Write( rStream, sal_True );
+ (const_cast< CntWallpaperItem* >(this))->_nColor.Write( rStream, sal_True );
rStream << _nStyle;
return rStream;
diff --git a/svl/source/items/ctypeitm.cxx b/svl/source/items/ctypeitm.cxx
index bb8fc9400e90..9cf67a1371ec 100644
--- a/svl/source/items/ctypeitm.cxx
+++ b/svl/source/items/ctypeitm.cxx
@@ -164,7 +164,7 @@ SfxItemPresentation CntContentTypeItem::GetPresentation(
DBG_ASSERT(pIntlWrapper,
"CntContentTypeItem::GetPresentation(): No IntlWrapper");
if (pIntlWrapper)
- SAL_CONST_CAST(CntContentTypeItem *, this)->_aPresentation
+ (const_cast< CntContentTypeItem * >(this))->_aPresentation
= INetContentTypes::GetPresentation(GetEnumValue(),
pIntlWrapper->
getLocale());
@@ -187,7 +187,7 @@ INetContentType CntContentTypeItem::GetEnumValue() const
{
// Not yet initialized... Get enum value for string content type.
- CntContentTypeItem* pVarThis = SAL_CONST_CAST( CntContentTypeItem*, this );
+ CntContentTypeItem* pVarThis = (const_cast< CntContentTypeItem* >(this));
pVarThis->_eType = INetContentTypes::GetContentType( GetValue() );
}
diff --git a/svl/source/items/custritm.cxx b/svl/source/items/custritm.cxx
index 7c71b67d6864..cccd70b85ed2 100644
--- a/svl/source/items/custritm.cxx
+++ b/svl/source/items/custritm.cxx
@@ -51,7 +51,7 @@ int CntUnencodedStringItem::operator ==(const SfxPoolItem & rItem) const
DBG_ASSERT(rItem.ISA(CntUnencodedStringItem),
"CntUnencodedStringItem::operator ==(): Bad type");
return m_aValue
- == SAL_STATIC_CAST(const CntUnencodedStringItem *, &rItem)->
+ == (static_cast< const CntUnencodedStringItem * >(&rItem))->
m_aValue;
}
diff --git a/svl/source/items/intitem.cxx b/svl/source/items/intitem.cxx
index abe1586c17db..e7844678c186 100644
--- a/svl/source/items/intitem.cxx
+++ b/svl/source/items/intitem.cxx
@@ -77,7 +77,7 @@ int SfxInt16Item::operator ==(const SfxPoolItem & rItem) const
{
DBG_CHKTHIS(SfxInt16Item, 0);
DBG_ASSERT(SfxPoolItem::operator ==(rItem), "unequal type");
- return m_nValue == SAL_STATIC_CAST(const SfxInt16Item *, &rItem)->
+ return m_nValue == (static_cast< const SfxInt16Item * >(&rItem))->
m_nValue;
}
@@ -87,10 +87,10 @@ int SfxInt16Item::Compare(const SfxPoolItem & rWith) const
{
DBG_CHKTHIS(SfxInt16Item, 0);
DBG_ASSERT(SfxPoolItem::operator ==(rWith), "unequal type");
- return SAL_STATIC_CAST(const SfxInt16Item *, &rWith)->m_nValue
+ return (static_cast< const SfxInt16Item * >(&rWith))->m_nValue
< m_nValue ?
-1 :
- SAL_STATIC_CAST(const SfxInt16Item *, &rWith)->m_nValue
+ (static_cast< const SfxInt16Item * >(&rWith))->m_nValue
== m_nValue ?
0 : 1;
}
diff --git a/svl/source/items/sfontitm.cxx b/svl/source/items/sfontitm.cxx
index 1077c939a201..226208f629bd 100644
--- a/svl/source/items/sfontitm.cxx
+++ b/svl/source/items/sfontitm.cxx
@@ -129,8 +129,8 @@ SvStream & SfxFontItem::Store(SvStream & rStream, sal_uInt16) const
<< sal_Int8(m_bOutline) << sal_Int8(m_bShadow)
<< sal_Int8(m_bKerning);
}
- SAL_CONST_CAST(Color &, m_aColor).Write(rStream, sal_True);
- SAL_CONST_CAST(Color &, m_aFillColor).Write(rStream, sal_True);
+ (const_cast< Color & >(m_aColor)).Write(rStream, sal_True);
+ (const_cast< Color & >(m_aFillColor)).Write(rStream, sal_True);
rStream << sal_Int16(m_bHasFont << 2 | m_bHasColor
| m_bHasFillColor << 1);
return rStream;
diff --git a/svl/source/items/slstitm.cxx b/svl/source/items/slstitm.cxx
index d12ab3e0f5a6..bc7efbe430ad 100644
--- a/svl/source/items/slstitm.cxx
+++ b/svl/source/items/slstitm.cxx
@@ -147,7 +147,7 @@ std::vector<String>& SfxStringListItem::GetList()
const std::vector<String>& SfxStringListItem::GetList () const
{
- return SAL_CONST_CAST(SfxStringListItem *, this)->GetList();
+ return (const_cast< SfxStringListItem * >(this))->GetList();
}
//------------------------------------------------------------------------
diff --git a/svl/source/items/visitem.cxx b/svl/source/items/visitem.cxx
index 6453efc0c52d..016bdb6f1a0f 100644
--- a/svl/source/items/visitem.cxx
+++ b/svl/source/items/visitem.cxx
@@ -57,7 +57,7 @@ int SfxVisibilityItem::operator ==(const SfxPoolItem & rItem) const
{
DBG_CHKTHIS(SfxVisibilityItem, 0);
DBG_ASSERT(SfxPoolItem::operator ==(rItem), "unequal type");
- return m_nValue.bVisible == SAL_STATIC_CAST(const SfxVisibilityItem *, &rItem)->
+ return m_nValue.bVisible == (static_cast< const SfxVisibilityItem * >(&rItem))->
m_nValue.bVisible;
}