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

Joseph Powers jpowers at kemper.freedesktop.org
Fri Jun 10 05:54:13 PDT 2011


 svtools/inc/svtools/svlbox.hxx     |  416 ++++++++++++++++++-------------------
 svtools/inc/svtools/treelist.hxx   |  135 ++++++++----
 svtools/source/contnr/svimpbox.cxx |  118 +++++-----
 svtools/source/contnr/svlbox.cxx   |   62 ++---
 svtools/source/contnr/treelist.cxx |  172 +++++++--------
 5 files changed, 483 insertions(+), 420 deletions(-)

New commits:
commit 4bba01ba875ad42c80c042c43b8ef3587cbf44d3
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Thu Jun 9 21:23:11 2011 -0700

    Change ScTreeEntryList to no longer depend on class List.
    
    Version 2.0 of the patch. It works this time...

diff --git a/svtools/inc/svtools/svlbox.hxx b/svtools/inc/svtools/svlbox.hxx
index b605d49..c56b740 100644
--- a/svtools/inc/svtools/svlbox.hxx
+++ b/svtools/inc/svtools/svlbox.hxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -69,23 +69,23 @@ namespace utl {
 // *************************** Tabulatoren *****************************
 // *********************************************************************
 
-#define SV_LBOXTAB_DYNAMIC     		0x0001 // Ausgabespalte des Items verschiebt
+#define SV_LBOXTAB_DYNAMIC          0x0001 // Ausgabespalte des Items verschiebt
                                            // sich entsprechend Child-Tiefe
-#define SV_LBOXTAB_ADJUST_RIGHT		0x0002 // rechter Rand des Items am Tabulator
-#define SV_LBOXTAB_ADJUST_LEFT		0x0004 // linker Rand ...
-#define SV_LBOXTAB_ADJUST_CENTER	0x0008 // Item am Tabulator zentrieren
-#define SV_LBOXTAB_ADJUST_NUMERIC	0x0010 // Dezimalpunkt am Tabulator (Strings)
+#define SV_LBOXTAB_ADJUST_RIGHT     0x0002 // rechter Rand des Items am Tabulator
+#define SV_LBOXTAB_ADJUST_LEFT      0x0004 // linker Rand ...
+#define SV_LBOXTAB_ADJUST_CENTER    0x0008 // Item am Tabulator zentrieren
+#define SV_LBOXTAB_ADJUST_NUMERIC   0x0010 // Dezimalpunkt am Tabulator (Strings)
 
 // wird nicht mehr unterstuetzt! Fokus richtet sich jetzt nach Selektion!
-#define SV_LBOXTAB_SHOW_FOCUS		0x0020 // Fokus visualisieren
+#define SV_LBOXTAB_SHOW_FOCUS       0x0020 // Fokus visualisieren
 
-#define SV_LBOXTAB_SHOW_SELECTION	0x0040 // Selektionszustand visualisieren
+#define SV_LBOXTAB_SHOW_SELECTION   0x0040 // Selektionszustand visualisieren
                                            // Item muss umschliessendes Polygon
                                            // zurueckgeben koennen (D&D-Cursor)
-#define SV_LBOXTAB_EDITABLE        	0x0100 // Item an Tabulator editierbar
-#define SV_LBOXTAB_PUSHABLE			0x0200 // Item verhaelt sich wie ein Button
-#define SV_LBOXTAB_INV_ALWAYS		0x0400 // Hintergrund immer loeschen
-#define SV_LBOXTAB_FORCE			0x0800 // Default-Berechnung des ersten Tabulators
+#define SV_LBOXTAB_EDITABLE         0x0100 // Item an Tabulator editierbar
+#define SV_LBOXTAB_PUSHABLE         0x0200 // Item verhaelt sich wie ein Button
+#define SV_LBOXTAB_INV_ALWAYS       0x0400 // Hintergrund immer loeschen
+#define SV_LBOXTAB_FORCE            0x0800 // Default-Berechnung des ersten Tabulators
                                            // (auf die sich Abo-Tabpage, Extras/Optionen/Anpassen,
                                            // etc. verlassen) ausschalten. Die Position des ersten
                                            // Tabs entspricht jetzt exakt den eingestellten Flags &
@@ -93,25 +93,25 @@ namespace utl {
 
 class SvLBoxTab
 {
-    long	nPos;
-    void*	pUserData;
+    long    nPos;
+    void*   pUserData;
 public:
             SvLBoxTab();
             SvLBoxTab( long nPos, sal_uInt16 nFlags=SV_LBOXTAB_ADJUST_LEFT );
             SvLBoxTab( const SvLBoxTab& );
             ~SvLBoxTab();
 
-    sal_uInt16	nFlags;
-
-    void	SetUserData( void* pPtr ) { pUserData = pPtr; }
-    void*	GetUserData() const { return pUserData; }
-    sal_Bool	IsDynamic() const { return (sal_Bool)((nFlags & SV_LBOXTAB_DYNAMIC)!=0); }
-    void	SetPos( long nNewPos) { nPos = nNewPos; }
-    long	GetPos() const { return nPos; }
-    long	CalcOffset( long nItemLength, long nTabWidth );
-    // long	CalcOffset( const String&, const OutputDevice& );
-    sal_Bool	IsEditable() const { return (sal_Bool)((nFlags & SV_LBOXTAB_EDITABLE)!=0); }
-    sal_Bool	IsPushable() const { return (sal_Bool)((nFlags & SV_LBOXTAB_PUSHABLE)!=0); }
+    sal_uInt16  nFlags;
+
+    void    SetUserData( void* pPtr ) { pUserData = pPtr; }
+    void*   GetUserData() const { return pUserData; }
+    sal_Bool    IsDynamic() const { return (sal_Bool)((nFlags & SV_LBOXTAB_DYNAMIC)!=0); }
+    void    SetPos( long nNewPos) { nPos = nNewPos; }
+    long    GetPos() const { return nPos; }
+    long    CalcOffset( long nItemLength, long nTabWidth );
+    // long CalcOffset( const String&, const OutputDevice& );
+    sal_Bool    IsEditable() const { return (sal_Bool)((nFlags & SV_LBOXTAB_EDITABLE)!=0); }
+    sal_Bool    IsPushable() const { return (sal_Bool)((nFlags & SV_LBOXTAB_PUSHABLE)!=0); }
 };
 
 // *********************************************************************
@@ -121,7 +121,7 @@ public:
 class SvViewDataItem
 {
 public:
-    Size 	aSize;
+    Size    aSize;
             SvViewDataItem();
             ~SvViewDataItem();
 };
@@ -133,10 +133,10 @@ class SvViewDataEntry : public SvViewData
 {
 public:
     SvViewDataItem* pItemData;  // ein Array von SvViewDataItems
-    sal_uInt16 			nItmCnt;	// Anzahl Items fuer delete-operator
+    sal_uInt16          nItmCnt;    // Anzahl Items fuer delete-operator
 
                     SvViewDataEntry();
-    virtual 		~SvViewDataEntry();
+    virtual         ~SvViewDataEntry();
 };
 
 // *********************************************************************
@@ -148,101 +148,101 @@ class SVT_DLLPUBLIC SvLBoxItem
 public:
                         SvLBoxItem( SvLBoxEntry*, sal_uInt16 nFlags );
                         SvLBoxItem();
-    virtual				~SvLBoxItem();
-    virtual sal_uInt16		IsA() = 0;
-    const Size& 		GetSize( SvLBox* pView, SvLBoxEntry* pEntry );
-    const Size&			GetSize( SvLBoxEntry*, SvViewDataEntry* );
-    const Size&			GetSize( SvViewDataEntry* pData, sal_uInt16 nItemPos )
+    virtual             ~SvLBoxItem();
+    virtual sal_uInt16      IsA() = 0;
+    const Size&         GetSize( SvLBox* pView, SvLBoxEntry* pEntry );
+    const Size&         GetSize( SvLBoxEntry*, SvViewDataEntry* );
+    const Size&         GetSize( SvViewDataEntry* pData, sal_uInt16 nItemPos )
                         {
                             SvViewDataItem* pIData=pData->pItemData+nItemPos;
                             return pIData->aSize;
                         }
 
-    virtual void		Paint( const Point& rPos, SvLBox& rOutDev,
+    virtual void        Paint( const Point& rPos, SvLBox& rOutDev,
                             sal_uInt16 nViewDataEntryFlags,
                             SvLBoxEntry* pEntry ) = 0;
 
-    virtual void		InitViewData( SvLBox* pView, SvLBoxEntry* pEntry,
+    virtual void        InitViewData( SvLBox* pView, SvLBoxEntry* pEntry,
                             // wenn != 0 muss dieser Pointer benutzt werden!
                             // wenn == 0 muss er ueber die View geholt werden
                             SvViewDataItem* pViewData = 0) = 0;
     virtual SvLBoxItem* Create() const = 0;
     // view-abhaengige Daten werden nicht geklont
-    virtual void 		Clone( SvLBoxItem* pSource ) = 0;
+    virtual void        Clone( SvLBoxItem* pSource ) = 0;
 };
 
 // Flags, die am Model haengen
-#define SV_ENTRYFLAG_CHILDS_ON_DEMAND	0x0001
-#define SV_ENTRYFLAG_DISABLE_DROP 		0x0002
-#define SV_ENTRYFLAG_IN_USE 			0x0004
+#define SV_ENTRYFLAG_CHILDS_ON_DEMAND   0x0001
+#define SV_ENTRYFLAG_DISABLE_DROP       0x0002
+#define SV_ENTRYFLAG_IN_USE             0x0004
 // wird gesetzt, wenn RequestingChilds keine Childs gestzt hat
-#define SV_ENTRYFLAG_NO_NODEBMP			0x0008
+#define SV_ENTRYFLAG_NO_NODEBMP         0x0008
 // Eintrag hatte oder hat Kinder
-#define SV_ENTRYFLAG_HAD_CHILDREN		0x0010
+#define SV_ENTRYFLAG_HAD_CHILDREN       0x0010
 
-#define SV_ENTRYFLAG_USER_FLAGS			0xF000
-#define SV_ENTRYFLAG_SEMITRANSPARENT	0x8000		// draw semi-transparent entry bitmaps
+#define SV_ENTRYFLAG_USER_FLAGS         0xF000
+#define SV_ENTRYFLAG_SEMITRANSPARENT    0x8000      // draw semi-transparent entry bitmaps
 
 class SVT_DLLPUBLIC SvLBoxEntry : public SvListEntry
 {
     friend class SvLBox;
 
-    SvPtrarr 	aItems;
-    void*	 	pUserData;
-    sal_uInt16	 	nEntryFlags;
-    SVT_DLLPRIVATE void 		DeleteItems_Impl();
+    SvPtrarr    aItems;
+    void*       pUserData;
+    sal_uInt16      nEntryFlags;
+    SVT_DLLPRIVATE void         DeleteItems_Impl();
 public:
 
                 SvLBoxEntry();
-    virtual 	~SvLBoxEntry();
+    virtual     ~SvLBoxEntry();
 
-    sal_uInt16		ItemCount() const { return (sal_uInt16)aItems.Count(); }
+    sal_uInt16      ItemCount() const { return (sal_uInt16)aItems.Count(); }
     // DARF NUR GERUFEN WERDEN, WENN DER EINTRAG NOCH NICHT IM MODEL
     // EINGEFUEGT IST, DA SONST FUER DAS ITEM KEINE VIEW-ABHAENGIGEN
     // DATEN ALLOZIERT WERDEN!
-    void		AddItem( SvLBoxItem* pItem );
-    void		ReplaceItem( SvLBoxItem* pNewItem, sal_uInt16 nPos );
-    SvLBoxItem*	GetItem( sal_uInt16 nPos ) const { return (SvLBoxItem*)aItems.GetObject(nPos ); }
+    void        AddItem( SvLBoxItem* pItem );
+    void        ReplaceItem( SvLBoxItem* pNewItem, sal_uInt16 nPos );
+    SvLBoxItem* GetItem( sal_uInt16 nPos ) const { return (SvLBoxItem*)aItems.GetObject(nPos ); }
     SvLBoxItem* GetFirstItem( sal_uInt16 nId );
-    sal_uInt16		GetPos( SvLBoxItem* pItem ) const { return aItems.GetPos( pItem ); }
-    void*		GetUserData() const { return pUserData; }
-    void		SetUserData( void* pPtr ) { pUserData = pPtr; }
+    sal_uInt16      GetPos( SvLBoxItem* pItem ) const { return aItems.GetPos( pItem ); }
+    void*       GetUserData() const { return pUserData; }
+    void        SetUserData( void* pPtr ) { pUserData = pPtr; }
     virtual void Clone( SvListEntry* pSource );
-    void 		EnableChildsOnDemand( sal_Bool bEnable=sal_True );
-    sal_Bool 		HasChildsOnDemand() const { return (sal_Bool)((nEntryFlags & SV_ENTRYFLAG_CHILDS_ON_DEMAND)!=0); }
-    sal_Bool		HasInUseEmphasis() const	{ return (sal_Bool)((nEntryFlags & SV_ENTRYFLAG_IN_USE)!=0); }
+    void        EnableChildsOnDemand( sal_Bool bEnable=sal_True );
+    sal_Bool        HasChildsOnDemand() const { return (sal_Bool)((nEntryFlags & SV_ENTRYFLAG_CHILDS_ON_DEMAND)!=0); }
+    sal_Bool        HasInUseEmphasis() const    { return (sal_Bool)((nEntryFlags & SV_ENTRYFLAG_IN_USE)!=0); }
 
-    sal_uInt16		GetFlags() const { return nEntryFlags; }
-    void		SetFlags( sal_uInt16 nFlags ) { nEntryFlags = nFlags; }
+    sal_uInt16      GetFlags() const { return nEntryFlags; }
+    void        SetFlags( sal_uInt16 nFlags ) { nEntryFlags = nFlags; }
 };
 
 // *********************************************************************
 // ****************************** SvLBox *******************************
 // *********************************************************************
 
-#define WB_FORCE_SELECTION			((WinBits)0x8000)
+#define WB_FORCE_SELECTION          ((WinBits)0x8000)
 
 #define DragDropMode sal_uInt16
-#define SV_DRAGDROP_NONE			(DragDropMode)0x0000
-#define SV_DRAGDROP_CTRL_MOVE		(DragDropMode)0x0001
-#define SV_DRAGDROP_CTRL_COPY		(DragDropMode)0x0002
-#define SV_DRAGDROP_APP_MOVE   		(DragDropMode)0x0004
-#define SV_DRAGDROP_APP_COPY		(DragDropMode)0x0008
-#define SV_DRAGDROP_APP_DROP		(DragDropMode)0x0010
+#define SV_DRAGDROP_NONE            (DragDropMode)0x0000
+#define SV_DRAGDROP_CTRL_MOVE       (DragDropMode)0x0001
+#define SV_DRAGDROP_CTRL_COPY       (DragDropMode)0x0002
+#define SV_DRAGDROP_APP_MOVE        (DragDropMode)0x0004
+#define SV_DRAGDROP_APP_COPY        (DragDropMode)0x0008
+#define SV_DRAGDROP_APP_DROP        (DragDropMode)0x0010
 // Entries duerfen ueber den obersten Eintrag gedroppt werden.
 // Das Drop-Target ist in diesem Fall 0
-#define SV_DRAGDROP_ENABLE_TOP		(DragDropMode)0x0020
+#define SV_DRAGDROP_ENABLE_TOP      (DragDropMode)0x0020
 
 DECLARE_SVTREELIST(SvLBoxTreeList, SvLBoxEntry*)
 
 #define SVLISTBOX_ID_LBOX 0   // fuer SvLBox::IsA()
 
-#define SVLBOX_IN_EDT			0x0001
-#define SVLBOX_EDT_ENABLED		0x0002
-#define SVLBOX_IS_EXPANDING		0x0004
-#define SVLBOX_IS_TRAVELSELECT	0x0008
-#define SVLBOX_TARGEMPH_VIS		0x0010
-#define SVLBOX_EDTEND_CALLED	0x0020
+#define SVLBOX_IN_EDT           0x0001
+#define SVLBOX_EDT_ENABLED      0x0002
+#define SVLBOX_IS_EXPANDING     0x0004
+#define SVLBOX_IS_TRAVELSELECT  0x0008
+#define SVLBOX_TARGEMPH_VIS     0x0010
+#define SVLBOX_EDTEND_CALLED    0x0020
 
 class SvLBox;
 struct SvLBox_Impl
@@ -285,28 +285,28 @@ class SVT_DLLPUBLIC SvLBox
 
 protected:
 
-    Link			aExpandedHdl;
-    Link			aExpandingHdl;
-    Link			aSelectHdl;
-    Link			aDeselectHdl;
-    Link			aDoubleClickHdl;
-    SvLBoxEntry*	pHdlEntry;
-    SvLBoxItem*		pHdlItem;
-    SvLBoxEntry*	pTargetEntry;
+    Link            aExpandedHdl;
+    Link            aExpandingHdl;
+    Link            aSelectHdl;
+    Link            aDeselectHdl;
+    Link            aDoubleClickHdl;
+    SvLBoxEntry*    pHdlEntry;
+    SvLBoxItem*     pHdlItem;
+    SvLBoxEntry*    pTargetEntry;
 
     SvLBox_Impl*    pLBoxImpl;
 
-    sal_uInt16			nImpFlags;
+    sal_uInt16          nImpFlags;
     // Move/CopySelection: Position des aktuellen Eintrags in Selektionsliste
-    sal_uInt16			nCurEntrySelPos;
+    sal_uInt16          nCurEntrySelPos;
 
-    DragDropMode	nDragDropMode;
-    SelectionMode	eSelMode;
-    sal_Int8 		nDragOptions;
+    DragDropMode    nDragDropMode;
+    SelectionMode   eSelMode;
+    sal_Int8        nDragOptions;
 
-    sal_Bool			CheckDragAndDropMode( SvLBox* pSource, sal_Int8 );
-    void			ImplShowTargetEmphasis( SvLBoxEntry* pEntry, sal_Bool bShow);
-    void			EnableSelectionAsDropTarget( sal_Bool bEnable = sal_True,
+    sal_Bool            CheckDragAndDropMode( SvLBox* pSource, sal_Int8 );
+    void            ImplShowTargetEmphasis( SvLBoxEntry* pEntry, sal_Bool bShow);
+    void            EnableSelectionAsDropTarget( sal_Bool bEnable = sal_True,
                                                  sal_Bool bWithChilds = sal_True );
     // standard impl gibt 0 zurueck; muss von abgeleiteten Klassen, die
     // D&D unterstuetzen, ueberladen werden
@@ -321,43 +321,43 @@ protected:
 
     // invalidate children on enable/disable
     virtual void StateChanged( StateChangedType );
-    
+
     virtual sal_uLong Insert( SvLBoxEntry* pEnt,SvLBoxEntry* pPar,sal_uLong nPos=LIST_APPEND);
     virtual sal_uLong Insert( SvLBoxEntry* pEntry,sal_uLong nRootPos = LIST_APPEND );
-    void			InsertTree( SvLBoxEntry* pTree, SvLBoxEntry* pTarget) {pModel->InsertTree( pTree, pTarget ); }
+    void            InsertTree( SvLBoxEntry* pTree, SvLBoxEntry* pTarget) {pModel->InsertTree( pTree, pTarget ); }
 
     // Inplace-Editing
     SvInplaceEdit2*  pEdCtrl;
-    void			EnableInplaceEditing( sal_Bool bEnable){if(bEnable)nImpFlags|=SVLBOX_EDT_ENABLED; else nImpFlags&=~SVLBOX_EDT_ENABLED;}
-    sal_Bool			IsInplaceEditingEnabled() const { return (sal_Bool)((nImpFlags&SVLBOX_EDT_ENABLED)!=0); }
-    virtual void	EditingRequest( SvLBoxEntry* pEntry, SvLBoxItem* pItem,
+    void            EnableInplaceEditing( sal_Bool bEnable){if(bEnable)nImpFlags|=SVLBOX_EDT_ENABLED; else nImpFlags&=~SVLBOX_EDT_ENABLED;}
+    sal_Bool            IsInplaceEditingEnabled() const { return (sal_Bool)((nImpFlags&SVLBOX_EDT_ENABLED)!=0); }
+    virtual void    EditingRequest( SvLBoxEntry* pEntry, SvLBoxItem* pItem,
                         const Point& rMousePos );
-    void			EditText( const String&, const Rectangle&,const Selection&);
-    void			EditText( const String&, const Rectangle&,const Selection&, sal_Bool bMulti);
-    void			EditTextMultiLine( const String&, const Rectangle&,const Selection&);
-    void			CancelTextEditing();
-    sal_Bool			IsEditingActive() const	{ return (sal_Bool)((nImpFlags & SVLBOX_IN_EDT)!=0); }
-    sal_Bool			EditingCanceled() const;
-    void			EndEditing( sal_Bool bCancel = sal_False );
+    void            EditText( const String&, const Rectangle&,const Selection&);
+    void            EditText( const String&, const Rectangle&,const Selection&, sal_Bool bMulti);
+    void            EditTextMultiLine( const String&, const Rectangle&,const Selection&);
+    void            CancelTextEditing();
+    sal_Bool            IsEditingActive() const { return (sal_Bool)((nImpFlags & SVLBOX_IN_EDT)!=0); }
+    sal_Bool            EditingCanceled() const;
+    void            EndEditing( sal_Bool bCancel = sal_False );
     bool            IsEmptyTextAllowed() const;
     void            ForbidEmptyText();
     // Callback EditText
-    virtual	void	EditedText( const String& );
+    virtual void    EditedText( const String& );
 
     // Rueckgabewert muss von SvViewDataEntry abgeleitet sein!
-    virtual	SvViewData* CreateViewData( SvListEntry* );
+    virtual SvViewData* CreateViewData( SvListEntry* );
     // InitViewData wird direkt nach CreateViewData aufgerufen
     // In InitViewData ist der Entry noch nicht in die View eingefuegt!
     virtual void InitViewData( SvViewData*, SvListEntry* pEntry );
     // ruft fuer Items aller Entries InitViewData auf
-    void			RecalcViewData();
+    void            RecalcViewData();
     // Callback von RecalcViewData
-    virtual void	ViewDataInitialized( SvLBoxEntry* );
+    virtual void    ViewDataInitialized( SvLBoxEntry* );
 
     virtual void    Command( const CommandEvent& rCEvt );
-    virtual void	KeyInput( const KeyEvent& rKEvt );
+    virtual void    KeyInput( const KeyEvent& rKEvt );
     virtual SvLBoxEntry* GetEntry( const Point& rPos, sal_Bool bHit=sal_False ) const;
-    virtual void 	ModelHasEntryInvalidated( SvListEntry* pEntry );
+    virtual void    ModelHasEntryInvalidated( SvListEntry* pEntry );
 
      // handler and methods for Drag - finished handler. This link can be set
     // to the TransferDataContainer. The AddBox/RemoveBox methods must be
@@ -368,7 +368,7 @@ protected:
     Link GetDragFinishedHdl() const;
 
     // for asynchronous D&D
-    sal_Int8    	ExecuteDrop( const ExecuteDropEvent& rEvt, SvLBox* pSourceView );
+    sal_Int8        ExecuteDrop( const ExecuteDropEvent& rEvt, SvLBox* pSourceView );
 
     void            OnCurrentEntryChanged();
 
@@ -382,67 +382,67 @@ protected:
     virtual ::vcl::StringEntryIdentifier    CurrentEntry( String& _out_entryText ) const;
     virtual ::vcl::StringEntryIdentifier    NextEntry( ::vcl::StringEntryIdentifier _currentEntry, String& _out_entryText ) const;
     virtual void                            SelectEntry( ::vcl::StringEntryIdentifier _entry );
- 
+
 public:
 
     SvLBox( Window* pParent, WinBits nWinStyle=0 );
     SvLBox( Window* pParent, const ResId& rResId );
     ~SvLBox();
 
-    SvLBoxTreeList*	GetModel() const { return (SvLBoxTreeList*)pModel; }
+    SvLBoxTreeList* GetModel() const { return (SvLBoxTreeList*)pModel; }
     using SvListView::SetModel;
-    void			SetModel( SvLBoxTreeList* );
-    void			DisconnectFromModel();
+    void            SetModel( SvLBoxTreeList* );
+    void            DisconnectFromModel();
 
-    virtual sal_uInt16	IsA();
-    sal_uLong			GetEntryCount() const {return pModel->GetEntryCount();}
+    virtual sal_uInt16  IsA();
+    sal_uLong           GetEntryCount() const {return pModel->GetEntryCount();}
     SvLBoxEntry*    First() const { return (SvLBoxEntry*)(pModel->First()); }
     SvLBoxEntry*    Next( SvLBoxEntry* pEntry, sal_uInt16* pDepth=0 ) const { return (SvLBoxEntry*)(pModel->Next(pEntry,pDepth));}
-    SvLBoxEntry*	Prev( SvLBoxEntry* pEntry, sal_uInt16* pDepth=0 ) const { return (SvLBoxEntry*)(pModel->Prev(pEntry,pDepth));}
-    SvLBoxEntry*	Last( sal_uInt16* pDepth=0 ) const { return (SvLBoxEntry*)(pModel->Last(pDepth));}
+    SvLBoxEntry*    Prev( SvLBoxEntry* pEntry, sal_uInt16* pDepth=0 ) const { return (SvLBoxEntry*)(pModel->Prev(pEntry,pDepth));}
+    SvLBoxEntry*    Last() const { return (SvLBoxEntry*)(pModel->Last()); }
 
-    SvLBoxEntry*	FirstChild(SvLBoxEntry* pParent ) const { return (SvLBoxEntry*)(pModel->FirstChild(pParent)); }
-    SvLBoxEntry*	NextSibling(SvLBoxEntry* pEntry ) const { return (SvLBoxEntry*)(pModel->NextSibling( pEntry )); }
-    SvLBoxEntry*	PrevSibling(SvLBoxEntry* pEntry ) const { return (SvLBoxEntry*)(pModel->PrevSibling( pEntry )); }
+    SvLBoxEntry*    FirstChild(SvLBoxEntry* pParent ) const { return (SvLBoxEntry*)(pModel->FirstChild(pParent)); }
+    SvLBoxEntry*    NextSibling(SvLBoxEntry* pEntry ) const { return (SvLBoxEntry*)(pModel->NextSibling( pEntry )); }
+    SvLBoxEntry*    PrevSibling(SvLBoxEntry* pEntry ) const { return (SvLBoxEntry*)(pModel->PrevSibling( pEntry )); }
 
-    SvLBoxEntry*	FirstSelected() const { return (SvLBoxEntry*)SvListView::FirstSelected(); }
+    SvLBoxEntry*    FirstSelected() const { return (SvLBoxEntry*)SvListView::FirstSelected(); }
     using SvListView::NextSelected;
     SvLBoxEntry*    NextSelected( SvLBoxEntry* pEntry ) const { return (SvLBoxEntry*)(SvListView::NextSelected(pEntry)); }
     using SvListView::PrevSelected;
-    SvLBoxEntry*	PrevSelected( SvLBoxEntry* pEntry ) const { return (SvLBoxEntry*)(SvListView::PrevSelected(pEntry)); }
-    SvLBoxEntry*	LastSelected() const { return (SvLBoxEntry*)(SvListView::LastSelected()); }
+    SvLBoxEntry*    PrevSelected( SvLBoxEntry* pEntry ) const { return (SvLBoxEntry*)(SvListView::PrevSelected(pEntry)); }
+    SvLBoxEntry*    LastSelected() const { return (SvLBoxEntry*)(SvListView::LastSelected()); }
 
-    sal_Bool 			CopySelection( SvLBox* pSource, SvLBoxEntry* pTarget );
-    sal_Bool 			MoveSelection( SvLBox* pSource, SvLBoxEntry* pTarget );
-    sal_Bool			MoveSelectionCopyFallbackPossible( SvLBox* pSource, SvLBoxEntry* pTarget, sal_Bool bAllowCopyFallback );
-    void 			RemoveSelection();
+    sal_Bool            CopySelection( SvLBox* pSource, SvLBoxEntry* pTarget );
+    sal_Bool            MoveSelection( SvLBox* pSource, SvLBoxEntry* pTarget );
+    sal_Bool            MoveSelectionCopyFallbackPossible( SvLBox* pSource, SvLBoxEntry* pTarget, sal_Bool bAllowCopyFallback );
+    void            RemoveSelection();
 
-    DragDropMode	GetDragDropMode() const { return nDragDropMode; }
-    virtual void	SetDragDropMode( DragDropMode );
-    SelectionMode	GetSelectionMode() const { return eSelMode; }
-    virtual void 	SetSelectionMode( SelectionMode );
+    DragDropMode    GetDragDropMode() const { return nDragDropMode; }
+    virtual void    SetDragDropMode( DragDropMode );
+    SelectionMode   GetSelectionMode() const { return eSelMode; }
+    virtual void    SetSelectionMode( SelectionMode );
 
     // pParent==0 -> Root-Ebene
-    SvLBoxEntry*	GetEntry( SvLBoxEntry* pParent, sal_uLong nPos ) const { return (SvLBoxEntry*)(pModel->GetEntry(pParent,nPos)); }
-    SvLBoxEntry*	GetEntry( sal_uLong nRootPos ) const { return (SvLBoxEntry*)(pModel->GetEntry(nRootPos)); }
+    SvLBoxEntry*    GetEntry( SvLBoxEntry* pParent, sal_uLong nPos ) const { return (SvLBoxEntry*)(pModel->GetEntry(pParent,nPos)); }
+    SvLBoxEntry*    GetEntry( sal_uLong nRootPos ) const { return (SvLBoxEntry*)(pModel->GetEntry(nRootPos)); }
 
-    SvLBoxEntry*	GetEntryFromPath( const ::std::deque< sal_Int32 >& _rPath ) const;
-    void			FillEntryPath( SvLBoxEntry* pEntry, ::std::deque< sal_Int32 >& _rPath ) const;
-    virtual	String	GetEntryText( SvLBoxEntry* pEntry ) const;
+    SvLBoxEntry*    GetEntryFromPath( const ::std::deque< sal_Int32 >& _rPath ) const;
+    void            FillEntryPath( SvLBoxEntry* pEntry, ::std::deque< sal_Int32 >& _rPath ) const;
+    virtual String  GetEntryText( SvLBoxEntry* pEntry ) const;
 
     using Window::GetParent;
-    SvLBoxEntry*	GetParent( SvLBoxEntry* pEntry ) const { return (SvLBoxEntry*)(pModel->GetParent(pEntry)); }
-    SvLBoxEntry* 	GetRootLevelParent(SvLBoxEntry* pEntry ) const { return (SvLBoxEntry*)(pModel->GetRootLevelParent( pEntry ));}
+    SvLBoxEntry*    GetParent( SvLBoxEntry* pEntry ) const { return (SvLBoxEntry*)(pModel->GetParent(pEntry)); }
+    SvLBoxEntry*    GetRootLevelParent(SvLBoxEntry* pEntry ) const { return (SvLBoxEntry*)(pModel->GetRootLevelParent( pEntry ));}
 
     using Window::GetChildCount;
-    sal_uLong			GetChildCount( SvLBoxEntry* pParent ) const { return pModel->GetChildCount(pParent); }
-    sal_uLong			GetLevelChildCount( SvLBoxEntry* pParent ) const;
+    sal_uLong           GetChildCount( SvLBoxEntry* pParent ) const { return pModel->GetChildCount(pParent); }
+    sal_uLong           GetLevelChildCount( SvLBoxEntry* pParent ) const;
 
     SvViewDataEntry* GetViewDataEntry( SvListEntry* pEntry ) const { return (SvViewDataEntry*)SvListView::GetViewData(pEntry); }
-    SvViewDataItem*	 GetViewDataItem( SvListEntry*, SvLBoxItem* ) const;
+    SvViewDataItem*  GetViewDataItem( SvListEntry*, SvLBoxItem* ) const;
 
-    virtual void	MakeVisible( SvLBoxEntry* pEntry );
-    void    		Clear();
+    virtual void    MakeVisible( SvLBoxEntry* pEntry );
+    void            Clear();
 
     /** enables or disables mnemonic characters in the entry texts.
 
@@ -482,37 +482,37 @@ public:
     virtual sal_Bool    Expand( SvLBoxEntry* pParent );
     virtual sal_Bool    Collapse( SvLBoxEntry* pParent );
     virtual sal_Bool    Select( SvLBoxEntry* pEntry, sal_Bool bSelect=sal_True );
-    virtual sal_uLong	SelectChilds( SvLBoxEntry* pParent, sal_Bool bSelect );
-    virtual void	SelectAll( sal_Bool bSelect, sal_Bool bPaint=sal_True );
+    virtual sal_uLong   SelectChilds( SvLBoxEntry* pParent, sal_Bool bSelect );
+    virtual void    SelectAll( sal_Bool bSelect, sal_Bool bPaint=sal_True );
 
     virtual void    SetCurEntry( SvLBoxEntry* _pEntry ) = 0;
     virtual SvLBoxEntry*
                     GetCurEntry() const = 0;
 
     // Model
-    void			SetInUseEmphasis( SvLBoxEntry* pEntry, sal_Bool bInUse=sal_True);
+    void            SetInUseEmphasis( SvLBoxEntry* pEntry, sal_Bool bInUse=sal_True);
     // View
-    void			SetCursorEmphasis( SvLBoxEntry* pEntry, sal_Bool bCursored=sal_True);
-    sal_Bool			HasCursorEmphasis( SvLBoxEntry* pEntry ) const;
+    void            SetCursorEmphasis( SvLBoxEntry* pEntry, sal_Bool bCursored=sal_True);
+    sal_Bool            HasCursorEmphasis( SvLBoxEntry* pEntry ) const;
 
     void            SetSelectHdl( const Link& rNewHdl ) {aSelectHdl=rNewHdl; }
     void            SetDeselectHdl( const Link& rNewHdl ) {aDeselectHdl=rNewHdl; }
-    void			SetDoubleClickHdl(const Link& rNewHdl) {aDoubleClickHdl=rNewHdl;}
+    void            SetDoubleClickHdl(const Link& rNewHdl) {aDoubleClickHdl=rNewHdl;}
     const Link&     GetSelectHdl() const { return aSelectHdl; }
     const Link&     GetDeselectHdl() const { return aDeselectHdl; }
-    const Link&		GetDoubleClickHdl() const { return aDoubleClickHdl; }
+    const Link&     GetDoubleClickHdl() const { return aDoubleClickHdl; }
     void            SetExpandingHdl(const Link& rNewHdl){aExpandingHdl=rNewHdl;}
-    void			SetExpandedHdl(const Link& rNewHdl){aExpandedHdl=rNewHdl;}
+    void            SetExpandedHdl(const Link& rNewHdl){aExpandedHdl=rNewHdl;}
     const Link&     GetExpandingHdl() const { return aExpandingHdl; }
 
-    virtual void 	ExpandedHdl();
-    virtual long 	ExpandingHdl();
-    virtual void 	SelectHdl();
-    virtual void 	DeselectHdl();
-    virtual sal_Bool 	DoubleClickHdl();
-    sal_Bool			IsTravelSelect() const { return (sal_Bool)((nImpFlags&SVLBOX_IS_TRAVELSELECT)!=0);}
-    SvLBoxEntry*	GetHdlEntry() const { return pHdlEntry; }
-    SvLBoxItem*		GetHdlItem() const;
+    virtual void    ExpandedHdl();
+    virtual long    ExpandingHdl();
+    virtual void    SelectHdl();
+    virtual void    DeselectHdl();
+    virtual sal_Bool    DoubleClickHdl();
+    sal_Bool            IsTravelSelect() const { return (sal_Bool)((nImpFlags&SVLBOX_IS_TRAVELSELECT)!=0);}
+    SvLBoxEntry*    GetHdlEntry() const { return pHdlEntry; }
+    SvLBoxItem*     GetHdlItem() const;
 
     // wird aufgerufen, wenn ein Eintrag mit gesetztem
     // ENTRYFLAG_CHILDS_ON_DEMAND expandiert wird.
@@ -521,40 +521,40 @@ public:
     // Drag & Drop
 
     //JP 28.3.2001: new Drag & Drop API
-    virtual sal_Int8	AcceptDrop( const AcceptDropEvent& rEvt );
+    virtual sal_Int8    AcceptDrop( const AcceptDropEvent& rEvt );
     virtual sal_Int8    ExecuteDrop( const ExecuteDropEvent& rEvt );
-    virtual void		StartDrag( sal_Int8 nAction, const Point& rPosPixel );
-    virtual DragDropMode	NotifyStartDrag( TransferDataContainer& rData,
+    virtual void        StartDrag( sal_Int8 nAction, const Point& rPosPixel );
+    virtual DragDropMode    NotifyStartDrag( TransferDataContainer& rData,
                                          SvLBoxEntry* );
-    virtual void		DragFinished( sal_Int8 nDropAction );
-    virtual sal_Bool 		NotifyAcceptDrop( SvLBoxEntry* );
+    virtual void        DragFinished( sal_Int8 nDropAction );
+    virtual sal_Bool        NotifyAcceptDrop( SvLBoxEntry* );
 
-    void			SetDragOptions( sal_Int8 nOptions ) { nDragOptions = nOptions; }
-    sal_Int8 		GetDragOptions() const { return nDragOptions; }
+    void            SetDragOptions( sal_Int8 nOptions ) { nDragOptions = nOptions; }
+    sal_Int8        GetDragOptions() const { return nDragOptions; }
 
-    SvLBox*			GetSourceView() const;
-    SvLBox*			GetTargetView() const;
+    SvLBox*         GetSourceView() const;
+    SvLBox*         GetTargetView() const;
 
-    virtual void	NotifyRemoving( SvLBoxEntry* );
-    virtual void	ShowTargetEmphasis( SvLBoxEntry*, sal_Bool bShow );
+    virtual void    NotifyRemoving( SvLBoxEntry* );
+    virtual void    ShowTargetEmphasis( SvLBoxEntry*, sal_Bool bShow );
     virtual SvLBoxEntry* CloneEntry( SvLBoxEntry* pSource );
     virtual SvLBoxEntry* CreateEntry() const; // zum 'new'en von Entries
 
     // Rueckgabe: sal_True==Ok, sal_False==Abbrechen
-    virtual sal_Bool	NotifyMoving(
-        SvLBoxEntry*  pTarget,		 // D&D-Drop-Position in this->GetModel()
-        SvLBoxEntry*  pEntry,		 // Zu verschiebender Entry aus
+    virtual sal_Bool    NotifyMoving(
+        SvLBoxEntry*  pTarget,       // D&D-Drop-Position in this->GetModel()
+        SvLBoxEntry*  pEntry,        // Zu verschiebender Entry aus
                                      // GetSourceListBox()->GetModel()
         SvLBoxEntry*& rpNewParent,   // Neuer Target-Parent
-        sal_uLong&		  rNewChildPos); // Position in Childlist des Target-Parents
+        sal_uLong&        rNewChildPos); // Position in Childlist des Target-Parents
 
     // Rueckgabe: sal_True==Ok, sal_False==Abbrechen
-    virtual sal_Bool	NotifyCopying(
-        SvLBoxEntry*  pTarget,		 // D&D-Drop-Position in this->GetModel()
-        SvLBoxEntry*  pEntry,		 // Zu kopierender Entry aus
+    virtual sal_Bool    NotifyCopying(
+        SvLBoxEntry*  pTarget,       // D&D-Drop-Position in this->GetModel()
+        SvLBoxEntry*  pEntry,        // Zu kopierender Entry aus
                                      // GetSourceListBox()->GetModel()
         SvLBoxEntry*& rpNewParent,   // Neuer Target-Parent
-        sal_uLong&		  rNewChildPos); // Position in Childlist des Target-Parents
+        sal_uLong&        rNewChildPos); // Position in Childlist des Target-Parents
 
     // ACCESSIBILITY ==========================================================
 
@@ -569,7 +569,7 @@ public:
         @param pEntry
             The entry.
         @return  The bounding rectangle of an entry. */
-    virtual Rectangle	GetBoundingRect( SvLBoxEntry* pEntry );
+    virtual Rectangle   GetBoundingRect( SvLBoxEntry* pEntry );
 
 protected:
     using SvListView::Expand;
@@ -582,24 +582,24 @@ protected:
 #define SV_LBOX_DD_FORMAT "SV_LBOX_DD_FORMAT"
 struct SvLBoxDDInfo
 {
-    Application*	pApp;
-    SvLBox*			pSource;
-    SvLBoxEntry*	pDDStartEntry;
+    Application*    pApp;
+    SvLBox*         pSource;
+    SvLBoxEntry*    pDDStartEntry;
     // relative Position im Eintrag bei Drag-Beginn (IconView)
-    long 			nMouseRelX,nMouseRelY;
-    sal_uLong			nRes1,nRes2,nRes3,nRes4;
+    long            nMouseRelX,nMouseRelY;
+    sal_uLong           nRes1,nRes2,nRes3,nRes4;
 };
 
 class SvInplaceEdit : public Edit
 {
-    Link 		aCallBackHdl;
+    Link        aCallBackHdl;
     Accelerator aAccReturn;
     Accelerator aAccEscape;
-    Timer 		aTimer;
-    sal_Bool 		bCanceled;
-    sal_Bool 		bAlreadyInCallBack;
+    Timer       aTimer;
+    sal_Bool        bCanceled;
+    sal_Bool        bAlreadyInCallBack;
 
-    void 		CallCallBackHdl_Impl();
+    void        CallCallBackHdl_Impl();
     DECL_LINK( Timeout_Impl, Timer * );
     DECL_LINK( ReturnHdl_Impl, Accelerator * );
     DECL_LINK( EscapeHdl_Impl, Accelerator * );
@@ -610,25 +610,25 @@ public:
                    const Selection& );
     ~SvInplaceEdit();
 
-    virtual void	KeyInput( const KeyEvent& rKEvt );
-    virtual void	LoseFocus();
-    sal_Bool			EditingCanceled() const { return bCanceled; }
-    String	 		GetText() const { return Edit::GetText(); }
-    void			StopEditing( sal_Bool bCancel = sal_False );
+    virtual void    KeyInput( const KeyEvent& rKEvt );
+    virtual void    LoseFocus();
+    sal_Bool            EditingCanceled() const { return bCanceled; }
+    String          GetText() const { return Edit::GetText(); }
+    void            StopEditing( sal_Bool bCancel = sal_False );
 };
 
 class SvInplaceEdit2
 {
-    Link 		aCallBackHdl;
+    Link        aCallBackHdl;
     Accelerator aAccReturn;
     Accelerator aAccEscape;
-    Timer 		aTimer;
-    Edit*		pEdit;
-    sal_Bool 		bCanceled;
-    sal_Bool 		bAlreadyInCallBack;
-    sal_Bool		bMultiLine;
+    Timer       aTimer;
+    Edit*       pEdit;
+    sal_Bool        bCanceled;
+    sal_Bool        bAlreadyInCallBack;
+    sal_Bool        bMultiLine;
 
-    void 		CallCallBackHdl_Impl();
+    void        CallCallBackHdl_Impl();
     DECL_LINK( Timeout_Impl, Timer * );
     DECL_LINK( ReturnHdl_Impl, Accelerator * );
     DECL_LINK( EscapeHdl_Impl, Accelerator * );
@@ -638,13 +638,13 @@ public:
                    const String& rData, const Link& rNotifyEditEnd,
                    const Selection&, sal_Bool bMultiLine = sal_False );
                ~SvInplaceEdit2();
-    sal_Bool 		KeyInput( const KeyEvent& rKEvt );
-    void 		LoseFocus();
-    sal_Bool		EditingCanceled() const { return bCanceled; }
-    String		GetText() const;
-    String		GetSavedValue() const;
-    void		StopEditing( sal_Bool bCancel = sal_False );
-    void		Hide();
+    sal_Bool        KeyInput( const KeyEvent& rKEvt );
+    void        LoseFocus();
+    sal_Bool        EditingCanceled() const { return bCanceled; }
+    String      GetText() const;
+    String      GetSavedValue() const;
+    void        StopEditing( sal_Bool bCancel = sal_False );
+    void        Hide();
 };
 
 inline SvViewDataItem* SvLBox::GetViewDataItem( SvListEntry* pEntry,
diff --git a/svtools/inc/svtools/treelist.hxx b/svtools/inc/svtools/treelist.hxx
index b355290..6c296d2 100644
--- a/svtools/inc/svtools/treelist.hxx
+++ b/svtools/inc/svtools/treelist.hxx
@@ -31,7 +31,6 @@
 
 #include "svtools/svtdllapi.h"
 #include <tools/solar.h>
-#include <tools/list.hxx>
 #include <vector>
 
 #include <tools/table.hxx>
@@ -39,39 +38,109 @@
 #include <tools/string.hxx>
 #include <tools/debug.hxx>
 
-#define LISTACTION_INSERTED			1
+#define LISTACTION_INSERTED         1
 #define LISTACTION_REMOVING         2
 #define LISTACTION_REMOVED          3
-#define LISTACTION_MOVING			4
-#define LISTACTION_MOVED			5
-#define LISTACTION_CLEARING 		6
-#define LISTACTION_INSERTED_TREE	7
-#define LISTACTION_INVALIDATE_ENTRY	8
-#define LISTACTION_RESORTING		9
-#define LISTACTION_RESORTED			10
-#define LISTACTION_CLEARED			11
+#define LISTACTION_MOVING           4
+#define LISTACTION_MOVED            5
+#define LISTACTION_CLEARING         6
+#define LISTACTION_INSERTED_TREE    7
+#define LISTACTION_INVALIDATE_ENTRY 8
+#define LISTACTION_RESORTING        9
+#define LISTACTION_RESORTED         10
+#define LISTACTION_CLEARED          11
 
 #define SV_TREELIST_ROOT_ENTRY  (SvListEntry*)0
-#define SV_TREELIST_ERROR		 0xFFFFFFFF
+#define SV_TREELIST_ERROR        0xFFFFFFFF
 
 // Entryflags, die an der View haengen
-#define SVLISTENTRYFLAG_SELECTED		0x0001
-#define SVLISTENTRYFLAG_EXPANDED		0x0002
-#define SVLISTENTRYFLAG_FOCUSED			0x0004
-#define SVLISTENTRYFLAG_CURSORED		0x0008
-#define SVLISTENTRYFLAG_NOT_SELECTABLE	0x0010
+#define SVLISTENTRYFLAG_SELECTED        0x0001
+#define SVLISTENTRYFLAG_EXPANDED        0x0002
+#define SVLISTENTRYFLAG_FOCUSED         0x0004
+#define SVLISTENTRYFLAG_CURSORED        0x0008
+#define SVLISTENTRYFLAG_NOT_SELECTABLE  0x0010
 
 class SvListEntry;
 
 //=============================================================================
 
-class SVT_DLLPUBLIC SvTreeEntryList : public List
+typedef ::std::vector< SvListEntry* > SvTreeEntryList_impl;
+
+class SVT_DLLPUBLIC SvTreeEntryList
 {
+private:
+    SvTreeEntryList_impl    maEntryList;
+    size_t                  maCurrent;
+
 public:
-                    SvTreeEntryList() {};
+                    SvTreeEntryList() { maCurrent = 0; };
                     SvTreeEntryList( SvTreeEntryList& rList );
 
     void            DestroyAll();
+    void            push_back( SvListEntry* pItem )
+                    { maEntryList.push_back( pItem ); }
+    void            insert( SvListEntry* pItem, size_t i )
+                    {
+                        if ( i < maEntryList.size() ) {
+                            maEntryList.insert( maEntryList.begin() + i, pItem );
+                        } else {
+                            maEntryList.push_back( pItem );
+                        }
+                    }
+    void            remove( SvListEntry* pItem )
+                    {
+                        for ( SvTreeEntryList_impl::iterator it = maEntryList.begin();
+                              it < maEntryList.end();
+                              ++it
+                        ) {
+                            if ( *it == pItem ) {
+                                maEntryList.erase( it );
+                                break;
+                            }
+                        }
+                    }
+    void            remove( size_t i )
+                    {
+                        if ( i < maEntryList.size() ) {
+                            maEntryList.erase( maEntryList.begin() + i );
+                        }
+                    }
+    void            replace( SvListEntry* pNew, SvListEntry* pOld )
+                    {
+                        for ( size_t i = 0, n = maEntryList.size(); i < n; ++i ) {
+                            if ( maEntryList[ i ] == pOld ) {
+                                maEntryList[ i ] = pNew;
+                                break;
+                            }
+                        }
+                    }
+    void            clear() { maEntryList.clear(); }
+
+    bool            empty() { return maEntryList.empty(); }
+
+    size_t          size() { return maEntryList.size(); }
+    size_t          GetPos( SvListEntry* pItem )
+                    {
+                        for ( size_t i = 0, n = maEntryList.size(); i < n; ++i ) {
+                            if ( maEntryList[ i ] == pItem ) {
+                                return i;
+                            }
+                        }
+                        return (size_t)~0;
+                    }
+
+    SvListEntry*    operator[]( size_t i )
+                    { return i < maEntryList.size() ? maEntryList[ i ] : NULL; }
+    SvListEntry*    First()
+                    {
+                        maCurrent = 0;
+                        return ( maCurrent < maEntryList.size() ) ? maEntryList[ 0 ] : NULL;
+                    }
+    SvListEntry*    Next()
+                    {
+                        return ( maCurrent+1 < maEntryList.size() ) ? maEntryList[ ++maCurrent ] : NULL;
+                    }
+    SvListEntry*    last() { return maEntryList.empty() ? NULL : maEntryList.back(); }
 };
 
 //=============================================================================
@@ -112,7 +181,7 @@ public:
         return ( nListPos & 0x7fffffff );
     }
 
-    virtual void 		Clone( SvListEntry* pSource );
+    virtual void        Clone( SvListEntry* pSource );
 };
 
 class SvListView;
@@ -275,15 +344,15 @@ public:
     SvListEntry*        First() const;
     SvListEntry*        Next( SvListEntry* pEntry, sal_uInt16* pDepth=0 ) const;
     SvListEntry*        Prev( SvListEntry* pEntry, sal_uInt16* pDepth=0 ) const;
-    SvListEntry*        Last( sal_uInt16* pDepth=0 ) const;
+    SvListEntry*        Last() const;
 
     SvListEntry*        FirstChild( SvListEntry* pParent ) const;
     SvListEntry*        NextSibling( SvListEntry* pEntry ) const;
     SvListEntry*        PrevSibling( SvListEntry* pEntry ) const;
     SvListEntry*        LastSibling( SvListEntry* pEntry ) const;
 
-    sal_uLong           Insert( SvListEntry* pEntry,SvListEntry* pPar,sal_uLong nPos=LIST_APPEND);
-    sal_uLong           Insert( SvListEntry* pEntry,sal_uLong nRootPos = LIST_APPEND )
+    sal_uLong           Insert( SvListEntry* pEntry,SvListEntry* pPar,sal_uLong nPos=ULONG_MAX);
+    sal_uLong           Insert( SvListEntry* pEntry,sal_uLong nRootPos = ULONG_MAX )
     { return Insert(pEntry, pRootItem, nRootPos ); }
 
     void                InsertTree( SvListEntry* pTree, SvListEntry* pTarget );
@@ -428,7 +497,7 @@ public:
     SvListEntry*        GetEntryAtVisPos( sal_uLong nVisPos ) const
     { return pModel->GetEntryAtVisPos((SvListView*)this,nVisPos); }
 
-    sal_uLong			GetVisiblePos( SvListEntry* pEntry ) const
+    sal_uLong           GetVisiblePos( SvListEntry* pEntry ) const
     { return pModel->GetVisiblePos((SvListView*)this,pEntry); }
 
     sal_uLong           GetVisibleChildCount(SvListEntry* pParent ) const
@@ -462,10 +531,10 @@ public:
     void                SetEntryFocus( SvListEntry* pEntry, sal_Bool bFocus ) const;
     SvViewData*         GetViewData( SvListEntry* pEntry ) const;
     sal_Bool            HasViewData() const
-    { return aDataTable.Count() > 1; }	// eine ROOT gibts immer
+    { return aDataTable.Count() > 1; }  // eine ROOT gibts immer
 
-    virtual	SvViewData* CreateViewData( SvListEntry* pEntry );
-    virtual	void        InitViewData( SvViewData*, SvListEntry* pEntry );
+    virtual SvViewData* CreateViewData( SvListEntry* pEntry );
+    virtual void        InitViewData( SvViewData*, SvListEntry* pEntry );
 
     virtual void        ModelHasCleared();
     virtual void        ModelHasInserted( SvListEntry* pEntry );
@@ -536,17 +605,15 @@ inline SvListEntry* SvTreeList::GetEntry( SvListEntry* pParent, sal_uLong nPos )
         pParent = pRootItem;
     SvListEntry* pRet = 0;
     if ( pParent->pChilds )
-        pRet = (SvListEntry*)(pParent->pChilds->GetObject(nPos));
+        pRet = (*pParent->pChilds)[ nPos ];
     return pRet;
 }
 
 inline SvListEntry* SvTreeList::GetEntry( sal_uLong nRootPos ) const
 {
-    SvListEntry* pRet;
+    SvListEntry* pRet = 0;
     if ( nEntryCount )
-        pRet = (SvListEntry*)(pRootItem->pChilds->GetObject(nRootPos));
-    else
-        pRet = 0;
+        pRet = (*pRootItem->pChilds)[ nRootPos ];
     return pRet;
 }
 
@@ -566,7 +633,7 @@ inline SvListEntry* SvTreeList::GetParent( SvListEntry* pEntry ) const
 }
 
 #define DECLARE_SVTREELIST( ClassName, Type )                                   \
