[Libreoffice-commits] .: editeng/inc editeng/source

Thorsten Behrens thorsten at kemper.freedesktop.org
Mon Mar 14 09:30:52 PDT 2011


 editeng/inc/editeng/outliner.hxx   |    2 +-
 editeng/source/outliner/outlvw.cxx |    7 +++----
 2 files changed, 4 insertions(+), 5 deletions(-)

New commits:
commit 6466904b413b2cee8587cee2e9ac1bb6ee5c495b
Author: npcdoom <venccsralph at gmail.com>
Date:   Wed Mar 9 12:57:55 2011 -0430

    Change CreateSelectionList to use vector instead of List.
    
    - Removed returning List and added a parameter of
    std::vector<Paragraph*> to CreateSelectionList.

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


More information about the Libreoffice-commits mailing list