[Libreoffice-commits] .: 2 commits - cui/source

Joseph Powers jpowers at kemper.freedesktop.org
Sun May 22 22:53:01 PDT 2011


 cui/source/inc/page.hxx          |    2 +-
 cui/source/tabpages/numpages.cxx |    9 +++------
 cui/source/tabpages/page.cxx     |   12 ++++++------
 3 files changed, 10 insertions(+), 13 deletions(-)

New commits:
commit eb4924054ecb090c12e3ba6d9be80663f634abe9
Author: Rafael Dominguez <venccsralph at gmail.com>
Date:   Sat May 21 17:37:19 2011 -0430

    Replace List for std::vector<String>.

diff --git a/cui/source/inc/page.hxx b/cui/source/inc/page.hxx
index 99d071b..7ddd00a 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 d087aa2..e3c0c6a 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();
commit c63005b5ff0494c04da12cf68bbe63c87fc76078
Author: Rafael Dominguez <venccsralph at gmail.com>
Date:   Sat May 21 17:21:16 2011 -0430

    Replace List for std::vector<String>.

diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 5b69c4d..21dbb6f 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -3586,13 +3586,10 @@ void SvxNumOptionsTabPage::PageCreated(SfxAllItemSet aSet)
     if (pListItem)
     {
         ListBox& myCharFmtLB = GetCharFmtListBox();
-        const List *pList = (pListItem)->GetList();
-        sal_uInt32 nCount = pList->Count();;
+        const std::vector<String> &aList = (pListItem)->GetList();
+        sal_uInt32 nCount = aList.size();;
         for(sal_uInt32 i = 0; i < nCount; i++)
-        {
-            myCharFmtLB.InsertEntry(*(const String*)(pList->GetObject(i)) );
-
-        }
+            myCharFmtLB.InsertEntry(aList[i]);
     }
     if (pMetricItem)
         SetMetric(static_cast<FieldUnit>(pMetricItem->GetValue()));


More information about the Libreoffice-commits mailing list