-class ClassName : public SvTreeList                                       	    \
+class ClassName : public SvTreeList                                             \
 {                                                                               \
 public:                                                                         \
     Type        First() const                                                   \
@@ -575,8 +642,8 @@ public:
                     { return (Type)SvTreeList::Next(pEntry,pDepth); }           \
     Type        Prev( SvListEntry* pEntry, sal_uInt16* pDepth=0 ) const         \
                     { return (Type)SvTreeList::Prev(pEntry,pDepth); }           \
-    Type        Last( sal_uInt16* pDepth=0 ) const                              \
-                    { return (Type)SvTreeList::Last(pDepth); }                  \
+    Type        Last() const                                                    \
+                    { return (Type)SvTreeList::Last(); }                        \
                                                                                 \
     Type        Clone( SvListEntry* pEntry, sal_uLong& nCloneCount ) const      \
                     { return (Type)SvTreeList::Clone(pEntry,nCloneCount); }     \
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index fe9cd17..da5aff8 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -46,13 +46,13 @@
 #include <comphelper/processfactory.hxx>
 #include <comphelper/string.hxx>
 
-#define NODE_BMP_TABDIST_NOTVALID 	-2000000
-#define FIRST_ENTRY_TAB				1
+#define NODE_BMP_TABDIST_NOTVALID   -2000000
+#define FIRST_ENTRY_TAB             1
 
 // #i27063# (pl), #i32300# (pb) never access VCL after DeInitVCL - also no destructors
-Image*	SvImpLBox::s_pDefCollapsed		= NULL;
-Image*	SvImpLBox::s_pDefExpanded		= NULL;
-sal_Int32 SvImpLBox::s_nImageRefCount	= 0;
+Image*  SvImpLBox::s_pDefCollapsed      = NULL;
+Image*  SvImpLBox::s_pDefExpanded       = NULL;
+sal_Int32 SvImpLBox::s_nImageRefCount   = 0;
 
 SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvLBoxTreeList* pLBTree, WinBits nWinStyle) :
 
