editeng/source/items/textitem.cxx | 13 ++++--------- sc/source/core/data/stlsheet.cxx | 4 +--- sfx2/source/control/bindings.cxx | 2 +- svx/source/sdr/properties/defaultproperties.cxx | 2 +- svx/source/unodraw/unoshape.cxx | 2 +- sw/source/core/doc/docfmt.cxx | 4 +--- sw/source/core/doc/docnew.cxx | 4 +--- sw/source/core/unocore/unosect.cxx | 6 ++---- sw/source/core/unocore/unotext.cxx | 4 +--- sw/source/ui/uiview/viewtab.cxx | 4 +--- 10 files changed, 14 insertions(+), 31 deletions(-)
New commits: commit 1af0e36fb6b1a013db6b4f2875be8a85fd67c2a2 Author: Bjoern Michaelsen <bjoern.michael...@canonical.com> Date: Sat Aug 4 15:17:03 2012 +0200 kill va_args abuse for SfxItemSet Change-Id: I200addfdf551f1b8437b704c481d397c53440dcd diff --git a/sc/source/core/data/stlsheet.cxx b/sc/source/core/data/stlsheet.cxx index e13f0ec..0b5fd72 100644 --- a/sc/source/core/data/stlsheet.cxx +++ b/sc/source/core/data/stlsheet.cxx @@ -240,9 +240,7 @@ SfxItemSet& ScStyleSheet::GetItemSet() case SFX_STYLE_FAMILY_PARA: default: - pSet = new SfxItemSet( GetPool().GetPool(), - ATTR_PATTERN_START, ATTR_PATTERN_END, - 0 ); + pSet = new SfxItemSet( GetPool().GetPool(), ATTR_PATTERN_START, ATTR_PATTERN_END ); break; } bMySet = true; diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index 495a070..963c169 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -1211,7 +1211,7 @@ void SfxBindings::Execute_Impl( SfxRequest& aReq, const SfxSlot* pSlot, SfxShell { // The value is attached to a toggleable attribute (Bools) sal_uInt16 nWhich = pSlot->GetWhich(rPool); - SfxItemSet aSet(rPool, nWhich, nWhich, 0); + SfxItemSet aSet(rPool, nWhich, nWhich); SfxStateFunc aFunc = pSlot->GetStateFnc(); pShell->CallState( aFunc, aSet ); const SfxPoolItem *pOldItem; diff --git a/svx/source/sdr/properties/defaultproperties.cxx b/svx/source/sdr/properties/defaultproperties.cxx index aa6b10c..11874f1 100644 --- a/svx/source/sdr/properties/defaultproperties.cxx +++ b/svx/source/sdr/properties/defaultproperties.cxx @@ -154,7 +154,7 @@ namespace sdr const SfxPoolItem *pPoolItem; std::vector< sal_uInt16 > aPostItemChangeList; sal_Bool bDidChange(sal_False); - SfxItemSet aSet(*GetSdrObject().GetObjectItemPool(), SDRATTR_START, EE_ITEMS_END, 0, 0); + SfxItemSet aSet(*GetSdrObject().GetObjectItemPool(), SDRATTR_START, EE_ITEMS_END); // give a hint to STL_Vector aPostItemChangeList.reserve(rSet.Count()); diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 447979a..4aea0ed 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -675,7 +675,7 @@ void SvxShape::ObtainSettingsFromPropertySet(const SvxItemPropertySet& rPropSet) DBG_TESTSOLARMUTEX(); if(mpObj.is() && rPropSet.AreThereOwnUsrAnys() && mpModel) { - SfxItemSet aSet( mpModel->GetItemPool(), SDRATTR_START, SDRATTR_END, 0); + SfxItemSet aSet( mpModel->GetItemPool(), SDRATTR_START, SDRATTR_END); Reference< beans::XPropertySet > xShape( (OWeakObject*)this, UNO_QUERY ); SvxItemPropertySet_ObtainSettingsFromPropertySet(rPropSet, aSet, xShape, mpPropSet->getPropertyMap() ); diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index f0bc6bc..6b749df 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -200,9 +200,7 @@ sal_Bool lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs ) std::vector<sal_uInt16> aClearWhichIds; // restoring all paragraph list attributes { - SfxItemSet aListAttrSet( pDoc->GetAttrPool(), - RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END - 1, - 0 ); + SfxItemSet aListAttrSet( pDoc->GetAttrPool(), RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END - 1 ); aListAttrSet.Set( *pSet ); if ( aListAttrSet.Count() ) { diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 4ddf95e..878223c 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -423,9 +423,7 @@ SwDoc::SwDoc() // pass empty item set containing the paragraph's list attributes // as ignorable items to the stype manager. { - SfxItemSet aIgnorableParagraphItems( GetAttrPool(), - RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1, - 0 ); + SfxItemSet aIgnorableParagraphItems( GetAttrPool(), RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1); pStyleAccess = createStyleManager( &aIgnorableParagraphItems ); } diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index c51a601..51016e2 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -838,8 +838,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException, if (pFmt) { const SfxItemSet& rOldAttrSet = pFmt->GetAttrSet(); - pItemSet.reset( new SfxItemSet(*rOldAttrSet.GetPool(), - pEntry->nWID, pEntry->nWID, 0)); + pItemSet.reset( new SfxItemSet(*rOldAttrSet.GetPool(), pEntry->nWID, pEntry->nWID)); pItemSet->Put(rOldAttrSet); m_rPropSet.setPropertyValue(*pEntry, pValues[nProperty], *pItemSet); @@ -1607,8 +1606,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException) if (pFmt) { const SfxItemSet& rOldAttrSet = pFmt->GetAttrSet(); - pNewAttrSet.reset( new SfxItemSet(*rOldAttrSet.GetPool(), - pEntry->nWID, pEntry->nWID, 0)); + pNewAttrSet.reset( new SfxItemSet(*rOldAttrSet.GetPool(), pEntry->nWID, pEntry->nWID)); pNewAttrSet->ClearItem(pEntry->nWID); } else diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx index 315990a..a36cc9c 100644 --- a/sw/source/core/unocore/unotext.cxx +++ b/sw/source/core/unocore/unotext.cxx @@ -1652,9 +1652,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException) // make a selection from aStartPam to a EndPam SwSelBoxes aBoxes; - SfxItemSet aFrameItemSet(m_pImpl->m_pDoc->GetAttrPool(), - RES_FRMATR_BEGIN, RES_FRMATR_END-1, - 0 ); + SfxItemSet aFrameItemSet(m_pImpl->m_pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1); // If there is no content in the frame the shape is in // it gets deleted in the DelFullPara call below, // In this case insert a tmp text node ( we delete it later ) diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx index f94c123..c706424 100644 --- a/sw/source/ui/uiview/viewtab.cxx +++ b/sw/source/ui/uiview/viewtab.cxx @@ -1156,9 +1156,7 @@ void SwView::StateTabWin(SfxItemSet& rSet) aDistLR.SetRight((sal_uInt16)rBox.GetDistance(BOX_LINE_RIGHT)); //add the border distance of the paragraph - SfxItemSet aCoreSet1( GetPool(), - RES_BOX, RES_BOX, - 0 ); + SfxItemSet aCoreSet1( GetPool(), RES_BOX, RES_BOX ); rSh.GetCurAttr( aCoreSet1 ); const SvxBoxItem& rParaBox = (const SvxBoxItem&)aCoreSet1.Get(RES_BOX); aDistLR.SetLeft(aDistLR.GetLeft() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_LEFT )); commit 14d0096300685ec508b3b54d773db7767ce3b429 Author: Bjoern Michaelsen <bjoern.michael...@canonical.com> Date: Sat Aug 4 15:22:14 2012 +0200 kill last (ab)user of SetRanges() Change-Id: I7f52d67d955896821f2c340fdd51e072b53fdd2f diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx index 165f64d..41ea8a6 100644 --- a/editeng/source/items/textitem.cxx +++ b/editeng/source/items/textitem.cxx @@ -3504,15 +3504,10 @@ SvxScriptSetItem::SvxScriptSetItem( sal_uInt16 nSlotId, SfxItemPool& rPool ) { sal_uInt16 nLatin, nAsian, nComplex; GetWhichIds( nLatin, nAsian, nComplex ); - - sal_uInt16 aIds[ 9 ] = { 0 }; - aIds[ 0 ] = aIds[ 1 ] = nLatin; - aIds[ 2 ] = aIds[ 3 ] = nAsian; - aIds[ 4 ] = aIds[ 5 ] = nComplex; - aIds[ 6 ] = aIds[ 7 ] = SID_ATTR_CHAR_SCRIPTTYPE; - aIds[ 8 ] = 0; - - GetItemSet().SetRanges( aIds ); + GetItemSet().MergeRange( nLatin, nLatin ); + GetItemSet().MergeRange( nAsian, nAsian ); + GetItemSet().MergeRange( nComplex, nComplex ); + GetItemSet().MergeRange( SID_ATTR_CHAR_SCRIPTTYPE, SID_ATTR_CHAR_SCRIPTTYPE ); } SfxPoolItem* SvxScriptSetItem::Clone( SfxItemPool * ) const _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits