From 2adcaf9df41ac8cb98beeb90d231d5c5892c172f Mon Sep 17 00:00:00 2001
From: npcdoom <venccsralph@gmail.com>
Date: Wed, 9 Mar 2011 12:57:55 -0430
Subject: [PATCH 4/4] Change CreateSelectionList to use vector instead of List.

- Removed returning List and added a parameter of
std::vector<Paragraph*> to CreateSelectionList.
---
 editeng/inc/editeng/outliner.hxx   |    2 +-
 editeng/source/outliner/outlvw.cxx |    7 +++----
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/editeng/inc/editeng/outliner.hxx b/editeng/inc/editeng/outliner.hxx
index cdfd119..c80fe91 100644
--- a/editeng/inc/editeng/outliner.hxx
+++ b/editeng/inc/editeng/outliner.hxx
@@ -281,7 +281,7 @@ public:
 
     Rectangle   GetVisArea() const;
 
-    List*       CreateSelectionList();
+    void        CreateSelectionList (std::vector<Paragraph*> &aSelList) ;
 
     // Retruns the number of selected paragraphs
     ULONG       Select( Paragraph* pParagraph,
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index e07952f..de9fae7 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -1039,18 +1039,17 @@ void OutlinerView::PasteSpecial()
     }
 }
 
-List* OutlinerView::CreateSelectionList()
+void OutlinerView::CreateSelectionList (std::vector<Paragraph*> &aSelList)
 {
     DBG_CHKTHIS( OutlinerView, 0 );
 
     ParaRange aParas = ImpGetSelectedParagraphs( TRUE );
-    List* pSelList = new List;
+
     for ( USHORT nPara = aParas.nStartPara; nPara <= aParas.nEndPara; nPara++ )
     {
         Paragraph* pPara = pOwner->pParaList->GetParagraph( nPara );
-        pSelList->Insert( pPara, LIST_APPEND );
+        aSelList.push_back(pPara);
     }
-    return pSelList;
 }
 
 SfxStyleSheet* OutlinerView::GetStyleSheet() const
-- 
1.7.3.4

