kill va_args abuse for SfxItemSet

Change-Id: I200addfdf551f1b8437b704c481d397c53440dcd
This commit is contained in:
Bjoern Michaelsen
2012-08-04 15:17:03 +02:00
parent 14d0096300
commit 1af0e36fb6
9 changed files with 10 additions and 22 deletions

View File

@@ -240,9 +240,7 @@ SfxItemSet& ScStyleSheet::GetItemSet()
case SFX_STYLE_FAMILY_PARA: case SFX_STYLE_FAMILY_PARA:
default: default:
pSet = new SfxItemSet( GetPool().GetPool(), pSet = new SfxItemSet( GetPool().GetPool(), ATTR_PATTERN_START, ATTR_PATTERN_END );
ATTR_PATTERN_START, ATTR_PATTERN_END,
0 );
break; break;
} }
bMySet = true; bMySet = true;

View File

@@ -1211,7 +1211,7 @@ void SfxBindings::Execute_Impl( SfxRequest& aReq, const SfxSlot* pSlot, SfxShell
{ {
// The value is attached to a toggleable attribute (Bools) // The value is attached to a toggleable attribute (Bools)
sal_uInt16 nWhich = pSlot->GetWhich(rPool); sal_uInt16 nWhich = pSlot->GetWhich(rPool);
SfxItemSet aSet(rPool, nWhich, nWhich, 0); SfxItemSet aSet(rPool, nWhich, nWhich);
SfxStateFunc aFunc = pSlot->GetStateFnc(); SfxStateFunc aFunc = pSlot->GetStateFnc();
pShell->CallState( aFunc, aSet ); pShell->CallState( aFunc, aSet );
const SfxPoolItem *pOldItem; const SfxPoolItem *pOldItem;

View File

@@ -154,7 +154,7 @@ namespace sdr
const SfxPoolItem *pPoolItem; const SfxPoolItem *pPoolItem;
std::vector< sal_uInt16 > aPostItemChangeList; std::vector< sal_uInt16 > aPostItemChangeList;
sal_Bool bDidChange(sal_False); 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 // give a hint to STL_Vector
aPostItemChangeList.reserve(rSet.Count()); aPostItemChangeList.reserve(rSet.Count());

View File

@@ -675,7 +675,7 @@ void SvxShape::ObtainSettingsFromPropertySet(const SvxItemPropertySet& rPropSet)
DBG_TESTSOLARMUTEX(); DBG_TESTSOLARMUTEX();
if(mpObj.is() && rPropSet.AreThereOwnUsrAnys() && mpModel) 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 ); Reference< beans::XPropertySet > xShape( (OWeakObject*)this, UNO_QUERY );
SvxItemPropertySet_ObtainSettingsFromPropertySet(rPropSet, aSet, xShape, mpPropSet->getPropertyMap() ); SvxItemPropertySet_ObtainSettingsFromPropertySet(rPropSet, aSet, xShape, mpPropSet->getPropertyMap() );

View File

@@ -200,9 +200,7 @@ sal_Bool lcl_RstAttr( const SwNodePtr& rpNd, void* pArgs )
std::vector<sal_uInt16> aClearWhichIds; std::vector<sal_uInt16> aClearWhichIds;
// restoring all paragraph list attributes // restoring all paragraph list attributes
{ {
SfxItemSet aListAttrSet( pDoc->GetAttrPool(), SfxItemSet aListAttrSet( pDoc->GetAttrPool(), RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END - 1 );
RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END - 1,
0 );
aListAttrSet.Set( *pSet ); aListAttrSet.Set( *pSet );
if ( aListAttrSet.Count() ) if ( aListAttrSet.Count() )
{ {

View File

@@ -423,9 +423,7 @@ SwDoc::SwDoc()
// pass empty item set containing the paragraph's list attributes // pass empty item set containing the paragraph's list attributes
// as ignorable items to the stype manager. // as ignorable items to the stype manager.
{ {
SfxItemSet aIgnorableParagraphItems( GetAttrPool(), SfxItemSet aIgnorableParagraphItems( GetAttrPool(), RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1);
RES_PARATR_LIST_BEGIN, RES_PARATR_LIST_END-1,
0 );
pStyleAccess = createStyleManager( &aIgnorableParagraphItems ); pStyleAccess = createStyleManager( &aIgnorableParagraphItems );
} }

View File

@@ -838,8 +838,7 @@ throw (beans::UnknownPropertyException, beans::PropertyVetoException,
if (pFmt) if (pFmt)
{ {
const SfxItemSet& rOldAttrSet = pFmt->GetAttrSet(); const SfxItemSet& rOldAttrSet = pFmt->GetAttrSet();
pItemSet.reset( new SfxItemSet(*rOldAttrSet.GetPool(), pItemSet.reset( new SfxItemSet(*rOldAttrSet.GetPool(), pEntry->nWID, pEntry->nWID));
pEntry->nWID, pEntry->nWID, 0));
pItemSet->Put(rOldAttrSet); pItemSet->Put(rOldAttrSet);
m_rPropSet.setPropertyValue(*pEntry, m_rPropSet.setPropertyValue(*pEntry,
pValues[nProperty], *pItemSet); pValues[nProperty], *pItemSet);
@@ -1607,8 +1606,7 @@ throw (beans::UnknownPropertyException, uno::RuntimeException)
if (pFmt) if (pFmt)
{ {
const SfxItemSet& rOldAttrSet = pFmt->GetAttrSet(); const SfxItemSet& rOldAttrSet = pFmt->GetAttrSet();
pNewAttrSet.reset( new SfxItemSet(*rOldAttrSet.GetPool(), pNewAttrSet.reset( new SfxItemSet(*rOldAttrSet.GetPool(), pEntry->nWID, pEntry->nWID));
pEntry->nWID, pEntry->nWID, 0));
pNewAttrSet->ClearItem(pEntry->nWID); pNewAttrSet->ClearItem(pEntry->nWID);
} }
else else

View File

@@ -1652,9 +1652,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
// make a selection from aStartPam to a EndPam // make a selection from aStartPam to a EndPam
SwSelBoxes aBoxes; SwSelBoxes aBoxes;
SfxItemSet aFrameItemSet(m_pImpl->m_pDoc->GetAttrPool(), SfxItemSet aFrameItemSet(m_pImpl->m_pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1);
RES_FRMATR_BEGIN, RES_FRMATR_END-1,
0 );
// If there is no content in the frame the shape is in // If there is no content in the frame the shape is in
// it gets deleted in the DelFullPara call below, // it gets deleted in the DelFullPara call below,
// In this case insert a tmp text node ( we delete it later ) // In this case insert a tmp text node ( we delete it later )

View File

@@ -1156,9 +1156,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
aDistLR.SetRight((sal_uInt16)rBox.GetDistance(BOX_LINE_RIGHT)); aDistLR.SetRight((sal_uInt16)rBox.GetDistance(BOX_LINE_RIGHT));
//add the border distance of the paragraph //add the border distance of the paragraph
SfxItemSet aCoreSet1( GetPool(), SfxItemSet aCoreSet1( GetPool(), RES_BOX, RES_BOX );
RES_BOX, RES_BOX,
0 );
rSh.GetCurAttr( aCoreSet1 ); rSh.GetCurAttr( aCoreSet1 );
const SvxBoxItem& rParaBox = (const SvxBoxItem&)aCoreSet1.Get(RES_BOX); const SvxBoxItem& rParaBox = (const SvxBoxItem&)aCoreSet1.Get(RES_BOX);
aDistLR.SetLeft(aDistLR.GetLeft() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_LEFT )); aDistLR.SetLeft(aDistLR.GetLeft() + (sal_uInt16)rParaBox.GetDistance(BOX_LINE_LEFT ));