diff options
-rw-r--r-- | include/svl/itemset.hxx | 9 | ||||
-rw-r--r-- | svl/source/items/itemset.cxx | 19 | ||||
-rw-r--r-- | sw/source/core/attr/format.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/attr/swatrset.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/docnode/node.cxx | 6 |
5 files changed, 11 insertions, 27 deletions
diff --git a/include/svl/itemset.hxx b/include/svl/itemset.hxx index 5c056471a36b..a4710697a0f8 100644 --- a/include/svl/itemset.hxx +++ b/include/svl/itemset.hxx @@ -127,8 +127,8 @@ public: virtual const SfxPoolItem* Put( const SfxPoolItem&, sal_uInt16 nWhich ); const SfxPoolItem* Put( const SfxPoolItem& rItem ) { return Put(rItem, rItem.Which()); } - virtual int Put( const SfxItemSet&, - sal_Bool bInvalidAsDefault = sal_True ); + bool Put( const SfxItemSet&, + bool bInvalidAsDefault = true ); void PutExtended( const SfxItemSet&, SfxItemState eDontCareAs = SFX_ITEM_UNKNOWN, SfxItemState eDefaultAs = SFX_ITEM_UNKNOWN ); @@ -181,10 +181,7 @@ public: virtual SfxItemSet * Clone( sal_Bool bItems = sal_True, SfxItemPool *pToPool = 0 ) const; virtual const SfxPoolItem* Put( const SfxPoolItem&, sal_uInt16 nWhich ); - const SfxPoolItem* Put( const SfxPoolItem& rItem ) - { return Put(rItem, rItem.Which()); } - virtual int Put( const SfxItemSet&, - sal_Bool bInvalidAsDefault = sal_True ); + using SfxItemSet::Put; }; #endif // INCLUDED_SVL_ITEMSET_HXX diff --git a/svl/source/items/itemset.cxx b/svl/source/items/itemset.cxx index bc27dd128b5a..b305121cc50e 100644 --- a/svl/source/items/itemset.cxx +++ b/svl/source/items/itemset.cxx @@ -630,7 +630,7 @@ const SfxPoolItem* SfxItemSet::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich // ----------------------------------------------------------------------- -int SfxItemSet::Put( const SfxItemSet& rSet, sal_Bool bInvalidAsDefault ) +bool SfxItemSet::Put( const SfxItemSet& rSet, bool bInvalidAsDefault ) { DBG_CHKTHIS(SfxItemSet, DbgCheckItemSet); bool bRet = false; @@ -658,7 +658,7 @@ int SfxItemSet::Put( const SfxItemSet& rSet, sal_Bool bInvalidAsDefault ) pPtr += 2; } } - return int(bRet); + return bRet; } // ----------------------------------------------------------------------- @@ -922,7 +922,7 @@ bool SfxItemSet::Set } } else - bRet = Put(rSet, sal_False); + bRet = Put(rSet, false); return bRet; } @@ -2005,19 +2005,6 @@ const SfxPoolItem* SfxAllItemSet::Put( const SfxPoolItem& rItem, sal_uInt16 nWhi } // ----------------------------------------------------------------------- - - -/* Diese Methode wird forwarded, damit sie nicht durch die anderen - Put-Methoden dieser SubClass gehided wird. -*/ - -int SfxAllItemSet::Put( const SfxItemSet& rSet, sal_Bool bInvalidAsDefault ) -{ - //? pruefen, ob Which-Ranges erweitert werden - return SfxItemSet::Put( rSet, bInvalidAsDefault ); -} - -// ----------------------------------------------------------------------- // Item disablen, wenn durch ein VoidItem mit dem Which-Wert 0 ausgedrueckt void SfxItemSet::DisableItem(sal_uInt16 nWhich) diff --git a/sw/source/core/attr/format.cxx b/sw/source/core/attr/format.cxx index 025faf79a9cc..277957f2564b 100644 --- a/sw/source/core/attr/format.cxx +++ b/sw/source/core/attr/format.cxx @@ -447,7 +447,7 @@ bool SwFmt::SetFmtAttr( const SfxItemSet& rSet ) ( RES_GRFFMTCOLL == nFmtWhich || RES_TXTFMTCOLL == nFmtWhich ) ) ) { - if( ( bRet = (0 != aSet.Put( rSet ))) ) + if( ( bRet = aSet.Put( rSet )) ) aSet.SetModifyAtAttr( this ); // #i71574# if ( nFmtWhich == RES_TXTFMTCOLL ) diff --git a/sw/source/core/attr/swatrset.cxx b/sw/source/core/attr/swatrset.cxx index 9f41cd6a7df0..083cd2ac85fd 100644 --- a/sw/source/core/attr/swatrset.cxx +++ b/sw/source/core/attr/swatrset.cxx @@ -127,7 +127,7 @@ bool SwAttrSet::Put_BC( const SfxItemSet& rSet, { pNewSet = pNew; pOldSet = pOld; - bool nRet = 0 != SfxItemSet::Put( rSet ); + bool nRet = SfxItemSet::Put( rSet ); pOldSet = pNewSet = 0; return nRet; } diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index e2f6ecab9383..e0710b31e589 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -139,7 +139,7 @@ const SfxPoolItem* Put( boost::shared_ptr<const SfxItemSet>& mrpAttrSet, return pRet; } -int Put( boost::shared_ptr<const SfxItemSet>& mrpAttrSet, const SwCntntNode& rNode, +bool Put( boost::shared_ptr<const SfxItemSet>& mrpAttrSet, const SwCntntNode& rNode, const SfxItemSet& rSet ) { SwAttrSet aNewSet( (SwAttrSet&)*mrpAttrSet ); @@ -152,7 +152,7 @@ int Put( boost::shared_ptr<const SfxItemSet>& mrpAttrSet, const SwCntntNode& rNo pStyleNames->Put( aNewSet ); } - const int nRet = aNewSet.Put( rSet ); + const bool nRet = aNewSet.Put( rSet ); // #i76273# Robust if ( pStyleNames ) @@ -1437,7 +1437,7 @@ sal_Bool SwCntntNode::SetAttr( const SfxItemSet& rSet ) SFX_ITEM_SET != rSet.GetItemState( RES_PARATR_NUMRULE, sal_False ) ) ) { // Some special treatment for Attributes - bRet = 0 != AttrSetHandleHelper::Put( mpAttrSet, *this, rSet ); + bRet = AttrSetHandleHelper::Put( mpAttrSet, *this, rSet ); } else { |