diff options
author | npcdoom <venccsralph@gmail.com> | 2011-03-09 12:57:55 -0430 |
---|---|---|
committer | Thorsten Behrens <tbehrens@novell.com> | 2011-03-14 17:30:08 +0100 |
commit | cbbcd6e6922280a36688dccad8d1de9c53d15c5f (patch) | |
tree | 658c1175dd42cefff9fc9ea656cbea27e9947323 /editeng | |
parent | 5c7f1340820ebd5aba6fc994b7435e97bfaff9de (diff) |
Change CreateSelectionList to use vector instead of List.
- Removed returning List and added a parameter of
std::vector<Paragraph*> to CreateSelectionList.
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/inc/editeng/outliner.hxx | 2 | ||||
-rw-r--r-- | 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 e6e3164cd2df..8cec3ae4d47f 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 ff66af048c18..7d43f04d9141 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 |