[Libreoffice-commits] .: 10 commits - basic/source editeng/inc editeng/source idl/inc idl/source

Joseph Powers jpowers at kemper.freedesktop.org
Fri Dec 31 07:00:31 PST 2010


 basic/source/app/app.cxx             |  169 ++++++++++++++++----------
 basic/source/app/app.hxx             |   16 +-
 basic/source/app/appwin.cxx          |    2 
 basic/source/app/appwin.hxx          |    7 -
 basic/source/app/status.cxx          |    4 
 editeng/inc/editeng/outliner.hxx     |   15 --
 editeng/source/editeng/editdoc.cxx   |  117 ++++++++++++------
 editeng/source/editeng/editdoc.hxx   |   36 ++++-
 editeng/source/editeng/impedit4.cxx  |  106 ++++++++--------
 editeng/source/outliner/outliner.cxx |   71 ++++++----
 idl/inc/attrib.hxx                   |   79 ------------
 idl/inc/basobj.hxx                   |   30 ----
 idl/inc/command.hxx                  |    7 -
 idl/inc/hash.hxx                     |    9 -
 idl/inc/module.hxx                   |    4 
 idl/inc/object.hxx                   |   10 -
 idl/source/cmptools/hash.cxx         |   14 --
 idl/source/objects/basobj.cxx        |    3 
 idl/source/objects/module.cxx        |   46 -------
 idl/source/objects/object.cxx        |  226 +++--------------------------------
 idl/source/objects/slot.cxx          |   29 +---
 idl/source/objects/types.cxx         |    3 
 idl/source/prj/command.cxx           |   37 ++---
 idl/source/prj/database.cxx          |   81 ++----------
 24 files changed, 415 insertions(+), 706 deletions(-)

New commits:
commit 4e69ce291af48ba34e6c0e0166c9e7851080f9cc
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Thu Dec 30 07:02:52 2010 -0800

    Remove DECLARE_LIST( SvMetaClassList, SvMetaClass* )

diff --git a/idl/inc/object.hxx b/idl/inc/object.hxx
index eaafe66..3f70af8 100644
--- a/idl/inc/object.hxx
+++ b/idl/inc/object.hxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -32,6 +32,7 @@
 #define _SVSTDARR_ULONGS
 #include <types.hxx>
 #include <slot.hxx>
+#include <vector>
 
 struct SvSlotElement
 {
@@ -43,8 +44,9 @@ struct SvSlotElement
              {}
 };
 DECLARE_LIST( SvSlotElementList, SvSlotElement* )
+
 class SvMetaClass;
