From 2d53194c96083ebca071b4370e1f57225c61578d Mon Sep 17 00:00:00 2001
From: Rafael Dominguez <venccsralph@gmail.com>
Date: Sun, 25 Mar 2012 11:10:34 -0430
Subject: [PATCH 02/31] Overload SdPageObjsTLB::GetSelectEntryList.

To return selected entries to a vector instead to a deprecated
List structure.
---
 sd/source/ui/dlg/sdtreelb.cxx |   15 +++++++++++++++
 sd/source/ui/inc/sdtreelb.hxx |   11 +++++++++++
 2 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 7132739..492c44c 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -693,6 +693,21 @@ List* SdPageObjsTLB::GetSelectEntryList( sal_uInt16 nDepth )
     return( pList );
 }
 
+void SdPageObjsTLB::GetSelectEntryList( sal_uInt16 nDepth, std::vector<rtl::OUString> &rEntries ) const
+{
+    SvLBoxEntry* pEntry = FirstSelected();
+
+    while( pEntry )
+    {
+        sal_uInt16 nListDepth = GetModel()->GetDepth( pEntry );
+
+        if( nListDepth == nDepth )
+            rEntries.push_back(GetEntryText(pEntry));
+
+        pEntry = NextSelected( pEntry );
+    }
+}
+
 /*************************************************************************
 |*
 |* Eintraege werden erst auf Anforderung (Doppelklick) eingefuegt
diff --git a/sd/source/ui/inc/sdtreelb.hxx b/sd/source/ui/inc/sdtreelb.hxx
index 1c9d5b5..509fbbd 100644
--- a/sd/source/ui/inc/sdtreelb.hxx
+++ b/sd/source/ui/inc/sdtreelb.hxx
@@ -207,6 +207,17 @@ public:
     sal_Bool                    SelectEntry( const String& rName );
     String                  GetSelectEntry();
     List*                   GetSelectEntryList( sal_uInt16 nDepth );
+
+    /*************************************************************************
+    |*
+    |* Selektierte Eintrage zurueckgeben
+    |* nDepth == 0 -> Seiten
+    |* nDepth == 1 -> Objekte
+    |*
+    \************************************************************************/
+
+    void                    GetSelectEntryList (sal_uInt16 nDepth, std::vector<rtl::OUString> &rEntries) const;
+
     SdDrawDocument*         GetBookmarkDoc(SfxMedium* pMedium = NULL);
     ::sd::DrawDocShell*         GetDropDocSh() { return(mpDropDocSh); }
 
-- 
1.7.3.4