@@ -89,15 +89,15 @@ SvImpLBox::SvImpLBox( SvTreeListBox* pLBView, SvLBoxTreeList* pLBTree, WinBits n
     nHorSBarHeight = (short)aHorSBar.GetSizePixel().Height();
     nVerSBarWidth = (short)aVerSBar.GetSizePixel().Width();
 
-    pStartEntry	= 0;
-    pCursor 			= 0;
-    pAnchor				= 0;
-    nVisibleCount  		= 0; 	// Anzahl Daten-Zeilen im Control
+    pStartEntry = 0;
+    pCursor             = 0;
+    pAnchor             = 0;
+    nVisibleCount       = 0;    // Anzahl Daten-Zeilen im Control
     nNodeBmpTabDistance = NODE_BMP_TABDIST_NOTVALID;
-    nYoffsNodeBmp 		= 0;
-    nNodeBmpWidth		= 0;
+    nYoffsNodeBmp       = 0;
+    nNodeBmpWidth       = 0;
 
-    bAsyncBeginDrag		= sal_False;
+    bAsyncBeginDrag     = sal_False;
     aAsyncBeginDragTimer.SetTimeout( 0 );
     aAsyncBeginDragTimer.SetTimeoutHdl( LINK(this,SvImpLBox,BeginDragHdl));
     // Button-Animation in Listbox
@@ -260,7 +260,7 @@ void SvImpLBox::SetExtendedWindowBits( ExtendedWinBits _nBits )
 void SvImpLBox::Clear()
 {
     StopUserEvent();
-    pStartEntry	= 0;
+    pStartEntry = 0;
     pAnchor = 0;
 
     pActiveButton = 0;
@@ -1051,10 +1051,10 @@ void SvImpLBox::DrawNet()
     //for platforms who don't have nets, DrawNativeControl does nothing and return true
     //so that SvImpLBox::DrawNet() doesn't draw anything too
      if(pView->IsNativeControlSupported( CTRL_LISTNET, PART_ENTIRE_CONTROL)) {
-        ImplControlValue	aControlValue;
+        ImplControlValue    aControlValue;
         Point  aTemp(0,0);   // temporary needed for g++ 3.3.5
         Rectangle aCtrlRegion( aTemp, Size( 0, 0 ) );
-        ControlState		nState = CTRL_STATE_ENABLED;
+        ControlState        nState = CTRL_STATE_ENABLED;
         if( pView->DrawNativeControl( CTRL_LISTNET, PART_ENTIRE_CONTROL,
                                       aCtrlRegion, nState, aControlValue, rtl::OUString() ) )
         {
@@ -1413,7 +1413,7 @@ void SvImpLBox::FillView()
             if( bFound )
             {
                 aVerSBar.SetThumbPos( nThumb );
-                ShowCursor( sal_True );	// Focusrect neu berechnen
+                ShowCursor( sal_True ); // Focusrect neu berechnen
                 pView->Invalidate();
             }
         }
@@ -1718,7 +1718,7 @@ void SvImpLBox::RemovingEntry( SvLBoxEntry* pEntry )
 
     SvLBoxEntry* pParent = (SvLBoxEntry*)(pView->GetModel()->GetParent(pEntry));
 
-    if( pParent && pView->GetModel()->GetChildList(pParent)->Count() == 1 )
+    if( pParent && pView->GetModel()->GetChildList(pParent)->size() == 1 )
     {
         DBG_ASSERT( pView->IsExpanded( pParent ), "Parent not expanded");
         pParent->SetFlags( pParent->GetFlags() | SV_ENTRYFLAG_NO_NODEBMP);
@@ -1735,7 +1735,7 @@ void SvImpLBox::RemovingEntry( SvLBoxEntry* pEntry )
     {
         if( bSimpleTravel )
             pView->Select( pCursor, sal_False );
-        ShowCursor( sal_False );	// Focus-Rect weg
+        ShowCursor( sal_False );    // Focus-Rect weg
         // NextSibling, weil auch Childs des Cursors geloescht werden
         pTemp = pView->NextSibling( pCursor );
         if( !pTemp )
@@ -1886,7 +1886,7 @@ void SvImpLBox::EntryInserted( SvLBoxEntry* pEntry )
     if( GetUpdateMode() )
     {
         SvLBoxEntry* pParent = (SvLBoxEntry*)pTree->GetParent(pEntry);
-        if( pParent && pTree->GetChildList(pParent)->Count() == 1 )
+        if( pParent && pTree->GetChildList(pParent)->size() == 1 )
             // Pluszeichen zeichnen
             pTree->InvalidateEntry( pParent );
 
@@ -1897,8 +1897,8 @@ void SvImpLBox::EntryInserted( SvLBoxEntry* pEntry )
             SelAllDestrAnch( sal_False, sal_True );
         else
             DestroyAnchor();
-        //	nFlags &= (~F_DESEL_ALL);
-//		ShowCursor( sal_False ); // falls sich Cursor nach unten verschiebt
+        //  nFlags &= (~F_DESEL_ALL);
+//      ShowCursor( sal_False ); // falls sich Cursor nach unten verschiebt
         long nY = GetEntryLine( pEntry );
         sal_Bool bEntryVisible = IsLineVisible( nY );
         if( bEntryVisible )
@@ -1963,7 +1963,7 @@ void SvImpLBox::EntryInserted( SvLBoxEntry* pEntry )
 // ****** Steuerung der Controlanimation
 
 sal_Bool SvImpLBox::ButtonDownCheckCtrl(const MouseEvent& rMEvt, SvLBoxEntry* pEntry,
-                                   long nY	)
+                                   long nY  )
 {
     SvLBoxItem* pItem = pView->GetItem(pEntry,rMEvt.GetPosPixel().X(),&pActiveTab);
     if( pItem && (pItem->IsA()==SV_ITEM_ID_LBOXBUTTON))
@@ -2205,7 +2205,7 @@ void SvImpLBox::MouseMove( const MouseEvent& rMEvt)
 sal_Bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
 {
     aEditTimer.Stop();
-    const KeyCode&	rKeyCode = rKEvt.GetKeyCode();
+    const KeyCode&  rKeyCode = rKEvt.GetKeyCode();
 
     if( rKeyCode.IsMod2() )
         return sal_False; // Alt-Taste nicht auswerten
@@ -2252,7 +2252,7 @@ sal_Bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
             if( pNewCursor )
             {
                 aSelEng.CursorPosChanging( bShift, bMod1 );
-                SetCursor( pNewCursor, bMod1 );		// no selection, when Ctrl is on
+                SetCursor( pNewCursor, bMod1 );     // no selection, when Ctrl is on
                 if( !IsEntryInView( pNewCursor ) )
                     KeyUp( sal_False );
             }
@@ -2283,13 +2283,13 @@ sal_Bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
             {
                 aSelEng.CursorPosChanging( bShift, bMod1 );
                 if( IsEntryInView( pNewCursor ) )
-                    SetCursor( pNewCursor, bMod1 );	// no selection, when Ctrl is on
+                    SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
                 else
                 {
                     if( pCursor )
                         pView->Select( pCursor, sal_False );
                     KeyDown( sal_False );
-                    SetCursor( pNewCursor, bMod1 );	// no selection, when Ctrl is on
+                    SetCursor( pNewCursor, bMod1 ); // no selection, when Ctrl is on
                 }
             }
             else
@@ -2312,9 +2312,9 @@ sal_Bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
             }
             else if( nWindowStyle & WB_HSCROLL )
             {
-                long	nThumb = aHorSBar.GetThumbPos();
+                long    nThumb = aHorSBar.GetThumbPos();
                 nThumb += aHorSBar.GetLineSize();
-                long	nOldThumb = aHorSBar.GetThumbPos();
+                long    nOldThumb = aHorSBar.GetThumbPos();
                 aHorSBar.SetThumbPos( nThumb );
                 nThumb = nOldThumb;
                 nThumb -= aHorSBar.GetThumbPos();
@@ -2343,9 +2343,9 @@ sal_Bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
             }
             else if ( nWindowStyle & WB_HSCROLL )
             {
-                long	nThumb = aHorSBar.GetThumbPos();
+                long    nThumb = aHorSBar.GetThumbPos();
                 nThumb -= aHorSBar.GetLineSize();
-                long	nOldThumb = aHorSBar.GetThumbPos();
+                long    nOldThumb = aHorSBar.GetThumbPos();
                 aHorSBar.SetThumbPos( nThumb );
                 nThumb = nOldThumb;
                 nThumb -= aHorSBar.GetThumbPos();
@@ -2540,7 +2540,7 @@ sal_Bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
                         // Sonderbehandlung Explorer: Befindet sich auf der
                         // Root nur ein Eintrag,dann den Root-Entry nicht
                         // einklappen
-                        if( pTree->GetChildList(0)->Count() < 2 )
+                        if( pTree->GetChildList(0)->size() < 2 )
                         {
                             nRefDepth = 1;
                             pParentToCollapse = pCursor;
@@ -2593,7 +2593,7 @@ sal_Bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
 
             if( pNewCursor && pNewCursor != pCursor )
             {
-//				SelAllDestrAnch( sal_False );
+//              SelAllDestrAnch( sal_False );
                 aSelEng.CursorPosChanging( bShift, bMod1 );
                 SetCursor( pNewCursor );
                 if( !IsEntryInView( pNewCursor ) )
@@ -2613,7 +2613,7 @@ sal_Bool SvImpLBox::KeyInput( const KeyEvent& rKEvt)
 
             if( pNewCursor && pNewCursor != pCursor)
             {
-//				SelAllDestrAnch( sal_False );
+//              SelAllDestrAnch( sal_False );
                 aSelEng.CursorPosChanging( bShift, bMod1 );
                 SetCursor( pNewCursor );
                 if( !IsEntryInView( pNewCursor ) )
@@ -2653,8 +2653,8 @@ void SvImpLBox::GetFocus()
         pView->SetEntryFocus( pCursor, sal_True );
         ShowCursor( sal_True );
 // auskommentiert wg. deselectall
-//		if( bSimpleTravel && !pView->IsSelected(pCursor) )
-//			pView->Select( pCursor, sal_True );
+//      if( bSimpleTravel && !pView->IsSelected(pCursor) )
+//          pView->Select( pCursor, sal_True );
     }
     if( m_nStyle & WB_HIDESELECTION )
     {
@@ -2764,7 +2764,7 @@ sal_Bool ImpLBSelEng::SetCursorAtPoint(const Point& rPoint, sal_Bool bDontSelect
         // bei SimpleTravel wird in SetCursor selektiert und
         // der Select-Handler gerufen
         //if( !bDontSelectAtCursor && !pImp->bSimpleTravel )
-        //	pImp->SelectEntry( pNewCursor, sal_True );
+        //  pImp->SelectEntry( pNewCursor, sal_True );
         pImp->SetCursor( pNewCursor, bDontSelectAtCursor );
         return sal_True;
     }
@@ -3066,7 +3066,7 @@ void lcl_DeleteSubPopups(PopupMenu* pPopup)
 
 void SvImpLBox::Command( const CommandEvent& rCEvt )
 {
-    sal_uInt16				nCommand = rCEvt.GetCommand();
+    sal_uInt16              nCommand = rCEvt.GetCommand();
 
     if( nCommand == COMMAND_CONTEXTMENU )
         aEditTimer.Stop();
@@ -3078,22 +3078,22 @@ void SvImpLBox::Command( const CommandEvent& rCEvt )
 
     if( bContextMenuHandling && nCommand == COMMAND_CONTEXTMENU )
     {
-        Point	aPopupPos;
-        sal_Bool	bClickedIsFreePlace = sal_False;
+        Point   aPopupPos;
+        sal_Bool    bClickedIsFreePlace = sal_False;
         std::stack<SvLBoxEntry*> aSelRestore;
 
         if( rCEvt.IsMouseEvent() )
-        {	// change selection, if mouse pos doesn't fit to selection
+        {   // change selection, if mouse pos doesn't fit to selection
 
             aPopupPos = rCEvt.GetMousePosPixel();
 
-            SvLBoxEntry*	pClickedEntry = GetEntry( aPopupPos );
+            SvLBoxEntry*    pClickedEntry = GetEntry( aPopupPos );
             if( pClickedEntry )
-            {	// mouse in non empty area
-                sal_Bool				bClickedIsSelected = sal_False;
+            {   // mouse in non empty area
+                sal_Bool                bClickedIsSelected = sal_False;
 
                 // collect the currently selected entries
-                SvLBoxEntry*		pSelected = pView->FirstSelected();
+                SvLBoxEntry*        pSelected = pView->FirstSelected();
                 while( pSelected )
                 {
                     bClickedIsSelected |= ( pClickedEntry == pSelected );
@@ -3102,7 +3102,7 @@ void SvImpLBox::Command( const CommandEvent& rCEvt )
 
                 // if the entry which the user clicked at is not selected
                 if( !bClickedIsSelected )
-                {	// deselect all other and select the clicked one
+                {   // deselect all other and select the clicked one
                     pView->SelectAll( sal_False );
                     pView->SetCursor( pClickedEntry );
                 }
@@ -3110,8 +3110,8 @@ void SvImpLBox::Command( const CommandEvent& rCEvt )
             else if( aSelEng.GetSelectionMode() == SINGLE_SELECTION )
             {//modified by BerryJia for fixing Bug102739 2002-9-9 17:00(Beijing Time)
                 bClickedIsFreePlace = sal_True;
-                sal_Int32				nSelectedEntries = pView->GetSelectionCount();
-                SvLBoxEntry*		pSelected = pView->FirstSelected();
+                sal_Int32               nSelectedEntries = pView->GetSelectionCount();
+                SvLBoxEntry*        pSelected = pView->FirstSelected();
                 for(sal_uInt16 nSel = 0; nSel < nSelectedEntries; nSel++ )
                 {
                     aSelRestore.push(pSelected);
@@ -3120,19 +3120,19 @@ void SvImpLBox::Command( const CommandEvent& rCEvt )
                 pView->SelectAll( sal_False );
             }
             else
-            {	// deselect all
+            {   // deselect all
                 pView->SelectAll( sal_False );
             }
 
 
         }
         else
-        {	// key event (or at least no mouse event)
-            sal_Int32	nSelectionCount = pView->GetSelectionCount();
+        {   // key event (or at least no mouse event)
+            sal_Int32   nSelectionCount = pView->GetSelectionCount();
 
             if( nSelectionCount )
-            {	// now allways take first visible as base for positioning the menu
-                SvLBoxEntry*	pSelected = pView->FirstSelected();
+            {   // now allways take first visible as base for positioning the menu
+                SvLBoxEntry*    pSelected = pView->FirstSelected();
                 while( pSelected )
                 {
                     if( IsEntryInView( pSelected ) )
@@ -3154,7 +3154,7 @@ void SvImpLBox::Command( const CommandEvent& rCEvt )
                 aPopupPos = Point( 0, 0 );
         }
 
-        PopupMenu*	pPopup = pView->CreateContextMenu();
+        PopupMenu*  pPopup = pView->CreateContextMenu();
 
         if( pPopup )
         {
@@ -3248,8 +3248,8 @@ IMPL_LINK( SvImpLBox, EditTimerCall, Timer *, EMPTYARG )
         if ( bIsMouseTriggered )
         {
             Point aCurrentMousePos = pView->GetPointerPosPixel();
-            if	(	( abs( aCurrentMousePos.X() - aEditClickPos.X() ) > 5 )
-                ||	( abs( aCurrentMousePos.Y() - aEditClickPos.Y() ) > 5 )
+            if  (   ( abs( aCurrentMousePos.X() - aEditClickPos.X() ) > 5 )
+                ||  ( abs( aCurrentMousePos.Y() - aEditClickPos.Y() ) > 5 )
                 )
             {
                 return 0L;
@@ -3303,7 +3303,7 @@ sal_Bool SvImpLBox::RequestHelp( const HelpEvent& rHEvt )
             {
                 // rechten Item-Rand am View-Rand clippen
                 //if( aItemRect.Right() > aViewRect.Right() )
-                //	aItemRect.Right() = aViewRect.Right();
+                //  aItemRect.Right() = aViewRect.Right();
 
                 Point aPt = pView->OutputToScreenPixel( aItemRect.TopLeft() );
                 aItemRect.Left()   = aPt.X();
@@ -3438,10 +3438,10 @@ void SvImpLBox::FindMostRight_Impl( SvLBoxEntry* pParent, SvLBoxEntry* pEntryToI
     if( !pList )
         return;
 
-    sal_uLong nCount = pList->Count();
-    for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
+    size_t nCount = pList->size();
+    for( size_t nCur = 0; nCur < nCount; nCur++ )
     {
-        SvLBoxEntry* pChild = (SvLBoxEntry*)pList->GetObject( nCur );
+        SvLBoxEntry* pChild = (SvLBoxEntry*)(*pList)[ nCur ];
         if( pChild != pEntryToIgnore )
         {
             SetMostRight( pChild );
diff --git a/svtools/source/contnr/svlbox.cxx b/svtools/source/contnr/svlbox.cxx
index 7b07a59..6ab6184 100644
--- a/svtools/source/contnr/svlbox.cxx
+++ b/svtools/source/contnr/svlbox.cxx
@@ -64,19 +64,19 @@ DBG_NAME(SvInplaceEdit2)
 
 SvInplaceEdit::SvInplaceEdit
 (
-    Window*				pParent,
-    const Point&		rPos,
-    const Size&			rSize,
-    const String&		rData,
-    const Link&			rNotifyEditEnd,
-    const Selection&	rSelection
+    Window*             pParent,
+    const Point&        rPos,
+    const Size&         rSize,
+    const String&       rData,
+    const Link&         rNotifyEditEnd,
+    const Selection&    rSelection
 ) :
 
     Edit( pParent, WB_LEFT ),
 
-    aCallBackHdl		( rNotifyEditEnd ),
-    bCanceled			( sal_False ),
-    bAlreadyInCallBack	( sal_False )
+    aCallBackHdl        ( rNotifyEditEnd ),
+    bCanceled           ( sal_False ),
+    bAlreadyInCallBack  ( sal_False )
 
 {
     DBG_CTOR(SvInplaceEdit,0);
@@ -269,10 +269,10 @@ SvInplaceEdit2::SvInplaceEdit2
     sal_Bool bMulti
 ) :
 
-     aCallBackHdl		( rNotifyEditEnd ),
-    bCanceled			( sal_False ),
-    bAlreadyInCallBack	( sal_False ),
-    bMultiLine			( bMulti )
+     aCallBackHdl       ( rNotifyEditEnd ),
+    bCanceled           ( sal_False ),
+    bAlreadyInCallBack  ( sal_False ),
+    bMultiLine          ( bMulti )
 
 {
     DBG_CTOR(SvInplaceEdit2,0);
@@ -534,7 +534,7 @@ SvLBoxItem::~SvLBoxItem()
 const Size& SvLBoxItem::GetSize( SvLBox* pView,SvLBoxEntry* pEntry )
 {
     DBG_CHKTHIS(SvLBoxItem,0);
-    SvViewDataItem*	pViewData = pView->GetViewDataItem( pEntry, this );
+    SvViewDataItem* pViewData = pView->GetViewDataItem( pEntry, this );
     return pViewData->aSize;
 }
 
@@ -694,7 +694,7 @@ SvLBox_Impl::SvLBox_Impl( SvLBox& _rBox )
 
 DBG_NAME(SvLBox);
 
-SvLBox::SvLBox( Window* pParent, WinBits nWinStyle	) :
+SvLBox::SvLBox( Window* pParent, WinBits nWinStyle  ) :
     Control( pParent, nWinStyle | WB_CLIPCHILDREN ),
     DropTargetHelper( this ), DragSourceHelper( this ), eSelMode( NO_SELECTION )
 {
@@ -776,7 +776,7 @@ void SvLBox::DisconnectFromModel()
 {
     DBG_CHKTHIS(SvLBox,0);
     SvLBoxTreeList* pNewModel = new SvLBoxTreeList;
-    pNewModel->SetRefCount( 0 );	// else this will never be deleted
+    pNewModel->SetRefCount( 0 );    // else this will never be deleted
     SvListView::SetModel( pNewModel );
 }
 
@@ -919,18 +919,18 @@ void SvLBox::NotifyRemoving( SvLBoxEntry* )
 */
 #ifdef DBG_UTIL
 sal_Bool SvLBox::NotifyMoving(
-    SvLBoxEntry*  pTarget,		 // D&D-Drop-Position in this->GetModel()
-    SvLBoxEntry*  pEntry,		 // Zu verschiebender Entry aus
+    SvLBoxEntry*  pTarget,       // D&D-Drop-Position in this->GetModel()
+    SvLBoxEntry*  pEntry,        // Zu verschiebender Entry aus
                                  // GetSourceListBox()->GetModel()
     SvLBoxEntry*& rpNewParent,   // Neuer Target-Parent
-    sal_uLong&		  rNewChildPos)  // Position in Childlist des Target-Parents
+    sal_uLong&        rNewChildPos)  // Position in Childlist des Target-Parents
 #else
 sal_Bool SvLBox::NotifyMoving(
-    SvLBoxEntry*  pTarget,		 // D&D-Drop-Position in this->GetModel()
-    SvLBoxEntry*,        		 // Zu verschiebender Entry aus
+    SvLBoxEntry*  pTarget,       // D&D-Drop-Position in this->GetModel()
+    SvLBoxEntry*,                // Zu verschiebender Entry aus
                                  // GetSourceListBox()->GetModel()
     SvLBoxEntry*& rpNewParent,   // Neuer Target-Parent
-    sal_uLong&		  rNewChildPos)  // Position in Childlist des Target-Parents
+    sal_uLong&        rNewChildPos)  // Position in Childlist des Target-Parents
 #endif
 {
     DBG_CHKTHIS(SvLBox,0);
@@ -962,11 +962,11 @@ sal_Bool SvLBox::NotifyMoving(
 }
 
 sal_Bool SvLBox::NotifyCopying(
-    SvLBoxEntry*  pTarget,		 // D&D-Drop-Position in this->GetModel()
-    SvLBoxEntry*  pEntry,		 // Zu kopierender Entry aus
+    SvLBoxEntry*  pTarget,       // D&D-Drop-Position in this->GetModel()
+    SvLBoxEntry*  pEntry,        // Zu kopierender Entry aus
                                  // GetSourceListBox()->GetModel()
     SvLBoxEntry*& rpNewParent,   // Neuer Target-Parent
-    sal_uLong&		  rNewChildPos)  // Position in Childlist des Target-Parents
+    sal_uLong&        rNewChildPos)  // Position in Childlist des Target-Parents
 {
     DBG_CHKTHIS(SvLBox,0);
     return NotifyMoving(pTarget,pEntry,rpNewParent,rNewChildPos);
@@ -1025,7 +1025,7 @@ sal_Bool SvLBox::CopySelection( SvLBox* pSource, SvLBoxEntry* pTarget )
     {
         // Childs werden automatisch mitkopiert
         pSource->SelectChilds( pSourceEntry, sal_False );
-        aList.Insert( pSourceEntry, LIST_APPEND );
+        aList.push_back( pSourceEntry );
         pSourceEntry = pSource->NextSelected( pSourceEntry );
     }
 
@@ -1033,7 +1033,7 @@ sal_Bool SvLBox::CopySelection( SvLBox* pSource, SvLBoxEntry* pTarget )
     while ( pSourceEntry )
     {
         SvLBoxEntry* pNewParent = 0;
-        sal_uLong nInsertionPos = LIST_APPEND;
+        sal_uLong nInsertionPos = ULONG_MAX;
         sal_Bool bOk=NotifyCopying(pTarget,pSourceEntry,pNewParent,nInsertionPos);
         if ( bOk )
         {
@@ -1086,7 +1086,7 @@ sal_Bool SvLBox::MoveSelectionCopyFallbackPossible( SvLBox* pSource, SvLBoxEntry
     {
         // Childs werden automatisch mitbewegt
         pSource->SelectChilds( pSourceEntry, sal_False );
-        aList.Insert( pSourceEntry, LIST_APPEND );
+        aList.push_back( pSourceEntry );
         pSourceEntry = pSource->NextSelected( pSourceEntry );
     }
 
@@ -1094,7 +1094,7 @@ sal_Bool SvLBox::MoveSelectionCopyFallbackPossible( SvLBox* pSource, SvLBoxEntry
     while ( pSourceEntry )
     {
         SvLBoxEntry* pNewParent = 0;
-        sal_uLong nInsertionPos = LIST_APPEND;
+        sal_uLong nInsertionPos = ULONG_MAX;
         sal_Bool bOk = NotifyMoving(pTarget,pSourceEntry,pNewParent,nInsertionPos);
         sal_Bool bCopyOk = bOk;
         if ( !bOk && bAllowCopyFallback )
@@ -1144,7 +1144,7 @@ void SvLBox::RemoveSelection()
     SvLBoxEntry* pEntry = FirstSelected();
     while ( pEntry )
     {
-        aList.Insert( pEntry );
+        aList.push_back( pEntry );
         if ( pEntry->HasChilds() )
             // Remove loescht Childs automatisch
             SelectChilds( pEntry, sal_False );
@@ -1653,7 +1653,7 @@ void SvLBox::ModelHasEntryInvalidated( SvListEntry* pEntry )
     sal_uInt16 nCount = ((SvLBoxEntry*)pEntry)->ItemCount();
     for( sal_uInt16 nIdx = 0; nIdx < nCount; nIdx++ )
     {
-        SvLBoxItem*	pItem = ((SvLBoxEntry*)pEntry)->GetItem( nIdx );
+        SvLBoxItem* pItem = ((SvLBoxEntry*)pEntry)->GetItem( nIdx );
         pItem->InitViewData( this, (SvLBoxEntry*)pEntry, 0 );
     }
 }
diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx
index 0301229..7567507 100644
--- a/svtools/source/contnr/treelist.cxx
+++ b/svtools/source/contnr/treelist.cxx
@@ -74,15 +74,15 @@ void SvListEntry::Clone( SvListEntry* pSource)
     DBG_CHKTHIS(SvListEntry,0);
     nListPos &= 0x80000000;
     nListPos |= ( pSource->nListPos & 0x7fffffff);
-    nAbsPos		= pSource->nAbsPos;
+    nAbsPos     = pSource->nAbsPos;
 }
 
 void SvListEntry::SetListPositions()
 {
     if( pChilds )
     {
-        SvListEntry	*pEntry = (SvListEntry*)pChilds->First();
-        sal_uLong		nCur = 0;
+        SvListEntry *pEntry = (SvListEntry*)pChilds->First();
+        sal_uLong       nCur = 0;
         while ( pEntry )
         {
             pEntry->nListPos &= 0x80000000;
@@ -107,9 +107,9 @@ SvViewData::SvViewData()
 SvViewData::SvViewData( const SvViewData& rData )
 {
     DBG_CTOR(SvViewData,0);
-    nFlags	= rData.nFlags;
+    nFlags  = rData.nFlags;
     nFlags &= ~( SVLISTENTRYFLAG_SELECTED | SVLISTENTRYFLAG_FOCUSED );
-    nVisPos	= rData.nVisPos;
+    nVisPos = rData.nVisPos;
 }
 
 SvViewData::~SvViewData()
@@ -135,6 +135,14 @@ void SvTreeEntryList::DestroyAll()
     }
 }
 
+SvTreeEntryList::SvTreeEntryList(SvTreeEntryList& rList)
+{
+    maEntryList.clear();
+    maCurrent = 0;
+    for ( size_t i = 0, n = rList.size(); i < n; ++i ) {
+        maEntryList.push_back( rList[ i ] );
+    }
+}
 
 /*************************************************************************
 |*
@@ -318,12 +326,13 @@ sal_uLong SvTreeList::Move(SvListEntry* pSrcEntry,SvListEntry* pTargetParent,sal
 
     // Dummy-Ptr einfuegen, weil nListPos durch das
     // folgende Remove ungueltig werden koennte
-    SvListEntry* pDummy = 0; pDstList->Insert( pDummy, nListPos );
+    SvListEntry* pDummy = 0;
+    pDstList->insert( pDummy, nListPos );
 
     // loeschen
-    pSrcList->Remove( pSrcEntry );
+    pSrcList->remove( pSrcEntry );
     // Hat Parent noch Childs ?
-    if ( pSrcList->Count() == 0 )
+    if ( pSrcList->empty() )
     {
         // Keine Childs, deshalb Child-List loeschen
         SvListEntry* pParent = pSrcEntry->pParent;
@@ -336,7 +345,7 @@ sal_uLong SvTreeList::Move(SvListEntry* pSrcEntry,SvListEntry* pTargetParent,sal
     // der ChildList den alten Parent noch benoetigen!)
     pSrcEntry->pParent = pTargetParent;
 
-    pDstList->Replace( pSrcEntry, pDummy );
+    pDstList->replace( pSrcEntry, pDummy );
 
     // Listenpositionen in Zielliste korrigieren
     SetListPositions( pDstList );
@@ -344,7 +353,7 @@ sal_uLong SvTreeList::Move(SvListEntry* pSrcEntry,SvListEntry* pTargetParent,sal
         SetListPositions( pSrcList );
 
 #ifdef CHECK_INTEGRITY
-CheckIntegrity();
+    CheckIntegrity();
 #endif
 
     sal_uLong nRetVal = pDstList->GetPos( pSrcEntry );
@@ -369,12 +378,12 @@ sal_uLong SvTreeList::Copy(SvListEntry* pSrcEntry,SvListEntry* pTargetParent,sal
     nEntryCount += nCloneCount;
 
     SvTreeEntryList* pDstList = pTargetParent->pChilds;
-    pClonedEntry->pParent = pTargetParent;		// Parent umsetzen
-    pDstList->Insert( pClonedEntry, nListPos ); // Einfuegen
+    pClonedEntry->pParent = pTargetParent;      // Parent umsetzen
+    pDstList->insert( pClonedEntry, nListPos ); // Einfuegen
     SetListPositions( pDstList ); // Listenpositionen in Zielliste korrigieren
 
 #ifdef CHECK_INTEGRITY
-CheckIntegrity();
+    CheckIntegrity();
 #endif
     Broadcast( LISTACTION_INSERTED_TREE, pClonedEntry );
     sal_uLong nRetVal = pDstList->GetPos( pClonedEntry );
@@ -475,7 +484,7 @@ void SvTreeList::InsertTree(SvListEntry* pSrcEntry,
 
     pSrcEntry->pParent = pTargetParent; // Parent umsetzen
     SvTreeEntryList* pDstList = pTargetParent->pChilds;
-    pDstList->Insert( pSrcEntry, nListPos ); // einfuegen
+    pDstList->insert( pSrcEntry, nListPos ); // einfuegen
     SetListPositions(pDstList); // Listenpositionen in Zielliste korrigieren
     nEntryCount += GetChildCount( pSrcEntry );
     nEntryCount++; // der Parent ist ja auch neu
@@ -541,7 +550,7 @@ SvTreeEntryList* SvTreeList::CloneChilds( SvTreeEntryList* pChilds,
             pNewChild->pChilds = pSubChilds;
         }
 
-        pClonedChilds->Insert( pNewChild, LIST_APPEND );
+        pClonedChilds->push_back( pNewChild );
         pChild = (SvListEntry*)pChilds->Next();
     }
     return pClonedChilds;
@@ -614,7 +623,7 @@ sal_uLong SvTreeList::GetChildSelectionCount(const SvListView* pView,SvListEntry
         if( pParent && pView->IsSelected( pParent ) && nRefDepth < nActDepth)
             nCount++;
     } while( pParent && nRefDepth < nActDepth );
-//	nCount--;
+//  nCount--;
     return nCount;
 }
 
@@ -628,7 +637,7 @@ sal_uLong SvTreeList::GetChildSelectionCount(const SvListView* pView,SvListEntry
 SvListEntry* SvTreeList::First() const
 {
     if ( nEntryCount )
-        return (SvListEntry*)(pRootItem->pChilds->GetObject(0));
+        return (SvListEntry*)(*pRootItem->pChilds)[ 0 ];
     else
         return 0;
 }
@@ -658,15 +667,15 @@ SvListEntry* SvTreeList::Next( SvListEntry* pActEntry, sal_uInt16* pDepth ) cons
     if ( pActEntry->pChilds /* && pActEntry->pChilds->Count() */ )
     {
         nDepth++;
-        pActEntry = (SvListEntry*)(pActEntry->pChilds->GetObject(0));
+        pActEntry = (SvListEntry*)(*pActEntry->pChilds)[ 0 ];
         if ( bWithDepth )
             *pDepth = nDepth;
         return pActEntry;
     }
 
-    if ( pActualList->Count() > ( nActualPos + 1 ) )
+    if ( pActualList->size() > ( nActualPos + 1 ) )
     {
-        pActEntry = (SvListEntry*)(pActualList->GetObject( nActualPos + 1 ));
+        pActEntry = (SvListEntry*)(*pActualList)[ nActualPos + 1 ];
         if ( bWithDepth )
             *pDepth = nDepth;
         return pActEntry;
@@ -680,9 +689,9 @@ SvListEntry* SvTreeList::Next( SvListEntry* pActEntry, sal_uInt16* pDepth ) cons
         pActualList = pParent->pParent->pChilds;
         DBG_ASSERT(pActualList,"TreeData corrupt!");
         nActualPos = pParent->GetChildListPos();
-        if ( pActualList->Count() > ( nActualPos + 1 ) )
+        if ( pActualList->size() > ( nActualPos + 1 ) )
         {
-            pActEntry = (SvListEntry*)(pActualList->GetObject( nActualPos + 1 ));
+            pActEntry = (SvListEntry*)(*pActualList)[ nActualPos + 1 ];
             if ( bWithDepth )
                 *pDepth = nDepth;
             return pActEntry;
@@ -715,12 +724,12 @@ SvListEntry* SvTreeList::Prev( SvListEntry* pActEntry, sal_uInt16* pDepth ) cons
 
     if ( nActualPos > 0 )
     {
-        pActEntry = (SvListEntry*)(pActualList->GetObject( nActualPos - 1 ));
-        while( pActEntry->pChilds /* && pActEntry->pChilds->Count() */ )
+        pActEntry = (SvListEntry*)(*pActualList)[ nActualPos - 1 ];
+        while( pActEntry->pChilds )
         {
             pActualList = pActEntry->pChilds;
             nDepth++;
-            pActEntry = (SvListEntry*)(pActualList->Last());
+            pActEntry = (SvListEntry*)(pActualList->last());
         }
         if ( bWithDepth )
             *pDepth = nDepth;
@@ -747,18 +756,18 @@ SvListEntry* SvTreeList::Prev( SvListEntry* pActEntry, sal_uInt16* pDepth ) cons
 |*
 *************************************************************************/
 
-SvListEntry* SvTreeList::Last( sal_uInt16* /* nDepth */ ) const
+SvListEntry* SvTreeList::Last() const
 {
     SvTreeEntryList* pActList = pRootItem->pChilds;
-//	if ( pActList->Count() == 0 )
-//		return 0;
+//  if ( pActList->Count() == 0 )
+//      return 0;
     SvListEntry* pEntry = 0;
     while( pActList )
     {
-        pEntry = (SvListEntry*)(pActList->Last());
+        pEntry = (SvListEntry*)(pActList->last());
         pActList = pEntry->pChilds;
-//		if ( pActList->Count() == 0 )
-//			pActList = 0;
+//      if ( pActList->Count() == 0 )
+//          pActList = 0;
     }
     return pEntry;
 }
@@ -848,16 +857,16 @@ SvListEntry* SvTreeList::NextVisible(const SvListView* pView,SvListEntry* pActEn
     {
         DBG_ASSERT(pActEntry->pChilds,"Childs?");
         nDepth++;
-        pActEntry = (SvListEntry*)(pActEntry->pChilds->GetObject(0));
+        pActEntry = (SvListEntry*)(*pActEntry->pChilds)[ 0 ];
         if ( bWithDepth )
             *pActDepth = nDepth;
         return pActEntry;
     }
 
     nActualPos++;
-    if ( pActualList->Count() > nActualPos  )
+    if ( pActualList->size() > nActualPos  )
     {
-        pActEntry = (SvListEntry*)(pActualList->GetObject( nActualPos ));
+        pActEntry = (SvListEntry*)(*pActualList)[ nActualPos ];
         if ( bWithDepth )
             *pActDepth = nDepth;
         return pActEntry;
@@ -870,9 +879,9 @@ SvListEntry* SvTreeList::NextVisible(const SvListView* pView,SvListEntry* pActEn
         pActualList = pParent->pParent->pChilds;
         nActualPos = pParent->GetChildListPos();
         nActualPos++;
-        if ( pActualList->Count() > nActualPos )
+        if ( pActualList->size() > nActualPos )
         {
-            pActEntry = (SvListEntry*)(pActualList->GetObject( nActualPos ));
+            pActEntry = (SvListEntry*)(*pActualList)[ nActualPos ];
             if ( bWithDepth )
                 *pActDepth = nDepth;
             return pActEntry;
@@ -910,12 +919,12 @@ SvListEntry* SvTreeList::PrevVisible(const SvListView* pView, SvListEntry* pActE
 
     if ( nActualPos > 0 )
     {
-        pActEntry = (SvListEntry*)(pActualList->GetObject( nActualPos - 1 ));
+        pActEntry = (SvListEntry*)(*pActualList)[ nActualPos - 1 ];
         while( pView->IsExpanded(pActEntry) )
         {
             pActualList = pActEntry->pChilds;
             nDepth++;
-            pActEntry = (SvListEntry*)(pActualList->Last());
+            pActEntry = (SvListEntry*)(pActualList->last());
         }
         if ( bWithDepth )
             *pActDepth = nDepth;
@@ -1032,7 +1041,7 @@ SvListEntry* SvTreeList::FirstChild( SvListEntry* pParent ) const
         pParent = pRootItem;
     SvListEntry* pResult;
     if ( pParent->pChilds )
-        pResult = (SvListEntry*)(pParent->pChilds->GetObject( 0 ));
+        pResult = (SvListEntry*)(*pParent->pChilds)[ 0 ];
     else
         pResult = 0;
     return pResult;
@@ -1044,10 +1053,9 @@ SvListEntry* SvTreeList::NextSibling( SvListEntry* pEntry ) const
     if( !pEntry )
         return 0;
     SvTreeEntryList* pList = pEntry->pParent->pChilds;
-//	sal_uLong nPos = pList->GetPos( pEntry );
     sal_uLong nPos = pEntry->GetChildListPos();
     nPos++;
-    pEntry = (SvListEntry*)(pList->GetObject( nPos ));
+    pEntry = (SvListEntry*)(*pList)[ nPos ];
     return pEntry;
 }
 
@@ -1058,12 +1066,11 @@ SvListEntry* SvTreeList::PrevSibling( SvListEntry* pEntry ) const
         return 0;
 
     SvTreeEntryList* pList = pEntry->pParent->pChilds;
-    // sal_uLong nPos = pList->GetPos( pEntry );
     sal_uLong nPos = pEntry->GetChildListPos();
     if ( nPos == 0 )
         return 0;
     nPos--;
-    pEntry = (SvListEntry*)(pList->GetObject( nPos ));
+    pEntry = (SvListEntry*)(*pList)[ nPos ];
     return pEntry;
 }
 
@@ -1076,12 +1083,11 @@ SvListEntry* SvTreeList::LastSibling( SvListEntry* pEntry ) const
     SvListEntry* pSib = 0;
     SvTreeEntryList* pSibs = pEntry->pParent->pChilds;
     if ( pSibs )
-        pSib = (SvListEntry*)(pSibs->Last());
+        pSib = (SvListEntry*)(pSibs->last());
     return pSib;
 }
 
 
-
 /*************************************************************************
 |*
 |*    SvTreeList::
@@ -1155,15 +1161,15 @@ sal_uLong SvTreeList::Insert( SvListEntry* pEntry,SvListEntry* pParent,sal_uLong
     bAbsPositionsValid = sal_False;
     pEntry->pParent = pParent;
 
-    pList->Insert( pEntry, nPos );
+    pList->insert( pEntry, nPos );
     nEntryCount++;
-    if( nPos != LIST_APPEND && (nPos != (pList->Count()-1)) )
+    if( nPos != ULONG_MAX && (nPos != (pList->size()-1)) )
         SetListPositions( pList );
     else
-        pEntry->nListPos = pList->Count()-1;
+        pEntry->nListPos = pList->size()-1;
 
 #ifdef CHECK_INTEGRITY
-CheckIntegrity();
+    CheckIntegrity();
 #endif
     Broadcast( LISTACTION_INSERTED, pEntry );
     return nPos; // pEntry->nListPos;
@@ -1293,7 +1299,7 @@ sal_Bool SvTreeList::Select( SvListView* pView, SvListEntry* pEntry, sal_Bool bS
         }
     }
 #ifdef CHECK_INTEGRITY
-CheckIntegrity();
+    CheckIntegrity();
 #endif
     return sal_True;
 }
@@ -1328,20 +1334,20 @@ sal_Bool SvTreeList::Remove( SvListEntry* pEntry )
 
     if ( pEntry->HasChildListPos() )
     {
-        sal_uLong nListPos = pEntry->GetChildListPos();
-        bLastEntry = (nListPos == (pList->Count()-1) ) ? sal_True : sal_False;
-        pList->Remove( nListPos );
+        size_t nListPos = pEntry->GetChildListPos();
+        bLastEntry = (nListPos == (pList->size()-1) ) ? sal_True : sal_False;
+        pList->remove( nListPos );
     }
     else
     {
-        pList->Remove( (void*) pEntry );
+        pList->remove( pEntry );
     }
 
 
     // moved to end of method because it is used later with Broadcast
     // delete pEntry; // loescht auch alle Childs
 
-    if ( pList->Count() == 0 )
+    if ( pList->empty() )
     {
         pParent->pChilds = 0;
         delete pList;
@@ -1354,7 +1360,7 @@ sal_Bool SvTreeList::Remove( SvListEntry* pEntry )
     nEntryCount -= nRemoved;
 
 #ifdef CHECK_INTEGRITY
-CheckIntegrity();
+    CheckIntegrity();
 #endif
     Broadcast( LISTACTION_REMOVED, pEntry );
 
@@ -1373,7 +1379,7 @@ sal_uLong SvTreeList::SelectChilds(SvListView* pView, SvListEntry* pParent,sal_B
     DBG_ASSERT(pView&&pParent,"SelChilds:View/Parent?");
     if ( !pParent->pChilds )
         return 0;
-    if ( pParent->pChilds->Count() == 0 )
+    if ( pParent->pChilds->empty() )
         return 0;
 
     sal_uInt16 nRefDepth = GetDepth( pParent );
@@ -1388,7 +1394,7 @@ sal_uLong SvTreeList::SelectChilds(SvListView* pView, SvListEntry* pParent,sal_B
     }
     while( pParent && nDepth > nRefDepth );
 #ifdef CHECK_INTEGRITY
-CheckIntegrity();
+    CheckIntegrity();
 #endif
     return nCount;
 }
@@ -1442,22 +1448,12 @@ SvListEntry* SvTreeList::GetEntryAtVisPos( const SvListView* pView, sal_uLong nV
 
 void SvTreeList::SetListPositions( SvTreeEntryList* pList )
 {
-    if( pList->Count() )
+    if( !pList->empty() )
     {
-        SvListEntry* pEntry = (SvListEntry*)(pList->GetObject(0));
+        SvListEntry* pEntry = (SvListEntry*)(*pList)[ 0 ];
         if( pEntry->pParent )
             pEntry->pParent->InvalidateChildrensListPositions();
     }
-    /*
-    sal_uLong nListPos = 0;
-    SvListEntry* pEntry = (SvListEntry*)(pList->First());
-    while( pEntry )
-    {
-        pEntry->nListPos = nListPos;
-        nListPos++;
-        pEntry = (SvListEntry*)(pList->Next());
-    }
-    */
 }
 
 
@@ -1472,7 +1468,7 @@ sal_Bool SvTreeList::IsInChildList( SvListEntry* pParent, SvListEntry* pChild) c
         pParent = pRootItem;
     sal_Bool bIsChild = sal_False;
     if ( pParent->pChilds )
-        bIsChild = (sal_Bool)(pParent->pChilds->GetPos(pChild) != LIST_ENTRY_NOTFOUND);
+        bIsChild = (sal_Bool)(pParent->pChilds->GetPos(pChild) != ULONG_MAX);
     return bIsChild;
 }
 
@@ -1669,7 +1665,7 @@ void SvListView::ModelHasInsertedTree( SvListEntry* )
 }
 
 void SvListView::ModelIsMoving( SvListEntry* /*  pSource */ ,
-    SvListEntry* /* pTargetParent */ ,	sal_uLong /* nPos */	)
+    SvListEntry* /* pTargetParent */ ,  sal_uLong /* nPos */    )
 {
     DBG_CHKTHIS(SvListView,0);
 }
@@ -1700,7 +1696,7 @@ void SvListView::ActionMoving( SvListEntry* pEntry,SvListEntry*,sal_uLong)
     DBG_CHKTHIS(SvListView,0);
     SvListEntry* pParent = pEntry->pParent;
     DBG_ASSERT(pParent,"Model not consistent");
-    if( pParent != pModel->pRootItem && pParent->pChilds->Count() == 1 )
+    if( pParent != pModel->pRootItem && pParent->pChilds->size() == 1 )
     {
         SvViewData* pViewData = (SvViewData*)aDataTable.Get( (sal_uLong)pParent );
         pViewData->nFlags &= (~SVLISTENTRYFLAG_EXPANDED);
@@ -1813,7 +1809,7 @@ void SvListView::ActionRemoving( SvListEntry* pEntry )
 
     SvListEntry* pCurEntry = pEntry->pParent;
     if ( pCurEntry && pCurEntry != pModel->pRootItem &&
-         pCurEntry->pChilds->Count() == 1 )
+         pCurEntry->pChilds->size() == 1 )
     {
         pViewData = (SvViewData*)aDataTable.Get((sal_uLong)pCurEntry);
         pViewData->nFlags &= (~SVLISTENTRYFLAG_EXPANDED);
@@ -1908,19 +1904,19 @@ void SvTreeList::Resort()
 void SvTreeList::ResortChilds( SvListEntry* pParent )
 {
     DBG_ASSERT(pParent,"Parent not set");
-    List* pChildList = pParent->pChilds;
+    SvTreeEntryList* pChildList = pParent->pChilds;
     if( !pChildList )
         return;
-    List aList( *pChildList );
-    pChildList->Clear();
+    SvTreeEntryList aList( *pChildList );
+    pChildList->clear();
 
-    sal_uLong nCount = aList.Count();
-    for( sal_uLong nCur = 0; nCur < nCount; nCur++ )
+    size_t nCount = aList.size();
+    for( size_t nCur = 0; nCur < nCount; nCur++ )
     {
-        SvListEntry* pCurEntry = (SvListEntry*)aList.GetObject( nCur );
-        sal_uLong nListPos = LIST_APPEND;
+        SvListEntry* pCurEntry = (SvListEntry*)aList[ nCur ];
+        sal_uLong nListPos = ULONG_MAX;
         GetInsertionPos( pCurEntry, pParent, nListPos );
-        pChildList->Insert( pCurEntry, nListPos );
+        pChildList->insert( pCurEntry, nListPos );
         if( pCurEntry->pChilds )
             ResortChilds( pCurEntry );
     }
@@ -1935,20 +1931,20 @@ void SvTreeList::GetInsertionPos( SvListEntry* pEntry, SvListEntry* pParent,
     if( eSortMode == SortNone )
         return;
 
-    rPos = LIST_APPEND;
+    rPos = ULONG_MAX;
     SvTreeEntryList* pChildList = GetChildList( pParent );
 
-    if( pChildList && pChildList->Count() )
+    if( pChildList && !pChildList->empty() )
     {
         long i = 0;
-        long j = pChildList->Count()-1;
+        long j = pChildList->size()-1;
         long k;
         StringCompare eCompare = COMPARE_GREATER;
 
         do
         {
             k = (i+j)/2;
-            SvListEntry* pTempEntry = (SvListEntry*)(pChildList->GetObject(k));
+            SvListEntry* pTempEntry = (SvListEntry*)(*pChildList)[ k ];
             eCompare = Compare( pEntry, pTempEntry );
             if( eSortMode == SortDescending && eCompare != COMPARE_EQUAL )
             {
@@ -1965,8 +1961,8 @@ void SvTreeList::GetInsertionPos( SvListEntry* pEntry, SvListEntry* pParent,
 
         if( eCompare != COMPARE_EQUAL )
         {
-            if(i > ((long)pChildList->Count() - 1)) // nicht gefunden, Ende der Liste
-                rPos = LIST_APPEND;
+            if(i > ((long)pChildList->size() - 1)) // nicht gefunden, Ende der Liste
+                rPos = ULONG_MAX;
             else
                 rPos = i;              // nicht gefunden, Mitte
         }


More information about the Libreoffice-commits mailing list