[Libreoffice-commits] .: 8 commits - cui/source dbaccess/source editeng/inc filter/inc idl/inc idl/source sd/inc sd/source svtools/source svx/inc tools/inc tools/source

Tor Lillqvist tml at kemper.freedesktop.org
Wed Aug 8 03:57:10 PDT 2012


 cui/source/dialogs/linkdlg.cxx           |   24 ++
 dbaccess/source/ui/misc/DExport.cxx      |    1 
 editeng/inc/editeng/outliner.hxx         |    3 
 filter/inc/filter/msfilter/svdfppt.hxx   |    1 
 idl/inc/basobj.hxx                       |   31 +--
 idl/inc/database.hxx                     |    2 
 idl/inc/module.hxx                       |    3 
 idl/inc/object.hxx                       |    7 
 idl/inc/slot.hxx                         |    3 
 idl/inc/types.hxx                        |   23 +-
 idl/source/objects/module.cxx            |   56 +++---
 idl/source/objects/object.cxx            |   40 ++--
 idl/source/objects/slot.cxx              |   31 +--
 idl/source/objects/types.cxx             |   79 ++++-----
 idl/source/prj/database.cxx              |  102 ++++++-----
 sd/inc/drawdoc.hxx                       |    7 
 sd/inc/sdabstdlg.hxx                     |    3 
 sd/source/core/drawdoc.cxx               |    5 
 sd/source/core/drawdoc3.cxx              |    7 
 sd/source/core/drawdoc_animations.cxx    |    5 
 sd/source/filter/eppt/text.hxx           |    1 
 sd/source/filter/ppt/pptin.cxx           |   13 -
 sd/source/ui/dlg/custsdlg.cxx            |   23 +-
 sd/source/ui/dlg/present.cxx             |    4 
 sd/source/ui/dlg/sddlgfact.cxx           |    2 
 sd/source/ui/dlg/sddlgfact.hxx           |    2 
 sd/source/ui/dlg/sdtreelb.cxx            |    6 
 sd/source/ui/func/fusldlg.cxx            |    4 
 sd/source/ui/inc/custsdlg.hxx            |    3 
 sd/source/ui/inc/present.hxx             |    5 
 sd/source/ui/slideshow/slideshow.cxx     |    9 -
 sd/source/ui/slideshow/slideshowimpl.cxx |    4 
 sd/source/ui/unoidl/unocpres.cxx         |   29 +--
 sd/source/ui/unoidl/unocpres.hxx         |    4 
 svtools/source/contnr/fileview.cxx       |  135 +++------------
 svtools/source/graphic/grfcache.cxx      |   76 ++++----
 svtools/source/graphic/grfcache.hxx      |    4 
 svx/inc/svx/svdlayer.hxx                 |    1 
 svx/inc/svx/xtable.hxx                   |    1 
 tools/inc/tools/pstm.hxx                 |   57 ++++--
 tools/inc/tools/ref.hxx                  |  272 +++++--------------------------
 tools/source/inet/inetmsg.cxx            |    1 
 tools/source/ref/pstm.cxx                |   31 ---
 tools/source/ref/ref.cxx                 |    3 
 44 files changed, 467 insertions(+), 656 deletions(-)

New commits:
commit b10a5e4c3c3e0c95abd1f8b3d102c506b7e54c29
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Aug 8 12:29:34 2012 +0200

    STL'ify CustomShowList
    
    Create SdCustomShowList class to replace usage of tools/list.hxx
    
    Change-Id: I0e57e29c8ee9ac8d693fee0edb084ded5286c141

diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index 3e72443..4f4b73f 100644
--- a/sd/inc/drawdoc.hxx
+++ b/sd/inc/drawdoc.hxx
@@ -85,6 +85,8 @@ class SdTransferable;
 struct SpellCallbackInfo;
 struct StyleRequestData;
 class SdDrawDocument;
+class SdCustomShow;
+class SdCustomShowList;
 
 namespace sd
 {
@@ -139,6 +141,7 @@ namespace sd
     };
 }
 
+
 // ------------------
 // - SdDrawDocument -
 // ------------------
@@ -153,7 +156,7 @@ private:
     sd::ShapeList*      mpOnlineSpellingList;
     SvxSearchItem*      mpOnlineSearchItem;
     std::vector<sd::FrameView*> maFrameViewList;
-    List*               mpCustomShowList;
+    SdCustomShowList*   mpCustomShowList;
     ::sd::DrawDocShell* mpDocSh;
     SdTransferable *    mpCreatingTransferable;
     sal_Bool                mbHasOnlineSpellErrors;
@@ -394,7 +397,7 @@ public:
     sal_uLong               GetLinkCount();
 
     std::vector<sd::FrameView*>& GetFrameViewList() { return maFrameViewList; }
-    SD_DLLPUBLIC List*  GetCustomShowList(sal_Bool bCreate = sal_False);
+    SD_DLLPUBLIC SdCustomShowList* GetCustomShowList(sal_Bool bCreate = sal_False);
 
     void                NbcSetChanged(sal_Bool bFlag = sal_True);
 
diff --git a/sd/inc/sdabstdlg.hxx b/sd/inc/sdabstdlg.hxx
index 063a735..11342a8 100644
--- a/sd/inc/sdabstdlg.hxx
+++ b/sd/inc/sdabstdlg.hxx
@@ -71,6 +71,7 @@ class Window;
 class SdPage;
 class TabPage;
 class ViewShell;
+class SdCustomShowList;
 
 class AbstractCopyDlg : public VclAbstractDialog  //add for CopyDlg
 {
@@ -201,7 +202,7 @@ public:
     virtual SfxAbstractTabDialog*       CreateSdOutlineBulletTabDlg ( ::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView = NULL ) = 0;
     virtual SfxAbstractTabDialog*       CreateSdParagraphTabDlg ( ::Window* pParent, const SfxItemSet* pAttr ) = 0;
     virtual AbstractSdStartPresDlg*     CreateSdStartPresentationDlg( ::Window* pWindow, const SfxItemSet& rInAttrs,
-                                                                     const std::vector<String> &rPageNames, List* pCSList ) = 0;
+                                                                     const std::vector<String> &rPageNames, SdCustomShowList* pCSList ) = 0;
     virtual VclAbstractDialog*          CreateRemoteDialog( ::Window* pWindow ) = 0;
     virtual SfxAbstractTabDialog*       CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, ::Window* pParent, SdResId DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool ) = 0;
     virtual AbstractSdPresLayoutDlg*    CreateSdPresLayoutDlg( ::sd::DrawDocShell* pDocShell, ::sd::ViewShell* pViewShell, ::Window* pWindow, const SfxItemSet& rInAttrs) = 0;
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 7d4cc74..6ddcda4 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -82,6 +82,7 @@
 #include "sdiocmpt.hxx"
 #include "sdresid.hxx"
 #include "cusshow.hxx"
+#include "customshowlist.hxx"
 #include "../ui/inc/DrawDocShell.hxx"
 #include "../ui/inc/GraphicDocShell.hxx"
 #include "../ui/inc/sdxfer.hxx"
@@ -414,10 +415,10 @@ SdDrawDocument::~SdDrawDocument()
 
     if (mpCustomShowList)
     {
-        for (sal_uLong j = 0; j < mpCustomShowList->Count(); j++)
+        for (sal_uLong j = 0; j < mpCustomShowList->size(); j++)
         {
             // Ggf. CustomShows loeschen
-            SdCustomShow* pCustomShow = (SdCustomShow*) mpCustomShowList->GetObject(j);
+            SdCustomShow* pCustomShow = (*mpCustomShowList)[j];
             delete pCustomShow;
         }
 
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index 1c7154f..27e9197 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -58,6 +58,7 @@
 #include "sdiocmpt.hxx"
 #include "strmname.h"
 #include "anminfo.hxx"
+#include "customshowlist.hxx"
 
 #include "../ui/inc/unmovss.hxx"
 #include "../ui/inc/unchss.hxx"
@@ -1190,15 +1191,15 @@ void SdDrawDocument::SetAllocDocSh(sal_Bool bAlloc)
 |*
 \************************************************************************/
 
-List* SdDrawDocument::GetCustomShowList(sal_Bool bCreate)
+SdCustomShowList* SdDrawDocument::GetCustomShowList(sal_Bool bCreate)
 {
     if (!mpCustomShowList && bCreate)
     {
         // Liste erzeugen
-        mpCustomShowList = new List();
+        mpCustomShowList = new SdCustomShowList;
     }
 
-    return(mpCustomShowList);
+    return mpCustomShowList;
 }
 
 /*************************************************************************
diff --git a/sd/source/core/drawdoc_animations.cxx b/sd/source/core/drawdoc_animations.cxx
index 375dd4d..e0f166e 100644
--- a/sd/source/core/drawdoc_animations.cxx
+++ b/sd/source/core/drawdoc_animations.cxx
@@ -29,6 +29,7 @@
 
 #include "drawdoc.hxx"
 #include "cusshow.hxx"
+#include "customshowlist.hxx"
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::presentation;
@@ -40,9 +41,9 @@ void SdDrawDocument::ReplacePageInCustomShows( const SdPage* pOldPage, const SdP
 {
     if ( mpCustomShowList )
     {
-        for (sal_uLong i = 0; i < mpCustomShowList->Count(); i++)
+        for (sal_uLong i = 0; i < mpCustomShowList->size(); i++)
         {
-            SdCustomShow* pCustomShow = (SdCustomShow*) mpCustomShowList->GetObject(i);
+            SdCustomShow* pCustomShow = (*mpCustomShowList)[i];
             pCustomShow->ReplacePage(pOldPage, pNewPage);
         }
     }
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index fa2c0a0..7415cae 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -77,6 +77,7 @@
 #include "propread.hxx"
 #include <cusshow.hxx>
 #include <vcl/bmpacc.hxx>
+#include "customshowlist.hxx"
 
 #include "../../ui/inc/DrawDocShell.hxx"
 #include "../../ui/inc/FrameView.hxx"
@@ -1276,7 +1277,7 @@ sal_Bool ImplSdPPTImport::Import()
                             sal_uInt32 nSCount = aContent.nRecLen >> 2;
                             if ( pPageList && nSCount )
                             {
-                                List* pList = mpDoc->GetCustomShowList( sal_True );
+                                SdCustomShowList* pList = mpDoc->GetCustomShowList( sal_True );
                                 if ( pList )
                                 {
                                     SdCustomShow* pSdCustomShow = new SdCustomShow( mpDoc );
@@ -1300,7 +1301,7 @@ sal_Bool ImplSdPPTImport::Import()
                                             }
                                         }
                                         if ( nFound )
-                                            pList->Insert( pSdCustomShow, LIST_APPEND );
+                                            pList->push_back( pSdCustomShow );
                                         else
                                             delete pSdCustomShow;
                                     }
@@ -1345,13 +1346,13 @@ sal_Bool ImplSdPPTImport::Import()
         // set the current custom show
         if ( aCustomShow.Len() )
         {
-            void* pPtr;
-            List* pList = mpDoc->GetCustomShowList( sal_False );
+            SdCustomShowList* pList = mpDoc->GetCustomShowList( sal_False );
             if ( pList )
             {
-                for ( pPtr = pList->First(); pPtr; pPtr = pList->Next() )
+                SdCustomShow* pPtr = NULL;
+                for( pPtr = pList->First(); pPtr; pPtr = pList->Next() )
                 {
-                    if ( ((SdCustomShow*)pPtr)->GetName() == aCustomShow )
+                    if ( pPtr->GetName() == aCustomShow )
                         break;
                 }
                 if ( !pPtr )
diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx
index 42daba8..e1436d4 100644
--- a/sd/source/ui/dlg/custsdlg.cxx
+++ b/sd/source/ui/dlg/custsdlg.cxx
@@ -41,6 +41,7 @@
 #include "sdpage.hxx"
 #include "cusshow.hxx"
 #include "app.hxx"
+#include "customshowlist.hxx"
 #include <vcl/msgbox.hxx>
 
 
@@ -89,9 +90,9 @@ SdCustomShowDlg::SdCustomShowDlg( Window* pWindow,
     {
         long nPosToSelect = pCustomShowList->GetCurPos();
         // ListBox mit CustomShows fuellen
-        for( pCustomShow = (SdCustomShow*) pCustomShowList->First();
+        for( pCustomShow = pCustomShowList->First();
              pCustomShow != NULL;
-             pCustomShow = (SdCustomShow*) pCustomShowList->Next() )
+             pCustomShow = pCustomShowList->Next() )
         {
             aLbCustomShows.InsertEntry( pCustomShow->GetName() );
         }
@@ -146,7 +147,7 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p )
                 if( !pCustomShowList )
                     pCustomShowList = rDoc.GetCustomShowList( sal_True );
 
-                pCustomShowList->Insert( pCustomShow, LIST_APPEND );
+                pCustomShowList->push_back( pCustomShow );
                 pCustomShowList->Last();
                 aLbCustomShows.InsertEntry( pCustomShow->GetName() );
                 aLbCustomShows.SelectEntry( pCustomShow->GetName() );
@@ -165,14 +166,14 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p )
         if( nPos != LISTBOX_ENTRY_NOTFOUND )
         {
             DBG_ASSERT( pCustomShowList, "pCustomShowList existiert nicht" );
-            pCustomShow = (SdCustomShow*) pCustomShowList->GetObject( nPos );
+            pCustomShow = (*pCustomShowList)[ nPos ];
             SdDefineCustomShowDlg aDlg( this, rDoc, pCustomShow );
 
             if( aDlg.Execute() == RET_OK )
             {
                 if( pCustomShow )
                 {
-                    pCustomShowList->Replace( pCustomShow, nPos );
+                    (*pCustomShowList)[nPos] = pCustomShow;
                     pCustomShowList->Seek( nPos );
                     aLbCustomShows.RemoveEntry( nPos );
                     aLbCustomShows.InsertEntry( pCustomShow->GetName(), nPos );
@@ -189,7 +190,7 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p )
         sal_uInt16 nPos = aLbCustomShows.GetSelectEntryPos();
         if( nPos != LISTBOX_ENTRY_NOTFOUND )
         {
-            delete (SdCustomShow*) pCustomShowList->Remove( nPos );
+            delete *pCustomShowList->erase( pCustomShowList->begin() + nPos );
             aLbCustomShows.RemoveEntry( nPos );
             aLbCustomShows.SelectEntryPos( nPos == 0 ? nPos : nPos - 1 );
             bModified = sal_True;
@@ -201,7 +202,7 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p )
         sal_uInt16 nPos = aLbCustomShows.GetSelectEntryPos();
         if( nPos != LISTBOX_ENTRY_NOTFOUND )
         {
-            SdCustomShow* pShow = new SdCustomShow( *(SdCustomShow*) pCustomShowList->GetObject( nPos ) );
+            SdCustomShow* pShow = new SdCustomShow( *(*pCustomShowList)[nPos] );
             String aStr( pShow->GetName() );
             String aStrCopy( SdResId( STR_COPY_CUSTOMSHOW ) );
 
@@ -250,7 +251,7 @@ IMPL_LINK( SdCustomShowDlg, ClickButtonHdl, void *, p )
             //pCustomShowList->Seek( nPosToSelect );
             pShow->SetName( aStr );
 
-            pCustomShowList->Insert( pShow, LIST_APPEND );
+            pCustomShowList->push_back( pShow );
             pCustomShowList->Last();
             aLbCustomShows.InsertEntry( pShow->GetName() );
             aLbCustomShows.SelectEntry( pShow->GetName() );
@@ -523,16 +524,16 @@ IMPL_LINK_NOARG(SdDefineCustomShowDlg, OKHdl)
 {
     // Name ueberpruefen...
     sal_Bool bDifferent = sal_True;
-    List* pCustomShowList = rDoc.GetCustomShowList();
+    SdCustomShowList* pCustomShowList = rDoc.GetCustomShowList();
     if( pCustomShowList )
     {
         String aName( aEdtName.GetText() );
         SdCustomShow* pCustomShow;
 
         long nPosToSelect = pCustomShowList->GetCurPos();
-        for( pCustomShow = (SdCustomShow*) pCustomShowList->First();
+        for( pCustomShow = pCustomShowList->First();
              pCustomShow != NULL;
-             pCustomShow = (SdCustomShow*) pCustomShowList->Next() )
+             pCustomShow = pCustomShowList->Next() )
         {
             if( aName == pCustomShow->GetName() && aName != aOldName )
                 bDifferent = sal_False;
diff --git a/sd/source/ui/dlg/present.cxx b/sd/source/ui/dlg/present.cxx
index c84bd2c..54b008e 100644
--- a/sd/source/ui/dlg/present.cxx
+++ b/sd/source/ui/dlg/present.cxx
@@ -42,6 +42,7 @@
 #include "present.hrc"
 #include "sdresid.hxx"
 #include "cusshow.hxx"
+#include "customshowlist.hxx"
 
 using ::rtl::OUString;
 using namespace ::com::sun::star::uno;
@@ -54,7 +55,7 @@ using namespace ::com::sun::star::beans;
 \************************************************************************/
 SdStartPresentationDlg::SdStartPresentationDlg( Window* pWindow,
                                   const SfxItemSet& rInAttrs,
-                                  const std::vector<String> &rPageNames, List* pCSList ) :
+                                  const std::vector<String> &rPageNames, SdCustomShowList* pCSList ) :
                 ModalDialog     ( pWindow, SdResId( DLG_START_PRESENTATION ) ),
                 aGrpRange               ( this, SdResId( GRP_RANGE ) ),
                 aRbtAll                 ( this, SdResId( RBT_ALL ) ),
