diff options
author | Rafael Dominguez <venccsralph@gmail.com> | 2011-06-01 22:34:45 -0430 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2011-06-06 21:51:41 +0200 |
commit | caabe93372413c3e03bc096e5c6f0d41c7422575 (patch) | |
tree | 7148ce64aee27bd562c3027ae2681720b40b4a1c /svx/source/sdr | |
parent | 508a953c274c8a534c379ded04adc7df1e5fd5ba (diff) |
Replace List for std::vector<SfxStyleSheetBase*>.
Diffstat (limited to 'svx/source/sdr')
-rw-r--r-- | svx/source/sdr/properties/attributeproperties.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx index 4115f97d8fc4..602aeceba40c 100644 --- a/svx/source/sdr/properties/attributeproperties.cxx +++ b/svx/source/sdr/properties/attributeproperties.cxx @@ -353,7 +353,7 @@ namespace sdr if(pOldPool && pNewPool) { // build a list of to-be-copied Styles - List aList; + std::vector<SfxStyleSheetBase*> aStyleList; SfxStyleSheetBase* pAnchor = 0L; while(pSheet) @@ -362,7 +362,7 @@ namespace sdr if(!pAnchor) { - aList.Insert(pSheet, LIST_APPEND); + aStyleList.push_back(pSheet); pSheet = pOldPool->Find(pSheet->GetParent(), pSheet->GetFamily()); } else @@ -373,15 +373,15 @@ namespace sdr } // copy and set the parents - pSheet = (SfxStyleSheetBase*)aList.First(); SfxStyleSheetBase* pNewSheet = 0L; SfxStyleSheetBase* pLastSheet = 0L; SfxStyleSheetBase* pForThisObject = 0L; - while(pSheet) + std::vector<SfxStyleSheetBase*>::iterator iter; + for (iter = aStyleList.begin(); iter != aStyleList.end(); ++iter) { - pNewSheet = &pNewPool->Make(pSheet->GetName(), pSheet->GetFamily(), pSheet->GetMask()); - pNewSheet->GetItemSet().Put(pSheet->GetItemSet(), sal_False); + pNewSheet = &pNewPool->Make((*iter)->GetName(), (*iter)->GetFamily(), (*iter)->GetMask()); + pNewSheet->GetItemSet().Put((*iter)->GetItemSet(), sal_False); if(bScaleUnitChanged) { @@ -399,7 +399,6 @@ namespace sdr } pLastSheet = pNewSheet; - pSheet = (SfxStyleSheetBase*)aList.Next(); } // Set link to the Style found in the Pool |