summaryrefslogtreecommitdiff
path: root/svl/source/items
diff options
context:
space:
mode:
Diffstat (limited to 'svl/source/items')
-rw-r--r--svl/source/items/itemset.cxx8
-rw-r--r--svl/source/items/poolcach.cxx2
2 files changed, 5 insertions, 5 deletions
diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx
index c69cbb48baca..f0a42745a4bd 100644
--- a/svl/source/items/itemset.cxx
+++ b/svl/source/items/itemset.cxx
@@ -99,7 +99,7 @@ SfxItemSet::SfxItemSet
(void) bTotalRanges; // avoid warnings
#endif
- _pWhichRanges = (sal_uInt16*) _pPool->GetFrozenIdRanges();
+ _pWhichRanges = const_cast<sal_uInt16*>(_pPool->GetFrozenIdRanges());
assert( _pWhichRanges && "don't create ItemSets with full range before FreezeIdRanges()" );
if ( !_pWhichRanges )
_pPool->FillItemIdRanges_Impl( _pWhichRanges );
@@ -232,7 +232,7 @@ SfxItemSet::SfxItemSet( const SfxItemSet& rASet ):
{
// Just copy the pointer and increase RefCount
*ppDst = *ppSrc;
- ( (SfxPoolItem*) (*ppDst) )->AddRef();
+ (*ppDst)->AddRef();
}
else if ( !(*ppSrc)->Which() )
*ppDst = (*ppSrc)->Clone();
@@ -258,7 +258,7 @@ SfxItemSet::~SfxItemSet()
if( *ppFnd && !IsInvalidItem(*ppFnd) )
{
if( !(*ppFnd)->Which() )
- delete (SfxPoolItem*) *ppFnd;
+ delete *ppFnd;
else {
// Still multiple references present, so just alter the RefCount
if ( 1 < (*ppFnd)->GetRefCount() && !IsDefaultItem(*ppFnd) )
@@ -770,7 +770,7 @@ void SfxItemSet::SetRanges( const sal_uInt16 *pNewRanges )
if( pNewRanges == GetPool()->GetFrozenIdRanges() )
{
delete[] _pWhichRanges;
- _pWhichRanges = ( sal_uInt16* ) pNewRanges;
+ _pWhichRanges = const_cast<sal_uInt16*>(pNewRanges);
}
else
{
diff --git a/svl/source/items/poolcach.cxx b/svl/source/items/poolcach.cxx
index 09f2d531f632..eb1f955dbece 100644
--- a/svl/source/items/poolcach.cxx
+++ b/svl/source/items/poolcach.cxx
@@ -104,7 +104,7 @@ const SfxSetItem& SfxItemPoolCache::ApplyTo( const SfxSetItem &rOrigItem, bool b
// Add the transformation to the cache
SfxItemModifyImpl aModify;
aModify.pOrigItem = &rOrigItem;
- aModify.pPoolItem = (SfxSetItem*) pNewPoolItem;
+ aModify.pPoolItem = const_cast<SfxSetItem*>(pNewPoolItem);
pCache->push_back( aModify );
DBG_ASSERT( !pItemToPut ||