diff --git a/sd/source/ui/dlg/sddlgfact.cxx b/sd/source/ui/dlg/sddlgfact.cxx
index 87bf533..e1a4666 100644
--- a/sd/source/ui/dlg/sddlgfact.cxx
+++ b/sd/source/ui/dlg/sddlgfact.cxx
@@ -485,7 +485,7 @@ SfxAbstractTabDialog *  SdAbstractDialogFactory_Impl::CreateSdParagraphTabDlg( :
 
 // add for SdStartPresentationDlg begin
 AbstractSdStartPresDlg *  SdAbstractDialogFactory_Impl::CreateSdStartPresentationDlg( ::Window* pWindow, const SfxItemSet& rInAttrs,
-                                                                                     const std::vector<String> &rPageNames, List* pCSList )
+                                                                                     const std::vector<String> &rPageNames, SdCustomShowList* pCSList )
 {
     return new AbstractSdStartPresDlg_Impl( new SdStartPresentationDlg( pWindow, rInAttrs, rPageNames, pCSList ) );
 }
diff --git a/sd/source/ui/dlg/sddlgfact.hxx b/sd/source/ui/dlg/sddlgfact.hxx
index df28929..e480541 100644
--- a/sd/source/ui/dlg/sddlgfact.hxx
+++ b/sd/source/ui/dlg/sddlgfact.hxx
@@ -275,7 +275,7 @@ public:
     virtual SfxAbstractTabDialog*       CreateSdOutlineBulletTabDlg ( ::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView = NULL );
     virtual SfxAbstractTabDialog*       CreateSdParagraphTabDlg ( ::Window* pParent, const SfxItemSet* pAttr );
     virtual AbstractSdStartPresDlg*     CreateSdStartPresentationDlg( ::Window* pWindow, const SfxItemSet& rInAttrs,
-                                                                     const std::vector<String> &rPageNames, List* pCSList );
+                                                                     const std::vector<String> &rPageNames, SdCustomShowList* pCSList );
     virtual VclAbstractDialog*          CreateRemoteDialog( ::Window* pWindow ); // ad for RemoteDialog
     virtual SfxAbstractTabDialog*       CreateSdPresLayoutTemplateDlg( SfxObjectShell* pDocSh, ::Window* pParent, SdResId DlgId, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool );
     virtual AbstractSdPresLayoutDlg*    CreateSdPresLayoutDlg( ::sd::DrawDocShell* pDocShell, ::sd::ViewShell* pViewShell, ::Window* pWindow, const SfxItemSet& rInAttrs);
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 4c38087..534c178 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -50,6 +50,7 @@
 #include "navigatr.hxx"
 #include "strings.hrc"
 #include "res_bmp.hrc"
+#include "customshowlist.hxx"
 
 #include <com/sun/star/embed/XEmbedPersist.hpp>
 #include <svtools/embedtransfer.hxx>
@@ -1175,12 +1176,11 @@ bool SdPageObjsTLB::PageBelongsToCurrentShow (const SdPage* pPage) const
     {
         // Get the current custom show.
         SdCustomShow* pCustomShow = NULL;
-        List* pShowList = const_cast<SdDrawDocument*>(mpDoc)->GetCustomShowList();
+        SdCustomShowList* pShowList = const_cast<SdDrawDocument*>(mpDoc)->GetCustomShowList();
         if (pShowList != NULL)
         {
             sal_uLong nCurrentShowIndex = pShowList->GetCurPos();
-            void* pObject = pShowList->GetObject(nCurrentShowIndex);
-            pCustomShow = static_cast<SdCustomShow*>(pObject);
+            pCustomShow = (*pShowList)[nCurrentShowIndex];
         }
 
         // Check whether the given page is part of that custom show.
diff --git a/sd/source/ui/func/fusldlg.cxx b/sd/source/ui/func/fusldlg.cxx
index f11e596..2e50da6 100644
--- a/sd/source/ui/func/fusldlg.cxx
+++ b/sd/source/ui/func/fusldlg.cxx
@@ -103,7 +103,7 @@ void FuSlideShowDlg::DoExecute( SfxRequest& )
         else if ( pPage->IsSelected() && !aFirstPage.Len() )
             aFirstPage = aStr;
     }
-    List* pCustomShowList = mpDoc->GetCustomShowList(); // No Create
+    SdCustomShowList* pCustomShowList = mpDoc->GetCustomShowList(); // No Create
 
     sal_Bool bStartWithActualPage = SD_MOD()->GetSdOptions( mpDoc->GetDocumentType() )->IsStartWithActualPage();
     if( !aFirstPage.Len() && pPage )
@@ -129,7 +129,7 @@ void FuSlideShowDlg::DoExecute( SfxRequest& )
     aDlgSet.Put( SfxInt32Item( ATTR_PRESENT_DISPLAY, pOptions->GetDisplay() ) );
 
     SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
