diff options
author | Rafael Dominguez <venccsralph@gmail.com> | 2011-06-01 22:35:29 -0430 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2011-06-06 21:51:47 +0200 |
commit | 67c12a9487f243317fd1b395e16d9b4b4e17ff5d (patch) | |
tree | f093eb993a17dc14dc6de3e695e8dfb888fa2c67 | |
parent | caabe93372413c3e03bc096e5c6f0d41c7422575 (diff) |
Replace List for std::vector<const SfxItemSet*>.
-rw-r--r-- | svx/source/sdr/properties/attributeproperties.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx index 602aeceba40c..f6969e7a2d98 100644 --- a/svx/source/sdr/properties/attributeproperties.cxx +++ b/svx/source/sdr/properties/attributeproperties.cxx @@ -425,23 +425,20 @@ namespace sdr { // there is no StyleSheetPool in the new model, thus set // all items as hard items in the object - List aList; + std::vector<const SfxItemSet*> aSetList; const SfxItemSet* pItemSet = &pOldStyleSheet->GetItemSet(); while(pItemSet) { - aList.Insert((void*)pItemSet, CONTAINER_APPEND); + aSetList.push_back(pItemSet); pItemSet = pItemSet->GetParent(); } SfxItemSet* pNewSet = &CreateObjectSpecificItemSet(pNewModel->GetItemPool()); - pItemSet = (SfxItemSet*)aList.Last(); - while(pItemSet) - { - pNewSet->Put(*pItemSet); - pItemSet = (SfxItemSet*)aList.Prev(); - } + std::vector<const SfxItemSet*>::const_reverse_iterator riter; + for (riter = aSetList.rbegin(); riter != aSetList.rend(); ++riter) + pNewSet->Put(*(*riter)); // Items which were hard attributes before need to stay if(mpItemSet) |