diff options
author | Rafael Dominguez <venccsralph@gmail.com> | 2011-05-21 17:37:19 -0430 |
---|---|---|
committer | Joseph Powers <jpowers27@cox.net> | 2011-05-22 21:21:33 -0700 |
commit | b9d82d2687e9e792dab2c4686c56f091e5494ee7 (patch) | |
tree | 06cf7f6d05dc498fc5ee1c0817aabb6da1094c70 /cui | |
parent | fb23c2dfd1de3a62b186676783f550cd7e31bb00 (diff) |
Replace List for std::vector<String>.
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/inc/page.hxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/page.cxx | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx index 289dac171671..e524a7d21e5d 100644 --- a/cui/source/inc/page.hxx +++ b/cui/source/inc/page.hxx @@ -222,7 +222,7 @@ public: void SetPaperFormatRanges( Paper eStart, Paper eEnd ) { ePaperStart = eStart, ePaperEnd = eEnd; } - void SetCollectionList(const List* pList); + void SetCollectionList(const std::vector<String> &aList); virtual void PageCreated (SfxAllItemSet aSet); }; diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx index c6c5ebde3f54..59977eba1251 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -1640,13 +1640,13 @@ IMPL_LINK_INLINE_END( SvxPageDescPage, CenterHdl_Impl, CheckBox *, EMPTYARG ) // ----------------------------------------------------------------------- -void SvxPageDescPage::SetCollectionList(const List* pList) +void SvxPageDescPage::SetCollectionList(const std::vector<String> &aList) { - sStandardRegister = *(String*)pList->GetObject(0); - for( sal_uInt16 i = 1; i < pList->Count(); i++ ) - { - aRegisterLB.InsertEntry(*(String*)pList->GetObject(i)); - } + OSL_ENSURE(!aList.empty(), "Empty string list"); + + sStandardRegister = aList[0]; + for( sal_uInt16 i = 1; i < aList.size(); i++ ) + aRegisterLB.InsertEntry(aList[i]); aRegisterCB .Show(); aRegisterFT .Show(); |