-DECLARE_LIST( SvMetaClassList, SvMetaClass* )
+typedef ::std::vector< SvMetaClass* > SvMetaClassList;
 
 class SvULongs : public List
 {
@@ -95,9 +97,6 @@ class SvMetaClass : public SvMetaType
     SvBOOL          			aAutomation;
     SvMetaClassRef				xAutomationInterface;
 
-//    void                FillSbxMemberObject( SvIdlDataBase & rBase,
-//                                            SbxObject *, StringList &,
-//                                            BOOL bVariable );
     BOOL 				TestAttribute( SvIdlDataBase & rBase, SvTokenStream & rInStm,
                                      SvMetaAttribute & rAttr ) const;
 #ifdef IDL_COMPILER
@@ -141,7 +140,6 @@ public:
                         { return aSuperClass; }
 
     void				FillClasses( SvMetaClassList & rList );
-//    virtual void        FillSbxObject( SvIdlDataBase & rBase, SbxObject * );
 
     const SvClassElementMemberList&
                         GetClassList() const
diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index 025338b..1ccbf99 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -565,10 +565,11 @@ void SvMetaClass::InsertSlots( SvSlotElementList& rList, SvULongs& rSuperList,
                             const ByteString & rPrefix, SvIdlDataBase& rBase)
 {
     // Wurde diese Klasse schon geschrieben ?
-    if ( rClassList.GetPos(this) != LIST_ENTRY_NOTFOUND )
-        return;
+    for ( size_t i = 0, n = rClassList.size(); i < n ; ++i )
+        if ( rClassList[ i ] == this )
+            return;
 
-    rClassList.Insert(this, LIST_APPEND);
+    rClassList.push_back( this );
 
     // alle direkten Attribute schreiben
     ULONG n;
@@ -630,22 +631,23 @@ void SvMetaClass::InsertSlots( SvSlotElementList& rList, SvULongs& rSuperList,
 void SvMetaClass::FillClasses( SvMetaClassList & rList )
 {
     // Bin ich noch nicht drin ?
-    if ( rList.GetPos(this) == LIST_ENTRY_NOTFOUND )
-    {
-        rList.Insert(this, LIST_APPEND);
+    for ( size_t i = 0, n = rList.size(); i < n; ++i )
+        if ( rList[ i ] == this )
+            return;
 
-        // Meine Imports
-        for( ULONG n = 0; n < aClassList.Count(); n++ )
-        {
-            SvClassElement * pEle = aClassList.GetObject( n );
-            SvMetaClass * pCl = pEle->GetClass();
-            pCl->FillClasses( rList );
-        }
+    rList.push_back( this );
 
-        // Meine Superklasse
-        if( aSuperClass.Is() )
-            aSuperClass->FillClasses( rList );
+    // Meine Imports
+    for( ULONG n = 0; n < aClassList.Count(); n++ )
+    {
+        SvClassElement * pEle = aClassList.GetObject( n );
+        SvMetaClass * pCl = pEle->GetClass();
+        pCl->FillClasses( rList );
     }
+
+    // Meine Superklasse
+    if( aSuperClass.Is() )
+        aSuperClass->FillClasses( rList );
 }
 
 
commit d79e961a937a3da77acfbeb5fcaef05e9f543b19
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Wed Dec 29 08:15:59 2010 -0800

    Remove DECLARE_LIST( SvNamePosList, SvNamePos *)

diff --git a/idl/inc/module.hxx b/idl/inc/module.hxx
index d9f13d3..060d5b3 100644
--- a/idl/inc/module.hxx
+++ b/idl/inc/module.hxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -40,7 +40,6 @@ struct SvNamePos
         : aUUId( rName )
         , nStmPos( nPos ) {}
 };
-DECLARE_LIST( SvNamePosList, SvNamePos *)
 
 /******************** class SvMetaModule *********************************/
 class SvMetaModule : public SvMetaExtern
@@ -97,7 +96,6 @@ public:
     virtual void		WriteAttributes( SvIdlDataBase & rBase,
                                         SvStream & rOutStm, USHORT nTab,
                                             WriteType, WriteAttribute = 0 );
-//    virtual void        WriteSbx( SvIdlDataBase & rBase, SvStream & rOutStm, SvNamePosList & rList );
     virtual void        Write( SvIdlDataBase & rBase, SvStream & rOutStm, USHORT nTab,
                                     WriteType, WriteAttribute = 0 );
     virtual void        WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm );
diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx
index 73b20cc..57ac3c3 100644
--- a/idl/source/objects/module.cxx
+++ b/idl/source/objects/module.cxx
@@ -500,28 +500,6 @@ void SvMetaModule::WriteAttributes( SvIdlDataBase & rBase,
 }
 
 /*************************************************************************
-|*    SvMetaModule::WriteSbx()
-*************************************************************************/
-/*
-void SvMetaModule::WriteSbx( SvIdlDataBase & rBase, SvStream & rOutStm,
-                                SvNamePosList & rList )
-{
-    for( ULONG n = 0; n < aClassList.Count(); n++ )
-    {
-        SvMetaClass * pClass = aClassList.GetObject( n );
-        if( !pClass->IsShell() && pClass->GetAutomation() )
-        {
-            rList.Insert( new SvNamePos( pClass->GetUUId(), rOutStm.Tell() ),
-                        LIST_APPEND );
-            SbxObjectRef xSbxObj = new SbxObject( pClass->GetName() );
-            pClass->FillSbxObject( rBase, xSbxObj );
-            xSbxObj->Store( rOutStm );
-        }
-    }
-}
- */
-
-/*************************************************************************
 |*    SvMetaModule::Write()
 *************************************************************************/
 void SvMetaModule::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
@@ -546,27 +524,6 @@ void SvMetaModule::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
         WriteTab( rOutStm, nTab );
         rOutStm << "importlib(\"STDOLE.TLB\");" << endl;
 
-    /*
-        for( ULONG n = 0; n < aTypeList.Count(); n++ )
-        {
-            SvMetaType * pType = aTypeList.GetObject( n );
-            if( !pType ->Write( rBase, rOutStm, nTab +1, nT, nA ) )
-                return FALSE;
-        }
-    */
-        /*
-        for( ULONG n = 0; n < rBase.GetModuleList().Count(); n++ )
-        {
-            SvMetaModule * pModule = rBase.GetModuleList().GetObject( n );
-            const SvMetaTypeMemberList &rTypeList = pModule->GetTypeList();
-            for( ULONG n = 0; n < rTypeList.Count(); n++ )
-            {
-                SvMetaType * pType = rTypeList.GetObject( n );
-                pType->Write( rBase, rOutStm, nTab +1, nT, nA );
-            }
-        }
-        */
-
         for( ULONG n = 0; n < aClassList.Count(); n++ )
         {
             SvMetaClass * pClass = aClassList.GetObject( n );
commit 517aa17b735156ebff4a192d825366bfa5244310
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Tue Dec 28 21:50:36 2010 -0800

    Remove DECLARE_LIST(SvStringHashList,SvStringHashEntry *)

diff --git a/idl/inc/hash.hxx b/idl/inc/hash.hxx
index 53c207a..8f13536 100644
--- a/idl/inc/hash.hxx
+++ b/idl/inc/hash.hxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -29,10 +29,9 @@
 #ifndef _HASH_HXX
 #define _HASH_HXX
 
-
-
 #include <tools/ref.hxx>
 #include <tools/string.hxx>
+#include <vector>
 
 /****************** H a s h - T a b l e **********************************/
 class SvHashTable
@@ -99,11 +98,11 @@ public:
 SV_DECL_IMPL_REF(SvStringHashEntry)
 
 /****************** S t r i n g H a s h T a b l e ************************/
-DECLARE_LIST(SvStringHashList,SvStringHashEntry *)
+typedef ::std::vector< SvStringHashEntry* > SvStringHashList;
 
 class SvStringHashTable : public SvHashTable
 {
-    SvStringHashEntry * pEntries;
+    SvStringHashEntry*      pEntries;
 protected:
     virtual UINT32          HashFunc( const void * pElement ) const;
     virtual StringCompare   Compare( const void * pElement, UINT32 nIndex ) const;
diff --git a/idl/source/cmptools/hash.cxx b/idl/source/cmptools/hash.cxx
index 325050a..b8a6d04 100644
--- a/idl/source/cmptools/hash.cxx
+++ b/idl/source/cmptools/hash.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -101,9 +101,6 @@ BOOL SvHashTable::Test_Insert( const void * pElement, BOOL bInsert,
     nHash =  HashFunc( pElement );
     nIndex = nHash % nMax;
 
-//  const char* s = ((ByteString*) pElement)->GetStr();
-//  fprintf(stderr,"### Hash: %lu , Name: %s\n",nIndex,s );
-
     nLoop = 0;                                      // divide to range
     while( (nMax != nLoop) && IsEntry( nIndex ) )
     {                     // is place occupied
@@ -180,14 +177,7 @@ SvStringHashTable::~SvStringHashTable()
     }
 #endif
 
-#ifdef MPW
-    // der MPW-Compiler ruft sonst keine Dtoren!
-    for ( USHORT n = 0; n < GetMax(); ++n )
-        (pEntries+n)->SvStringHashEntry::~SvStringHashEntry();
-    delete (void*) pEntries;
-#else
     delete [] pEntries;
-#endif
 }
 
 /*************************************************************************
@@ -326,7 +316,7 @@ void SvStringHashTable::FillHashList( SvStringHashList * pList ) const
     for( UINT32 n = 0; n < GetMax(); n++ )
     {
         if( IsEntry( n ) )
-            pList->Insert( Get( n ), LIST_APPEND );
+            pList->push_back( Get( n ) );
     }
     // Hash Reihenfolge, jetzt sortieren
 }
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index 649d1b3..76238d5 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -852,15 +852,14 @@ BOOL SvIdlWorkingBase::WriteSvIdl( SvStream & rOutStm )
     if( GetIdTable() )
     {
         GetIdTable()->FillHashList( &aList );
-        SvStringHashEntry * pEntry = aList.First();
-        while( pEntry )
+        for ( size_t i = 0, n = aList.size(); i < n; ++i )
         {
+            SvStringHashEntry* pEntry = aList[ i ];
             rOutStm << "#define " << pEntry->GetName().GetBuffer()
                     << '\t'
                     << ByteString::CreateFromInt64(
                         pEntry->GetValue() ).GetBuffer()
                     << endl;
-            pEntry = aList.Next();
         }
     }
 
commit ef41521e87108f2f02e273d5bfc5fa912560436a
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Tue Dec 28 18:25:01 2010 -0800

    Remove DECLARE_LIST( ByteStringList, ByteString* )
    
    I also removed some commented out code.

diff --git a/idl/inc/command.hxx b/idl/inc/command.hxx
index c2d6adf..8332569 100644
--- a/idl/inc/command.hxx
+++ b/idl/inc/command.hxx
@@ -39,7 +39,7 @@
 typedef ::std::vector< String* > StringList;
 #endif
 
-DECLARE_LIST( ByteStringList, ByteString* )
+typedef ::std::vector< ByteString* > ByteStringList;
 
 /******************** class SvCommand ************************************/
 class SvCommand
diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index fb76ff1..025338b 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -167,73 +167,6 @@ void SvMetaClass::Save( SvPersistStream & rStm )
     if( nMask & 0x10 ) rStm << aAutomation;
 }
 
-/*************************************************************************
-|*    SvMetaClass::FillSbxObject()
-|*
-|*    Beschreibung
-*************************************************************************/
-/*
-void SvMetaClass::FillSbxMemberObject( SvIdlDataBase & rBase,
-                                        SbxObject * pObj,
-                                        StringList & rSuperList,
-                                        BOOL bVariable )
-{
-    // alle Attribute der Klasse schreiben
-    ULONG n ;
-    for( n = 0; n < aAttrList.Count(); n++ )
-    {
-        SvMetaAttribute * pAttr = aAttrList.GetObject( n );
-
-        ByteString aMangleName = pAttr->GetMangleName( bVariable );
-        ByteString * pS = SvIdlDataBase::FindName( aMangleName, rSuperList );
-
-        if( !pS && pAttr->GetExport() )
-        {
-            // nicht doppelt
-            if( bVariable && pAttr->IsVariable() )
-            {
-                rSuperList.Insert( new ByteString( aMangleName ), LIST_APPEND );
-                 pAttr->FillSbxObject( rBase, pObj, bVariable );
-            }
-            else if( !bVariable && pAttr->IsMethod() )
-            {
-                rSuperList.Insert( new ByteString( aMangleName ), LIST_APPEND );
-                pAttr->FillSbxObject( rBase, pObj, bVariable );
-            }
-        }
-    }
-    // alle Attribute der importierten Klassen schreiben
-    for( n = 0; n < aClassList.Count(); n++ )
-    {
-        SvClassElement * pEle = aClassList.GetObject( n );
-        SvMetaClass * pClass = pEle->GetClass();
-        pClass->FillSbxMemberObject( rBase, pObj, rSuperList, bVariable );
-    }
-    // alle Attribute der Superklassen schreiben
-    if( aSuperClass.Is() )
-        aSuperClass->FillSbxMemberObject( rBase, pObj, rSuperList, bVariable );
-}
-*/
-/*************************************************************************
-|*    SvMetaClass::FillSbxObject()
-|*
-|*    Beschreibung
-*************************************************************************/
-/*
-void SvMetaClass::FillSbxObject( SvIdlDataBase & rBase, SbxObject * pObj )
-{
-    StringList aSuperList;
-    FillSbxMemberObject( rBase, pObj, aSuperList, TRUE );
-    FillSbxMemberObject( rBase, pObj, aSuperList, FALSE );
-
-    ByteString * pStr = aSuperList.First();
-    while( pStr )
-    {
-        delete pStr;
-        pStr = aSuperList.Next();
-    }
-}
- */
 #ifdef IDL_COMPILER
 /*************************************************************************
 |*    SvMetaClass::ReadAttributesSvIdl()
@@ -524,63 +457,6 @@ void SvMetaClass::WriteSvIdl( SvIdlDataBase & rBase, SvStream & rOutStm,
 }
 
 /*************************************************************************
-|*    SvMetaClass::WriteOdlMember()
-|*
-|*    Beschreibung
-*************************************************************************/
-/*
-void SvMetaClass::WriteOdlMembers( ByteStringList & rSuperList,
-                                    BOOL bVariable, BOOL bWriteTab,
-                                       SvIdlDataBase & rBase,
-                                       SvStream & rOutStm, USHORT nTab )
-{
-    // alle Attribute schreiben
-    ULONG n;
-    for( n = 0; n < aAttrList.Count(); n++ )
-    {
-        SvMetaAttribute * pAttr = aAttrList.GetObject( n );
-
-        ByteString aMangleName = pAttr->GetMangleName( bVariable );
-        ByteString * pS = rBase.FindName( aMangleName, rSuperList );
-
-        if( !pS && pAttr->GetExport() )
-        {
-            // nicht doppelt
-            if( bVariable && pAttr->IsVariable() )
-            {
-                rSuperList.Insert( new ByteString( aMangleName ), LIST_APPEND );
-                pAttr->Write( rBase, rOutStm, nTab +1, WRITE_ODL,
-                                WA_VARIABLE );
-                rOutStm << ';' << endl;
-            }
-            else if( !bVariable && pAttr->IsMethod() )
-            {
-                rSuperList.Insert( new ByteString( aMangleName ), LIST_APPEND );
-                pAttr->Write( rBase, rOutStm, nTab +1, WRITE_ODL,
-                                WA_METHOD );
-                rOutStm << ';' << endl;
-            }
-        }
-        else
-            continue;
-    }
-    // alle Attribute der importierten Klassen schreiben
-    for( n = 0; n < aClassList.Count(); n++ )
-    {
-        SvClassElement * pEle = aClassList.GetObject( n );
-        SvMetaClass * pCl = pEle->GetClass();
-        pCl->WriteOdlMembers( rSuperList, bVariable, bWriteTab,
-                                 rBase, rOutStm, nTab );
-    }
-    // alle Attribute der Superklassen schreiben
-    SvMetaClass * pSC = aSuperClass;
-    if( pSC )
-        pSC->WriteOdlMembers( rSuperList, bVariable, bWriteTab,
-                             rBase, rOutStm, nTab );
-}
- */
-
-/*************************************************************************
 |*    SvMetaClass::Write()
 |*
 |*    Beschreibung
@@ -595,53 +471,12 @@ void SvMetaClass::Write( SvIdlDataBase & rBase, SvStream & rOutStm,
         case WRITE_ODL:
         {
             DBG_ERROR( "Not supported anymore!" );
-/*
-            // Schreibt die Attribute
-            SvMetaName::Write( rBase, rOutStm, nTab, nT, nA );
-
-            WriteTab( rOutStm, nTab );
-            rOutStm << "dispinterface " << GetName().GetBuffer() << endl;
-            WriteTab( rOutStm, nTab );
-            rOutStm << '{' << endl;
-
-            WriteTab( rOutStm, nTab );
-            rOutStm << "properties:";
-            rOutStm << endl;
-
-            StringList aSuperList;
-            WriteOdlMembers( aSuperList, TRUE, TRUE, rBase, rOutStm, nTab );
-
-            WriteTab( rOutStm, nTab );
-            rOutStm << "methods:";
-            rOutStm << endl;
-
-            WriteOdlMembers( aSuperList, FALSE, TRUE, rBase, rOutStm, nTab );
-
-            ByteString * pStr = aSuperList.First();
-            while( pStr )
-            {
-                delete pStr;
-                pStr = aSuperList.Next();
-            }
-
-            WriteTab( rOutStm, 1 );
-            rOutStm << '}' << endl;
- */
             break;
         }
         case WRITE_C_SOURCE:
         case WRITE_C_HEADER:
         {
             DBG_ERROR( "Not supported anymore!" );
-/*
-            StringList aSuperList;
-            if( nT == WRITE_C_SOURCE )
-            {
-                rOutStm << "#pragma code_seg (\"" << GetName().GetBuffer()
-                    << "\",\"CODE\")" << endl;
-            }
-            WriteCFunctions( aSuperList, rBase, rOutStm, nTab, nT );
- */
             break;
         }
         case WRITE_DOCU:
@@ -847,20 +682,6 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
     rOutStm << "#undef " << GetName().GetBuffer() << endl;
     rOutStm << "#define ShellClass " << GetName().GetBuffer() << endl;
 
-//    rOutStm << "SFX_TYPELIB(" << GetName().GetBuffer() << ',' << endl
-//        << "\t/* library type */"
-//        << '"' << ByteString( GetModule()->GetUUId().GetHexName(), RTL_TEXTENCODING_UTF8 ).GetBuffer() << "\"," << endl
-//        << "\t\"" << GetModule()->GetTypeLibFileName().GetBuffer() << "\","
-//        << ByteString::CreateFromInt32( GetModule()->GetVersion().GetMajorVersion() ).GetBuffer() << ','
-//        << ByteString::CreateFromInt32( GetModule()->GetVersion().GetMinorVersion() ).GetBuffer() << ',' << endl
-//        << "\t/* shell type   */"
-//        << '"';
-//    if( xAutomationInterface.Is() )
-//        rOutStm << ByteString( xAutomationInterface->GetUUId().GetHexName(), RTL_TEXTENCODING_UTF8 ).GetBuffer();
-//    else
-//        rOutStm << ByteString( GetUUId().GetHexName(), RTL_TEXTENCODING_UTF8 ).GetBuffer();
-//    rOutStm << "\");" << endl << endl;
-
     // Fuer Interfaces werden kein Slotmaps geschrieben
     if( !IsShell() )
     {
@@ -868,7 +689,6 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
         return;
     }
     // Parameter Array schreiben
-    //rOutStm << "SfxArgList " << GetName().GetBuffer() << "ArgMap[] = {" << endl;
     rOutStm << "SFX_ARGUMENTMAP(" << GetName().GetBuffer() << ')' << endl
         << '{' << endl;
 
@@ -900,12 +720,9 @@ void SvMetaClass::WriteSfx( SvIdlDataBase & rBase, SvStream & rOutStm )
 
     ByteStringList aStringList;
     WriteSlotStubs( GetName(), aSlotList, aStringList, rOutStm );
-    ByteString * pStr = aStringList.First();
-    while( pStr )
-    {
-        delete pStr;
-        pStr = aStringList.Next();
-    }
+    for ( size_t i = 0, n = aStringList.size(); i < n; ++i )
+        delete aStringList[ i ];
+    aStringList.clear();
 
     rOutStm << endl;
 
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx
index 2ebc6c1..bff0efa 100644
--- a/idl/source/objects/slot.cxx
+++ b/idl/source/objects/slot.cxx
@@ -1197,18 +1197,6 @@ void SvMetaSlot::WriteSlotStubs( const ByteString & rShellName,
                                 ByteStringList & rList,
                                 SvStream & rOutStm )
 {
-/*
-    ByteString aName = GetName();
-    SvMetaAttribute * pAttr = rAttrList.First();
-    while( pAttr )
-    {
-        if( pAttr->GetName() == aName )
-            break;
-        pAttr = rAttrList.Next();
-    }
-    if( pAttr )
-        return;
-*/
     if ( !GetExport() && !GetHidden() )
         return;
 
@@ -1216,9 +1204,9 @@ void SvMetaSlot::WriteSlotStubs( const ByteString & rShellName,
     if ( aMethodName.Len() && aMethodName != "NoExec" )
     {
         BOOL bIn = FALSE;
-        for( USHORT n = 0; n < rList.Count(); n++ )
+        for( size_t n = 0; n < rList.size(); n++ )
         {
-            if( *(rList.GetObject(n)) == aMethodName )
+            if( *(rList[ n ]) == aMethodName )
             {
                 bIn=TRUE;
                 break;
@@ -1227,7 +1215,7 @@ void SvMetaSlot::WriteSlotStubs( const ByteString & rShellName,
 
         if ( !bIn )
         {
-            rList.Insert( new ByteString(aMethodName), LIST_APPEND );
+            rList.push_back( new ByteString(aMethodName) );
             rOutStm << "SFX_EXEC_STUB("
                     << rShellName.GetBuffer()
                     << ','
@@ -1240,9 +1228,9 @@ void SvMetaSlot::WriteSlotStubs( const ByteString & rShellName,
     if ( aMethodName.Len() && aMethodName != "NoState" )
     {
         BOOL bIn = FALSE;
-        for ( USHORT n=0; n < rList.Count(); n++ )
+        for ( size_t n=0; n < rList.size(); n++ )
         {
-            if ( *(rList.GetObject(n)) == aMethodName )
+            if ( *(rList[ n ]) == aMethodName )
             {
                 bIn=TRUE;
                 break;
@@ -1251,7 +1239,7 @@ void SvMetaSlot::WriteSlotStubs( const ByteString & rShellName,
 
         if ( !bIn )
         {
-            rList.Insert( new ByteString(aMethodName), LIST_APPEND );
+            rList.push_back( new ByteString(aMethodName) );
             rOutStm << "SFX_STATE_STUB("
                     << rShellName.GetBuffer()
                     << ','
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index fbdc9be..649d1b3 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -43,19 +43,6 @@
 |*
 |*    Beschreibung
 *************************************************************************/
-/*
-void PrimeNumber(){
-    USHORT i, n;
-    for( i = 5001; i < 5500; i += 2 ){
-        for( n = 2; n < i && ((i % n) != 0); n++ );
-        if( n == i ){
-            printf( "\nPrimzahl: %d\n", i );
-            return;
-        }
-    }
-}
-*/
-
 SvIdlDataBase::SvIdlDataBase( const SvCommand& rCmd )
     : bExport( FALSE )
     , nUniqueId( 0 )
@@ -64,7 +51,6 @@ SvIdlDataBase::SvIdlDataBase( const SvCommand& rCmd )
     , aPersStream( *IDLAPP->pClassMgr, NULL )
     , pIdTable( NULL )
 {
-    //PrimeNumber();
 }
 
 /*************************************************************************
@@ -513,10 +499,7 @@ SvMetaType * SvIdlDataBase::ReadKnownType( SvTokenStream & rInStm )
             }
         }
     }
-/*
-    SvMetaTypeList aTmpTypeList;
-    if( FillTypeList( aTmpTypeList, pTok ) )
-*/
+
     if( pTok->IsIdentifier() )
     {
         ByteString aName = pTok->GetString();
@@ -548,21 +531,7 @@ SvMetaType * SvIdlDataBase::ReadKnownType( SvTokenStream & rInStm )
                     bSet = TRUE;
                 }
             }
-            /*
-            SvMetaType * pMetaType = aTmpTypeList.First();
-            while( pMetaType )
-            {
-                if( pMetaType->GetIn() == bIn
-                  && pMetaType->GetOut() == bOut
-                  && pMetaType->GetCall0() == nCall0
-                  && pMetaType->GetCall1() == nCall1 )
-                {
-                    return pMetaType;
-                }
-                pMetaType = aTmpTypeList.Next();
-            }
-            */
-            //SvMetaType * pType = aTmpTypeList.First();
+
             if( !bSet )
                 // Ist genau dieser Typ
                 return pType;
@@ -602,22 +571,7 @@ SvMetaAttribute * SvIdlDataBase::ReadKnownAttr
     if( !pType )
         pType = ReadKnownType( rInStm );
 
-    if( pType )
-    {
-        // Wenn wir Slots auf die Wiese stellen, d"urfen wir nicht voraussetzen,
-        // da\s jeder Slot einen anderen Namen hat!
-/*
-        SvToken * pTok = rInStm.GetToken_Next();
-        if( pTok->IsIdentifier() )
-            for( ULONG n = 0; n < aAttrList.Count(); n++ )
-            {
-                SvMetaAttribute * pAttr = aAttrList.GetObject( n );
-                if( pAttr->GetName() == pTok->GetString() )
-                    return pAttr;
-            }
-*/
-    }
-    else
+    if( !pType )
     {
         // sonst SlotId?
         SvToken * pTok = rInStm.GetToken_Next();
commit 77957cd623217fcffae043eba428346226b7cf90
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Tue Dec 28 18:02:06 2010 -0800

    Remove DECLARE_LIST( StringList, String * )

diff --git a/idl/inc/command.hxx b/idl/inc/command.hxx
index c3dfd3e..c2d6adf 100644
--- a/idl/inc/command.hxx
+++ b/idl/inc/command.hxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -32,10 +32,11 @@
 
 #include <tools/list.hxx>
 #include <tools/string.hxx>
+#include <vector>
 
 #ifndef STRING_LIST
 #define STRING_LIST
-DECLARE_LIST( StringList, String * )
+typedef ::std::vector< String* > StringList;
 #endif
 
 DECLARE_LIST( ByteStringList, ByteString* )
diff --git a/idl/source/prj/command.cxx b/idl/source/prj/command.cxx
index 77b0596..e6a3c75 100644
--- a/idl/source/prj/command.cxx
+++ b/idl/source/prj/command.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -172,9 +172,9 @@ void DeInit()
 *************************************************************************/
 BOOL ReadIdl( SvIdlWorkingBase * pDataBase, const SvCommand & rCommand )
 {
-    for( USHORT n = 0; n < rCommand.aInFileList.Count(); n++ )
+    for( size_t n = 0; n < rCommand.aInFileList.size(); ++n )
     {
-        String aFileName ( *rCommand.aInFileList.GetObject( n ) );
+        String aFileName ( *rCommand.aInFileList[ n ] );
         SvFileStream aStm( aFileName, STREAM_STD_READ | STREAM_NOCREATE );
         if( aStm.GetError() == SVSTREAM_OK )
         {
@@ -218,7 +218,7 @@ BOOL ReadIdl( SvIdlWorkingBase * pDataBase, const SvCommand & rCommand )
 static BOOL ResponseFile( StringList * pList, int argc, char ** argv )
 {
     // Programmname
-    pList->Insert( new String( String::CreateFromAscii(*argv) ), LIST_APPEND );
+    pList->push_back( new String( String::CreateFromAscii(*argv) ) );
     for( int i = 1; i < argc; i++ )
     {
         if( '@' == **(argv +i) )
@@ -240,12 +240,12 @@ static BOOL ResponseFile( StringList * pList, int argc, char ** argv )
                     while( aStr.GetChar(n) && !isspace( aStr.GetChar(n) ) )
                         n++;
                     if( n != nPos )
-                        pList->Insert( new String( String::CreateFromAscii( aStr.Copy( nPos, n - nPos ).GetBuffer() ) ), LIST_APPEND );
+                        pList->push_back( new String( String::CreateFromAscii( aStr.Copy( nPos, n - nPos ).GetBuffer() ) ) );
                 }
             }
         }
         else if( argv[ i ] )
-            pList->Insert( new String( String::CreateFromAscii( argv[ i ] ) ), LIST_APPEND );
+            pList->push_back( new String( String::CreateFromAscii( argv[ i ] ) ) );
     }
     return TRUE;
 }
@@ -261,9 +261,9 @@ SvCommand::SvCommand( int argc, char ** argv )
     StringList aList;
 
     if( ResponseFile( &aList, argc, argv ) )
-    for( ULONG i = 1; i < aList.Count(); i++ )
+    for( size_t i = 1; i < aList.size(); i++ )
     {
-        String aParam( *aList.GetObject( i ) );
+        String aParam( *aList[ i ] );
         sal_Unicode aFirstChar( aParam.GetChar(0) );
         if( '-' == aFirstChar )
         {
@@ -374,9 +374,9 @@ SvCommand::SvCommand( int argc, char ** argv )
             }
             else if( aParam.EqualsIgnoreCaseAscii( "rsc", 0, 3 ) )
             { // erste Zeile im *.srs File
-                if( aList.GetObject( i +1 ) )
+                if( aList[ i + 1 ] )
                 {
-                    aSrsLine = ByteString( *aList.GetObject( i +1 ), RTL_TEXTENCODING_UTF8 );
+                    aSrsLine = ByteString( *aList[ i +1 ], RTL_TEXTENCODING_UTF8 );
                     i++;
                 }
             }
@@ -392,7 +392,7 @@ SvCommand::SvCommand( int argc, char ** argv )
         }
         else
         {
-            aInFileList.Insert( new String( aParam ), LIST_APPEND );
+            aInFileList.push_back( new String( aParam ) );
         }
     }
     else
@@ -400,12 +400,9 @@ SvCommand::SvCommand( int argc, char ** argv )
         printf( "%s", CommandLineSyntax );
     }
 
-    String * pStr = aList.First();
-    while( pStr )
-    {
-        delete pStr;
-        pStr = aList.Next();
-    }
+    for ( size_t i = 0, n = aList.size(); i < n; ++i )
+        delete aList[ i ];
+    aList.clear();
 
     ByteString aInc( getenv( "INCLUDE" ) );
     // Include Environmentvariable anhaengen
@@ -427,9 +424,9 @@ SvCommand::SvCommand( int argc, char ** argv )
 SvCommand::~SvCommand()
 {
     // ByteString Liste freigeben
-    String * pStr;
-    while( NULL != (pStr = aInFileList.Remove()) )
-        delete pStr;
+    for ( size_t i = 0, n = aInFileList.size(); i < n; ++i )
+        delete aInFileList[ i ];
+    aInFileList.clear();
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/idl/source/prj/database.cxx b/idl/source/prj/database.cxx
index e208587..fbdc9be 100644
--- a/idl/source/prj/database.cxx
+++ b/idl/source/prj/database.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -74,12 +74,10 @@ SvIdlDataBase::SvIdlDataBase( const SvCommand& rCmd )
 *************************************************************************/
 SvIdlDataBase::~SvIdlDataBase()
 {
-    String * pStr = aIdFileList.First();
-    while( pStr )
-    {
-        delete pStr;
-        pStr = aIdFileList.Next();
-    }
+    for ( size_t i = 0, n = aIdFileList.size(); i < n; ++i )
+        delete aIdFileList[ i ];
+    aIdFileList.clear();
+
     delete pIdTable;
 }
 
@@ -320,15 +318,11 @@ BOOL SvIdlDataBase::ReadIdFile( const String & rFileName )
     DirEntry aFullName( rFileName );
     aFullName.Find( GetPath() );
 
-    String * pIdFile = aIdFileList.First();
-    while( pIdFile )
-    {
-        if( *pIdFile == rFileName )
-            return TRUE; // schon eingelesen
-        pIdFile = aIdFileList.Next();
-    }
+    for ( size_t i = 0, n = aIdFileList.size(); i < n; ++i )
+        if ( *aIdFileList[ i ] == rFileName )
+            return TRUE;
 
-    aIdFileList.Insert( new String( rFileName ), LIST_APPEND );
+    aIdFileList.push_back( new String( rFileName ) );
 
     SvTokenStream aTokStm( aFullName.GetFull() );
     if( aTokStm.GetStream().GetError() == SVSTREAM_OK )
commit 0413aacd9dea1485fea0b21307982a6f1fcd5492
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Tue Dec 28 07:16:01 2010 -0800

    Remove DECLARE_LIST(SvAttributeListImpl,SvAttribute*)

diff --git a/idl/inc/attrib.hxx b/idl/inc/attrib.hxx
deleted file mode 100644
index fadb5fe..0000000
--- a/idl/inc/attrib.hxx
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _ATTRIB_HXX
-#define _ATTRIB_HXX
-
-#ifdef IDL_COMPILER
-#include <hash.hxx>
-#include <object.hxx>
-
-/******************** class SvAttribute **********************************/
-class SvAttribute
-{
-    SvStringHashEntryRef    aName;
-    CreateMetaObjectType    pCreateMethod;
-    SvMetaObjectRef         aTmpClass;
-public:
-                        SvAttribute( SvStringHashEntry * pAttribName,
-                                     CreateMetaObjectType pMethod )
-                            : aName( pAttribName ),
-                              pCreateMethod( pMethod ) {}
-
-    SvMetaObjectRef     CreateClass()
-                        {
-                            if( aTmpClass.Is() )
-                            {
-                                SvMetaObjectRef aTmp( aTmpClass );
-                                aTmpClass.Clear();
-                                return aTmp;
-                            }
-                            return pCreateMethod();
-                        }
-};
-
-#define SV_ATTRIBUTE( AttributeName, PostfixClassName )                 \
-        SvAttribute( SvHash_##AttributeName(),                          \
-                     SvMeta##PostfixClassName::Create )
-
-/******************** class SvAttributeList ******************************/
-DECLARE_LIST(SvAttributeListImpl,SvAttribute*)
-class SvAttributeList : public SvAttributeListImpl
-{
-public:
-            SvAttributeList() : SvAttributeListImpl() {}
-
-    void    Append( SvAttribute * pObj )
-            { Insert( pObj, LIST_APPEND ); }
-};
-
-
-#endif // IDL_COMPILER
-#endif // _ATTRIB_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/idl/inc/basobj.hxx b/idl/inc/basobj.hxx
index ed8a070..5993e0f 100644
--- a/idl/inc/basobj.hxx
+++ b/idl/inc/basobj.hxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -60,43 +60,20 @@ enum
 typedef int WriteAttribute;
 
 /******************** Meta Factory **************************************/
-#ifdef IDL_COMPILER
-
-#define PRV_SV_DECL_META_FACTORY( Class )                               \
-    static SvAttributeList * pAttribList;                               \
-    static SvMetaObject * Create() { return new Class; }                \
-    static const char *   GetClassName() { return #Class; }
-
-#define PRV_SV_IMPL_META_FACTORY( Class )                               \
-    SvAttributeList * Class::pAttribList = NULL;
-
-#else
-
-#define PRV_SV_DECL_META_FACTORY( Class )
-
-#define PRV_SV_IMPL_META_FACTORY( Class )
-
-#endif // IDL_COMPILER
-
 #define SV_DECL_META_FACTORY( Class, CLASS_ID )                         \
-    SV_DECL_PERSIST( Class, CLASS_ID )                                  \
-    PRV_SV_DECL_META_FACTORY( Class )
+    SV_DECL_PERSIST( Class, CLASS_ID )
 
 
 #define SV_DECL_META_FACTORY1( Class, Super1, CLASS_ID )                \
-    SV_DECL_PERSIST1( Class, Super1, CLASS_ID )                         \
-    PRV_SV_DECL_META_FACTORY( Class )
+    SV_DECL_PERSIST1( Class, Super1, CLASS_ID )
 
 #define SV_IMPL_META_FACTORY( Class )                                   \
-    PRV_SV_IMPL_META_FACTORY( Class )                                   \
     SV_IMPL_PERSIST( Class )
 
 
 #define SV_IMPL_META_FACTORY1( Class, Super1 )                          \
-    PRV_SV_IMPL_META_FACTORY( Class )                                   \
     SV_IMPL_PERSIST1( Class, Super1 )
 
-
 /******************** class SvMetaObject ********************************/
 class SvMetaObject : public SvPersistBase
 {
@@ -121,7 +98,6 @@ public:
 #endif
 };
 SV_DECL_IMPL_REF(SvMetaObject)
-//SV_DECL_IMPL_PERSIST_LIST(SvMetaObject,SvMetaObject *)
 SV_DECL_PERSIST_LIST(SvMetaObject,SvMetaObject *)
 SV_IMPL_PERSIST_LIST(SvMetaObject,SvMetaObject *)
 
diff --git a/idl/source/objects/basobj.cxx b/idl/source/objects/basobj.cxx
index 474ca86..46936b3 100644
--- a/idl/source/objects/basobj.cxx
+++ b/idl/source/objects/basobj.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -34,7 +34,6 @@
 
 #include <tools/debug.hxx>
 
-#include <attrib.hxx>
 #include <basobj.hxx>
 #include <module.hxx>
 #include <globals.hxx>
diff --git a/idl/source/objects/module.cxx b/idl/source/objects/module.cxx
index d9c148e..73b20cc 100644
--- a/idl/source/objects/module.cxx
+++ b/idl/source/objects/module.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -32,7 +32,6 @@
 #include <ctype.h>
 #include <stdio.h>
 
-#include <attrib.hxx>
 #include <module.hxx>
 #include <globals.hxx>
 #include <database.hxx>
diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index 3690336..fb76ff1 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -34,7 +34,6 @@
 
 #include <tools/debug.hxx>
 
-#include <attrib.hxx>
 #include <object.hxx>
 #include <globals.hxx>
 #include <database.hxx>
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx
index ee93d5b..2ebc6c1 100644
--- a/idl/source/objects/slot.cxx
+++ b/idl/source/objects/slot.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -32,7 +32,6 @@
 #include <ctype.h>
 #include <stdio.h>
 #include <tools/debug.hxx>
-#include <attrib.hxx>
 #include <slot.hxx>
 #include <globals.hxx>
 #include <database.hxx>
@@ -42,7 +41,7 @@ SV_IMPL_META_FACTORY1( SvMetaSlot, SvMetaAttribute );
 
 SvMetaObject *SvMetaSlot::MakeClone() const
 {
-        return new SvMetaSlot( *this ); 
+        return new SvMetaSlot( *this );
 }
 
 /*************************************************************************
diff --git a/idl/source/objects/types.cxx b/idl/source/objects/types.cxx
index bed4583..d8085e3 100644
--- a/idl/source/objects/types.cxx
+++ b/idl/source/objects/types.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -34,7 +34,6 @@
 
 #include <tools/debug.hxx>
 
-#include <attrib.hxx>
 #include <types.hxx>
 #include <globals.hxx>
 #include <database.hxx>
commit c7b73463d63054284d50c38ce0e367b271d2472b
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Mon Dec 27 20:12:23 2010 -0800

    Remove DECLARE_LIST( DummyItemList, ConstPoolItemPtr )

diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index 672c20e..78b4515 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -1206,13 +1206,38 @@ BOOL ContentAttribs::HasItem( USHORT nWhich )
 //	----------------------------------------------------------------------
 //	class ItemList
 //	----------------------------------------------------------------------
+ItemList::ItemList() : CurrentItem( 0 )
+{
+}
+
 const SfxPoolItem* ItemList::FindAttrib( USHORT nWhich )
 {
-    const SfxPoolItem* pItem = First();
-    while ( pItem && ( pItem->Which() != nWhich ) )
-        pItem = Next();
+    for ( size_t i = 0, n = aItemPool.size(); i < n; ++i )
+        if ( aItemPool[ i ]->Which() == nWhich )
+            return aItemPool[ i ];
+    return NULL;
+}
+
+const SfxPoolItem* ItemList::First()
+{
+    CurrentItem = 0;
+    return aItemPool.empty() ? NULL : aItemPool[ 0 ];
+}
 
-    return pItem;
+const SfxPoolItem* ItemList::Next()
+{
+    if ( CurrentItem + 1 < aItemPool.size() )
+    {
+        ++CurrentItem;
+        return aItemPool[ CurrentItem ];
+    }
+    return NULL;
+}
+
+void ItemList::Insert( const SfxPoolItem* pItem )
+{
+    aItemPool.push_back( pItem );
+    CurrentItem = aItemPool.size() - 1;
 }
 
 // -------------------------------------------------------------------------
diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx
index 6905a2c..de2d99a 100644
--- a/editeng/source/editeng/editdoc.hxx
+++ b/editeng/source/editeng/editdoc.hxx
@@ -174,11 +174,22 @@ public:
 //	class ItemList
 //	----------------------------------------------------------------------
 typedef const SfxPoolItem* ConstPoolItemPtr;
-DECLARE_LIST( DummyItemList, ConstPoolItemPtr )
-class ItemList : public DummyItemList
+typedef ::std::vector< ConstPoolItemPtr > DummyItemList;
+
+class ItemList
 {
+private:
+    DummyItemList aItemPool;
+    size_t  CurrentItem;
+
 public:
-    const SfxPoolItem*	FindAttrib( USHORT nWhich );
+    ItemList();
+    const SfxPoolItem*  FindAttrib( USHORT nWhich );
+    const SfxPoolItem*  First();
+    const SfxPoolItem*  Next();
+    size_t              Count() { return aItemPool.size(); };
+    void                Insert( const SfxPoolItem* pItem );
+    void                Clear() { aItemPool.clear(); };
 };
 
 // -------------------------------------------------------------------------
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index beeaf4b..93f9225 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -322,7 +322,7 @@ void lcl_FindValidAttribs( ItemList& rLst, ContentNode* pNode, sal_uInt16 nIndex
         if ( pAttr->GetEnd() > nIndex )
         {
             if ( IsScriptItemValid( pAttr->GetItem()->Which(), nScriptType ) )
-                rLst.Insert( pAttr->GetItem(), LIST_APPEND );
+                rLst.Insert( pAttr->GetItem() );
         }
         nAttr++;
         pAttr = GetAttrib( pNode->GetCharAttribs().GetAttribs(), nAttr );
@@ -685,11 +685,11 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel )
                 if ( !n || IsScriptChange( EditPaM( pNode, nIndex ) ) )
                 {
                     SfxItemSet aAttribs = GetAttribs( nNode, nIndex+1, nIndex+1 );
-                    aAttribItems.Insert( &aAttribs.Get( GetScriptItemId( EE_CHAR_FONTINFO, nScriptType ) ), LIST_APPEND );
-                    aAttribItems.Insert( &aAttribs.Get( GetScriptItemId( EE_CHAR_FONTHEIGHT, nScriptType ) ), LIST_APPEND );
-                    aAttribItems.Insert( &aAttribs.Get( GetScriptItemId( EE_CHAR_WEIGHT, nScriptType ) ), LIST_APPEND );
-                    aAttribItems.Insert( &aAttribs.Get( GetScriptItemId( EE_CHAR_ITALIC, nScriptType ) ), LIST_APPEND );
-                    aAttribItems.Insert( &aAttribs.Get( GetScriptItemId( EE_CHAR_LANGUAGE, nScriptType ) ), LIST_APPEND );
+                    aAttribItems.Insert( &aAttribs.Get( GetScriptItemId( EE_CHAR_FONTINFO, nScriptType ) ) );
+                    aAttribItems.Insert( &aAttribs.Get( GetScriptItemId( EE_CHAR_FONTHEIGHT, nScriptType ) ) );
+                    aAttribItems.Insert( &aAttribs.Get( GetScriptItemId( EE_CHAR_WEIGHT, nScriptType ) ) );
+                    aAttribItems.Insert( &aAttribs.Get( GetScriptItemId( EE_CHAR_ITALIC, nScriptType ) ) );
+                    aAttribItems.Insert( &aAttribs.Get( GetScriptItemId( EE_CHAR_LANGUAGE, nScriptType ) ) );
                 }
                 // #96298# Insert hard attribs AFTER CJK attribs...
                 lcl_FindValidAttribs( aAttribItems, pNode, nIndex, nScriptType );
@@ -1476,7 +1476,7 @@ SpellInfo * ImpEditEngine::CreateSpellInfo( const EditSelection &rSel, bool bMul
 //    pSpellInfo->aSpellStart = CreateEPaM( aSentenceSel.Min() );
 //    pSpellInfo->aSpellTo    = CreateEPaM( rSel.HasRange()? aSentenceSel.Max() : aSentenceSel.Min() );
     // always spell draw objects completely, startting at the top.
-    // (spelling in only a selection or not starting with the top requires 
+    // (spelling in only a selection or not starting with the top requires
     // further changes elsewehe to work properly)
     pSpellInfo->aSpellStart = EPaM();
     pSpellInfo->aSpellTo    = EPaM( EE_PARA_NOT_FOUND, EE_INDEX_NOT_FOUND );
@@ -2019,8 +2019,8 @@ Reference< XSpellAlternatives > ImpEditEngine::ImpFindNextError(EditSelection& r
     return xSpellAlt;
 }
 
-bool ImpEditEngine::SpellSentence(EditView& rEditView, 
-    ::svx::SpellPortions& rToFill, 
+bool ImpEditEngine::SpellSentence(EditView& rEditView,
+    ::svx::SpellPortions& rToFill,
     bool /*bIsGrammarChecking*/ )
 {
 #ifdef SVX_LIGHT
@@ -2181,8 +2181,8 @@ void ImpEditEngine::AddPortionIterated(
 #endif
 }
 
-void ImpEditEngine::ApplyChangedSentence(EditView& rEditView, 
-    const ::svx::SpellPortions& rNewPortions, 
+void ImpEditEngine::ApplyChangedSentence(EditView& rEditView,
+    const ::svx::SpellPortions& rNewPortions,
     bool bRecheck )
 {
 #ifdef SVX_LIGHT
@@ -2305,7 +2305,7 @@ void ImpEditEngine::ApplyChangedSentence(EditView& rEditView,
             aNext = EditPaM( aOldSel.Max().GetNode(), nEndOfSentence );
         }
         rEditView.pImpEditView->SetEditSelection( aNext );
-        
+
         FormatAndUpdate();
         aEditDoc.SetModified(TRUE);
     }
@@ -2320,7 +2320,7 @@ void ImpEditEngine::PutSpellingToSentenceStart( EditView& rEditView )
     {
         rEditView.pImpEditView->SetEditSelection( pSpellInfo->aLastSpellContentSelections.begin()->Min() );
     }
-  
+
 #endif
 }
 
@@ -2852,17 +2852,17 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
         sal_uInt16 nLanguage = LANGUAGE_SYSTEM;
 
         // since we don't use Hiragana/Katakana or half-width/full-width transliterations here
-        // it is fine to use ANYWORD_IGNOREWHITESPACES. (ANY_WORD btw is broken and will 
+        // it is fine to use ANYWORD_IGNOREWHITESPACES. (ANY_WORD btw is broken and will
         // occasionaly miss words in consecutive sentences). Also with ANYWORD_IGNOREWHITESPACES
         // text like 'just-in-time' will be converted to 'Just-In-Time' which seems to be the
         // proper thing to do.
         const sal_Int16 nWordType = i18n::WordType::ANYWORD_IGNOREWHITESPACES;
 
         //! In order to have less trouble with changing text size, e.g. because
-        //! of ligatures or � (German small sz) being resolved, we need to process 
-        //! the text replacements from end to start. 
-        //! This way the offsets for the yet to be changed words will be 
-        //! left unchanged by the already replaced text. 
+        //! of ligatures or � (German small sz) being resolved, we need to process
+        //! the text replacements from end to start.
+        //! This way the offsets for the yet to be changed words will be
+        //! left unchanged by the already replaced text.
         //! For this we temporarily save the changes to be done in this vector
         std::vector< TransliterationChgData >   aChanges;
         TransliterationChgData                  aChgData;
@@ -2875,11 +2875,11 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
             i18n::Boundary aEndBndry;
             aSttBndry = _xBI->getWordBoundary(
                         *pNode, nStartPos,
-                        SvxCreateLocale( GetLanguage( EditPaM( pNode, nStartPos + 1 ) ) ), 
+                        SvxCreateLocale( GetLanguage( EditPaM( pNode, nStartPos + 1 ) ) ),
                         nWordType, TRUE /*prefer forward direction*/);
             aEndBndry = _xBI->getWordBoundary(
                         *pNode, nEndPos,
-                        SvxCreateLocale( GetLanguage( EditPaM( pNode, nEndPos + 1 ) ) ), 
+                        SvxCreateLocale( GetLanguage( EditPaM( pNode, nEndPos + 1 ) ) ),
                         nWordType, FALSE /*prefer backward direction*/);
 
             // prevent backtracking to the previous word if selection is at word boundary
@@ -2911,8 +2911,8 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
 #endif
 
                 Sequence< sal_Int32 > aOffsets;
-                String aNewText( aTranslitarationWrapper.transliterate( *pNode, 
-                        GetLanguage( EditPaM( pNode, nCurrentStart + 1 ) ), 
+                String aNewText( aTranslitarationWrapper.transliterate( *pNode,
+                        GetLanguage( EditPaM( pNode, nCurrentStart + 1 ) ),
                         nCurrentStart, nLen, &aOffsets ));
 
                 if (!pNode->Equals( aNewText, nCurrentStart, nLen ))
@@ -2929,8 +2929,8 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
                 (void) aSelTxt;
 #endif
 
-                aCurWordBndry = _xBI->nextWord( *pNode, nCurrentEnd, 
-                        SvxCreateLocale( GetLanguage( EditPaM( pNode, nCurrentEnd + 1 ) ) ), 
+                aCurWordBndry = _xBI->nextWord( *pNode, nCurrentEnd,
+                        SvxCreateLocale( GetLanguage( EditPaM( pNode, nCurrentEnd + 1 ) ) ),
                         nWordType);
             }
             DBG_ASSERT( nCurrentEnd >= aEndBndry.endPos, "failed to reach end of transliteration" );
@@ -2939,19 +2939,19 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
         {
             // for 'sentence case' we need to iterate sentence by sentence
 
-            sal_Int32 nLastStart = _xBI->beginOfSentence( 
-                    *pNode, nEndPos, 
+            sal_Int32 nLastStart = _xBI->beginOfSentence(
+                    *pNode, nEndPos,
                     SvxCreateLocale( GetLanguage( EditPaM( pNode, nEndPos + 1 ) ) ) );
-            sal_Int32 nLastEnd = _xBI->endOfSentence( 
-                    *pNode, nLastStart, 
+            sal_Int32 nLastEnd = _xBI->endOfSentence(
+                    *pNode, nLastStart,
                     SvxCreateLocale( GetLanguage( EditPaM( pNode, nLastStart + 1 ) ) ) );
-            
+
             // extend nCurrentStart, nCurrentEnd to the current sentence boundaries
-            nCurrentStart = _xBI->beginOfSentence( 
-                    *pNode, nStartPos, 
+            nCurrentStart = _xBI->beginOfSentence(
+                    *pNode, nStartPos,
                     SvxCreateLocale( GetLanguage( EditPaM( pNode, nStartPos + 1 ) ) ) );
-            nCurrentEnd = _xBI->endOfSentence( 
-                    *pNode, nCurrentStart, 
+            nCurrentEnd = _xBI->endOfSentence(
+                    *pNode, nCurrentStart,
                     SvxCreateLocale( GetLanguage( EditPaM( pNode, nCurrentStart + 1 ) ) ) );
 
             // prevent backtracking to the previous sentence if selection starts at end of a sentence
@@ -2959,18 +2959,18 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
             {
                 // now nCurrentStart is probably located on a non-letter word. (unless we
                 // are in Asian text with no spaces...)
-                // Thus to get the real sentence start we should locate the next real word, 
+                // Thus to get the real sentence start we should locate the next real word,
                 // that is one found by DICTIONARY_WORD
-                i18n::Boundary aBndry = _xBI->nextWord( *pNode, nCurrentEnd, 
-                        SvxCreateLocale( GetLanguage( EditPaM( pNode, nCurrentEnd + 1 ) ) ), 
+                i18n::Boundary aBndry = _xBI->nextWord( *pNode, nCurrentEnd,
+                        SvxCreateLocale( GetLanguage( EditPaM( pNode, nCurrentEnd + 1 ) ) ),
                         i18n::WordType::DICTIONARY_WORD);
 
                 // now get new current sentence boundaries
-                nCurrentStart = _xBI->beginOfSentence( 
-                        *pNode, aBndry.startPos, 
+                nCurrentStart = _xBI->beginOfSentence(
+                        *pNode, aBndry.startPos,
                         SvxCreateLocale( GetLanguage( EditPaM( pNode, aBndry.startPos + 1 ) ) ) );
-                nCurrentEnd = _xBI->endOfSentence( 
-                        *pNode, nCurrentStart, 
+                nCurrentEnd = _xBI->endOfSentence(
+                        *pNode, nCurrentStart,
                         SvxCreateLocale( GetLanguage( EditPaM( pNode, nCurrentStart + 1 ) ) ) );
             }
             // prevent advancing to the next sentence if selection ends at start of a sentence
@@ -2978,13 +2978,13 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
             {
                 // now nCurrentStart is probably located on a non-letter word. (unless we
                 // are in Asian text with no spaces...)
-                // Thus to get the real sentence start we should locate the previous real word, 
+                // Thus to get the real sentence start we should locate the previous real word,
                 // that is one found by DICTIONARY_WORD
-                i18n::Boundary aBndry = _xBI->previousWord( *pNode, nLastStart, 
-                        SvxCreateLocale( GetLanguage( EditPaM( pNode, nLastStart + 1 ) ) ), 
+                i18n::Boundary aBndry = _xBI->previousWord( *pNode, nLastStart,
+                        SvxCreateLocale( GetLanguage( EditPaM( pNode, nLastStart + 1 ) ) ),
                         i18n::WordType::DICTIONARY_WORD);
-                nLastEnd = _xBI->endOfSentence( 
-                        *pNode, aBndry.startPos, 
+                nLastEnd = _xBI->endOfSentence(
+                        *pNode, aBndry.startPos,
                         SvxCreateLocale( GetLanguage( EditPaM( pNode, aBndry.startPos + 1 ) ) ) );
                 if (nCurrentEnd > nLastEnd)
                     nCurrentEnd = nLastEnd;
@@ -2999,8 +2999,8 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
 #endif
 
                 Sequence< sal_Int32 > aOffsets;
-                String aNewText( aTranslitarationWrapper.transliterate( *pNode, 
-                        GetLanguage( EditPaM( pNode, nCurrentStart + 1 ) ), 
+                String aNewText( aTranslitarationWrapper.transliterate( *pNode,
+                        GetLanguage( EditPaM( pNode, nCurrentStart + 1 ) ),
                         nCurrentStart, nLen, &aOffsets ));
 
                 if (!pNode->Equals( aNewText, nCurrentStart, nLen ))
@@ -3019,8 +3019,8 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
                         SvxCreateLocale( GetLanguage( EditPaM( pNode, nCurrentEnd + 1 ) ) ),
                         nWordType);
                 nCurrentStart = aFirstWordBndry.startPos;
-                nCurrentEnd = _xBI->endOfSentence( 
-                        *pNode, nCurrentStart, 
+                nCurrentEnd = _xBI->endOfSentence(
+                        *pNode, nCurrentStart,
                         SvxCreateLocale( GetLanguage( EditPaM( pNode, nCurrentStart + 1 ) ) ) );
             }
             DBG_ASSERT( nCurrentEnd >= nLastEnd, "failed to reach end of transliteration" );
@@ -3106,8 +3106,8 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
 
                 USHORT nSelNode = aEditDoc.GetPos( rData.aSelection.Min().GetNode() );
                 ParaPortion* pParaPortion = GetParaPortions()[nSelNode];
-                pParaPortion->MarkSelectionInvalid( rData.nStart, 
-                        std::max< USHORT >( rData.nStart + rData.nLen, 
+                pParaPortion->MarkSelectionInvalid( rData.nStart,
+                        std::max< USHORT >( rData.nStart + rData.nLen,
                                             rData.nStart + rData.aNewText.Len() ) );
             }
         } // if (aChanges.size() > 0)
@@ -3135,7 +3135,7 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
 }
 
 
-short ImpEditEngine::ReplaceTextOnly( 
+short ImpEditEngine::ReplaceTextOnly(
     ContentNode* pNode,
     USHORT nCurrentStart, xub_StrLen nLen,
     const String& rNewText,
commit 81812e8e67f5f09717f2545dd083a69c66560ea1
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Mon Dec 27 19:43:02 2010 -0800

    Remove DECLARE_LIST( DummyColorList, SvxColorItem* )

diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index 2a609d7..672c20e 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -75,11 +75,11 @@ using namespace ::com::sun::star;
 USHORT GetScriptItemId( USHORT nItemId, short nScriptType )
 {
     USHORT nId = nItemId;
-    
+
     if ( ( nScriptType == i18n::ScriptType::ASIAN ) ||
          ( nScriptType == i18n::ScriptType::COMPLEX ) )
     {
-        switch ( nItemId ) 
+        switch ( nItemId )
         {
             case EE_CHAR_LANGUAGE:
                 nId = ( nScriptType == i18n::ScriptType::ASIAN ) ? EE_CHAR_LANGUAGE_CJK : EE_CHAR_LANGUAGE_CTL;
@@ -98,15 +98,15 @@ USHORT GetScriptItemId( USHORT nItemId, short nScriptType )
             break;
         }
     }
-    
+
     return nId;
 }
 
 BOOL IsScriptItemValid( USHORT nItemId, short nScriptType )
 {
     BOOL bValid = TRUE;
-    
-    switch ( nItemId ) 
+
+    switch ( nItemId )
     {
         case EE_CHAR_LANGUAGE:
             bValid = nScriptType == i18n::ScriptType::LATIN;
@@ -241,11 +241,11 @@ USHORT aV3Map[] = {
 };
 
 USHORT aV4Map[] = {
-    3994, 3995, 3996, 3997, 3998, 3999, 4000, 4001, 4002, 4003, 
-    4004, 4005, 4006, 4007, 4008, 4009, 4010, 4011, 4012, 4013, 
-    4014, 4015, 4016, 4017, 4018, 
+    3994, 3995, 3996, 3997, 3998, 3999, 4000, 4001, 4002, 4003,
+    4004, 4005, 4006, 4007, 4008, 4009, 4010, 4011, 4012, 4013,
+    4014, 4015, 4016, 4017, 4018,
     /* CJK Items inserted here: EE_CHAR_LANGUAGE - EE_CHAR_XMLATTRIBS */
-    4034, 4035, 4036, 4037 
+    4034, 4035, 4036, 4037
 };
 
 USHORT aV5Map[] = {
@@ -1079,7 +1079,7 @@ void ContentNode::CreateDefFont()
     SfxStyleSheet* pS = aContentAttribs.GetStyleSheet();
     if ( pS )
         CreateFont( GetCharAttribs().GetDefFont(), pS->GetItemSet() );
-    
+
     // ... dann die harte Absatzformatierung rueberbuegeln...
     CreateFont( GetCharAttribs().GetDefFont(),
         GetContentAttribs().GetItems(), pS == NULL );
@@ -1088,7 +1088,7 @@ void ContentNode::CreateDefFont()
 void ContentNode::SetStyleSheet( SfxStyleSheet* pS, const SvxFont& rFontFromStyle )
 {
     aContentAttribs.SetStyleSheet( pS );
-    
+
     // Erst alle Informationen aus dem Style verwenden...
     GetCharAttribs().GetDefFont() = rFontFromStyle;
     // ... dann die harte Absatzformatierung rueberbuegeln...
@@ -1119,10 +1119,10 @@ void ContentNode::CreateWrongList()
 #endif
 }
 
-void ContentNode::SetWrongList( WrongList* p ) 	
-{ 
+void ContentNode::SetWrongList( WrongList* p )
+{
     DBG_ASSERT( !pWrongList, "WrongList existiert schon!" );
-    pWrongList = p; 
+    pWrongList = p;
 }
 
 // -------------------------------------------------------------------------
@@ -1220,7 +1220,7 @@ const SfxPoolItem* ItemList::FindAttrib( USHORT nWhich )
 // -------------------------------------------------------------------------
 EditDoc::EditDoc( SfxItemPool* pPool )
 {
-    if ( pPool ) 
+    if ( pPool )
     {
         pItemPool = pPool;
         bOwnerOfPool = FALSE;
@@ -1230,7 +1230,7 @@ EditDoc::EditDoc( SfxItemPool* pPool )
         pItemPool = new EditEngineItemPool( FALSE );
         bOwnerOfPool = TRUE;
     }
-    
+
     nDefTab = DEFTAB;
     bIsVertical = FALSE;
     bIsFixedCellHeight = FALSE;
@@ -1243,7 +1243,7 @@ EditDoc::EditDoc( SfxItemPool* pPool )
 EditDoc::~EditDoc()
 {
     ImplDestroyContents();
-    if ( bOwnerOfPool ) 
+    if ( bOwnerOfPool )
         SfxItemPool::Free(pItemPool);
 }
 
@@ -1427,7 +1427,7 @@ XubString EditDoc::GetParaAsString( ContentNode* pNode, USHORT nStartPos, USHORT
             pNextFeature = 0;	// Feature interessiert unten nicht
 
         DBG_ASSERT( nEnd >= nIndex, "Ende vorm Index?" );
-        //!! beware of sub string length  of -1 which is also defined as STRING_LEN and 
+        //!! beware of sub string length  of -1 which is also defined as STRING_LEN and
         //!! thus would result in adding the whole sub string up to the end of the node !!
         if (nEnd > nIndex)
             aStr += XubString( *pNode, nIndex, nEnd - nIndex );
@@ -1492,8 +1492,8 @@ EditPaM EditDoc::Clear()
     return aPaM;
 }
 
-void EditDoc::SetModified( BOOL b )	
-{ 
+void EditDoc::SetModified( BOOL b )
+{
     bModified = b;
     if ( bModified )
     {
@@ -2248,33 +2248,47 @@ ULONG SvxFontTable::GetId( const SvxFontItem& rFontItem )
     return 0;
 }
 
+//=============================================================================
 SvxColorList::SvxColorList()
 {
 }
 
 SvxColorList::~SvxColorList()
 {
-    SvxColorItem* pItem = First();
-    while( pItem )
-    {
-        delete pItem;
-        pItem = Next();
-    }
+    for ( size_t i = 0, n = aColorList.size(); i < n; ++i )
+        delete aColorList[ i ];
+    aColorList.clear();
 }
 
-ULONG SvxColorList::GetId( const SvxColorItem& rColorItem )
+size_t SvxColorList::GetId( const SvxColorItem& rColorItem )
 {
-    SvxColorItem* pItem = First();
-    while ( pItem )
-    {
-        if ( *pItem == rColorItem )
-            return GetCurPos();
-        pItem = Next();
-    }
+    for ( size_t i = 0, n = aColorList.size(); i < n; ++i )
+        if ( *aColorList[ i ] == rColorItem )
+            return i;
     DBG_WARNING( "Color nicht gefunden: GetId()" );
     return 0;
 }
 
+void SvxColorList::Insert( SvxColorItem* pItem, size_t nIndex )
+{
+    if ( nIndex >= aColorList.size() )
+    {
+        aColorList.push_back( pItem );
+    }
+    else
+    {
+        DummyColorList::iterator it = aColorList.begin();
+        ::std::advance( it, nIndex );
+        aColorList.insert( it, pItem );
+    }
+}
+
+SvxColorItem* SvxColorList::GetObject( size_t nIndex )
+{
+    return ( nIndex >= aColorList.size() ) ? NULL : aColorList[ nIndex ];
+}
+
+//=============================================================================
 EditEngineItemPool::EditEngineItemPool( BOOL bPersistenRefCounts )
     : SfxItemPool( String( "EditEngineItemPool", RTL_TEXTENCODING_ASCII_US ), EE_ITEMS_START, EE_ITEMS_END,
                     aItemInfos, 0, bPersistenRefCounts )
diff --git a/editeng/source/editeng/editdoc.hxx b/editeng/source/editeng/editdoc.hxx
index 188992b..6905a2c 100644
--- a/editeng/source/editeng/editdoc.hxx
+++ b/editeng/source/editeng/editdoc.hxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -38,6 +38,7 @@
 #include <svl/style.hxx>
 #include <svl/itempool.hxx>
 #include <tools/table.hxx>
+#include <vector>
 
 class ImpEditEngine;
 class SvxTabStop;
@@ -138,6 +139,7 @@ SV_DECL_PTRARR( ContentInfoArray, ContentAttribsInfoPtr, 1, 1 )
 //	class SvxFontTable
 //	----------------------------------------------------------------------
 DECLARE_TABLE( DummyFontTable, SvxFontItem* )
+
 class SvxFontTable : public DummyFontTable
 {
 public:
@@ -151,14 +153,21 @@ public:
 //	class SvxColorList
 //	----------------------------------------------------------------------
 typedef ContentNode* ContentNodePtr;
-DECLARE_LIST( DummyColorList, SvxColorItem* )
-class SvxColorList : public DummyColorList
+typedef ::std::vector< SvxColorItem* > DummyColorList;
+
+class SvxColorList
 {
+private:
+    DummyColorList aColorList;
+
 public:
             SvxColorList();
             ~SvxColorList();
 
-    ULONG	GetId( const SvxColorItem& rColor );
+    size_t  GetId( const SvxColorItem& rColor );
+    size_t  Count() { return aColorList.size(); };
+    void    Insert( SvxColorItem* pItem, size_t nIndex );
+    SvxColorItem* GetObject( size_t nIndex );
 };
 
 //	----------------------------------------------------------------------
@@ -750,7 +759,7 @@ public:
 
     SfxItemPool&		GetItemPool()					{ return *pItemPool; }
     const SfxItemPool&	GetItemPool() const				{ return *pItemPool; }
-    
+
     void			RemoveItemsFromPool( ContentNode* pNode );
 
     void			InsertAttrib( const SfxPoolItem& rItem, ContentNode* pNode, USHORT nStart, USHORT nEnd );
commit 3b0d47d04166a2f2e416dae433a0c464fda20a97
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Mon Dec 27 08:04:47 2010 -0800

    Remove DECLARE_LIST(ViewList,OutlinerView*)

diff --git a/editeng/inc/editeng/outliner.hxx b/editeng/inc/editeng/outliner.hxx
index 004cb6a..bf8cce8 100644
--- a/editeng/inc/editeng/outliner.hxx
+++ b/editeng/inc/editeng/outliner.hxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -395,8 +395,7 @@ public:
 bool EDITENG_DLLPUBLIC  GetStatusValueForThesaurusFromContext( String &rStatusVal, LanguageType &rLang, const EditView &rEditView );
 void EDITENG_DLLPUBLIC  ReplaceTextWithSynonym( EditView &rEditView, const String &rSynonmText );
 
-
-DECLARE_LIST(ViewList,OutlinerView*)
+typedef ::std::vector< OutlinerView* > ViewList;
 
 class EDITENG_DLLPUBLIC DrawPortionInfo
 {
@@ -727,11 +726,11 @@ public:
     void            SetAddExtLeading( BOOL b );
     BOOL            IsAddExtLeading() const;
 
-    ULONG           InsertView( OutlinerView* pView, ULONG nIndex=LIST_APPEND);
+    size_t          InsertView( OutlinerView* pView, size_t nIndex = size_t(-1) );
     OutlinerView*   RemoveView( OutlinerView* pView );
-    OutlinerView*   RemoveView( ULONG nIndex );
-    OutlinerView*   GetView( ULONG nIndex ) const;
-    ULONG           GetViewCount() const;
+    OutlinerView*   RemoveView( size_t nIndex );
+    OutlinerView*   GetView( size_t nIndex ) const;
+    size_t          GetViewCount() const;
 
     Paragraph*      Insert( const String& rText, ULONG nAbsPos = LIST_APPEND, sal_Int16 nDepth = 0 );
     void            SetText( const OutlinerParaObject& );
@@ -768,9 +767,7 @@ public:
     BOOL            HasChilds( Paragraph* pParagraph ) const;
     ULONG           GetChildCount( Paragraph* pParent ) const;
     BOOL            IsExpanded( Paragraph* pPara ) const;
-//	Paragraph*      GetParagraph( Paragraph* pParent, ULONG nRelPos ) const;
     Paragraph*      GetParent( Paragraph* pParagraph ) const;
-//	ULONG           GetRelPos( Paragraph* pParent, Paragraph* pPara ) const;
     ULONG           GetAbsPos( Paragraph* pPara );
 
     sal_Int16		GetDepth( ULONG nPara ) const;
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index f73dbde..5896d34 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -66,6 +66,8 @@
 // #101498# calculate if it's RTL or not
 #include <unicode/ubidi.h>
 
+using ::std::advance;
+
 #define DEFAULT_SCALE	75
 
 static const USHORT nDefStyles = 3;	// Sonderbehandlung fuer die ersten 3 Ebenen
@@ -1141,9 +1143,9 @@ void Outliner::InvalidateBullet( Paragraph* /*pPara*/, ULONG nPara )
     DBG_CHKTHIS(Outliner,0);
 
     long nLineHeight = (long)pEditEngine->GetLineHeight((USHORT)nPara );
-    OutlinerView* pView = aViewList.First();
-    while( pView )
+    for ( size_t i = 0, n = aViewList.size(); i < n; ++i )
     {
+        OutlinerView* pView = aViewList[ i ];
         Point aPos( pView->pEditView->GetWindowPosTopLeft((USHORT)nPara ) );
         Rectangle aRect( pView->GetOutputArea() );
         aRect.Right() = aPos.X();
@@ -1152,7 +1154,6 @@ void Outliner::InvalidateBullet( Paragraph* /*pPara*/, ULONG nPara )
         aRect.Bottom() += nLineHeight;
 
         pView->GetWindow()->Invalidate( aRect );
-        pView = aViewList.Next();
     }
 }
 
@@ -1249,8 +1250,6 @@ void Outliner::ImpTextPasted( ULONG nStartPara, USHORT nCount )
     const ULONG nStart = nStartPara;
 
     Paragraph* pPara = pParaList->GetParagraph( nStartPara );
-//	Paragraph* pLastConverted = NULL;
-//    bool bFirst = true;
 
     while( nCount && pPara )
     {
@@ -1365,30 +1364,44 @@ Outliner::~Outliner()
     delete pEditEngine;
 }
 
-ULONG Outliner::InsertView( OutlinerView* pView, ULONG nIndex )
+size_t Outliner::InsertView( OutlinerView* pView, size_t nIndex )
 {
     DBG_CHKTHIS(Outliner,0);
-
-    aViewList.Insert( pView, nIndex );
+    size_t ActualIndex;
+//joe
+    if ( nIndex >= aViewList.size() )
+    {
+        aViewList.push_back( pView );
+        ActualIndex = aViewList.size() - 1;
+    }
+    else
+    {
+        ViewList::iterator it = aViewList.begin();
+        advance( it, nIndex );
+        ActualIndex = nIndex;
+    }
     pEditEngine->InsertView(  pView->pEditView, (USHORT)nIndex );
-    return aViewList.GetPos( pView );
+    return ActualIndex;
 }
 
 OutlinerView* Outliner::RemoveView( OutlinerView* pView )
 {
     DBG_CHKTHIS(Outliner,0);
 
-    ULONG nPos = aViewList.GetPos( pView );
-    if ( nPos != LIST_ENTRY_NOTFOUND )
+    for ( ViewList::iterator it = aViewList.begin(); it < aViewList.end(); ++it )
     {
-        pView->pEditView->HideCursor(); // HACK wg. BugId 10006
-        pEditEngine->RemoveView(  pView->pEditView );
-        aViewList.Remove( nPos );
+        if ( *it == pView )
+        {
+            pView->pEditView->HideCursor(); // HACK wg. BugId 10006
+            pEditEngine->RemoveView(  pView->pEditView );
+            aViewList.erase( it );
+            break;
+        }
     }
     return NULL;	// MT: return ueberfluessig
 }
 
-OutlinerView* Outliner::RemoveView( ULONG nIndex )
+OutlinerView* Outliner::RemoveView( size_t nIndex )
 {
     DBG_CHKTHIS(Outliner,0);
 
@@ -1396,21 +1409,27 @@ OutlinerView* Outliner::RemoveView( ULONG nIndex )
     pEditView->HideCursor(); // HACK wg. BugId 10006
 
     pEditEngine->RemoveView( (USHORT)nIndex );
-    aViewList.Remove( nIndex );
+
+    {
+        ViewList::iterator it = aViewList.begin();
+        advance( it, nIndex );
+        aViewList.erase( it );
+    }
+
     return NULL;	// MT: return ueberfluessig
 }
 
 
-OutlinerView* Outliner::GetView( ULONG nIndex ) const
+OutlinerView* Outliner::GetView( size_t nIndex ) const
 {
     DBG_CHKTHIS(Outliner,0);
-    return aViewList.GetObject( nIndex );
+    return ( nIndex >= aViewList.size() ) ? NULL : aViewList[ nIndex ];
 }
 
-ULONG Outliner::GetViewCount() const
+size_t Outliner::GetViewCount() const
 {
     DBG_CHKTHIS(Outliner,0);
-    return aViewList.Count();
+    return aViewList.size();
 }
 
 void Outliner::ParagraphInsertedHdl()
@@ -1892,13 +1911,13 @@ static bool isSameNumbering( const SvxNumberFormat& rN1, const SvxNumberFormat&
 {
     if( rN1.GetNumberingType() != rN2.GetNumberingType() )
         return false;
-        
+
     if( rN1.GetNumStr(1) != rN2.GetNumStr(1) )
         return false;
-        
+
     if( (rN1.GetPrefix() != rN2.GetPrefix()) || (rN1.GetSuffix() != rN2.GetSuffix()) )
         return false;
-        
+
     return true;
 }
 
@@ -1923,10 +1942,10 @@ sal_uInt16 Outliner::ImplGetNumbering( USHORT nPara, const SvxNumberFormat* pPar
             break;
 
         const SvxNumberFormat* pFmt = GetNumberFormat( nPara );
-        
+
         if( pFmt == 0 )
             continue; // ignore paragraphs without bullets
-            
+
         // check if numbering is the same
         if( !isSameNumbering( *pFmt, *pParaFmt ) )
             break;
commit 406a069872db04cfcd1c864420c46630485bf2cb
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Mon Dec 27 06:29:50 2010 -0800

    Remove DECLARE_LIST(EditList, AppWin*)
    
    released under LGPL 3+

diff --git a/basic/source/app/app.cxx b/basic/source/app/app.cxx
index 73c9e15..3ff9441 100644
--- a/basic/source/app/app.cxx
+++ b/basic/source/app/app.cxx
@@ -627,17 +627,15 @@ void BasicFrame::LoadIniFile()
     if ( pBasic )
         pBasic->LoadIniFile();
 
-    for ( i = 0 ; i < pList->Count() ; i++ )
-        pList->GetObject( i )->LoadIniFile();
+    for ( i = 0 ; i < pList->size() ; i++ )
+        pList->at( i )->LoadIniFile();
 }
 
 BasicFrame::~BasicFrame()
 {
-    AppWin* p = pList->First();
-    DBG_ASSERT( !p, "Still open FileWindows");
-    if( p )
-        while( (p = pList->Remove() ) != NULL )
-            delete p;
+    for ( size_t i = 0, n = pList->size(); i < n; ++i )
+        delete pList->at( i );
+    pList->clear();
 
     MenuBar *pBar = GetMenuBar();
     SetMenuBar( NULL );
@@ -699,8 +697,8 @@ IMPL_LINK( BasicFrame, CheckAllFiles, Timer*, pTimer )
     {
         AppWin* pStartWin = pWork;
         Window* pFocusWin = Application::GetFocusWindow();
-        for ( int i = pList->Count()-1 ; i >= 0 ; i-- )
-            pList->GetObject( i )->CheckReload();
+        for ( size_t i = pList->size() ; i > 0 ; )
+            pList->at( --i )->CheckReload();
 
         if ( pWork != pStartWin )
         {
@@ -777,11 +775,10 @@ void BasicFrame::Resize()
 
 
     // Resize possibly maximized window
-    ULONG i;
-    for( i = pList->Count(); i > 0 ; i-- )
+    for( size_t i = pList->size(); i > 0 ; i-- )
     {
-        if ( pList->GetObject( i-1 )->GetWinState() == TT_WIN_STATE_MAX )
-            pList->GetObject( i-1 )->Maximize();
+        if ( pList->at( i-1 )->GetWinState() == TT_WIN_STATE_MAX )
+            pList->at( i-1 )->Maximize();
     }
 }
 
@@ -801,42 +798,58 @@ void BasicFrame::GetFocus()
 IMPL_LINK( BasicFrame, CloseButtonClick, void*, EMPTYARG )
 {
     AppWin* p;
-    for ( p = pList->Last() ; p && p->GetWinState() != TT_WIN_STATE_MAX ; p = pList->Prev() )
-    {};
-    if ( p )
-        p->GrabFocus();
+    for ( size_t i = pList->size(); i > 0; --i )
+    {
+        p = pList->at( i - 1 );
+        if ( p->GetWinState() == TT_WIN_STATE_MAX )
+        {
+            p->GrabFocus();
+            break;
+        }
+    }
     return Command( RID_FILECLOSE, FALSE );
 }
 
 IMPL_LINK( BasicFrame, FloatButtonClick, void*, EMPTYARG )
 {
     AppWin* p;
-    for ( p = pList->Last() ; p && p->GetWinState() != TT_WIN_STATE_MAX ; p = pList->Prev() )
-    {};
-    if ( p )
-        p->TitleButtonClick( TITLE_BUTTON_DOCKING );
+    for ( size_t i = pList->size(); i > 0; --i )
+    {
+        p = pList->at( i - 1 );
+        if ( p->GetWinState() == TT_WIN_STATE_MAX )
+        {
+            p->TitleButtonClick( TITLE_BUTTON_DOCKING );
+            break;
+        }
+    }
     return 1;
 }
 
 IMPL_LINK( BasicFrame, HideButtonClick, void*, EMPTYARG )
 {
     AppWin* p;
-    for ( p = pList->Last() ; p && p->GetWinState() != TT_WIN_STATE_MAX ; p = pList->Prev() )
-    {};
-    if ( p )
-        p->TitleButtonClick( TITLE_BUTTON_HIDE );
+    for ( size_t i = pList->size(); i > 0; --i )
+    {
+        p = pList->at( i - 1 );
+        if ( p->GetWinState() == TT_WIN_STATE_MAX )
+        {
+            p->TitleButtonClick( TITLE_BUTTON_HIDE );
+            break;
+        }
+    }
     return 1;
 }
 
 void BasicFrame::WinShow_Hide()
 {
-    if ( !pList->Count() )
+    if ( pList->empty() )
         return;
 
     AppWin* p;
     BOOL bWasFullscreen = FALSE;
-    for ( p = pList->Last() ; p ; p = pList->Prev() )
+    for ( size_t i = pList->size(); i > 0; --i )
     {
+        p = pList->at( i - 1 );
         if ( p->pDataEdit )
         {
             if ( p->GetWinState() & TT_WIN_STATE_HIDE	// Hidden
@@ -855,16 +868,26 @@ void BasicFrame::WinMax_Restore()
     // The application buttons
     AppWin* p;
     BOOL bHasFullscreenWin = FALSE;
-    for( p = pList->First(); p && !bHasFullscreenWin ; p = pList->Next() )
-        bHasFullscreenWin |= ( p->GetWinState() == TT_WIN_STATE_MAX );
+    for ( size_t i = 0, n = pList->size(); i < n && !bHasFullscreenWin; ++i )
+    {
+        p = pList->at( i );
+        bHasFullscreenWin = ( p->GetWinState() == TT_WIN_STATE_MAX );
+    }
     GetMenuBar()->ShowButtons( bHasFullscreenWin, FALSE, FALSE );
     WinShow_Hide();
 }
 
 void BasicFrame::RemoveWindow( AppWin *pWin )
 {
-    pList->Remove( pWin );
-    pWork = pList->Last();
+    for ( EditList::iterator it = pList->begin(); it < pList->end(); ++it )
+    {
+        if ( *it == pWin )
+        {
+            pList->erase( it );
+            break;
+        }
+    }
+    pWork = ( pList->empty() ) ? NULL : pList->back();
 
     WinShow_Hide();
 
@@ -874,7 +897,8 @@ void BasicFrame::RemoveWindow( AppWin *pWin )
     WinMax_Restore();
 
     Menu* pMenu = GetMenuBar();
-    if( pList->Count() == 0 ) {
+    if( pList->empty() )
+    {
         pMenu->EnableItem( RID_APPEDIT,   FALSE );
         pMenu->EnableItem( RID_APPRUN,	  FALSE );
         pMenu->EnableItem( RID_APPWINDOW, FALSE );
@@ -893,14 +917,15 @@ void BasicFrame::RemoveWindow( AppWin *pWin )
 
 void BasicFrame::AddWindow( AppWin *pWin )
 {
-    pList->Insert( pWin, LIST_APPEND );
+    pList->push_back( pWin );
     pWork = pWin;
 
     WinMax_Restore();
 
     // Enable main menu
     MenuBar* pMenu = GetMenuBar();
-    if( pList->Count() > 0 ) {
+    if( !pList->empty() )
+    {
         pMenu->EnableItem( RID_APPEDIT,   TRUE );
         pMenu->EnableItem( RID_APPRUN,	  TRUE );
         pMenu->EnableItem( RID_APPWINDOW, TRUE );
@@ -938,8 +963,15 @@ void BasicFrame::WindowRenamed( AppWin *pWin )
 void BasicFrame::FocusWindow( AppWin *pWin )
 {
     pWork = pWin;
-    pList->Remove( pWin );
-    pList->Insert( pWin, LIST_APPEND );
+    for ( EditList::iterator it = pList->begin(); it < pList->end(); ++it )
+    {
+        if ( *it == pWin )
+        {
+            pList->erase( it );
+            break;
+        }
+    }
+    pList->push_back( pWin );
     pWin->Minimize( FALSE );
 
     aAppFile = pWin->GetText();
@@ -976,8 +1008,8 @@ BOOL BasicFrame::Close()
 
 BOOL BasicFrame::CloseAll()
 {
-    while ( pList->Count() )
-        if ( !pList->Last()->Close() )
+    while ( !pList->empty() )
+        if ( !pList->back()->Close() )
             return FALSE;
     return TRUE;
 }
@@ -985,8 +1017,11 @@ BOOL BasicFrame::CloseAll()
 BOOL BasicFrame::CompileAll()
 {
     AppWin* p;
-    for( p = pList->First(); p; p = pList->Next() )
-      if( p->ISA(AppBasEd) && !((AppBasEd*)p)->Compile() ) return FALSE;
+    for ( size_t i = 0, n = pList->size(); i < n; ++i )
+    {
+        p = pList->at( i );
+        if ( p->ISA(AppBasEd) && !((AppBasEd*)p)->Compile() ) return FALSE;
+    }
     return TRUE;
 }
 
@@ -1325,7 +1360,14 @@ long BasicFrame::Command( short nID, BOOL bChecked )
                 else
                 {
                     AppWin *w = NULL;
-                    for ( w = pList->Last() ; w ? !w->ISA(AppBasEd) : FALSE ; w = pList->Prev() ) ;
+                    for ( size_t i = pList->size(); i > 0; --i )
+                    {
+                        if ( pList->at( i-1 )->ISA( AppBasEd ) )
+                        {
+                            w = pList->at( i-1 );
+                            break;
+                        }
+                    }
                     if ( w )
                     {
                         p = ((AppBasEd*)w);
@@ -1399,13 +1441,12 @@ long BasicFrame::Command( short nID, BOOL bChecked )
         case RID_WINTILE:
             {
                 WindowArrange aArange;
-                for ( ULONG i = 0 ; i < pList->Count() ; i++ )
+                for ( size_t i = 0, n = pList->size(); i < n ; i++ )
                 {
-                    aArange.AddWindow( pList->GetObject( i ) );
-                    pList->GetObject( i )->Restore();
+                    aArange.AddWindow( pList->at( i ) );
+                    pList->at( i )->Restore();
                 }
 
-
                 sal_Int32 nTitleHeight;
                 {
                     sal_Int32 nDummy1, nDummy2, nDummy3;
@@ -1423,10 +1464,10 @@ long BasicFrame::Command( short nID, BOOL bChecked )
         case RID_WINTILEHORZ:
             {
                 WindowArrange aArange;
-                for ( ULONG i = 0 ; i < pList->Count() ; i++ )
+                for ( size_t i = 0, n = pList->size(); i < n ; i++ )
                 {
-                    aArange.AddWindow( pList->GetObject( i ) );
-                    pList->GetObject( i )->Restore();
+                    aArange.AddWindow( pList->at( i ) );
+                    pList->at( i )->Restore();
                 }
 
 
@@ -1447,10 +1488,10 @@ long BasicFrame::Command( short nID, BOOL bChecked )
         case RID_WINTILEVERT:
             {
                 WindowArrange aArange;
-                for ( ULONG i = 0 ; i < pList->Count() ; i++ )
+                for ( size_t i = 0, n = pList->size(); i < n ; i++ )
                 {
-                    aArange.AddWindow( pList->GetObject( i ) );
-                    pList->GetObject( i )->Restore();
+                    aArange.AddWindow( pList->at( i ) );
+                    pList->at( i )->Restore();
                 }
 
 
@@ -1470,9 +1511,9 @@ long BasicFrame::Command( short nID, BOOL bChecked )
             break;
         case RID_WINCASCADE:
             {
-                for ( USHORT i = 0 ; i < pList->Count() ; i++ )
+                for ( size_t i = 0, n = pList->size(); i < n ; i++ )
                 {
-                    pList->GetObject( i )->Cascade( i );
+                    pList->at( i )->Cascade( i );
                 }
             }
             break;
@@ -1523,8 +1564,9 @@ long BasicFrame::Command( short nID, BOOL bChecked )
 BOOL BasicFrame::SaveAll()
 {
     AppWin* p, *q = pWork;
-    for( p = pList->First(); p; p = pList->Next() )
+    for ( size_t i = 0, n = pList->size(); i < n ; i++ )
     {
+        p = pList->at( i );
         USHORT nRes = p->QuerySave( QUERY_DISK_CHANGED );
         if( (( nRes == SAVE_RES_ERROR ) && QueryBox(this,SttResId(IDS_ASKSAVEERROR)).Execute() == RET_NO )
             || ( nRes == SAVE_RES_CANCEL ) )
@@ -1543,8 +1585,9 @@ IMPL_LINK( BasicFrame, ModuleWinExists, String*, pFilename )
 AppBasEd* BasicFrame::FindModuleWin( const String& rName )
 {
     AppWin* p;
-    for( p = pList->First(); p; p = pList->Next() )
+    for ( size_t i = 0, n = pList->size(); i < n ; i++ )
     {
+        p = pList->at( i );
         if( p->ISA(AppBasEd) && ((AppBasEd*)p)->GetModName() == rName )
             return ((AppBasEd*)p);
     }
@@ -1554,8 +1597,9 @@ AppBasEd* BasicFrame::FindModuleWin( const String& rName )
 AppError* BasicFrame::FindErrorWin( const String& rName )
 {
     AppWin* p;
-    for( p = pList->First(); p; p = pList->Next() )
+    for ( size_t i = 0, n = pList->size(); i < n ; i++ )
     {
+        p = pList->at( i );
         if( p->ISA(AppError) && ((AppError*)p)->GetText() == rName )
             return ((AppError*)p);
     }
@@ -1565,8 +1609,9 @@ AppError* BasicFrame::FindErrorWin( const String& rName )
 AppWin* BasicFrame::FindWin( const String& rName )
 {
     AppWin* p;
-    for( p = pList->First(); p; p = pList->Next() )
+    for ( size_t i = 0, n = pList->size(); i < n ; i++ )
     {
+        p = pList->at( i );
         if( p->GetText() == rName )
             return p;
     }
@@ -1576,8 +1621,9 @@ AppWin* BasicFrame::FindWin( const String& rName )
 AppWin* BasicFrame::FindWin( USHORT nWinId )
 {
     AppWin* p;
-    for( p = pList->First(); p; p = pList->Next() )
+    for ( size_t i = 0, n = pList->size(); i < n ; i++ )
     {
+        p = pList->at( i );
         if( p->GetWinId() == nWinId )
             return p;
     }
@@ -1587,8 +1633,9 @@ AppWin* BasicFrame::FindWin( USHORT nWinId )
 AppWin* BasicFrame::IsWinValid( AppWin* pMaybeWin )
 {
     AppWin* p;
-    for( p = pList->First(); p; p = pList->Next() )
+    for ( size_t i = 0, n = pList->size(); i < n ; i++ )
     {
+        p = pList->at( i );
         if( p == pMaybeWin )
             return p;
     }
@@ -1597,9 +1644,9 @@ AppWin* BasicFrame::IsWinValid( AppWin* pMaybeWin )
 
 IMPL_LINK( BasicFrame, WriteString, String*, pString )
 {
-    if ( pList->Last() )
+    if ( !pList->empty() )
     {
-        pList->Last()->pDataEdit->ReplaceSelected( *pString );
+        pList->back()->pDataEdit->ReplaceSelected( *pString );
         return TRUE;
     }
     else
diff --git a/basic/source/app/app.hxx b/basic/source/app/app.hxx
index d866418..f523b28 100644
--- a/basic/source/app/app.hxx
+++ b/basic/source/app/app.hxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -39,8 +39,8 @@
 
 class BasicFrame;
 #include <basic/mybasic.hxx>
+#include <vector>
 
-class EditList;
 class AppWin;
 class AppEdit;
 class AppBasEd;
@@ -50,12 +50,12 @@ class StatusLine;
 class BasicPrinter;
 struct TTLogMsg;
 
+typedef ::std::vector< AppWin* > EditList;
+
 class BasicApp : public Application {
     short		nWait;				// Wait-Zaehler
 public:
-//	Help*		pHelp;				// Hilfesystem
     BasicFrame*	pFrame;				// Frame Window
-//	MenuBar*	pMainMenu;			// Hauptmenue
     Accelerator*	pMainAccel;		// Acceleratoren
 
     int Main( );
@@ -90,13 +90,13 @@ class BasicFrame : public WorkWindow, public SfxBroadcaster, public SfxListener
 using SystemWindow::Notify;
 using Window::Command;
 
-virtual BOOL Close();
+    virtual BOOL Close();
     BOOL CloseAll();          // Close all windows
     BOOL CompileAll();        // Compile all texts
     AutoTimer aLineNum;       // Show the line numbers
-virtual void Resize();
-virtual void Move();
-virtual void GetFocus();
+    virtual void Resize();
+    virtual void Move();
+    virtual void GetFocus();
     void LoadLibrary();
     void SaveLibrary();
     BOOL bIsAutoRun;
diff --git a/basic/source/app/appwin.cxx b/basic/source/app/appwin.cxx
index 25dd2f1..1f0bf79 100644
--- a/basic/source/app/appwin.cxx
+++ b/basic/source/app/appwin.cxx
@@ -226,7 +226,7 @@ long AppWin::PreNotify( NotifyEvent& rNEvt )
     if ( rNEvt.GetType() == EVENT_MOUSEBUTTONDOWN )
         Activate();
     if ( rNEvt.GetType() == EVENT_GETFOCUS )
-        if ( pFrame->pList->Last() != this )
+        if ( pFrame->pList->back() != this )
             Activate();
     return FALSE;		// Der event soll weiter verarbeitet werden
 }
diff --git a/basic/source/app/appwin.hxx b/basic/source/app/appwin.hxx
index ef36360..efd2dd8 100644
--- a/basic/source/app/appwin.hxx
+++ b/basic/source/app/appwin.hxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -35,6 +35,8 @@
 #include "app.hxx"
 #include "dataedit.hxx"
 
+#include <vector>
+
 typedef USHORT QueryBits;
 #define QUERY_NONE				( QueryBits ( 0x00 ) )
 #define QUERY_DIRTY				( QueryBits ( 0x01 ) )
@@ -75,7 +77,6 @@ protected:
 
     short nId;						// ID-Nummer( "Unnamed n" )
     BasicFrame* pFrame;				// Parent-Window
-//	Icon* pIcon;					// Document icon
     String aFind;					// Search string
     String aReplace;				// Replace string
     BOOL bFind;						// TRUE if search not replace
@@ -133,7 +134,7 @@ public:
     void SetWinId( USHORT nWId ) { nWinId = nWId; }
 };
 
-DECLARE_LIST( EditList, AppWin* )
+typedef ::std::vector< AppWin* > EditList;
 
 #endif
 
diff --git a/basic/source/app/status.cxx b/basic/source/app/status.cxx
index 2b1ee2a..f46675c 100644
--- a/basic/source/app/status.cxx
+++ b/basic/source/app/status.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -113,7 +113,7 @@ void StatusLine::LoadTaskToolBox()
         Window* pWin = pFrame->FindWin( pWinMenu->GetItemId( nFirstWinPos ) );
 
         if ( pWin )
-            pTaskToolBox->UpdateTask( Image(), pWin->GetText(), pWin == pFrame->pList->Last() && !( pFrame->pList->Last()->GetWinState() & TT_WIN_STATE_HIDE ) );
+            pTaskToolBox->UpdateTask( Image(), pWin->GetText(), pWin == pFrame->pList->back() && !( pFrame->pList->back()->GetWinState() & TT_WIN_STATE_HIDE ) );
 
         nFirstWinPos++;
     }


More information about the Libreoffice-commits mailing list