-    AbstractSdStartPresDlg* pDlg = pFact ? pFact->CreateSdStartPresentationDlg(mpWindow, aDlgSet, aPageNameList, pCustomShowList ) : 0;
+    AbstractSdStartPresDlg* pDlg = pFact ? pFact->CreateSdStartPresentationDlg(mpWindow, aDlgSet, aPageNameList, pCustomShowList) : 0;
     if( pDlg && (pDlg->Execute() == RET_OK) )
     {
         rtl::OUString aPage;
diff --git a/sd/source/ui/inc/custsdlg.hxx b/sd/source/ui/inc/custsdlg.hxx
index cb077e0..7744976 100644
--- a/sd/source/ui/inc/custsdlg.hxx
+++ b/sd/source/ui/inc/custsdlg.hxx
@@ -39,6 +39,7 @@
 
 class SdDrawDocument;
 class SdCustomShow;
+class SdCustomShowList;
 
 //------------------------------------------------------------------------
 
@@ -56,7 +57,7 @@ private:
     OKButton        aBtnOK;
 
     SdDrawDocument& rDoc;
-    List*           pCustomShowList;
+    SdCustomShowList* pCustomShowList;
     SdCustomShow*   pCustomShow;
     sal_Bool            bModified;
 
diff --git a/sd/source/ui/inc/present.hxx b/sd/source/ui/inc/present.hxx
index 2a19777..451ff71 100644
--- a/sd/source/ui/inc/present.hxx
+++ b/sd/source/ui/inc/present.hxx
@@ -38,6 +38,7 @@
 
 class SfxItemSet;
 class List;
+class SdCustomShowList;
 
 /*************************************************************************
 |* Dialog zum Festlegen von Optionen und Starten der Praesentation
@@ -77,7 +78,7 @@ private:
     CancelButton        aBtnCancel;
     HelpButton          aBtnHelp;
 
-    List*               pCustomShowList;
+    SdCustomShowList*   pCustomShowList;
     const SfxItemSet&   rOutAttrs;
     sal_Int32           mnMonitors;
 
@@ -95,7 +96,7 @@ public:
                         SdStartPresentationDlg( Window* pWindow,
                                 const SfxItemSet& rInAttrs,
                                 const std::vector<String> &rPageNames,
-                                List* pCSList );
+                                SdCustomShowList* pCSList );
 
     void                GetAttr( SfxItemSet& rOutAttrs );
 };
diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx
index c2fa430..bd64cad 100644
--- a/sd/source/ui/slideshow/slideshow.cxx
+++ b/sd/source/ui/slideshow/slideshow.cxx
@@ -60,6 +60,7 @@
 #include "ViewShell.hxx"
 #include "SlideShowRestarter.hxx"
 #include "DrawController.hxx"
+#include "customshowlist.hxx"
 #include <boost/bind.hpp>
 
 using ::com::sun::star::presentation::XSlideShowController;
@@ -385,11 +386,11 @@ void SAL_CALL SlideShow::setPropertyValue( const OUString& aPropertyName, const
 
             const String aShowName( aShow );
 
-            List* pCustomShowList = mpDoc->GetCustomShowList(sal_False);
+            SdCustomShowList* pCustomShowList = mpDoc->GetCustomShowList(sal_False);
             if(pCustomShowList)
             {
                 SdCustomShow* pCustomShow;
-                for( pCustomShow = (SdCustomShow*) pCustomShowList->First(); pCustomShow != NULL; pCustomShow = (SdCustomShow*) pCustomShowList->Next() )
+                for( pCustomShow = pCustomShowList->First(); pCustomShow != NULL; pCustomShow = pCustomShowList->Next() )
                 {
                     if( pCustomShow->GetName() == aShowName )
                         break;
@@ -605,8 +606,8 @@ Any SAL_CALL SlideShow::getPropertyValue( const OUString& PropertyName ) throw(U
         return Any( rPresSettings.mbAnimationAllowed );
     case ATTR_PRESENT_CUSTOMSHOW:
         {
-            List* pList = mpDoc->GetCustomShowList(sal_False);
-            SdCustomShow* pShow = (pList && rPresSettings.mbCustomShow)?(SdCustomShow*)pList->GetCurObject():NULL;
+            SdCustomShowList* pList = mpDoc->GetCustomShowList(sal_False);
+            SdCustomShow* pShow = (pList && rPresSettings.mbCustomShow) ? pList->GetCurObject() : NULL;
             OUString aShowName;
 
             if(pShow)
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index ed7f215..75aceb1 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -80,6 +80,8 @@
 #include "avmedia/mediawindow.hxx"
 #include  "svtools/colrdlg.hxx"
 #include "RemoteServer.hxx"
+#include "customshowlist.hxx"
+
 #include <boost/bind.hpp>
 
 using ::rtl::OUString;
@@ -2469,7 +2471,7 @@ void SlideshowImpl::createSlideList( bool bAll, bool bStartWithActualSlide, cons
         SdCustomShow*   pCustomShow;
 
         if( !bStartWithActualSlide && mpDoc->GetCustomShowList() && maPresSettings.mbCustomShow )
-            pCustomShow = (SdCustomShow*) mpDoc->GetCustomShowList()->GetCurObject();
+            pCustomShow = mpDoc->GetCustomShowList()->GetCurObject();
         else
             pCustomShow = NULL;
 
diff --git a/sd/source/ui/unoidl/unocpres.cxx b/sd/source/ui/unoidl/unocpres.cxx
index 4280f39..2887264 100644
--- a/sd/source/ui/unoidl/unocpres.cxx
+++ b/sd/source/ui/unoidl/unocpres.cxx
@@ -41,6 +41,7 @@
 #include "unocpres.hxx"
 #include "cusshow.hxx"
 #include "unopage.hxx"
+#include "customshowlist.hxx"
 
 using namespace ::rtl;
 using namespace ::com::sun::star;
@@ -342,7 +343,7 @@ void SAL_CALL SdXCustomPresentationAccess::insertByName( const OUString& aName,
     SolarMutexGuard aGuard;
 
     // get the documents custom show list
-    List* pList = 0;
+    SdCustomShowList* pList = 0;
     if(mrModel.GetDoc())
         pList = mrModel.GetDoc()->GetCustomShowList(sal_True);
 
@@ -377,15 +378,15 @@ void SAL_CALL SdXCustomPresentationAccess::insertByName( const OUString& aName,
     pShow->SetName( aName);
 
     // check if this or another customshow with the same name already exists
-    for( SdCustomShow* pCompare = (SdCustomShow*)pList->First();
+    for( SdCustomShow* pCompare = pList->First();
          pCompare;
-         pCompare = (SdCustomShow*)pList->Next() )
+         pCompare = pList->Next() )
     {
         if( pCompare == pShow || pCompare->GetName() == pShow->GetName() )
             throw container::ElementExistException();
     }
 
-    pList->Insert(pShow);
+    pList->push_back(pShow);
 
     mrModel.SetModified();
 }
@@ -397,9 +398,9 @@ void SAL_CALL SdXCustomPresentationAccess::removeByName( const OUString& Name )
 
     SdCustomShow* pShow = getSdCustomShow(Name);
 
-    List* pList = GetCustomShowList();
+    SdCustomShowList* pList = GetCustomShowList();
     if(pList && pShow)
-        delete (SdCustomShow*)pList->Remove( pShow );
+        delete pList->Remove( pShow );
     else
         throw container::NoSuchElementException();
 
@@ -441,8 +442,8 @@ uno::Sequence< OUString > SAL_CALL SdXCustomPresentationAccess::getElementNames(
 {
     SolarMutexGuard aGuard;
 
-    List* pList = GetCustomShowList();
-    const sal_uInt32 nCount = pList?pList->Count():0;
+    SdCustomShowList* pList = GetCustomShowList();
+    const sal_uInt32 nCount = pList ? pList->size() : 0;
 
     uno::Sequence< OUString > aSequence( nCount );
     OUString* pStringList = aSequence.getArray();
@@ -450,7 +451,7 @@ uno::Sequence< OUString > SAL_CALL SdXCustomPresentationAccess::getElementNames(
     sal_uInt32 nIdx = 0;
     while( nIdx < nCount )
     {
-        const SdCustomShow* pShow = (const SdCustomShow*)pList->GetObject(nIdx);
+        const SdCustomShow* pShow = (*pList)[nIdx];
         pStringList[nIdx] = pShow->GetName();
         nIdx++;
     }
@@ -478,22 +479,22 @@ sal_Bool SAL_CALL SdXCustomPresentationAccess::hasElements()
 {
     SolarMutexGuard aGuard;
 
-    List* pList = GetCustomShowList();
-    return pList && pList->Count() > 0;
+    SdCustomShowList* pList = GetCustomShowList();
+    return pList && !pList->empty();
 }
 
 SdCustomShow * SdXCustomPresentationAccess::getSdCustomShow( const OUString& Name ) const throw()
 {
     sal_uInt32 nIdx = 0;
 
-    List* pList = GetCustomShowList();
-    const sal_uInt32 nCount = pList?pList->Count():0;
+    SdCustomShowList* pList = GetCustomShowList();
+    const sal_uInt32 nCount = pList ? pList->size() : 0;
 
     const String aName( Name );
 
     while( nIdx < nCount )
     {
-        SdCustomShow* pShow = (SdCustomShow*)pList->GetObject(nIdx);
+        SdCustomShow* pShow = (*pList)[nIdx];
         if( pShow->GetName() == aName )
             return pShow;
         nIdx++;
diff --git a/sd/source/ui/unoidl/unocpres.hxx b/sd/source/ui/unoidl/unocpres.hxx
index 3bb5f7f..4f29b0c 100644
--- a/sd/source/ui/unoidl/unocpres.hxx
+++ b/sd/source/ui/unoidl/unocpres.hxx
@@ -113,7 +113,7 @@ private:
     SdXImpressDocument& mrModel;
 
     // intern
-    inline List* GetCustomShowList() const throw();
+    inline SdCustomShowList* GetCustomShowList() const throw();
     SdCustomShow * getSdCustomShow( const ::rtl::OUString& Name ) const throw();
 
 public:
@@ -146,7 +146,7 @@ public:
     virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException);
 };
 
-inline List * SdXCustomPresentationAccess::GetCustomShowList() const throw()
+inline SdCustomShowList* SdXCustomPresentationAccess::GetCustomShowList() const throw()
 {
     if(mrModel.GetDoc())
         return mrModel.GetDoc()->GetCustomShowList(sal_False);
commit 720a130b29e24c5e3b8bfc97a046c1a41694ab8f
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Aug 8 12:00:39 2012 +0200

    Remove usage of list.hxx
    
    Change-Id: I5815bdc2ef0d7eff15d518f6d66e913e31592d83

diff --git a/editeng/inc/editeng/outliner.hxx b/editeng/inc/editeng/outliner.hxx
index 370ff2e..9b61a81 100644
--- a/editeng/inc/editeng/outliner.hxx
+++ b/editeng/inc/editeng/outliner.hxx
@@ -36,7 +36,7 @@
 #include <editeng/editdata.hxx>
 #include <i18npool/lang.h>
 #include <tools/color.hxx>
-#include <tools/list.hxx>
+#include <tools/contnr.hxx>
 #include <vcl/graph.hxx>
 #include <tools/link.hxx>
 #include <rsc/rscsfx.hxx>
@@ -699,7 +699,7 @@ public:
     OutlinerView*   GetView( size_t nIndex ) const;
     size_t          GetViewCount() const;
 
-    Paragraph*      Insert( const String& rText, sal_uLong nAbsPos = LIST_APPEND, sal_Int16 nDepth = 0 );
+    Paragraph*      Insert( const String& rText, sal_uLong nAbsPos = CONTAINER_APPEND, sal_Int16 nDepth = 0 );
     void            SetText( const OutlinerParaObject& );
     void            AddText( const OutlinerParaObject& );
     void            SetText( const String& rText, Paragraph* pParagraph );
diff --git a/sd/source/ui/dlg/present.cxx b/sd/source/ui/dlg/present.cxx
index 3aea637..c84bd2c 100644
--- a/sd/source/ui/dlg/present.cxx
+++ b/sd/source/ui/dlg/present.cxx
@@ -35,6 +35,7 @@
 #include <com/sun/star/container/XIndexAccess.hpp>
 #include <comphelper/processfactory.hxx>
 #include <svl/itemset.hxx>
+#include <tools/list.hxx>
 
 #include "sdattr.hxx"
 #include "present.hxx"
commit daccbc1e070fe5788bb4f1f5e88d0eb7af5813b2
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Aug 8 09:20:24 2012 +0200

    Convert from tools/list.hxx to std::list in GraphicCache
    
    Change-Id: I020a2e9ef8485549d0c66798c8b651641319e17a

diff --git a/svtools/source/graphic/grfcache.cxx b/svtools/source/graphic/grfcache.cxx
index bfb39e4..59aab2f 100644
--- a/svtools/source/graphic/grfcache.cxx
+++ b/svtools/source/graphic/grfcache.cxx
@@ -867,7 +867,7 @@ GraphicCache::GraphicCache( GraphicManager& rMgr, sal_uLong nDisplayCacheSize, s
 GraphicCache::~GraphicCache()
 {
     DBG_ASSERT( !maGraphicCache.size(), "GraphicCache::~GraphicCache(): there are some GraphicObjects in cache" );
-    DBG_ASSERT( !maDisplayCache.Count(), "GraphicCache::~GraphicCache(): there are some GraphicObjects in display cache" );
+    DBG_ASSERT( maDisplayCache.empty(), "GraphicCache::~GraphicCache(): there are some GraphicObjects in display cache" );
 }
 
 // -----------------------------------------------------------------------------
@@ -993,19 +993,18 @@ void GraphicCache::ReleaseGraphicObject( const GraphicObject& rObj )
             {
                 // if graphic cache entry has no more references,
                 // the corresponding display cache object can be removed
-                GraphicDisplayCacheEntry* pDisplayEntry = (GraphicDisplayCacheEntry*) maDisplayCache.First();
-
-                while( pDisplayEntry )
+                GraphicDisplayCacheEntryList::iterator it2 = maDisplayCache.begin();
+                while( it2 != maDisplayCache.end() )
                 {
+                    GraphicDisplayCacheEntry* pDisplayEntry = *it2;
                     if( pDisplayEntry->GetReferencedCacheEntry() == *it )
                     {
                         mnUsedDisplaySize -= pDisplayEntry->GetCacheSize();
-                        maDisplayCache.Remove( pDisplayEntry );
+                        it2 = maDisplayCache.erase( it2 );
                         delete pDisplayEntry;
-                        pDisplayEntry = (GraphicDisplayCacheEntry*) maDisplayCache.GetCurObject();
                     }
                     else
-                        pDisplayEntry = (GraphicDisplayCacheEntry*) maDisplayCache.Next();
+                        ++it2;
                 }
 
                 // delete graphic cache entry
@@ -1082,19 +1081,18 @@ void GraphicCache::SetMaxObjDisplayCacheSize( sal_uLong nNewMaxObjSize, sal_Bool
 
     if( bDestroy )
     {
-        GraphicDisplayCacheEntry* pCacheObj = (GraphicDisplayCacheEntry*) maDisplayCache.First();
-
-        while( pCacheObj )
+        GraphicDisplayCacheEntryList::iterator it = maDisplayCache.begin();
+        while( it != maDisplayCache.end() )
         {
+            GraphicDisplayCacheEntry* pCacheObj = *it;
             if( pCacheObj->GetCacheSize() > mnMaxObjDisplaySize )
             {
                 mnUsedDisplaySize -= pCacheObj->GetCacheSize();
-                maDisplayCache.Remove( pCacheObj );
+                it = maDisplayCache.erase( it );
                 delete pCacheObj;
-                pCacheObj = (GraphicDisplayCacheEntry*) maDisplayCache.GetCurObject();
             }
             else
-                pCacheObj = (GraphicDisplayCacheEntry*) maDisplayCache.Next();
+                ++it;
         }
     }
 }
@@ -1105,7 +1103,6 @@ void GraphicCache::SetCacheTimeout( sal_uLong nTimeoutSeconds )
 {
     if( mnReleaseTimeoutSeconds != nTimeoutSeconds )
     {
-        GraphicDisplayCacheEntry*   pDisplayEntry = (GraphicDisplayCacheEntry*) maDisplayCache.First();
         ::salhelper::TTimeValue           aReleaseTime;
 
         if( ( mnReleaseTimeoutSeconds = nTimeoutSeconds ) != 0 )
@@ -1114,10 +1111,10 @@ void GraphicCache::SetCacheTimeout( sal_uLong nTimeoutSeconds )
             aReleaseTime.addTime( ::salhelper::TTimeValue( nTimeoutSeconds, 0 ) );
         }
 
-        while( pDisplayEntry )
+        for( GraphicDisplayCacheEntryList::const_iterator it = maDisplayCache.begin();
+             it != maDisplayCache.end(); ++it )
         {
-            pDisplayEntry->SetReleaseTime( aReleaseTime );
-            pDisplayEntry = (GraphicDisplayCacheEntry*) maDisplayCache.Next();
+            (*it)->SetReleaseTime( aReleaseTime );
         }
     }
 }
@@ -1139,14 +1136,16 @@ sal_Bool GraphicCache::IsInDisplayCache( OutputDevice* pOut, const Point& rPt, c
     const Point                 aPtPixel( pOut->LogicToPixel( rPt ) );
     const Size                  aSzPixel( pOut->LogicToPixel( rSz ) );
     const GraphicCacheEntry*    pCacheEntry = ( (GraphicCache*) this )->ImplGetCacheEntry( rObj );
-    //GraphicDisplayCacheEntry* pDisplayEntry = (GraphicDisplayCacheEntry*) ( (GraphicCache*) this )->maDisplayCache.First(); // -Wall removed ....
     sal_Bool                        bFound = sal_False;
 
     if( pCacheEntry )
     {
-        for( long i = 0, nCount = maDisplayCache.Count(); !bFound && ( i < nCount ); i++ )
-            if( ( (GraphicDisplayCacheEntry*) maDisplayCache.GetObject( i ) )->Matches( pOut, aPtPixel, aSzPixel, pCacheEntry, rAttr ) )
+        for( GraphicDisplayCacheEntryList::const_iterator it = maDisplayCache.begin();
+             !bFound && ( it != maDisplayCache.end() ); ++it )
+        {
+            if( (*it)->Matches( pOut, aPtPixel, aSzPixel, pCacheEntry, rAttr ) )
                 bFound = sal_True;
+        }
     }
 
     return bFound;
@@ -1198,7 +1197,7 @@ sal_Bool GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& r
             pNewEntry->SetReleaseTime( aReleaseTime );
         }
 
-        maDisplayCache.Insert( pNewEntry, LIST_APPEND );
+        maDisplayCache.push_back( pNewEntry );
         mnUsedDisplaySize += pNewEntry->GetCacheSize();
         bRet = sal_True;
     }
@@ -1232,7 +1231,7 @@ sal_Bool GraphicCache::CreateDisplayCacheObj( OutputDevice* pOut, const Point& r
             pNewEntry->SetReleaseTime( aReleaseTime );
         }
 
-        maDisplayCache.Insert( pNewEntry, LIST_APPEND );
+        maDisplayCache.push_back( pNewEntry );
         mnUsedDisplaySize += pNewEntry->GetCacheSize();
         bRet = sal_True;
     }
@@ -1248,17 +1247,20 @@ sal_Bool GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt
     const Point                 aPtPixel( pOut->LogicToPixel( rPt ) );
     const Size                  aSzPixel( pOut->LogicToPixel( rSz ) );
     const GraphicCacheEntry*    pCacheEntry = ImplGetCacheEntry( rObj );
-    GraphicDisplayCacheEntry*   pDisplayCacheEntry = (GraphicDisplayCacheEntry*) maDisplayCache.First();
-    sal_Bool                        bRet = sal_False;
+    GraphicDisplayCacheEntry*   pDisplayCacheEntry = NULL;
+    GraphicDisplayCacheEntryList::iterator it = maDisplayCache.begin();
+    sal_Bool                    bRet = sal_False;
 
-    while( !bRet && pDisplayCacheEntry )
+    while( !bRet && it != maDisplayCache.end() )
     {
+        pDisplayCacheEntry = *it;
         if( pDisplayCacheEntry->Matches( pOut, aPtPixel, aSzPixel, pCacheEntry, rAttr ) )
         {
             ::salhelper::TTimeValue aReleaseTime;
 
             // put found object at last used position
-            maDisplayCache.Insert( maDisplayCache.Remove( pDisplayCacheEntry ), LIST_APPEND );
+            it = maDisplayCache.erase( it );
+            maDisplayCache.push_back( pDisplayCacheEntry );
 
             if( GetCacheTimeout() )
             {
@@ -1270,7 +1272,7 @@ sal_Bool GraphicCache::DrawDisplayCacheObj( OutputDevice* pOut, const Point& rPt
             bRet = sal_True;
         }
         else
-            pDisplayCacheEntry = (GraphicDisplayCacheEntry*) maDisplayCache.Next();
+            ++it;
     }
 
     if( bRet )
@@ -1287,24 +1289,22 @@ sal_Bool GraphicCache::ImplFreeDisplayCacheSpace( sal_uLong nSizeToFree )
 
     if( nSizeToFree )
     {
-        void* pObj = maDisplayCache.First();
+        GraphicDisplayCacheEntryList::iterator it = maDisplayCache.begin();
 
         if( nSizeToFree > mnUsedDisplaySize )
             nSizeToFree = mnUsedDisplaySize;
 
-        while( pObj )
+        while( it != maDisplayCache.end() )
         {
-            GraphicDisplayCacheEntry* pCacheObj = (GraphicDisplayCacheEntry*) pObj;
+            GraphicDisplayCacheEntry* pCacheObj = *it;
 
             nFreedSize += pCacheObj->GetCacheSize();
             mnUsedDisplaySize -= pCacheObj->GetCacheSize();
-            maDisplayCache.Remove( pObj );
+            it = maDisplayCache.erase( it );
             delete pCacheObj;
 
             if( nFreedSize >= nSizeToFree )
                 break;
-            else
-                pObj = maDisplayCache.GetCurObject();
         }
     }
 
@@ -1337,23 +1337,23 @@ IMPL_LINK( GraphicCache, ReleaseTimeoutHdl, Timer*, pTimer )
     pTimer->Stop();
 
     ::salhelper::TTimeValue           aCurTime;
-    GraphicDisplayCacheEntry*   pDisplayEntry = (GraphicDisplayCacheEntry*) maDisplayCache.First();
+    GraphicDisplayCacheEntryList::iterator it = maDisplayCache.begin();
 
     osl_getSystemTime( &aCurTime );
 
-    while( pDisplayEntry )
+    while( it != maDisplayCache.end() )
     {
+        GraphicDisplayCacheEntry*   pDisplayEntry = *it;
         const ::salhelper::TTimeValue& rReleaseTime = pDisplayEntry->GetReleaseTime();
 
         if( !rReleaseTime.isEmpty() && ( rReleaseTime < aCurTime ) )
         {
             mnUsedDisplaySize -= pDisplayEntry->GetCacheSize();
-            maDisplayCache.Remove( pDisplayEntry );
+            it = maDisplayCache.erase( it );
             delete pDisplayEntry;
-            pDisplayEntry = (GraphicDisplayCacheEntry*) maDisplayCache.GetCurObject();
         }
         else
-            pDisplayEntry = (GraphicDisplayCacheEntry*) maDisplayCache.Next();
+            ++it;
     }
 
     pTimer->Start();
diff --git a/svtools/source/graphic/grfcache.hxx b/svtools/source/graphic/grfcache.hxx
index 5c79e51..fed7911 100644
--- a/svtools/source/graphic/grfcache.hxx
+++ b/svtools/source/graphic/grfcache.hxx
@@ -31,7 +31,6 @@
 
 #include <vcl/graph.hxx>
 #include <vcl/timer.hxx>
-#include <tools/list.hxx>
 #include <svtools/grfmgr.hxx>
 #include <list>
 
@@ -40,16 +39,18 @@
 // -----------------------
 
 class GraphicCacheEntry;
+class GraphicDisplayCacheEntry;
 
 class GraphicCache
 {
 private:
     typedef std::list< GraphicCacheEntry* > GraphicCacheEntryList;
+    typedef std::list< GraphicDisplayCacheEntry* > GraphicDisplayCacheEntryList;
 
     GraphicManager&         mrMgr;
     Timer                   maReleaseTimer;
     GraphicCacheEntryList   maGraphicCache;
-    List                    maDisplayCache;
+    GraphicDisplayCacheEntryList maDisplayCache;
     sal_uLong               mnReleaseTimeoutSeconds;
     sal_uLong               mnMaxDisplaySize;
     sal_uLong               mnMaxObjDisplaySize;
commit 016918cf9459eccc177bfedbe75c6296b3b4bb67
Author: Noel Grandin <noel at peralex.com>
Date:   Tue Aug 7 16:56:51 2012 +0200

    STL'ify SV_DECL_IMPL_PERSIST_LIST
    
    Converts it to a template based on std::vector
    
    Change-Id: Id7f89f494164c61a3a573cff443ac0e0488e93f1

diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index bdacec8..09092f2 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -48,6 +48,7 @@
 #include <o3tl/compat_functional.hxx>
 #include <tools/debug.hxx>
 #include <tools/diagnose_ex.h>
+#include <tools/contnr.hxx>
 #include <i18npool/mslangid.hxx>
 #include <com/sun/star/awt/FontDescriptor.hpp>
 #include "WCopyTable.hxx"
diff --git a/editeng/inc/editeng/outliner.hxx b/editeng/inc/editeng/outliner.hxx
index 2930db0..370ff2e 100644
--- a/editeng/inc/editeng/outliner.hxx
+++ b/editeng/inc/editeng/outliner.hxx
@@ -36,6 +36,7 @@
 #include <editeng/editdata.hxx>
 #include <i18npool/lang.h>
 #include <tools/color.hxx>
+#include <tools/list.hxx>
 #include <vcl/graph.hxx>
 #include <tools/link.hxx>
 #include <rsc/rscsfx.hxx>
diff --git a/filter/inc/filter/msfilter/svdfppt.hxx b/filter/inc/filter/msfilter/svdfppt.hxx
index 3ef2f92..c559a82 100644
--- a/filter/inc/filter/msfilter/svdfppt.hxx
+++ b/filter/inc/filter/msfilter/svdfppt.hxx
@@ -33,6 +33,7 @@
 #include <tools/string.hxx>
 #include <tools/gen.hxx>
 #include <tools/color.hxx>
+#include <tools/list.hxx>
 #include <svx/svdobj.hxx>
 #include <editeng/numitem.hxx>
 #include <editeng/editdata.hxx>
diff --git a/idl/inc/basobj.hxx b/idl/inc/basobj.hxx
index ce7f47b..cc63437 100644
--- a/idl/inc/basobj.hxx
+++ b/idl/inc/basobj.hxx
@@ -73,9 +73,8 @@ public:
                                 WriteType, WriteAttribute = 0 );
 };
 SV_DECL_IMPL_REF(SvMetaObject)
-SV_DECL_PERSIST_LIST(SvMetaObject,SvMetaObject *)
-SV_IMPL_PERSIST_LIST(SvMetaObject,SvMetaObject *)
 
+class SvMetaObjectMemberList : public SvDeclPersistList<SvMetaObject *> {};
 
 class SvMetaObjectMemberStack
 {
@@ -84,21 +83,17 @@ public:
             SvMetaObjectMemberStack() {;}
 
     void            Push( SvMetaObject * pObj )
-                    { aList.Insert( pObj, LIST_APPEND ); }
-    SvMetaObject *  Pop() { return aList.Remove( aList.Count() -1 ); }
-    SvMetaObject *  Top() const { return aList.GetObject( aList.Count() -1 ); }
-    void            Clear() { aList.Clear(); }
-    sal_uLong     Count() const { return aList.Count(); }
+                    { aList.push_back( pObj ); }
+    SvMetaObject *  Pop() { return aList.pop_back(); }
+    SvMetaObject *  Top() const { return aList.back(); }
+    void            Clear() { aList.clear(); }
+    sal_uLong     Count() const { return aList.size(); }
 
     SvMetaObject *  Get( TypeId nType )
                     {
-                        SvMetaObject * pObj = aList.Last();
-                        while( pObj )
-                        {
-                            if( pObj->IsA( nType ) )
-                                return pObj;
-                            pObj = aList.Prev();
-                        }
+                        for( SvMetaObjectMemberList::reverse_iterator it = aList.rbegin(); it != aList.rend(); ++it )
+                            if( (*it)->IsA( nType ) )
+                                return *it;
                         return NULL;
                     }
 };
@@ -147,7 +142,8 @@ public:
     void                WriteDescription( SvStream& rOutStm );
 };
 SV_DECL_IMPL_REF(SvMetaName)
-SV_DECL_IMPL_PERSIST_LIST(SvMetaName,SvMetaName *)
+
+class SvMetaNameMemberList : public SvDeclPersistList<SvMetaName *> {};
 
 
 SV_DECL_REF(SvMetaReference)
@@ -195,7 +191,8 @@ public:
                         { aRef = pRef; }
 };
 SV_IMPL_REF(SvMetaReference)
-SV_DECL_IMPL_PERSIST_LIST(SvMetaReference,SvMetaReference *)
+
+class SvMetaReferenceMemberList : public SvDeclPersistList<SvMetaReference *> {};
 
 
 class SvMetaModule;
@@ -229,8 +226,8 @@ protected:
                                           WriteType, WriteAttribute = 0);
 };
 SV_DECL_IMPL_REF(SvMetaExtern)
-SV_DECL_IMPL_PERSIST_LIST(SvMetaExtern,SvMetaExtern *)
 
+class SvMetaExternMemberList : public SvDeclPersistList<SvMetaExtern *> {};
 
 #endif // _BASOBJ_HXX
 
diff --git a/idl/inc/database.hxx b/idl/inc/database.hxx
index 5a64aac..7ce2175 100644
--- a/idl/inc/database.hxx
+++ b/idl/inc/database.hxx
@@ -79,7 +79,7 @@ protected:
     SvIdlError                  aError;
     void WriteReset()
     {
-        aUsedTypes.Clear();
+        aUsedTypes.clear();
         aIFaceName = rtl::OString();
     }
 public:
diff --git a/idl/inc/module.hxx b/idl/inc/module.hxx
index c181650..386b216 100644
--- a/idl/inc/module.hxx
+++ b/idl/inc/module.hxx
@@ -90,7 +90,8 @@ public:
                                     HelpIdTable& rTable );
 };
 SV_DECL_IMPL_REF(SvMetaModule)
-SV_DECL_IMPL_PERSIST_LIST(SvMetaModule,SvMetaModule *)
+
+class SvMetaModuleMemberList : public SvDeclPersistList<SvMetaModule *> {};
 
 
 #endif // _MODULE_HXX
diff --git a/idl/inc/object.hxx b/idl/inc/object.hxx
index c236a6f..cbe4d31 100644
--- a/idl/inc/object.hxx
+++ b/idl/inc/object.hxx
@@ -66,9 +66,11 @@ public:
 };
 
 SV_DECL_IMPL_REF(SvClassElement)
-SV_DECL_IMPL_PERSIST_LIST(SvClassElement,SvClassElement *)
 
-SV_DECL_PERSIST_LIST(SvMetaClass,SvMetaClass *)
+class SvClassElementMemberList : public SvDeclPersistList<SvClassElement *> {};
+
+class SvMetaClassMemberList : public SvDeclPersistList<SvMetaClass *> {};
+
 class SvMetaClass : public SvMetaType
 {
     SvMetaAttributeMemberList   aAttrList;
@@ -133,7 +135,6 @@ public:
                                 HelpIdTable& rTable );
 };
 SV_IMPL_REF(SvMetaClass)
-SV_IMPL_PERSIST_LIST(SvMetaClass,SvMetaClass *)
 
 
 #endif // _OBJECT_HXX
diff --git a/idl/inc/slot.hxx b/idl/inc/slot.hxx
index 3b2cb66..1427218 100644
--- a/idl/inc/slot.hxx
+++ b/idl/inc/slot.hxx
@@ -254,7 +254,8 @@ public:
     virtual void        WriteCSV( SvIdlDataBase&, SvStream& );
 };
 SV_DECL_IMPL_REF(SvMetaSlot)
-SV_DECL_IMPL_PERSIST_LIST(SvMetaSlot,SvMetaSlot *)
+
+class SvMetaSlotMemberList : public SvDeclPersistList<SvMetaSlot *> {};
 
 #endif // _SLOT_HXX
 
diff --git a/idl/inc/types.hxx b/idl/inc/types.hxx
index 234d80e..7189ceb 100644
--- a/idl/inc/types.hxx
+++ b/idl/inc/types.hxx
@@ -33,7 +33,9 @@ typedef std::map<sal_uLong, SvMetaSlot*> HelpIdTable;
 
 SV_DECL_REF(SvMetaType)
 SV_DECL_REF(SvMetaAttribute)
-SV_DECL_PERSIST_LIST(SvMetaAttribute,SvMetaAttribute *)
+
+class SvMetaAttributeMemberList : public SvDeclPersistList<SvMetaAttribute *> {};
+
 class SvMetaAttribute : public SvMetaReference
 {
     SvMetaTypeRef       aType;
@@ -119,7 +121,6 @@ public:
     rtl::OString        Compare( SvMetaAttribute *pAttr );
 };
 SV_IMPL_REF(SvMetaAttribute)
-SV_IMPL_PERSIST_LIST(SvMetaAttribute,SvMetaAttribute *)
 
 
 enum { CALL_VALUE, CALL_POINTER, CALL_REFERENCE };
@@ -175,11 +176,11 @@ public:
     SvMetaAttributeMemberList & GetAttrList() const;
     sal_uLong               GetAttrCount() const
                         {
-                            return pAttrList ? pAttrList->Count() : 0L;
+                            return pAttrList ? pAttrList->size() : 0L;
                         }
     void                AppendAttr( SvMetaAttribute * pAttr )
                         {
-                            GetAttrList().Append( pAttr );
+                            GetAttrList().push_back( pAttr );
                         }
 
     void                SetType( int nT );
@@ -236,8 +237,8 @@ public:
                                         const rtl::OString& rChief );
 };
 SV_IMPL_REF(SvMetaType)
-SV_DECL_IMPL_PERSIST_LIST(SvMetaType,SvMetaType *)
 
+class SvMetaTypeMemberList : public SvDeclPersistList<SvMetaType *> {};
 
 class SvMetaTypeString : public SvMetaType
 {
@@ -246,8 +247,8 @@ public:
             SvMetaTypeString();
 };
 SV_DECL_IMPL_REF(SvMetaTypeString)
-SV_DECL_IMPL_PERSIST_LIST(SvMetaTypeString,SvMetaTypeString *)
 
+class SvMetaTypeStringMemberList : public SvDeclPersistList<SvMetaTypeString *> {};
 
 class SvMetaEnumValue : public SvMetaName
 {
@@ -262,8 +263,8 @@ public:
                                   WriteType, WriteAttribute = 0 );
 };
 SV_DECL_IMPL_REF(SvMetaEnumValue)
-SV_DECL_IMPL_PERSIST_LIST(SvMetaEnumValue,SvMetaEnumValue *)
 
+class SvMetaEnumValueMemberList : public SvDeclPersistList<SvMetaEnumValue *> {};
 
 class SvMetaTypeEnum : public SvMetaType
 {
@@ -280,10 +281,10 @@ public:
             SvMetaTypeEnum();
 
     sal_uInt16              GetMaxValue() const;
-    sal_uLong               Count() const { return aEnumValueList.Count(); }
+    sal_uLong               Count() const { return aEnumValueList.size(); }
     const rtl::OString&     GetPrefix() const { return aPrefix; }
     SvMetaEnumValue *   GetObject( sal_uLong n ) const
-                        { return aEnumValueList.GetObject( n ); }
+                        { return aEnumValueList[n]; }
 
     virtual sal_Bool        ReadSvIdl( SvIdlDataBase &, SvTokenStream & rInStm );
     virtual void        WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm, sal_uInt16 nTab );
@@ -293,8 +294,8 @@ public:
                                   WriteType, WriteAttribute = 0 );
 };
 SV_DECL_IMPL_REF(SvMetaTypeEnum)
-SV_DECL_IMPL_PERSIST_LIST(SvMetaTypeEnum,SvMetaTypeEnum *)
 
+class SvMetaTypeEnumMemberList : public SvDeclPersistList<SvMetaTypeEnum *> {};
 
 class SvMetaTypevoid : public SvMetaType
 {
@@ -303,7 +304,7 @@ public:
             SvMetaTypevoid();
 };
 SV_DECL_IMPL_REF(SvMetaTypevoid)
-SV_DECL_IMPL_PERSIST_LIST(SvMetaTypevoid,SvMetaTypevoid *)
+class SvMetaTypevoidMemberList : public SvDeclPersistList<SvMetaTypevoid *> {};
 
 
 #endif // _TYPES_HXX
diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx
index 20e38af..43a6869 100644
--- a/idl/source/objects/module.cxx
+++ b/idl/source/objects/module.cxx
@@ -184,9 +184,9 @@ void SvMetaModule::ReadContextSvIdl( SvIdlDataBase & rBase,
         SvMetaClassRef aClass = new SvMetaClass();
         if( aClass->ReadSvIdl( rBase, rInStm ) )
         {
-            aClassList.Append( aClass );
+            aClassList.push_back( aClass );
             // announce globally
-            rBase.GetClassList().Append( aClass );
+            rBase.GetClassList().push_back( aClass );
         }
     }
     else if( rInStm.GetToken()->Is( SvHash_enum() ) )
@@ -196,9 +196,9 @@ void SvMetaModule::ReadContextSvIdl( SvIdlDataBase & rBase,
         if( aEnum->ReadSvIdl( rBase, rInStm ) )
         {
             // declared in module
-            aTypeList.Append( aEnum );
+            aTypeList.push_back( aEnum );
             // announce globally
-            rBase.GetTypeList().Append( aEnum );
+            rBase.GetTypeList().push_back( aEnum );
         }
     }
     else if( rInStm.GetToken()->Is( SvHash_item() )
@@ -210,9 +210,9 @@ void SvMetaModule::ReadContextSvIdl( SvIdlDataBase & rBase,
         if( xItem->ReadSvIdl( rBase, rInStm ) )
         {
             // declared in module
-            aTypeList.Append( xItem );
+            aTypeList.push_back( xItem );
             // announce globally
-            rBase.GetTypeList().Append( xItem );
+            rBase.GetTypeList().push_back( xItem );
         }
     }
     else if( rInStm.GetToken()->Is( SvHash_include() ) )
@@ -280,7 +280,7 @@ void SvMetaModule::ReadContextSvIdl( SvIdlDataBase & rBase,
             if( xSlot->Test( rBase, rInStm ) )
             {
                 // declared in module
-                aAttrList.Append( xSlot );
+                aAttrList.push_back( xSlot );
                 // announce globally
                 rBase.AppendAttr( xSlot );
             }
@@ -294,22 +294,22 @@ void SvMetaModule::WriteContextSvIdl( SvIdlDataBase & rBase,
 {
     SvMetaExtern::WriteContextSvIdl( rBase, rOutStm, nTab );
     sal_uLong n;
-    for( n = 0; n < aTypeList.Count(); n++ )
+    for( n = 0; n < aTypeList.size(); n++ )
     {
         WriteTab( rOutStm, nTab );
-        aTypeList.GetObject( n )->WriteSvIdl( rBase, rOutStm, nTab );
+        aTypeList[n]->WriteSvIdl( rBase, rOutStm, nTab );
     }
     rOutStm << endl;
-    for( n = 0; n < aAttrList.Count(); n++ )
+    for( n = 0; n < aAttrList.size(); n++ )
     {
         WriteTab( rOutStm, nTab );
-        aAttrList.GetObject( n )->WriteSvIdl( rBase, rOutStm, nTab );
+        aAttrList[n]->WriteSvIdl( rBase, rOutStm, nTab );
     }
     rOutStm << endl;
-    for( n = 0; n < aClassList.Count(); n++ )
+    for( n = 0; n < aClassList.size(); n++ )
     {
         WriteTab( rOutStm, nTab );
-        aClassList.GetObject( n )->WriteSvIdl( rBase, rOutStm, nTab );
+        aClassList[n]->WriteSvIdl( rBase, rOutStm, nTab );
     }
 }
 
@@ -368,9 +368,9 @@ void SvMetaModule::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm,
 
 void SvMetaModule::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
 {
-    for( sal_uLong n = 0; n < aClassList.Count(); n++ )
+    for( sal_uLong n = 0; n < aClassList.size(); n++ )
     {
-        SvMetaClass * pClass = aClassList.GetObject( n );
+        SvMetaClass * pClass = aClassList[n];
         pClass->WriteSfx( rBase, rOutStm );
     }
 }
@@ -378,9 +378,9 @@ void SvMetaModule::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
 void SvMetaModule::WriteHelpIds( SvIdlDataBase & rBase, SvStream & rOutStm,
                             HelpIdTable& rTable )
 {
-    for( sal_uLong n = 0; n < aClassList.Count(); n++ )
+    for( sal_uLong n = 0; n < aClassList.size(); n++ )
     {
-        SvMetaClass * pClass = aClassList.GetObject( n );
+        SvMetaClass * pClass = aClassList[n];
         pClass->WriteHelpIds( rBase, rOutStm, rTable );
     }
 }
@@ -422,15 +422,15 @@ void SvMetaModule::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
         WriteTab( rOutStm, nTab );
         rOutStm << "importlib(\"STDOLE.TLB\");" << endl;
 
-        for( sal_uLong n = 0; n < aClassList.Count(); n++ )
+        for( sal_uLong n = 0; n < aClassList.size(); n++ )
         {
-            SvMetaClass * pClass = aClassList.GetObject( n );
+            SvMetaClass * pClass = aClassList[n];
             if( !pClass->IsShell() && pClass->GetAutomation() )
             {
                 WriteTab( rOutStm, nTab );
                 WriteStars( rOutStm );
                 pClass->Write( rBase, rOutStm, nTab +1, nT, nA );
-                if( n +1 < aClassList.Count() )
+                if( n +1 < aClassList.size() )
                     rOutStm << endl;
             }
         }
@@ -446,9 +446,9 @@ void SvMetaModule::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
         rOutStm << "</MODULE>" << endl << endl;
 
         rOutStm << "<CLASSES>" << endl;
-        for( sal_uLong n = 0; n < aClassList.Count(); n++ )
+        for( sal_uLong n = 0; n < aClassList.size(); n++ )
         {
-            SvMetaClass * pClass = aClassList.GetObject( n );
+            SvMetaClass * pClass = aClassList[n];
             if( !pClass->IsShell() )
             {
                 rOutStm << pClass->GetName().getString().getStr();
@@ -458,16 +458,16 @@ void SvMetaModule::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
 
                 // imported classes
                 const SvClassElementMemberList& rClassList = pClass->GetClassList();
-                if ( rClassList.Count() )
+                if ( !rClassList.empty() )
                 {
                     rOutStm << " ( ";
 
-                    for( sal_uLong m=0; m<rClassList.Count(); ++m )
+                    for( sal_uLong m=0; m<rClassList.size(); ++m )
                     {
-                        SvClassElement *pEle = rClassList.GetObject(m);
+                        SvClassElement *pEle = rClassList[m];
                         SvMetaClass *pCl = pEle->GetClass();
                         rOutStm << pCl->GetName().getString().getStr();
-                        if ( m+1 == rClassList.Count() )
+                        if ( m+1 == rClassList.size() )
                             rOutStm << " )";
                         else
                             rOutStm << " , ";
@@ -484,9 +484,9 @@ void SvMetaModule::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
     case WRITE_C_SOURCE:
     case WRITE_C_HEADER:
     {
-        for( sal_uLong n = 0; n < aClassList.Count(); n++ )
+        for( sal_uLong n = 0; n < aClassList.size(); n++ )
         {
-            SvMetaClass * pClass = aClassList.GetObject( n );
+            SvMetaClass * pClass = aClassList[n];
             if( !pClass->IsShell() )
                 pClass->Write( rBase, rOutStm, nTab, nT, nA );
         }
diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index e26e1dd..953886d 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -109,9 +109,9 @@ void SvMetaClass::Save( SvPersistStream & rStm )
 
     // create mask
     sal_uInt8 nMask = 0;
-    if( aAttrList.Count() )         nMask |= 0x1;
+    if( !aAttrList.empty() )        nMask |= 0x1;
     if( aSuperClass.Is() )          nMask |= 0x2;
-    if( aClassList.Count() )        nMask |= 0x4;
+    if( !aClassList.empty() )       nMask |= 0x4;
     if( xAutomationInterface.Is() ) nMask |= 0x8;
     if( aAutomation.IsSet() )       nMask |= 0x10;
 
@@ -162,7 +162,7 @@ void SvMetaClass::ReadContextSvIdl( SvIdlDataBase & rBase,
         {
             SvClassElementRef xEle = new SvClassElement();
             xEle->SetClass( pClass );
-            aClassList.Append( xEle );
+            aClassList.push_back( xEle );
 
             if( rInStm.Read( '[' ) )
             {
@@ -241,7 +241,7 @@ void SvMetaClass::ReadContextSvIdl( SvIdlDataBase & rBase,
                 aI.SetValue( rBase.GetUniqueId() );
                 xAttr->SetSlotId( aI );
             }
-            aAttrList.Append( xAttr );
+            aAttrList.push_back( xAttr );
             return;
         }
     }
@@ -256,15 +256,15 @@ void SvMetaClass::WriteContextSvIdl
 )
 {
     sal_uLong n;
-    for( n = 0; n < aAttrList.Count(); n++ )
+    for( n = 0; n < aAttrList.size(); n++ )
     {
         WriteTab( rOutStm, nTab );
-        aAttrList.GetObject( n )->WriteSvIdl( rBase, rOutStm, nTab );
+        aAttrList[n]->WriteSvIdl( rBase, rOutStm, nTab );
         rOutStm << ';' << endl;
     }
-    for( n = 0; n < aClassList.Count(); n++ )
+    for( n = 0; n < aClassList.size(); n++ )
     {
-        SvClassElement * pEle = aClassList.GetObject( n );
+        SvClassElement * pEle = aClassList[n];
         WriteTab( rOutStm, nTab );
         rOutStm << SvHash_import()->GetName().getStr() << ' '
                 << pEle->GetPrefix().getStr();
@@ -316,9 +316,9 @@ sal_Bool SvMetaClass::TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInS
         OSL_FAIL( rAttr.GetSlotId().getString().getStr() );
     }
 
-    for( sal_uLong n = 0; n < aAttrList.Count(); n++ )
+    for( sal_uLong n = 0; n < aAttrList.size(); n++ )
     {
-        SvMetaAttribute * pS = aAttrList.GetObject( n );
+        SvMetaAttribute * pS = aAttrList[n];
         if( pS->GetName().getString() == rAttr.GetName().getString() )
         {
             // values have to match
@@ -407,9 +407,9 @@ void SvMetaClass::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
 
             // write all attributes
             sal_uLong n;
-            for( n = 0; n < aAttrList.Count(); n++ )
+            for( n = 0; n < aAttrList.size(); n++ )
             {
-                SvMetaAttribute * pAttr = aAttrList.GetObject( n );
+                SvMetaAttribute * pAttr = aAttrList[n];
                 if( !pAttr->GetHidden() )
                 {
                     if( pAttr->IsMethod() )
@@ -473,9 +473,9 @@ void SvMetaClass::InsertSlots( SvSlotElementList& rList, std::vector<sal_uLong>&
 
     // write all direct attributes
     sal_uLong n;
-    for( n = 0; n < aAttrList.Count(); n++ )
+    for( n = 0; n < aAttrList.size(); n++ )
     {
-        SvMetaAttribute * pAttr = aAttrList.GetObject( n );
+        SvMetaAttribute * pAttr = aAttrList[n];
 
         sal_uLong nId = pAttr->GetSlotId().GetValue();
 
@@ -500,9 +500,9 @@ void SvMetaClass::InsertSlots( SvSlotElementList& rList, std::vector<sal_uLong>&
 
     // Write all attributes of the imported classes, as long as they have
     // not already been imported by the superclass.
-    for( n = 0; n < aClassList.Count(); n++ )
+    for( n = 0; n < aClassList.size(); n++ )
     {
-        SvClassElement * pEle = aClassList.GetObject( n );
+        SvClassElement * pEle = aClassList[n];
         SvMetaClass * pCl = pEle->GetClass();
         rtl::OStringBuffer rPre(rPrefix);
         if( rPre.getLength() && pEle->GetPrefix().getLength() )
@@ -531,9 +531,9 @@ void SvMetaClass::FillClasses( SvMetaClassList & rList )
     rList.push_back( this );
 
     // my imports
-    for( sal_uInt32 n = 0; n < aClassList.Count(); n++ )
+    for( sal_uInt32 n = 0; n < aClassList.size(); n++ )
     {
-        SvClassElement * pEle = aClassList.GetObject( n );
+        SvClassElement * pEle = aClassList[n];
         SvMetaClass * pCl = pEle->GetClass();
         pCl->FillClasses( rList );
     }
@@ -645,9 +645,9 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
 void SvMetaClass::WriteHelpIds( SvIdlDataBase & rBase, SvStream & rOutStm,
                             HelpIdTable& rTable )
 {
-    for( sal_uLong n=0; n<aAttrList.Count(); n++ )
+    for( sal_uLong n=0; n<aAttrList.size(); n++ )
     {
-        SvMetaAttribute * pAttr = aAttrList.GetObject( n );
+        SvMetaAttribute * pAttr = aAttrList[n];
         pAttr->WriteHelpId( rBase, rOutStm, rTable );
     }
 }
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx
index e0ed2d3..e55712e 100644
--- a/idl/source/objects/slot.cxx
+++ b/idl/source/objects/slot.cxx
@@ -1013,9 +1013,9 @@ void SvMetaSlot::Insert( SvSlotElementList& rList, const rtl::OString& rPrefix,
             rtl::OString aSId = aBuf.makeStringAndClear();
 
             xEnumSlot = NULL;
-            for( m=0; m<rBase.GetAttrList().Count(); m++ )
+            for( m=0; m<rBase.GetAttrList().size(); m++ )
             {
-                SvMetaAttribute * pAttr = rBase.GetAttrList().GetObject( m );
+                SvMetaAttribute * pAttr = rBase.GetAttrList()[m];
                 if (aSId.equals(pAttr->GetSlotId().getString()))
                 {
                     SvMetaSlot* pSlot = PTR_CAST( SvMetaSlot, pAttr );
@@ -1024,7 +1024,7 @@ void SvMetaSlot::Insert( SvSlotElementList& rList, const rtl::OString& rPrefix,
                 }
             }
 
-            if ( m == rBase.GetAttrList().Count() )
+            if ( m == rBase.GetAttrList().size() )
             {
                 OSL_FAIL("Invalid EnumSlot!");
                 xEnumSlot = Clone();
@@ -1347,7 +1347,7 @@ void SvMetaSlot::WriteSlot( const rtl::OString& rShellName, sal_uInt16 nCount,
         {
             rOutStm << pT->GetName().getString().getStr();
             if( !rBase.FindType( pT, rBase.aUsedTypes ) )
-                rBase.aUsedTypes.Append( pT );
+                rBase.aUsedTypes.push_back( pT );
         }
         else
             rOutStm << "SfxVoidItem not defined";
@@ -1356,7 +1356,7 @@ void SvMetaSlot::WriteSlot( const rtl::OString& rShellName, sal_uInt16 nCount,
     {
         SvMetaType *pT = rBase.FindType( "SfxBoolItem" );
         if ( pT && !rBase.FindType( pT, rBase.aUsedTypes ) )
-            rBase.aUsedTypes.Append( pT );
+            rBase.aUsedTypes.push_back( pT );
     }
 
     if( !bIsEnumSlot )
@@ -1436,13 +1436,13 @@ sal_uInt16 SvMetaSlot::WriteSlotParamArray( SvIdlDataBase & rBase, SvStream & rO
             pType = GetType();
 
         if( !rBase.FindType( pType, rBase.aUsedTypes ) )
-            rBase.aUsedTypes.Append( pType );
+            rBase.aUsedTypes.push_back( pType );
 
         const SvMetaAttributeMemberList & rList =
                     pType->GetAttrList();
-        for( sal_uLong n = 0; n < rList.Count(); n++ )
+        for( sal_uLong n = 0; n < rList.size(); n++ )
         {
-            SvMetaAttribute * pPar  = rList.GetObject( n );
+            SvMetaAttribute * pPar  = rList[n];
             SvMetaType * pPType     = pPar->GetType();
             WriteTab( rOutStm, 1 );
             rOutStm << "SFX_ARGUMENT("
@@ -1452,9 +1452,9 @@ sal_uInt16 SvMetaSlot::WriteSlotParamArray( SvIdlDataBase & rBase, SvStream & rO
                 // item name
                 << pPType->GetName().getString().getStr() << ")," << endl;
             if( !rBase.FindType( pPType, rBase.aUsedTypes ) )
-                rBase.aUsedTypes.Append( pPType );
+                rBase.aUsedTypes.push_back( pPType );
         }
-        return (sal_uInt16)rList.Count();
+        return (sal_uInt16)rList.size();
     }
     return 0;
 }
@@ -1624,15 +1624,16 @@ void SvMetaSlot::WriteCSV( SvIdlDataBase& rBase, SvStream& rStrm )
            if ( GetMethod() )
             pList = &GetMethod()->GetType()->GetAttrList();
 
-        if( pList && pList->Count() )
+        if( pList && !pList->empty() )
         {
             rStrm << "\"(";
-            SvMetaAttribute* pAttr = pList->First();
-            while( pAttr )
+            SvMetaAttributeMemberList::const_iterator it = pList->begin();
+            while( it != pList->end() )
             {
+                SvMetaAttribute* pAttr = *it;
                 pAttr->WriteCSV( rBase, rStrm );
-                pAttr = pList->Next();
-                if( pAttr )
+                ++it;
+                if( it != pList->end() )
                     rStrm << ',';
             }
             rStrm << ")\"";
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index 16e559a..9186857 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -334,10 +334,10 @@ void SvMetaAttribute::WriteParam( SvIdlDataBase & rBase,
         if( pBaseType->GetType() == TYPE_STRUCT )
         {
             const SvMetaAttributeMemberList & rList = pBaseType->GetAttrList();
-            sal_uLong nCount = rList.Count();
+            sal_uLong nCount = rList.size();
             for( sal_uLong i = 0; i < nCount; i++ )
             {
-                rList.GetObject( i )->WriteParam( rBase, rOutStm, nTab, nT );
+                rList[i]->WriteParam( rBase, rOutStm, nTab, nT );
                 if( i+1<nCount )
                 {
                         rOutStm << ',';
@@ -505,7 +505,7 @@ void SvMetaAttribute::WriteRecursiv_Impl( SvIdlDataBase & rBase,
                              WriteType nT, WriteAttribute nA )
 {
     const SvMetaAttributeMemberList & rList = GetType()->GetBaseType()->GetAttrList();
-    sal_uLong nCount = rList.Count();
+    sal_uLong nCount = rList.size();
 
     SvNumberIdentifier slotId = rBase.aStructSlotId;
     if ( !GetSlotId().getString().isEmpty() )
@@ -517,7 +517,7 @@ void SvMetaAttribute::WriteRecursiv_Impl( SvIdlDataBase & rBase,
 
     for( sal_uLong i = 0; i < nCount; i++ )
     {
-        SvMetaAttribute *pAttr = rList.GetObject( i );
+        SvMetaAttribute *pAttr = rList[i];
         if ( nT == WRITE_DOCU )
             pAttr->SetDescription( GetDescription().getString() );
         pAttr->Write( rBase, rOutStm, nTab, nT, nA );
@@ -1130,15 +1130,16 @@ void SvMetaType::WriteContext( SvIdlDataBase & rBase, SvStream & rOutStm,
 {
     if( GetAttrCount() )
     {
-        SvMetaAttribute * pAttr = pAttrList->First();
-        while( pAttr )
+        SvMetaAttributeMemberList::const_iterator it = pAttrList->begin();
+        while( it != pAttrList->end() )
         {
+            SvMetaAttribute * pAttr = *it;
             pAttr->Write( rBase, rOutStm, nTab, nT, nA );
             if( GetType() == TYPE_METHOD )
                 rOutStm << ',' << endl;
             else
                 rOutStm << ';' << endl;
-            pAttr = pAttrList->Next();
+            ++it;
         }
     }
 }
@@ -1337,7 +1338,7 @@ void SvMetaType::ReadContextSvIdl( SvIdlDataBase & rBase,
     if( xAttr->ReadSvIdl( rBase, rInStm ) )
     {
         if( xAttr->Test( rBase, rInStm ) )
-            GetAttrList().Append( xAttr );
+            GetAttrList().push_back( xAttr );
     }
 }
 
@@ -1350,16 +1351,17 @@ void SvMetaType::WriteContextSvIdl
 {
     if( GetAttrCount() )
     {
-        SvMetaAttribute * pAttr = pAttrList->First();
-        while( pAttr )
+        SvMetaAttributeMemberList::const_iterator it = pAttrList->begin();
+        while( it != pAttrList->end() )
         {
+            SvMetaAttribute * pAttr = *it;
             WriteTab( rOutStm, nTab );
             pAttr->WriteSvIdl( rBase, rOutStm, nTab );
             if( GetType() == TYPE_METHOD )
                 rOutStm << ',' << endl;
             else
                 rOutStm << ';' << endl;
-            pAttr = pAttrList->Next();
+            ++it;
         }
     }
 }
@@ -1381,7 +1383,7 @@ sal_uLong SvMetaType::MakeSfx( rtl::OStringBuffer& rAttrArray )
         // write the single attributes
         for( sal_uLong n = 0; n < nAttrCount; n++ )
         {
-            nC += pAttrList->GetObject( n )->MakeSfx( rAttrArray );
+            nC += (*pAttrList)[n]->MakeSfx( rAttrArray );
             if( n +1 < nAttrCount )
                 rAttrArray.append(", ");
         }
@@ -1467,13 +1469,14 @@ void SvMetaType::WriteMethodArgs
             WriteTab( rOutStm, nTab );
             rOutStm << '(' << endl;
 
-            SvMetaAttribute * pAttr = pAttrList->First();
-            while( pAttr )
+            SvMetaAttributeMemberList::const_iterator it = pAttrList->begin();
+            while( it != pAttrList->end() )
             {
+                SvMetaAttribute * pAttr = *it;
                 WriteTab( rOutStm, nTab +1 );
                 pAttr->WriteSvIdl( rBase, rOutStm, nTab +1 );
-                pAttr = pAttrList->Next();
-                if( pAttr )
+                ++it;
+                if( it != pAttrList->end() )
                        rOutStm << ',' << endl;
             }
             rOutStm << endl;
@@ -1489,12 +1492,13 @@ void SvMetaType::WriteMethodArgs
         rOutStm << '(';
         if( GetAttrCount() )
         {
-            SvMetaAttribute * pAttr = pAttrList->First();
-            while( pAttr )
+            SvMetaAttributeMemberList::const_iterator it = pAttrList->begin();
+            while( it != pAttrList->end() )
             {
+                SvMetaAttribute * pAttr = *it;
                 pAttr->WriteParam( rBase, rOutStm, nTab+1, nT );
-                pAttr = pAttrList->Next();
-                if( pAttr )
+                ++it;
+                if( it != pAttrList->end() )
                     rOutStm << ',';
                 else
                     rOutStm << ' ';
@@ -1517,9 +1521,10 @@ void SvMetaType::WriteMethodArgs
         if( GetAttrCount() )
         {
             rOutStm << endl;
-            SvMetaAttribute * pAttr = pAttrList->First();
-            while( pAttr )
+            SvMetaAttributeMemberList::const_iterator it = pAttrList->begin();
+            while( it != pAttrList->end() )
             {
+                SvMetaAttribute* pAttr = *it;
                 switch( nT )
                 {
                     case WRITE_C_HEADER:
@@ -1535,8 +1540,8 @@ void SvMetaType::WriteMethodArgs
                         DBG_ASSERT( sal_False, "WriteType not implemented" );
                     }
                 }
-                pAttr = pAttrList->Next();
-                if( pAttr )
+                ++it;
+                if( it != pAttrList->end() )
                        rOutStm << ',' << endl;
             }
             if( nT != WRITE_C_HEADER && nT != WRITE_C_SOURCE )
@@ -1685,7 +1690,7 @@ rtl::OString SvMetaType::GetParserString() const
         // write the single attributes
         for( sal_uLong n = 0; n < nAttrCount; n++ )
         {
-            SvMetaAttribute * pT = pAttrList->GetObject( n );
+            SvMetaAttribute * pT = (*pAttrList)[n];
             aPStr += pT->GetType()->GetParserString();
         }
     }
@@ -1711,7 +1716,7 @@ void SvMetaType::WriteParamNames( SvIdlDataBase & rBase,
             // write the single attributes
             for( sal_uLong n = 0; n < nAttrCount; n++ )
             {
-                SvMetaAttribute * pA = pAttrList->GetObject( n );
+                SvMetaAttribute * pA = (*pAttrList)[n];
                 rtl::OString aStr = pA->GetName().getString();
                 pA->GetType()->WriteParamNames( rBase, rOutStm, aStr );
                 if( n +1 < nAttrCount )
@@ -1822,7 +1827,7 @@ void SvMetaTypeEnum::Save( SvPersistStream & rStm )
 
     // create mask
     sal_uInt8 nMask = 0;
-    if( aEnumValueList.Count() )    nMask |= 0x01;
+    if( !aEnumValueList.empty() )   nMask |= 0x01;
     if( !aPrefix.isEmpty() )        nMask |= 0x02;
 
     // write data
@@ -1856,7 +1861,7 @@ void SvMetaTypeEnum::ReadContextSvIdl( SvIdlDataBase & rBase,
     sal_Bool bOk = aEnumVal->ReadSvIdl( rBase, rInStm );
     if( bOk )
     {
-        if( 0 == aEnumValueList.Count() )
+        if( aEnumValueList.empty() )
         {
            // the first
            aPrefix = aEnumVal->GetName().getString();
@@ -1865,7 +1870,7 @@ void SvMetaTypeEnum::ReadContextSvIdl( SvIdlDataBase & rBase,
         {
             aPrefix = getCommonSubPrefix(aPrefix, aEnumVal->GetName().getString());
         }
-        aEnumValueList.Append( aEnumVal );
+        aEnumValueList.push_back( aEnumVal );
     }
     if( !bOk )
         rInStm.Seek( nTokPos );
@@ -1876,10 +1881,10 @@ void SvMetaTypeEnum::WriteContextSvIdl( SvIdlDataBase & rBase,
                                         sal_uInt16 nTab )
 {
     WriteTab( rOutStm, nTab +1 );
-    for( sal_uLong n = 0; n < aEnumValueList.Count(); n++ )
+    for( sal_uLong n = 0; n < aEnumValueList.size(); n++ )
     {
-        aEnumValueList.GetObject( n )->WriteSvIdl( rBase, rOutStm, nTab );
-        if( n +1 != aEnumValueList.Count() )
+        aEnumValueList[n]->WriteSvIdl( rBase, rOutStm, nTab );
+        if( n + 1 != aEnumValueList.size() )
             rOutStm << ", ";
         else
             rOutStm << endl;
@@ -1921,11 +1926,11 @@ void SvMetaTypeEnum::WriteContext( SvIdlDataBase & rBase, SvStream & rOutStm,
                                  WriteType nT, WriteAttribute nA )
 {
     WriteTab( rOutStm, nTab +1 );
-    for( sal_uLong n = 0; n < aEnumValueList.Count(); n++ )
+    for( sal_uLong n = 0; n < aEnumValueList.size(); n++ )
     {
-        aEnumValueList.GetObject( n )->Write( rBase, rOutStm, nTab +1, nT, nA );
+        aEnumValueList[n]->Write( rBase, rOutStm, nTab +1, nT, nA );
 
-        if( n +1 != aEnumValueList.Count() )
+        if( n + 1 != aEnumValueList.size() )
         {
             if( 2 == n % 3 )
             {
@@ -1987,8 +1992,8 @@ rtl::OString SvMetaAttribute::Compare( SvMetaAttribute* pAttr )
                 {
                     for ( sal_uInt16 n=0; n<nCount; n++ )
                     {
-                        SvMetaAttribute *pAttr1 = rList.GetObject(n);
-                        SvMetaAttribute *pAttr2 = rOtherList.GetObject(n);
+                        SvMetaAttribute *pAttr1 = rList[n];
+                        SvMetaAttribute *pAttr2 = rOtherList[n];
                         pAttr1->Compare( pAttr2 );
                     }
                 }
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index 3ba44ef..b68862a 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -47,15 +47,15 @@ SvIdlDataBase::~SvIdlDataBase()
 }
 
 #define ADD_TYPE( Name, OdlName, ParserChar, CName, BasName, BasPost )            \
-    aTypeList.Append( new SvMetaType( SvHash_##Name()->GetName(),   \
+    aTypeList.push_back( new SvMetaType( SvHash_##Name()->GetName(),   \
                      BasName, OdlName, ParserChar, CName, BasName, BasPost ) );
 
 SvMetaTypeMemberList & SvIdlDataBase::GetTypeList()
 {
-    if( aTypeList.Count() == 0 )
+    if( aTypeList.empty() )
     { // fill initially
-        aTypeList.Append( new SvMetaTypeString() );
-        aTypeList.Append( new SvMetaTypevoid() );
+        aTypeList.push_back( new SvMetaTypeString() );
+        aTypeList.push_back( new SvMetaTypevoid() );
 
         // MI: IDispatch::Invoke can not unsigned
         ADD_TYPE( UINT16,    "long", 'h', "unsigned short", "Long", "&" );
@@ -78,9 +78,9 @@ SvMetaTypeMemberList & SvIdlDataBase::GetTypeList()
 
 SvMetaModule * SvIdlDataBase::GetModule( const rtl::OString& rName )
 {
-    for( sal_uLong n = 0; n < aModuleList.Count(); n++ )
-        if( aModuleList.GetObject( n )->GetName().getString().equals(rName) )
-            return aModuleList.GetObject( n );
+    for( sal_uLong n = 0; n < aModuleList.size(); n++ )
+        if( aModuleList[n]->GetName().getString().equals(rName) )
+            return aModuleList[n];
     return NULL;
 }
 
@@ -98,7 +98,7 @@ sal_Bool SvIdlDataBase::IsBinaryFormat( SvStream & rStm )
 
 void SvIdlDataBase::Load( SvStream & rStm )
 {
-    DBG_ASSERT( aTypeList.Count() == 0, "type list already initialized" );
+    DBG_ASSERT( aTypeList.empty(), "type list already initialized" );
     SvPersistStream aPStm( *IDLAPP->pClassMgr, &rStm );
 
     sal_uInt16  nVersion = 0;
@@ -141,11 +141,11 @@ void SvIdlDataBase::Save( SvStream & rStm, sal_uInt32 nFlags )
     if( bOnlyStreamedObjs )
     {
         SvMetaClassMemberList aList;
-        for( sal_uLong n = 0; n < GetModuleList().Count(); n++ )
+        for( sal_uLong n = 0; n < GetModuleList().size(); n++ )
         {
-            SvMetaModule * pModule = GetModuleList().GetObject( n );
+            SvMetaModule * pModule = GetModuleList()[n];
             if( !pModule->IsImported() )
-                aList.Append( pModule->GetClassList() );
+                aList.insert( pModule->GetClassList() );
         }
         aPStm << aList;
     }
@@ -347,18 +347,18 @@ sal_Bool SvIdlDataBase::ReadIdFile( const String & rFileName )
 SvMetaType * SvIdlDataBase::FindType( const SvMetaType * pPType,
                                     SvMetaTypeMemberList & rList )
 {
-    SvMetaType * pType = rList.First();
-    while( pType && pPType != pType )
-        pType = rList.Next();
-    return pType;
+    for( SvMetaTypeMemberList::const_iterator it = rList.begin(); it != rList.end(); ++it )
+        if( *it == pPType )
+            return *it;
+    return NULL;
 }
 
 SvMetaType * SvIdlDataBase::FindType( const rtl::OString& rName )
 {
-    SvMetaType * pType = aTypeList.First();
-    while( pType && !rName.equals(pType->GetName().getString()) )
-        pType = aTypeList.Next();
-    return pType;
+    for( SvMetaTypeMemberList::const_iterator it = aTypeList.begin(); it != aTypeList.end(); ++it )
+        if( rName.equals((*it)->GetName().getString()) )
+            return *it;
+    return NULL;
 }
 
 SvMetaType * SvIdlDataBase::ReadKnownType( SvTokenStream & rInStm )
@@ -404,12 +404,16 @@ SvMetaType * SvIdlDataBase::ReadKnownType( SvTokenStream & rInStm )
     {
         rtl::OString aName = pTok->GetString();
         SvMetaTypeMemberList & rList = GetTypeList();
-        SvMetaType * pType = rList.First();
-        while( pType )
+        SvMetaTypeMemberList::const_iterator it = rList.begin();
+        SvMetaType * pType = NULL;
+        while( it != rList.end() )
         {
-            if( pType->GetName().getString().equals(aName) )
+            if( (*it)->GetName().getString().equals(aName) )
+            {
+                pType = *it;
                 break;
-            pType = rList.Next();
+            }
+            ++it;
         }
         if( pType )
         {
@@ -436,7 +440,7 @@ SvMetaType * SvIdlDataBase::ReadKnownType( SvTokenStream & rInStm )
                 // is exactly this type
                 return pType;
 
-            DBG_ASSERT( aTmpTypeList.First(), "mindestens ein Element" );
+            DBG_ASSERT( aTmpTypeList.front(), "mindestens ein Element" );
             SvMetaTypeRef xType = new SvMetaType( pType->GetName().getString(), 'h', "dummy" );
             xType->SetRef( pType );
             xType->SetIn( bIn );
@@ -444,7 +448,7 @@ SvMetaType * SvIdlDataBase::ReadKnownType( SvTokenStream & rInStm )
             xType->SetCall0( nCall0 );
             xType->SetCall1( nCall1 );
 
-            aTmpTypeList.Append( xType );
+            aTmpTypeList.push_back( xType );
             return xType;
         }
     }
@@ -473,9 +477,9 @@ SvMetaAttribute * SvIdlDataBase::ReadKnownAttr
             sal_uLong n;
             if( FindId( pTok->GetString(), &n ) )
             {
-                for( sal_uLong i = 0; i < aAttrList.Count(); i++ )
+                for( sal_uLong i = 0; i < aAttrList.size(); i++ )
                 {
-                    SvMetaAttribute * pAttr = aAttrList.GetObject( i );
+                    SvMetaAttribute * pAttr = aAttrList[i];
                     if( pAttr->GetSlotId().getString().equals(pTok->GetString()) )
                         return pAttr;
                 }
@@ -499,9 +503,9 @@ SvMetaAttribute* SvIdlDataBase::SearchKnownAttr
     sal_uLong n;
     if( FindId( rId.getString(), &n ) )
     {
-        for( sal_uLong i = 0; i < aAttrList.Count(); i++ )
+        for( sal_uLong i = 0; i < aAttrList.size(); i++ )
         {
-            SvMetaAttribute * pAttr = aAttrList.GetObject( i );
+            SvMetaAttribute * pAttr = aAttrList[i];
             if( pAttr->GetSlotId().getString() == rId.getString() )
                 return pAttr;
         }
@@ -516,9 +520,9 @@ SvMetaClass * SvIdlDataBase::ReadKnownClass( SvTokenStream & rInStm )
     SvToken * pTok = rInStm.GetToken_Next();
 
     if( pTok->IsIdentifier() )
-        for( sal_uLong n = 0; n < aClassList.Count(); n++ )
+        for( sal_uLong n = 0; n < aClassList.size(); n++ )
         {
-            SvMetaClass * pClass = aClassList.GetObject( n );
+            SvMetaClass * pClass = aClassList[n];
             if( pClass->GetName().getString().equals(pTok->GetString()) )
                 return pClass;
         }
@@ -681,7 +685,7 @@ sal_Bool SvIdlWorkingBase::ReadSvIdl( SvTokenStream & rInStm, sal_Bool bImported
         {
             SvMetaModuleRef aModule = new SvMetaModule( rInStm.GetFileName(), bImported );
             if( aModule->ReadSvIdl( *this, rInStm ) )
-                GetModuleList().Append( aModule );
+                GetModuleList().push_back( aModule );
             else
                 bOk = sal_False;
         }
@@ -717,9 +721,9 @@ sal_Bool SvIdlWorkingBase::WriteSvIdl( SvStream & rOutStm )
         }
     }
 
-    for( sal_uLong n = 0; n < GetModuleList().Count(); n++ )
+    for( sal_uLong n = 0; n < GetModuleList().size(); n++ )
     {
-        SvMetaModule * pModule = GetModuleList().GetObject( n );
+        SvMetaModule * pModule = GetModuleList()[n];
         pModule->WriteSvIdl( *this, rOutStm, 0 );
     }
     return sal_True;
@@ -734,19 +738,19 @@ sal_Bool SvIdlWorkingBase::WriteSfx( SvStream & rOutStm )
     WriteReset();
     SvMemoryStream aTmpStm( 256000, 256000 );
     sal_uLong n;
-    for( n = 0; n < GetModuleList().Count(); n++ )
+    for( n = 0; n < GetModuleList().size(); n++ )
     {
-        SvMetaModule * pModule = GetModuleList().GetObject( n );
+        SvMetaModule * pModule = GetModuleList()[n];
         if( !pModule->IsImported() )
             pModule->WriteSfx( *this, aTmpStm );
         aTmpStm.Seek( 0 );
     }
-    for( n = 0; n < aUsedTypes.Count(); n++ )
+    for( n = 0; n < aUsedTypes.size(); n++ )
     {
-        SvMetaType * pType = aUsedTypes.GetObject( n );
+        SvMetaType * pType = aUsedTypes[n];
         pType->WriteSfx( *this, rOutStm );
     }
-    aUsedTypes.Clear();
+    aUsedTypes.clear();
     rOutStm << aTmpStm;
     return sal_True;
 }
@@ -758,16 +762,16 @@ sal_Bool SvIdlWorkingBase::WriteHelpIds( SvStream& rOutStm )
 
     HelpIdTable aIdTable;
     sal_uLong n;
-    for( n = 0; n < GetModuleList().Count(); n++ )
+    for( n = 0; n < GetModuleList().size(); n++ )
     {
-        SvMetaModule * pModule = GetModuleList().GetObject( n );
+        SvMetaModule * pModule = GetModuleList()[n];
         pModule->WriteHelpIds( *this, rOutStm, aIdTable );
     }
 
     const SvMetaAttributeMemberList & rAttrList = GetAttrList();
-    for( n = 0; n < rAttrList.Count(); n++ )
+    for( n = 0; n < rAttrList.size(); n++ )
     {
-        SvMetaAttribute * pAttr = rAttrList.GetObject( n );
+        SvMetaAttribute * pAttr = rAttrList[n];
         pAttr->WriteHelpId( *this, rOutStm, aIdTable );
     }
 
@@ -786,7 +790,7 @@ void SvIdlDataBase::StartNewFile( const String& rName )
 
 void SvIdlDataBase::AppendAttr( SvMetaAttribute *pAttr )
 {
-    aAttrList.Append( pAttr );
+    aAttrList.push_back( pAttr );
     if ( bExport )
         pAttr->SetNewAttribute( sal_True );
 }
@@ -794,12 +798,12 @@ void SvIdlDataBase::AppendAttr( SvMetaAttribute *pAttr )
 sal_Bool SvIdlWorkingBase::WriteCSV( SvStream& rStrm )
 {
     SvMetaAttributeMemberList &rList = GetAttrList();
-    sal_uLong nCount = rList.Count();
+    sal_uLong nCount = rList.size();
     for ( sal_uLong n=0; n<nCount; n++ )
     {
-        if ( rList.GetObject(n)->IsNewAttribute() )
+        if ( rList[n]->IsNewAttribute() )
         {
-            rList.GetObject(n)->WriteCSV( *this, rStrm );
+            rList[n]->WriteCSV( *this, rStrm );
         }
     }
 
@@ -814,9 +818,9 @@ sal_Bool SvIdlWorkingBase::WriteDocumentation( SvStream & rOutStm )
     if( rOutStm.GetError() != SVSTREAM_OK )
         return sal_False;
 
-    for( sal_uLong n = 0; n < GetModuleList().Count(); n++ )
+    for( sal_uLong n = 0; n < GetModuleList().size(); n++ )
     {
-        SvMetaModule * pModule = GetModuleList().GetObject( n );
+        SvMetaModule * pModule = GetModuleList()[n];
         if( !pModule->IsImported() )
             pModule->Write( *this, rOutStm, 0, WRITE_DOCU );
     }
diff --git a/sd/source/filter/eppt/text.hxx b/sd/source/filter/eppt/text.hxx
index aadd938..8f5c257 100644
--- a/sd/source/filter/eppt/text.hxx
+++ b/sd/source/filter/eppt/text.hxx
@@ -35,6 +35,7 @@
 #include <rtl/textenc.h>
 #include <com/sun/star/awt/FontDescriptor.hpp>
 #include <com/sun/star/lang/Locale.hpp>
+#include <tools/list.hxx>
 
 namespace com { namespace sun { namespace star {
 namespace awt { struct FontDescriptor; }
diff --git a/svtools/source/graphic/grfcache.hxx b/svtools/source/graphic/grfcache.hxx
index efcfda8..5c79e51 100644
--- a/svtools/source/graphic/grfcache.hxx
+++ b/svtools/source/graphic/grfcache.hxx
@@ -31,6 +31,7 @@
 
 #include <vcl/graph.hxx>
 #include <vcl/timer.hxx>
+#include <tools/list.hxx>
 #include <svtools/grfmgr.hxx>
 #include <list>
 
diff --git a/svx/inc/svx/svdlayer.hxx b/svx/inc/svx/svdlayer.hxx
index 25b27ef..aac75c9 100644
--- a/svx/inc/svx/svdlayer.hxx
+++ b/svx/inc/svx/svdlayer.hxx
@@ -31,6 +31,7 @@
 
 #include <tools/string.hxx>
 #include <tools/stream.hxx>
+#include <tools/contnr.hxx>
 #include <svx/svdsob.hxx>
 #include <svx/svdtypes.hxx> // fuer typedef SdrLayerID
 #include "svx/svxdllapi.h"
diff --git a/svx/inc/svx/xtable.hxx b/svx/inc/svx/xtable.hxx
index eaca035..f09b68e 100644
--- a/svx/inc/svx/xtable.hxx
+++ b/svx/inc/svx/xtable.hxx
@@ -41,6 +41,7 @@
 
 #include <tools/color.hxx>
 #include <tools/string.hxx>
+#include <tools/list.hxx>
 
 #include <cppuhelper/weak.hxx>
 
diff --git a/tools/inc/tools/pstm.hxx b/tools/inc/tools/pstm.hxx
index 64a3b64..1cb882a 100644
--- a/tools/inc/tools/pstm.hxx
+++ b/tools/inc/tools/pstm.hxx
@@ -104,35 +104,50 @@ public:
 SV_DECL_IMPL_REF(SvPersistBase)
 
 /*************************************************************************/
-// Damit die Liste, anders benannt wird
-typedef SvPersistBase SuperSvPersistBase;
-SV_DECL_REF_LIST_VISIBILITY(SuperSvPersistBase,SuperSvPersistBase*,TOOLS_DLLPUBLIC)
-SV_IMPL_REF_LIST(SuperSvPersistBase,SuperSvPersistBase*)
 
-class TOOLS_DLLPUBLIC SvPersistBaseMemberList : public SuperSvPersistBaseMemberList
+class SvPersistListWriteable
 {
 public:
-    SvPersistBaseMemberList();
-
-    void   WriteObjects( SvPersistStream &, sal_Bool bOnlyStreamedObj = sal_False ) const;
-    TOOLS_DLLPUBLIC friend SvPersistStream& operator << (SvPersistStream &, const SvPersistBaseMemberList &);
-    TOOLS_DLLPUBLIC friend SvPersistStream& operator >> (SvPersistStream &, SvPersistBaseMemberList &);
+    virtual ~SvPersistListWriteable() {}
+    virtual size_t size() const = 0;
+    virtual SvPersistBase* GetPersistBase(size_t idx) const = 0;
+};
+class SvPersistListReadable
+{
+public:
+    virtual ~SvPersistListReadable() {}
+    virtual void push_back(SvPersistBase* p) = 0;
 };
 
-/*************************************************************************/
-#define SV_DECL_PERSIST_LIST(ClassName,EntryName)\
-class ClassName##MemberList : public SvPersistBaseMemberList\
-{\
-public:\
-    PRV_SV_DECL_MEMBER_LIST(ClassName,EntryName)\
+void TOOLS_DLLPUBLIC WritePersistListObjects(const SvPersistListWriteable& rList, SvPersistStream & rStm, bool bOnlyStreamed = false );
+
+void TOOLS_DLLPUBLIC ReadObjects( SvPersistListReadable& rLst, SvPersistStream & rStm);
+
+// T has to be a subtype of "SvPersistBase*"
+template<typename T>
+class SvDeclPersistList : public SvRefMemberList<T>, public SvPersistListWriteable, public SvPersistListReadable
+{
+public:
+   // implement the reader/writer adapter methods
+    size_t size() const { return SvRefMemberList<T>::size(); }
+    SvPersistBase* GetPersistBase(size_t idx) const { return SvRefMemberList<T>::operator[](idx); }
+    void push_back(SvPersistBase* p) { SvRefMemberList<T>::push_back(static_cast<T>(p)); }
+    void WriteObjects(SvPersistStream & rStm, bool bOnlyStreamed ) const { WritePersistListObjects(*this, rStm, bOnlyStreamed); }
 };
 
-#define SV_IMPL_PERSIST_LIST(ClassName,EntryName)\
-    PRV_SV_IMPL_MEMBER_LIST(ClassName,EntryName,SvPersistBaseMemberList)
+template<typename T>
+TOOLS_DLLPUBLIC SvPersistStream& operator << (SvPersistStream &rStm, const SvDeclPersistList<T> &rLst)
+{
+    WritePersistListObjects( rLst, rStm );
+    return rStm;
+};
 
-#define SV_DECL_IMPL_PERSIST_LIST(ClassName,EntryName)\
-SV_DECL_PERSIST_LIST(ClassName,EntryName)\
-SV_IMPL_PERSIST_LIST(ClassName,EntryName)
+template<typename T>
+TOOLS_DLLPUBLIC SvPersistStream& operator >> (SvPersistStream &rStm, SvDeclPersistList<T> &rLst)
+{
+    ReadObjects( rLst, rStm );
+    return rStm;
+};
 
 typedef UniqueIndex<SvPersistBase> SvPersistUIdx;
 
diff --git a/tools/inc/tools/ref.hxx b/tools/inc/tools/ref.hxx
index 7a3257e..5e33c79 100644
--- a/tools/inc/tools/ref.hxx
+++ b/tools/inc/tools/ref.hxx
@@ -20,7 +20,7 @@
 #define _REF_HXX
 
 #include "tools/toolsdllapi.h"
-#include <tools/list.hxx>
+#include <vector>
 
 //=========================================================================
 
@@ -101,222 +101,59 @@ PRV_SV_IMPL_REF_COUNTERS( ClassName, Lock, OwnerLock( sal_True ),       \
 
 
 /************************** S v R e f L i s t ****************************/
-#define PRV_SV_DECL_REF_LIST(CN,EN,vis) \
-class CN##List : private List                                           \
-{                                                                       \
-public:                                                                 \
-            using List::Clear;                                          \
-            using List::Count;                                          \
-            using List::GetCurPos;                                      \
-                                                                        \
-            CN##List( sal_uInt16 _nInitSize = 16, sal_uInt16 _nReSize = 16 )  \
-                : List( _nInitSize, _nReSize ) {}                       \
-            CN##List( sal_uInt16 _nBlockSize, sal_uInt16 _nInitSize,    \
-                           sal_uInt16 _nReSize )                        \
-                : List( _nBlockSize, _nInitSize, _nReSize ) {}          \
-            CN##List( const CN##List& rClassName )                      \
-                : List( rClassName ) {}                                 \
-                                                                        \
-    void    Insert( EN p, sal_uIntPtr nIndex )                          \
-                { List::Insert( (void*)p, nIndex ); }                   \
-    void    Insert( EN p )                                              \
-                { List::Insert( (void*)p ); }                           \
-    EN      Remove()                                                    \
-                { return (EN)List::Remove(); }                          \
-    EN      Remove( sal_uIntPtr nIndex )                                \
-                { return (EN)List::Remove( nIndex ); }                  \
-    EN      Remove( EN p )                                              \
-                { return (EN)List::Remove( (void*)p ); }                \
-    EN      Replace( EN p, sal_uIntPtr nIndex )                         \
-                { return (EN)List::Replace( (void*)p, nIndex ); }       \
-    EN      Replace( EN pNew, EN pOld )                                 \
-                { return (EN)List::Replace( (void*)pNew, (void*)pOld ); }   \
-                                                                        \
-    EN      GetCurObject() const                                        \
-                { return (EN)List::GetCurObject(); }                    \
-    EN      GetObject( sal_uIntPtr nIndex ) const                       \
-                { return (EN)List::GetObject( nIndex ); }               \
-    sal_uIntPtr GetPos( const EN p ) const                              \
-                { return List::GetPos( (const void*)p ); }              \
-                                                                        \
-    EN      Seek( sal_uIntPtr nIndex )                                  \
-                { return (EN)List::Seek( nIndex ); }                    \
-    EN      Seek( void* p ) { return (EN)List::Seek( p ); }             \
-    EN      First()         { return (EN)List::First(); }               \
-    EN      Last()          { return (EN)List::Last(); }                \
-    EN      Next()          { return (EN)List::Next(); }                \
-    EN      Prev()          { return (EN)List::Prev(); }                \
-                                                                        \
-    CN##List&  operator =( const CN##List& rClassName )                 \
-                    { List::operator =( rClassName ); return *this; }   \
-                                                                        \
-    sal_Bool        operator ==( const CN##List& rList ) const          \
-                    { return List::operator ==( rList ); }              \
-    sal_Bool        operator !=( const CN##List& rList ) const          \
-                    { return List::operator !=( rList ); }              \
-};                                                                      \
-class vis CN##MemberList : public CN##List\
-{\
-public:\
-    inline CN##MemberList();\
-    inline CN##MemberList(sal_uInt16 nInitSz, sal_uInt16 nResize );\
-    inline CN##MemberList( const CN##MemberList & rRef );\
-    inline ~CN##MemberList();\
-    inline CN##MemberList & operator =( const CN##MemberList & rRef );\
-    inline void Clear();\
-    inline void Insert( EN p )\
-        {\
-            CN##List::Insert( p );\
-            p->AddRef();\
-        }\
-    inline void Insert( EN p, sal_uIntPtr nIndex )\
-        {\
-            CN##List::Insert( p, nIndex );\
-            p->AddRef();\
-        }\
-    inline void Append( EN p ) { Insert( p, LIST_APPEND ); }\
-    inline EN   Remove();\
-    inline EN   Remove( sal_uIntPtr nIndex );\
-    inline EN   Remove( EN p );\
-    inline EN   Replace( EN p, sal_uIntPtr nIndex );\
-    inline EN   Replace( EN pNew, EN pOld );\
-    inline void Append( const CN##MemberList & );\
+template<typename T>
+class SvRefMemberList : private std::vector<T>
+{
+private:
+    typedef typename std::vector<T> base_t;
+public:
+    using base_t::size;
+    using base_t::front;
+    using base_t::back;
+    using base_t::operator[];
+    using base_t::begin;
+    using base_t::end;
+    using base_t::iterator;
+    using base_t::const_iterator;
+    using base_t::rbegin;
+    using base_t::rend;
+    using base_t::reverse_iterator;
+    using base_t::empty;
+
+    inline ~SvRefMemberList() { clear(); }
+    inline void clear()
+        {
+            for( typename base_t::const_iterator it = base_t::begin(); it != base_t::end(); ++it )
+            {
+                  T p = *it;
+                  if( p )
+                      p->ReleaseReference();
+            }
+            base_t::clear();
+        }
+    inline void push_back( T p )
+        {
+            base_t::push_back( p );
+            p->AddRef();
+        }
+    inline void insert(const SvRefMemberList& rOther)
+       {
+           for( typename base_t::const_iterator it = rOther.begin(); it != rOther.end(); ++it )
+           {
+               push_back(*it);
+           }
+       }
+    inline T pop_back()
+        {
+            T p = base_t::back();
+            base_t::pop_back();
+            if( p )
+                p->ReleaseReference();
+            return p;
+        }
 };
 
 
-#define SV_DECL_REF_LIST(CN,EN) \
-PRV_SV_DECL_REF_LIST(CN,EN,/* empty */)
-
-#define SV_DECL_REF_LIST_VISIBILITY(CN,EN,vis) \
-PRV_SV_DECL_REF_LIST(CN,EN,vis)
-
-/************************** S v R e f L i s t ****************************/
-#define SV_IMPL_REF_LIST( CN, EN ) \
-inline CN##MemberList::CN##MemberList(){}\
-inline CN##MemberList::CN##MemberList(sal_uInt16 nInitSz, sal_uInt16 nResize )\
-    : CN##List( nInitSz, nResize ){}\
-inline CN##MemberList::CN##MemberList( const CN##MemberList & rRef ) \
-      : CN##List( rRef ) \
-{\
-    sal_uIntPtr nOldCount = Count(); \
-    EN pEntry = First(); \
-    while( pEntry ) \
-    { pEntry->AddRef(); pEntry = Next(); } \
-    Seek( nOldCount ); /* auch Curser gleich */ \
-}\
-inline CN##MemberList::~CN##MemberList() { Clear(); } \
-inline CN##MemberList & CN##MemberList::operator = \
-                    ( const CN##MemberList & rRef ) \
-{\
-    CN##MemberList & rList = (CN##MemberList &)rRef; \
-    sal_uIntPtr nOldCount = rList.Count(); \
-    /* Count der Objekte erhoehen */ \
-    EN pEntry = rList.First(); \
-    while( pEntry ) \
-    { pEntry->AddRef(); pEntry = rList.Next(); } \
-    rList.Seek( nOldCount ); /* Curser zurueck */ \
-    /* Liste kopieren */ \
-    Clear(); \
-    CN##List::operator = ( rRef ); \
-    return *this; \
-}\
-inline void        CN##MemberList::Clear() \
-{\
-    EN pEntry = Last();\
-    while( NULL != pEntry )\
-        pEntry = Remove();\
-}\
-inline EN CN##MemberList::Remove() \
-{\
-    EN p = CN##List::Remove(); \
-    if( p ) p->ReleaseReference(); return p; \
-}\
-inline EN CN##MemberList::Remove( sal_uIntPtr nIndex ) \
-{\
-    EN p = CN##List::Remove( nIndex ); \
-    if( p ) p->ReleaseReference(); return p; \
-}\
-inline EN CN##MemberList::Remove( EN p ) \
-{\
-    p = CN##List::Remove( p ); \
-    if( p ) p->ReleaseReference(); return p; \
-}\
-inline EN CN##MemberList::Replace( EN p, sal_uIntPtr nIndex ) \
-{\
-    p->AddRef(); p = CN##List::Replace( p, nIndex ); \
-    if( p ) p->ReleaseReference(); return p; \
-}\
-inline EN CN##MemberList::Replace( EN pNew, EN pOld ) \
-{\
-    pNew->AddRef(); CN##List::Replace( pNew, pOld ); \
-    if( pOld ) pOld->ReleaseReference(); return pOld; \
-}\
-inline void CN##MemberList::Append( const CN##MemberList & rList )\
-{\
-    for( sal_uIntPtr i = 0; i < rList.Count(); i++ )\
-        Append( rList.GetObject( i ) );\
-}
-
-/************************** S v M e m b e r L i s t **********************/
-#define PRV_SV_DECL_MEMBER_LIST(Class,EntryName)        \
-       Class##MemberList() {}                           \
-inline void Insert( EntryName p );                      \
-inline void Insert( EntryName p, sal_uIntPtr nIndex );        \
-inline void Append( EntryName p );                      \
-inline EntryName   Remove();                            \
-inline EntryName   Remove( sal_uIntPtr nIndex );              \
-inline EntryName   Remove( EntryName p );               \
-inline EntryName   Replace( EntryName p, sal_uIntPtr nIndex );\
-inline EntryName   Replace( EntryName pNew, EntryName pOld );\
-inline EntryName   GetCurObject() const;\
-inline EntryName   GetObject( sal_uIntPtr nIndex ) const;\
-inline sal_uIntPtr       GetPos( const EntryName ) const;\
-inline EntryName Seek( sal_uIntPtr nIndex );\

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list