[Libreoffice-commits] .: sw/source

Joseph Powers jpowers at kemper.freedesktop.org
Sun May 8 06:39:29 PDT 2011


 sw/source/ui/inc/insrule.hxx  |    7 +++++--
 sw/source/ui/misc/insrule.cxx |    8 ++++----
 2 files changed, 9 insertions(+), 6 deletions(-)

New commits:
commit c8b607d5b811f8f7b689808ef0f104cca704696f
Author: Rafael Dominguez <venccsralph at gmail.com>
Date:   Sat May 7 18:54:59 2011 -0430

    Remove deprecated List in SwInsertGrfRulerDlg.

diff --git a/sw/source/ui/inc/insrule.hxx b/sw/source/ui/inc/insrule.hxx
index f06c057..ae14265 100644
--- a/sw/source/ui/inc/insrule.hxx
+++ b/sw/source/ui/inc/insrule.hxx
@@ -27,6 +27,9 @@
  ************************************************************************/
 #ifndef _INSRULE_HXX
 #define _INSRULE_HXX
+
+#include <vector>
+
 #include "num.hxx"
 
 class SwRulerValueSet;
@@ -39,7 +42,7 @@ class SwInsertGrfRulerDlg  : public SfxModalDialog
     CancelButton	aCancelPB;
     HelpButton		aHelpPB;
 
-    List			aGrfNames;
+    std::vector<String> aGrfNames;
     String			sSimple;
     String          sRulers;
     sal_uInt16 			nSelPos;
@@ -56,7 +59,7 @@ public:
 
     String 			GetGraphicName();
     sal_Bool			IsSimpleLine() {return nSelPos == 1;}
-    sal_Bool 			HasImages() const {return 0 != aGrfNames.Count();}
+    sal_Bool 			HasImages() const {return !aGrfNames.empty();}
 };
 
 #endif
diff --git a/sw/source/ui/misc/insrule.cxx b/sw/source/ui/misc/insrule.cxx
index e8074bf..b341d04 100644
--- a/sw/source/ui/misc/insrule.cxx
+++ b/sw/source/ui/misc/insrule.cxx
@@ -76,10 +76,10 @@ SwInsertGrfRulerDlg::SwInsertGrfRulerDlg( Window* pParent ) :
     pExampleVS->InsertItem( 1, 1);
     pExampleVS->SetItemText( 1, sSimple);
 
-    for(sal_uInt16 i = 1; i <= aGrfNames.Count(); i++)
+    for(sal_uInt16 i = 1; i <= aGrfNames.size(); i++)
     {
         pExampleVS->InsertItem( i + 1, i);
-        pExampleVS->SetItemText( i + 1, *((String*)aGrfNames.GetObject(i-1)));
+        pExampleVS->SetItemText( i + 1, aGrfNames[i-1]);
     }
     pExampleVS->Show();
 
@@ -95,9 +95,9 @@ String SwInsertGrfRulerDlg::GetGraphicName()
 {
     String sRet;
     sal_uInt16 nSel = nSelPos - 2; //align selection position with ValueSet index
-    if(nSel < aGrfNames.Count())
+    if(nSel < aGrfNames.size())
         sRet = URIHelper::SmartRel2Abs(
-            INetURLObject(), *(String*) aGrfNames.GetObject(nSel),
+            INetURLObject(), aGrfNames[nSel],
             URIHelper::GetMaybeFileHdl());
     return sRet;
 }


More information about the Libreoffice-commits mailing list