[Libreoffice-commits] .: 20 commits - extensions/source sc/inc sc/source sc/workben sfx2/inc sfx2/source sw/inc sw/source

Michael Stahl mst at kemper.freedesktop.org
Wed Jun 20 10:48:50 PDT 2012


 extensions/source/bibliography/bibconfig.cxx |   35 +--
 extensions/source/bibliography/bibconfig.hxx |    6 
 extensions/source/bibliography/framectr.cxx  |   28 +-
 extensions/source/bibliography/framectr.hxx  |    5 
 extensions/source/bibliography/toolbar.cxx   |   10 -
 extensions/source/bibliography/toolbar.hxx   |    6 
 sc/inc/cellsuno.hxx                          |    3 
 sc/source/ui/unoobj/cellsuno.cxx             |   48 ++--
 sc/workben/result.hxx                        |    3 
 sfx2/inc/arrdecl.hxx                         |   44 +++-
 sfx2/inc/sfx2/app.hxx                        |    3 
 sfx2/inc/sfx2/bindings.hxx                   |    5 
 sfx2/inc/sfx2/childwin.hxx                   |    4 
 sfx2/inc/sfx2/fcontnr.hxx                    |    1 
 sfx2/inc/sfx2/frame.hxx                      |    5 
 sfx2/inc/sfx2/module.hxx                     |    4 
 sfx2/source/appl/app.cxx                     |    2 
 sfx2/source/appl/appchild.cxx                |   13 -
 sfx2/source/appl/appmisc.cxx                 |   32 ++-
 sfx2/source/appl/appreg.cxx                  |   12 -
 sfx2/source/appl/childwin.cxx                |   20 --
 sfx2/source/appl/module.cxx                  |   29 +--
 sfx2/source/appl/workwin.cxx                 |    4 
 sfx2/source/control/bindings.cxx             |   15 -
 sfx2/source/doc/docfac.cxx                   |    4 
 sfx2/source/doc/objxtor.cxx                  |   21 +-
 sfx2/source/inc/appdata.hxx                  |    3 
 sfx2/source/menu/mnuitem.cxx                 |    4 
 sfx2/source/statbar/stbitem.cxx              |    4 
 sfx2/source/toolbox/tbxitem.cxx              |    4 
 sfx2/source/view/frame.cxx                   |   47 ++--
 sfx2/source/view/viewfrm.cxx                 |   29 +--
 sfx2/source/view/viewsh.cxx                  |   30 +--
 sw/inc/swtable.hxx                           |   18 +
 sw/inc/tblsel.hxx                            |    4 
 sw/inc/tox.hxx                               |    2 
 sw/source/core/doc/docchart.cxx              |    6 
 sw/source/core/doc/docsort.cxx               |    2 
 sw/source/core/doc/doctxm.cxx                |    8 
 sw/source/core/doc/gctable.cxx               |   98 ++++------
 sw/source/core/doc/htmltbl.cxx               |   34 +--
 sw/source/core/doc/tblcpy.cxx                |   97 ++++------
 sw/source/core/doc/tblrwcl.cxx               |  260 +++++++++++++--------------
 sw/source/core/docnode/ndcopy.cxx            |   35 +--
 sw/source/core/docnode/ndtbl.cxx             |  102 +++++-----
 sw/source/core/docnode/ndtbl1.cxx            |   12 -
 sw/source/core/docnode/nodes.cxx             |   28 +-
 sw/source/core/edit/edtox.cxx                |    2 
 sw/source/core/fields/cellfml.cxx            |    8 
 sw/source/core/fields/ddetbl.cxx             |   20 +-
 sw/source/core/frmedt/fetab.cxx              |   11 -
 sw/source/core/frmedt/tblsel.cxx             |   43 ++--
 sw/source/core/inc/tblrwcl.hxx               |   11 -
 sw/source/core/layout/tabfrm.cxx             |    4 
 sw/source/core/table/swnewtable.cxx          |   50 ++---
 sw/source/core/table/swtable.cxx             |   60 +++---
 sw/source/core/tox/tox.cxx                   |    4 
 sw/source/core/undo/untbl.cxx                |   31 +--
 sw/source/core/unocore/unochart.cxx          |    8 
 sw/source/core/unocore/unoidx.cxx            |    6 
 sw/source/core/unocore/unotbl.cxx            |   42 ++--
 sw/source/filter/html/htmltab.cxx            |    8 
 sw/source/filter/html/htmltabw.cxx           |   21 +-
 sw/source/filter/rtf/rtftbl.cxx              |   34 +--
 sw/source/filter/writer/wrtswtbl.cxx         |    6 
 sw/source/filter/ww1/fltshell.cxx            |    8 
 sw/source/filter/ww8/WW8TableInfo.cxx        |   10 -
 sw/source/filter/ww8/docxattributeoutput.cxx |    2 
 sw/source/filter/ww8/rtfattributeoutput.cxx  |    2 
 sw/source/filter/ww8/wrtw8nds.cxx            |    2 
 sw/source/filter/ww8/ww8par2.cxx             |   10 -
 sw/source/filter/xml/xmltble.cxx             |   26 +-
 sw/source/filter/xml/xmltbli.cxx             |    4 
 sw/source/ui/inc/toxmgr.hxx                  |    2 
 sw/source/ui/index/toxmgr.cxx                |    6 
 sw/source/ui/misc/srtdlg.cxx                 |    2 
 sw/source/ui/shells/textidx.cxx              |    2 
 sw/source/ui/vba/vbatablehelper.cxx          |    8 
 78 files changed, 837 insertions(+), 805 deletions(-)

New commits:
commit 7092fc03000cd752fdadb9c6b800e631ee61115c
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Jun 20 19:45:46 2012 +0200

    adapt DBG_UTIL code to previous commit
    
    Change-Id: I021b4d70a02de7a66e0af82a859ae89e1a7d1231

diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx
index 835e0cf..4dea4f7 100644
--- a/sw/source/core/doc/htmltbl.cxx
+++ b/sw/source/core/doc/htmltbl.cxx
@@ -1679,8 +1679,10 @@ void SwHTMLTableLayout::SetWidths( sal_Bool bCallPass2, sal_uInt16 nAbsAvail,
             // check if the tables have correct widths
             SwTwips nSize = pSwTable->GetFrmFmt()->GetFrmSize().GetWidth();
             const SwTableLines& rLines = pSwTable->GetTabLines();
-            for( sal_uInt16 n = 0; n < rLines.Count(); ++n  )
+            for (size_t n = 0; n < rLines.size(); ++n)
+            {
                 _CheckBoxWidth( *rLines[ n ], nSize );
+            }
         }
 #endif
 
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index 8b1cb3d..0bbc137 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -196,7 +196,7 @@ void _CheckBoxWidth( const SwTableLine& rLine, SwTwips nSize );
 #define CHECKBOXWIDTH                                           \
     {                                                           \
         SwTwips nSize = GetFrmFmt()->GetFrmSize().GetWidth();   \
-        for( sal_uInt16 nTmp = 0; nTmp < aLines.Count(); ++nTmp )   \
+        for (size_t nTmp = 0; nTmp < aLines.size(); ++nTmp)   \
             ::_CheckBoxWidth( *aLines[ nTmp ], nSize );         \
     }
 
@@ -721,12 +721,12 @@ sal_Bool SwTable::AppendRow( SwDoc* pDoc, sal_uInt16 nCnt )
     // Find all Boxes/Lines
     _FndBox aFndBox( 0, 0 );
     {
-        const SwTableLine* pLLine = GetTabLines().back();
+        SwTableLine* pLLine = GetTabLines().back();
 
         const SwSelBoxes* pBxs = 0;     // Dummy!!!
         _FndPara aPara( *pBxs, &aFndBox );
 
-        _FndBoxAppendRowLine( (SwTableLine*)pLLine, &aPara );
+        _FndBoxAppendRowLine(pLLine, &aPara);
     }
     if( aFndBox.GetLines().empty() )
         return sal_False;
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 277efde..d106b48 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -1059,8 +1059,10 @@ void SwTable::SetTabCols( const SwTabCols &rNew, const SwTabCols &rOld,
 extern void _CheckBoxWidth( const SwTableLine&, SwTwips );
         // checke doch mal ob die Tabellen korrekte Breiten haben
         SwTwips nSize = GetFrmFmt()->GetFrmSize().GetWidth();
-        for( sal_uInt16 n = 0; n < aLines.Count(); ++n  )
+        for (size_t n = 0; n < aLines.size(); ++n)
+        {
             _CheckBoxWidth( *aLines[ n ], nSize );
+        }
     }
 #endif
 }
commit d69fdd1ed634be8426f9ff80f9411187da29f00a
Author: Noel Grandin <noel at peralex.com>
Date:   Mon Jun 18 18:04:44 2012 +0200

    Convert SV_DECL_PTRARR_DEL(SwTableLines) to std::vector
    
    Along the way, simplify a lot of the ForEach callback methods.
    
    Change-Id: I54bc87c1060f1d73470ca8b7fd645ffa23059606

diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx
index 29c779a..8a6624e 100644
--- a/sw/inc/swtable.hxx
+++ b/sw/inc/swtable.hxx
@@ -73,7 +73,18 @@ struct Parm;
 SV_DECL_REF( SwServerObject )
 #endif
 
-SV_DECL_PTRARR_DEL(SwTableLines, SwTableLine*, 10)
+class SwTableLines : public std::vector<SwTableLine*> {
+public:
+    // free's any remaining child objects
+    ~SwTableLines();
+
+    // return USHRT_MAX if not found, else index of position
+    sal_uInt16 GetPos(const SwTableLine* pBox) const
+    {
+        const_iterator it = std::find(begin(), end(), pBox);
+        return it == end() ? USHRT_MAX : it - begin();
+    }
+};
 
 class SwTableBoxes : public std::vector<SwTableBox*> {
 public:
@@ -89,7 +100,6 @@ public:
 // (for calculation in table).
 typedef SwTableBox* SwTableBoxPtr;
 SV_DECL_PTRARR_SORT( SwTableSortBoxes, SwTableBoxPtr, 25 )
-typedef SwTableLine* SwTableLinePtr;
 
 class SW_DLLPUBLIC SwTable: public SwClient          //Client of FrmFmt.
 {
@@ -176,7 +186,7 @@ public:
     void SetTableModel( sal_Bool bNew ){ bNewModel = bNew; }
     sal_Bool IsNewModel() const { return bNewModel; }
 
-    sal_uInt16 GetRowsToRepeat() const { return Min( GetTabLines().Count(), nRowsToRepeat ); }
+    sal_uInt16 GetRowsToRepeat() const { return Min( (sal_uInt16)GetTabLines().size(), nRowsToRepeat ); }
     sal_uInt16 _GetRowsToRepeat() const { return nRowsToRepeat; }
     void SetRowsToRepeat( sal_uInt16 nNumOfRows ) { nRowsToRepeat = nNumOfRows; }
 
@@ -252,7 +262,7 @@ public:
 
     void FindSuperfluousRows( SwSelBoxes& rBoxes )
         { _FindSuperfluousRows( rBoxes, 0, 0 ); }
-    void CheckRowSpan( SwTableLinePtr &rpLine, bool bUp ) const;
+    void CheckRowSpan( SwTableLine* &rpLine, bool bUp ) const;
 
           SwTableSortBoxes& GetTabSortBoxes()       { return aSortCntBoxes; }
     const SwTableSortBoxes& GetTabSortBoxes() const { return aSortCntBoxes; }
diff --git a/sw/inc/tblsel.hxx b/sw/inc/tblsel.hxx
index a4b7728..63fa38a 100644
--- a/sw/inc/tblsel.hxx
+++ b/sw/inc/tblsel.hxx
@@ -221,8 +221,8 @@ struct _FndPara
         : rBoxes(rPara.rBoxes), pFndLine(pFL), pFndBox(rPara.pFndBox) {}
 };
 
-sal_Bool _FndBoxCopyCol( const SwTableBox*& rpBox, void* pPara );
-SW_DLLPUBLIC sal_Bool _FndLineCopyCol( const SwTableLine*& rpLine, void* pPara );
+SW_DLLPUBLIC void ForEach_FndLineCopyCol(SwTableLines& rLines, _FndPara* pFndPara );
+
 
 
 #endif  //  _TBLSEL_HXX
diff --git a/sw/source/core/doc/docchart.cxx b/sw/source/core/doc/docchart.cxx
index f48fab4..ae23079 100644
--- a/sw/source/core/doc/docchart.cxx
+++ b/sw/source/core/doc/docchart.cxx
@@ -84,15 +84,15 @@ sal_Bool SwTable::IsTblComplexForChart( const String& rSelection ) const
         pSttBox = (*pLns)[ 0 ]->GetTabBoxes().front();
         while( !pSttBox->GetSttNd() )
             // Until the Content Box!
-            pSttBox = pSttBox->GetTabLines()[ 0 ]->GetTabBoxes().front();
+            pSttBox = pSttBox->GetTabLines().front()->GetTabBoxes().front();
 
-        const SwTableBoxes* pBoxes = &(*pLns)[ pLns->Count()-1 ]->GetTabBoxes();
+        const SwTableBoxes* pBoxes = &pLns->back()->GetTabBoxes();
         pEndBox = pBoxes->back();
         while( !pEndBox->GetSttNd() )
         {
             // Until the Content Box!
             pLns = &pEndBox->GetTabLines();
-            pBoxes = &(*pLns)[ pLns->Count()-1 ]->GetTabBoxes();
+            pBoxes = &pLns->back()->GetTabBoxes();
             pEndBox = pBoxes->back();
         }
     }
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index 29284de..f9ce363 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -502,7 +502,7 @@ sal_Bool SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
     _FndBox aFndBox( 0, 0 );
     {
         _FndPara aPara( rBoxes, &aFndBox );
-        pTblNd->GetTable().GetTabLines().ForEach( &_FndLineCopyCol, &aPara );;
+        ForEach_FndLineCopyCol( pTblNd->GetTable().GetTabLines(), &aPara );
     }
 
     if(aFndBox.GetLines().empty())
diff --git a/sw/source/core/doc/gctable.cxx b/sw/source/core/doc/gctable.cxx
index cd629f2..0694be3 100644
--- a/sw/source/core/doc/gctable.cxx
+++ b/sw/source/core/doc/gctable.cxx
@@ -31,6 +31,7 @@
 #include <tblrwcl.hxx>
 #include <swtblfmt.hxx>
 #include <algorithm>
+#include <boost/foreach.hpp>
 
 using namespace ::editeng;
 
@@ -55,48 +56,48 @@ sal_Bool _SwGCBorder_BoxBrd::CheckLeftBorderOfFormat( const SwFrmFmt& rFmt )
 }
 
 
+static bool lcl_GCBorder_ChkBoxBrd_B( const SwTableBox* pBox, _SwGCBorder_BoxBrd* pPara );
 
-sal_Bool lcl_GCBorder_ChkBoxBrd_L( const SwTableLine*& rpLine, void* pPara )
+static bool lcl_GCBorder_ChkBoxBrd_L( const SwTableLine* pLine, _SwGCBorder_BoxBrd* pPara )
 {
-    const SwTableBox* pBox = rpLine->GetTabBoxes()[ 0 ];
+    const SwTableBox* pBox = pLine->GetTabBoxes().front();
     return lcl_GCBorder_ChkBoxBrd_B( pBox, pPara );
 }
 
-sal_Bool lcl_GCBorder_ChkBoxBrd_B( const SwTableBox*& rpBox, void* pPara )
+static bool lcl_GCBorder_ChkBoxBrd_B( const SwTableBox* pBox, _SwGCBorder_BoxBrd* pPara )
 {
-    sal_Bool bRet = sal_True;
-    if( rpBox->GetTabLines().Count() )
+    bool bRet = true;
+    if( !pBox->GetTabLines().empty() )
     {
-        for( sal_uInt16 n = 0, nLines = rpBox->GetTabLines().Count();
+        for( sal_uInt16 n = 0, nLines = pBox->GetTabLines().size();
                 n < nLines && bRet; ++n )
         {
-            const SwTableLine* pLine = rpBox->GetTabLines()[ n ];
+            const SwTableLine* pLine = pBox->GetTabLines()[ n ];
             bRet = lcl_GCBorder_ChkBoxBrd_L( pLine, pPara );
         }
     }
     else
     {
-        _SwGCBorder_BoxBrd* pBPara = (_SwGCBorder_BoxBrd*)pPara;
-        bRet = pBPara->CheckLeftBorderOfFormat( *rpBox->GetFrmFmt() );
+        bRet = pPara->CheckLeftBorderOfFormat( *pBox->GetFrmFmt() );
     }
     return bRet;
 }
 
 static void lcl_GCBorder_GetLastBox_B( const SwTableBox* pBox, SwTableBoxes* pPara );
 
-sal_Bool lcl_GCBorder_GetLastBox_L( const SwTableLine*& rpLine, void* pPara )
+static void lcl_GCBorder_GetLastBox_L( const SwTableLine* pLine, SwTableBoxes* pPara )
 {
-    const SwTableBoxes& rBoxes = rpLine->GetTabBoxes();
-    const SwTableBox* pBox = rBoxes.back();
-    lcl_GCBorder_GetLastBox_B( pBox, (SwTableBoxes*)pPara );
-    return sal_True;
+    const SwTableBoxes& rBoxes = pLine->GetTabBoxes();
+    SwTableBox* pBox = rBoxes.back();
+    lcl_GCBorder_GetLastBox_B( pBox, pPara );
 }
 
 static void lcl_GCBorder_GetLastBox_B( const SwTableBox* pBox, SwTableBoxes* pPara )
 {
-    SwTableLines& rLines = (SwTableLines&)pBox->GetTabLines();
-    if( rLines.Count() )
-        rLines.ForEach( &lcl_GCBorder_GetLastBox_L, pPara );
+    const SwTableLines& rLines = pBox->GetTabLines();
+    if( !rLines.empty() )
+        BOOST_FOREACH( const SwTableLine* pLine, rLines )
+            lcl_GCBorder_GetLastBox_L( pLine, pPara );
     else
         pPara->push_back( (SwTableBox*)pBox );
 }
@@ -168,18 +169,16 @@ void lcl_GCBorder_DelBorder( const SwCollectTblLineBoxes& rCollTLB,
     } while( sal_True );
 }
 
-static sal_Bool lcl_GC_Box_Border( SwTableBox* pBox, _SwGCLineBorder* pPara );
+static void lcl_GC_Box_Border( const SwTableBox* pBox, _SwGCLineBorder* pPara );
 
-sal_Bool lcl_GC_Line_Border( const SwTableLine*& rpLine, void* pPara )
+void lcl_GC_Line_Border( const SwTableLine* pLine, _SwGCLineBorder* pGCPara )
 {
-    _SwGCLineBorder* pGCPara = (_SwGCLineBorder*)pPara;
-
     // First the right edge with the left edge of the succeeding Box within this Line
     {
         _SwGCBorder_BoxBrd aBPara;
         const SvxBorderLine* pBrd;
         const SfxPoolItem* pItem;
-        const SwTableBoxes& rBoxes = rpLine->GetTabBoxes();
+        const SwTableBoxes& rBoxes = pLine->GetTabBoxes();
         for( sal_uInt16 n = 0, nBoxes = rBoxes.size() - 1; n < nBoxes; ++n )
         {
             SwTableBoxes aBoxes;
@@ -221,7 +220,7 @@ sal_Bool lcl_GC_Line_Border( const SwTableLine*& rpLine, void* pPara )
         SwCollectTblLineBoxes aBottom( sal_False );
         SwCollectTblLineBoxes aTop( sal_True );
 
-        ::lcl_Line_CollectBox( rpLine, &aBottom );
+        ::lcl_Line_CollectBox( pLine, &aBottom );
 
         const SwTableLine* pNextLine = (*pGCPara->pLines)[ pGCPara->nLinePos+1 ];
         ::lcl_Line_CollectBox( pNextLine, &aTop );
@@ -309,24 +308,22 @@ sal_Bool lcl_GC_Line_Border( const SwTableLine*& rpLine, void* pPara )
         } while( sal_True );
     }
 
-    for( SwTableBoxes::iterator it = ((SwTableLine*)rpLine)->GetTabBoxes().begin();
-             it != ((SwTableLine*)rpLine)->GetTabBoxes().end(); ++it)
-        lcl_GC_Box_Border(*it, (_SwGCLineBorder*)pPara );
+    for( SwTableBoxes::const_iterator it = pLine->GetTabBoxes().begin();
+             it != pLine->GetTabBoxes().end(); ++it)
+        lcl_GC_Box_Border(*it, pGCPara );
 
     ++pGCPara->nLinePos;
-
-    return sal_True;
 }
 
-static sal_Bool lcl_GC_Box_Border( SwTableBox* pBox, _SwGCLineBorder* pPara )
+static void lcl_GC_Box_Border( const SwTableBox* pBox, _SwGCLineBorder* pPara )
 {
-    if( pBox->GetTabLines().Count() )
+    if( !pBox->GetTabLines().empty() )
     {
         _SwGCLineBorder aPara( *pBox );
         aPara.pShareFmts = pPara->pShareFmts;
-        pBox->GetTabLines().ForEach( &lcl_GC_Line_Border, &aPara );
+        BOOST_FOREACH( const SwTableLine* pLine, pBox->GetTabLines() )
+            lcl_GC_Line_Border( pLine, &aPara );
     }
-    return sal_True;
 }
 
 struct _GCLinePara
@@ -339,21 +336,21 @@ struct _GCLinePara
     {}
 };
 
-static bool lcl_MergeGCLine(const SwTableLine*& rpLine, void*const pPara);
+static bool lcl_MergeGCLine(SwTableLine* pLine, _GCLinePara* pPara);
 
-static bool lcl_MergeGCBox(SwTableBox* pTblBox, void*const pPara)
+static bool lcl_MergeGCBox(SwTableBox* pTblBox, _GCLinePara* pPara)
 {
-    sal_uInt16 n, nLen = pTblBox->GetTabLines().Count();
+    sal_uInt16 n, nLen = pTblBox->GetTabLines().size();
     if( nLen )
     {
         // ATTENTION: The Line count can change!
-        _GCLinePara aPara( pTblBox->GetTabLines(), (_GCLinePara*)pPara );
-        for( n = 0; n < pTblBox->GetTabLines().Count() &&
-            lcl_MergeGCLine( *(pTblBox->GetTabLines().GetData() + n), &aPara );
+        _GCLinePara aPara( pTblBox->GetTabLines(), pPara );
+        for( n = 0; n < pTblBox->GetTabLines().size() &&
+            lcl_MergeGCLine( pTblBox->GetTabLines()[n], &aPara );
             ++n )
             ;
 
-        if( 1 == pTblBox->GetTabLines().Count() )
+        if( 1 == pTblBox->GetTabLines().size() )
         {
             // Box with a Line, then move all the Line's Boxes after this Box
             // into the parent Line and delete this Box
@@ -375,18 +372,16 @@ static bool lcl_MergeGCBox(SwTableBox* pTblBox, void*const pPara)
     return true;
 }
 
-static bool lcl_MergeGCLine(const SwTableLine*& rpLine, void *const pPara)
+static bool lcl_MergeGCLine(SwTableLine* pLn, _GCLinePara* pGCPara)
 {
-    SwTableLine* pLn = (SwTableLine*)rpLine;
     sal_uInt16 nLen = pLn->GetTabBoxes().size();
     if( nLen )
     {
-        _GCLinePara* pGCPara = (_GCLinePara*)pPara;
         while( 1 == nLen )
         {
             // We have a Box with Lines
             SwTableBox* pBox = pLn->GetTabBoxes().front();
-            if( !pBox->GetTabLines().Count() )
+            if( pBox->GetTabLines().empty() )
                 break;
 
             SwTableLine* pLine = pBox->GetTabLines()[0];
@@ -394,17 +389,16 @@ static bool lcl_MergeGCLine(const SwTableLine*& rpLine, void *const pPara)
             // pLine turns into the current Line (that is rpLine), the rest is moved
             // into the LinesArray past the current one.
             // The LinesArray is in pPara!
-            nLen = pBox->GetTabLines().Count();
+            nLen = pBox->GetTabLines().size();
 
             SwTableLines& rLns = *pGCPara->pLns;
-            const SwTableLine* pTmp = pLn;
-            sal_uInt16 nInsPos = rLns.GetPos( pTmp );
+            sal_uInt16 nInsPos = rLns.GetPos( pLn );
             OSL_ENSURE( USHRT_MAX != nInsPos, "Could not find Line!" );
 
             SwTableBox* pUpper = pLn->GetUpper();
 
-            rLns.Remove( nInsPos, 1 );      // remove the Line from the array
-            rLns.Insert( &pBox->GetTabLines(), nInsPos );
+            rLns.erase( rLns.begin() + nInsPos );      // remove the Line from the array
+            rLns.insert( rLns.begin() + nInsPos, pBox->GetTabLines().begin(), pBox->GetTabLines().end() );
 
             // JP 31.03.99: Bug 60000
             // Pass the attributes of the to-be-deleted Lines to the "inserted" one
@@ -419,7 +413,7 @@ static bool lcl_MergeGCLine(const SwTableLine*& rpLine, void *const pPara)
                         pGCPara->pShareFmts->SetAttr( *rBoxLns[ nLns ], *pItem );
             }
 
-            pBox->GetTabLines().Remove( 0, nLen );  // Remove Lines from the array
+            pBox->GetTabLines().erase( pBox->GetTabLines().begin(), pBox->GetTabLines().begin() + nLen );  // Remove Lines from the array
 
             delete pLn;
 
@@ -433,7 +427,7 @@ static bool lcl_MergeGCLine(const SwTableLine*& rpLine, void *const pPara)
 
         // ATTENTION: The number of boxes can change!
         for( nLen = 0; nLen < pLn->GetTabBoxes().size(); ++nLen )
-            if( !lcl_MergeGCBox( pLn->GetTabBoxes()[nLen], pPara ))
+            if( !lcl_MergeGCBox( pLn->GetTabBoxes()[nLen], pGCPara ))
                 --nLen;
     }
     return true;
@@ -446,8 +440,8 @@ void SwTable::GCLines()
     _GCLinePara aPara( GetTabLines() );
     SwShareBoxFmts aShareFmts;
     aPara.pShareFmts = &aShareFmts;
-    for( sal_uInt16 n = 0; n < GetTabLines().Count() &&
-            lcl_MergeGCLine( *(GetTabLines().GetData() + n ), &aPara ); ++n )
+    for( sal_uInt16 n = 0; n < GetTabLines().size() &&
+            lcl_MergeGCLine( GetTabLines()[n], &aPara ); ++n )
         ;
 }
 
diff --git a/sw/source/core/doc/htmltbl.cxx b/sw/source/core/doc/htmltbl.cxx
index 890a1c8..835e0cf 100644
--- a/sw/source/core/doc/htmltbl.cxx
+++ b/sw/source/core/doc/htmltbl.cxx
@@ -48,6 +48,7 @@
 #include "htmltbl.hxx"
 #include "ndindex.hxx"
 #include "switerator.hxx"
+#include <boost/foreach.hpp>
 
 using namespace ::com::sun::star;
 
@@ -417,11 +418,11 @@ const SwStartNode *SwHTMLTableLayout::GetAnyBoxStartNode() const
     const SwTableBox* pBox = pSwTable->GetTabLines()[0]->GetTabBoxes()[0];
     while( 0 == (pBoxSttNd = pBox->GetSttNd()) )
     {
-        OSL_ENSURE( pBox->GetTabLines().Count() > 0,
+        OSL_ENSURE( pBox->GetTabLines().size() > 0,
                 "Box without start node and lines" );
-        OSL_ENSURE( pBox->GetTabLines()[0]->GetTabBoxes().size() > 0,
+        OSL_ENSURE( pBox->GetTabLines().front()->GetTabBoxes().size() > 0,
                 "Line without boxes" );
-        pBox = pBox->GetTabLines()[0]->GetTabBoxes()[0];
+        pBox = pBox->GetTabLines().front()->GetTabBoxes().front();
     }
 
     return pBoxSttNd;
@@ -1535,14 +1536,15 @@ void SwHTMLTableLayout::AutoLayoutPass2( sal_uInt16 nAbsAvail, sal_uInt16 nRelAv
     }
 }
 
-static sal_Bool lcl_ResizeLine( const SwTableLine*& rpLine, void* pPara );
+static void lcl_ResizeLine( const SwTableLine* pLine, sal_uInt16 *pWidth );
 
-static sal_Bool lcl_ResizeBox( SwTableBox* pBox, sal_uInt16* pWidth )
+static void lcl_ResizeBox( const SwTableBox* pBox, sal_uInt16* pWidth )
 {
     if( !pBox->GetSttNd() )
     {
         sal_uInt16 nWidth = 0;
-        pBox->GetTabLines().ForEach( &lcl_ResizeLine, &nWidth );
+        BOOST_FOREACH( const SwTableLine *pLine, pBox->GetTabLines() )
+            lcl_ResizeLine( pLine, &nWidth );
         pBox->GetFrmFmt()->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, nWidth, 0 ));
         *pWidth = *pWidth + nWidth;
     }
@@ -1550,27 +1552,21 @@ static sal_Bool lcl_ResizeBox( SwTableBox* pBox, sal_uInt16* pWidth )
     {
         *pWidth = *pWidth + (sal_uInt16)pBox->GetFrmFmt()->GetFrmSize().GetSize().Width();
     }
-
-    return sal_True;
 }
 
-static sal_Bool lcl_ResizeLine( const SwTableLine*& rpLine, void* pPara )
+static void lcl_ResizeLine( const SwTableLine* pLine, sal_uInt16 *pWidth )
 {
-    sal_uInt16 *pWidth = (sal_uInt16 *)pPara;
 #if OSL_DEBUG_LEVEL > 0
     sal_uInt16 nOldWidth = *pWidth;
 #endif
     *pWidth = 0;
-    for( SwTableBoxes::iterator it = ((SwTableLine*)rpLine)->GetTabBoxes().begin();
-             it != ((SwTableLine*)rpLine)->GetTabBoxes().end(); ++it)
-        lcl_ResizeBox(*it, pWidth );
+    BOOST_FOREACH( const SwTableBox* pBox, pLine->GetTabBoxes() )
+        lcl_ResizeBox(pBox, pWidth );
 
 #if OSL_DEBUG_LEVEL > 0
     OSL_ENSURE( !nOldWidth || Abs(*pWidth-nOldWidth) < COLFUZZY,
             "A box's rows have all a different length." );
 #endif
-
-    return sal_True;
 }
 
 void SwHTMLTableLayout::SetWidths( sal_Bool bCallPass2, sal_uInt16 nAbsAvail,
@@ -1637,8 +1633,8 @@ void SwHTMLTableLayout::SetWidths( sal_Bool bCallPass2, sal_uInt16 nAbsAvail,
     if( IsTopTable() )
     {
         sal_uInt16 nCalcTabWidth = 0;
-        ((SwTable *)pSwTable)->GetTabLines().ForEach( &lcl_ResizeLine,
-                                                      &nCalcTabWidth );
+        BOOST_FOREACH( const SwTableLine *pLine, pSwTable->GetTabLines() )
+            lcl_ResizeLine( pLine, &nCalcTabWidth );
         OSL_ENSURE( Abs( nRelTabWidth-nCalcTabWidth ) < COLFUZZY,
                 "Table width is not equal to the row width." );
 
diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx
index 582370d..e325c26 100644
--- a/sw/source/core/doc/tblcpy.cxx
+++ b/sw/source/core/doc/tblcpy.cxx
@@ -49,9 +49,8 @@
 #include <redline.hxx>
 #include <fmtfsize.hxx>
 #include <list>
+#include <boost/foreach.hpp>
 
-sal_Bool _FndCntntLine( const SwTableLine*& rpLine, void* pPara );
-sal_Bool _FndCntntBox( const SwTableBox*& rpBox, void* pPara );
 void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
                     SwTable& rDstTbl, SwTableBox* pDstBox,
                     sal_Bool bDelCntnt, SwUndoTblCpyTbl* pUndo );
@@ -114,10 +113,10 @@ namespace
     SubTable::iterator insertSubBox( SubTable& rSubTable, SwTableBox& rBox,
         SubTable::iterator pStartLn, SubTable::iterator pEndLn )
     {
-        if( rBox.GetTabLines().Count() )
+        if( !rBox.GetTabLines().empty() )
         {
             SubTable::difference_type nSize = std::distance( pStartLn, pEndLn );
-            if( nSize < rBox.GetTabLines().Count() )
+            if( nSize < (sal_uInt16)rBox.GetTabLines().size() )
             {
                 SubLine aSubLine;
                 SubLine::iterator pBox = pStartLn->begin();
@@ -133,9 +132,9 @@ namespace
                 do
                 {
                     rSubTable.insert( pEndLn, aSubLine );
-                } while( ++nSize < rBox.GetTabLines().Count() );
+                } while( ++nSize < (sal_uInt16)rBox.GetTabLines().size() );
             }
-            for( sal_uInt16 nLine = 0; nLine < rBox.GetTabLines().Count(); ++nLine )
+            for( sal_uInt16 nLine = 0; nLine < rBox.GetTabLines().size(); ++nLine )
                 pStartLn = insertSubLine( rSubTable, *rBox.GetTabLines()[nLine],
                            pStartLn );
             OSL_ENSURE( pStartLn == pEndLn, "Sub line confusion" );
@@ -176,13 +175,13 @@ namespace
     }
 
     TableStructure::TableStructure( const SwTable& rTable ) :
-        maLines( rTable.GetTabLines().Count() ), mnStartCol(USHRT_MAX),
+        maLines( rTable.GetTabLines().size() ), mnStartCol(USHRT_MAX),
         mnAddLine(0)
     {
         maCols.push_front(0);
         const SwTableLines &rLines = rTable.GetTabLines();
         sal_uInt16 nCnt = 0;
-        for( sal_uInt16 nLine = 0; nLine < rLines.Count(); ++nLine )
+        for( sal_uInt16 nLine = 0; nLine < rLines.size(); ++nLine )
             addLine( nCnt, rLines[nLine]->GetTabBoxes(), 0, rTable.IsNewModel() );
     }
 
@@ -211,10 +210,10 @@ namespace
                     (sal_uInt16)nMinSize > nEndLn - nStartLn + 1 )
                 {
                     sal_uInt16 nNewEndLn = nStartLn + (sal_uInt16)nMinSize - 1;
-                    if( nNewEndLn >= rLines.Count() )
+                    if( nNewEndLn >= rLines.size() )
                     {
-                        mnAddLine = nNewEndLn - rLines.Count() + 1;
-                        nNewEndLn = rLines.Count() - 1;
+                        mnAddLine = nNewEndLn - rLines.size() + 1;
+                        nNewEndLn = rLines.size() - 1;
                     }
                     while( nEndLn < nNewEndLn )
                     {
@@ -261,7 +260,7 @@ namespace
         bool bComplex = false;
         if( !bNewModel )
             for( sal_uInt16 nBox = 0; !bComplex && nBox < rBoxes.size(); ++nBox )
-                bComplex = rBoxes[nBox]->GetTabLines().Count() > 0;
+                bComplex = !rBoxes[nBox]->GetTabLines().empty();
         if( bComplex )
         {
             SubTable aSubTable;
@@ -374,7 +373,7 @@ namespace
         if( mnAddLine )
         {
             const SwTableLines &rLines = rTable.GetTabLines();
-            sal_uInt16 nLineCount = rLines.Count();
+            sal_uInt16 nLineCount = rLines.size();
             if( nLineCount < mnAddLine )
                 mnAddLine = nLineCount;
             sal_uInt16 nLine = (sal_uInt16)maLines.size();
@@ -586,8 +585,8 @@ void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
 
         // If DestBox is a Headline Box and has Table style set, then
         // DO NOT automatically set the TableHeadline style!
-        if( 1 < rDstTbl.GetTabLines().Count() &&
-            pLine == rDstTbl.GetTabLines()[0] )
+        if( 1 < rDstTbl.GetTabLines().size() &&
+            pLine == rDstTbl.GetTabLines().front() )
         {
             SwCntntNode* pCNd = aInsIdx.GetNode().GetCntntNode();
             if( !pCNd )
@@ -615,8 +614,8 @@ void lcl_CpyBox( const SwTable& rCpyTbl, const SwTableBox* pCpyBox,
     {
         sal_uInt16 nPoolId = pTxtNd->GetTxtColl()->GetPoolFmtId();
         if( bReplaceColl &&
-            (( 1 < rDstTbl.GetTabLines().Count() &&
-                pLine == rDstTbl.GetTabLines()[0] )
+            (( 1 < rDstTbl.GetTabLines().size() &&
+                pLine == rDstTbl.GetTabLines().front() )
                 // Is the Table's content sill valid?
                 ? RES_POOLCOLL_TABLE == nPoolId
                 : RES_POOLCOLL_TABLE_HDLN == nPoolId ) )
@@ -683,7 +682,7 @@ sal_Bool SwTable::InsNewTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBox
     _FndBox aFndBox( 0, 0 );
     {   // get all boxes/lines
         _FndPara aPara( rSelBoxes, &aFndBox );
-        GetTabLines().ForEach( &_FndLineCopyCol, &aPara );
+        ForEach_FndLineCopyCol( GetTabLines(), &aPara );
     }
     TableStructure aTarget( *this, aFndBox, rSelBoxes, aCopyStruct.getLineCount() );
 
@@ -691,7 +690,7 @@ sal_Bool SwTable::InsNewTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBox
     if( aTarget.mnAddLine && IsNewModel() )
     {
         SwSelBoxes aBoxes;
-        aBoxes.Insert( GetTabLines()[ GetTabLines().Count()-1 ]->GetTabBoxes()[0] );
+        aBoxes.Insert( GetTabLines().back()->GetTabBoxes().front() );
         if( pUndo )
             pUndo->InsertRow( *this, aBoxes, aTarget.mnAddLine );
         else
@@ -768,13 +767,13 @@ sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwNodeIndex& rSttBox,
     sal_Bool bDelCntnt = sal_True;
     const SwTableBox* pTmp;
 
-    for( sal_uInt16 nLines = 0; nLines < rCpyTbl.GetTabLines().Count(); ++nLines )
+    for( sal_uInt16 nLines = 0; nLines < rCpyTbl.GetTabLines().size(); ++nLines )
     {
         // Get the first from the CopyLine
         const SwTableBox* pCpyBox = rCpyTbl.GetTabLines()[nLines]
-                                    ->GetTabBoxes()[0];
-        while( pCpyBox->GetTabLines().Count() )
-            pCpyBox = pCpyBox->GetTabLines()[0]->GetTabBoxes()[0];
+                                    ->GetTabBoxes().front();
+        while( !pCpyBox->GetTabLines().empty() )
+            pCpyBox = pCpyBox->GetTabLines().front()->GetTabBoxes().front();
 
         do {
             // First copy the new content and then delete the old one.
@@ -798,15 +797,15 @@ sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwNodeIndex& rSttBox,
             pNxtLine = pNxtLine->GetUpper()->GetUpper();
         sal_uInt16 nPos = GetTabLines().C40_GETPOS( SwTableLine, pNxtLine );
         // Is there a next?
-        if( nPos + 1 >= GetTabLines().Count() )
+        if( nPos + 1 >= (sal_uInt16)GetTabLines().size() )
             bDelCntnt = sal_False;      // there is none, all goes into the last Box
         else
         {
             // Find the next Box with content
             pNxtLine = GetTabLines()[ nPos+1 ];
-            pMyBox = pNxtLine->GetTabBoxes()[0];
-            while( pMyBox->GetTabLines().Count() )
-                pMyBox = pMyBox->GetTabLines()[0]->GetTabBoxes()[0];
+            pMyBox = pNxtLine->GetTabBoxes().front();
+            while( !pMyBox->GetTabLines().empty() )
+                pMyBox = pMyBox->GetTabLines().front()->GetTabBoxes().front();
             bDelCntnt = sal_True;
         }
     }
@@ -840,7 +839,7 @@ sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
     // Find all Boxes/Lines
     {
         _FndPara aPara( rSelBoxes, &aFndBox );
-        ((SwTableLines&)GetTabLines()).ForEach( &_FndLineCopyCol, &aPara );
+        ForEach_FndLineCopyCol( GetTabLines(), &aPara );
     }
 
     // Special case: If a Box is located in a Table, copy it to all selected
@@ -864,8 +863,8 @@ sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
         if( 1 == nFndCnt )
         {
             // Is there still enough space in the Table?
-            if( (GetTabLines().Count() - nSttLine ) <
-                rCpyTbl.GetTabLines().Count() )
+            if( (GetTabLines().size() - nSttLine ) <
+                rCpyTbl.GetTabLines().size() )
             {
                 // If we don't have enough Lines, then see if we can insert
                 // new ones to reach our goal. But only if the SSelection
@@ -873,16 +872,16 @@ sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
                 if( 1 < rSelBoxes.Count() )
                     return sal_False;
 
-                sal_uInt16 nNewLns = rCpyTbl.GetTabLines().Count() -
-                                (GetTabLines().Count() - nSttLine );
+                sal_uInt16 nNewLns = rCpyTbl.GetTabLines().size() -
+                                (GetTabLines().size() - nSttLine );
 
                 // See if the Box count is high enough for the Lines
-                SwTableLine* pLastLn = GetTabLines()[ GetTabLines().Count()-1 ];
+                SwTableLine* pLastLn = GetTabLines().back();
 
                 pSttBox = pFLine->GetBoxes()[0].GetBox();
                 sal_uInt16 nSttBox = pFLine->GetLine()->GetTabBoxes().GetPos( pSttBox );
-                for( sal_uInt16 n = rCpyTbl.GetTabLines().Count() - nNewLns;
-                        n < rCpyTbl.GetTabLines().Count(); ++n )
+                for( sal_uInt16 n = rCpyTbl.GetTabLines().size() - nNewLns;
+                        n < rCpyTbl.GetTabLines().size(); ++n )
                 {
                     SwTableLine* pCpyLn = rCpyTbl.GetTabLines()[ n ];
 
@@ -912,9 +911,9 @@ sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
                     return sal_False;
             }
 
-            nTstLns = rCpyTbl.GetTabLines().Count();        // copy this many
+            nTstLns = rCpyTbl.GetTabLines().size();        // copy this many
         }
-        else if( 0 == (nFndCnt % rCpyTbl.GetTabLines().Count()) )
+        else if( 0 == (nFndCnt % rCpyTbl.GetTabLines().size()) )
             nTstLns = nFndCnt;
         else
             return sal_False;       // not enough space for the rows
@@ -934,7 +933,7 @@ sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
                 pLine = pInsFLine->GetLine();
             }
             SwTableLine* pCpyLn = rCpyTbl.GetTabLines()[ nLn %
-                                        rCpyTbl.GetTabLines().Count() ];
+                                        rCpyTbl.GetTabLines().size() ];
 
             // Selected too few rows?
             if( pInsFLine )
@@ -1021,7 +1020,7 @@ sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
         {
             pFLine = &aFndBox.GetLines()[ nLn ];
             SwTableLine* pCpyLn = rCpyTbl.GetTabLines()[
-                                nLn % rCpyTbl.GetTabLines().Count() ];
+                                nLn % rCpyTbl.GetTabLines().size() ];
             for( nBx = 0; nBx < pFLine->GetBoxes().size(); ++nBx )
             {
                 // Copy the pCpyBox into pMyBox
@@ -1035,21 +1034,21 @@ sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
     return sal_True;
 }
 
-static sal_Bool _FndCntntBox( SwTableBox* pBox, void* pPara )
+static void _FndCntntLine( const SwTableLine* pLine, SwSelBoxes* pPara );
+
+static void _FndCntntBox( const SwTableBox* pBox, SwSelBoxes* pPara )
 {
-    if( pBox->GetTabLines().Count() )
-        pBox->GetTabLines().ForEach( &_FndCntntLine, pPara );
+    if( !pBox->GetTabLines().empty() )
+        BOOST_FOREACH( const SwTableLine* pLine, pBox->GetTabLines() )
+            _FndCntntLine( pLine, pPara );
     else
-        ((SwSelBoxes*)pPara)->Insert( pBox );
-    return sal_True;
+        pPara->Insert( (SwTableBox*)pBox );
 }
 
-sal_Bool _FndCntntLine( const SwTableLine*& rpLine, void* pPara )
+static void _FndCntntLine( const SwTableLine* pLine, SwSelBoxes* pPara )
 {
-    for( SwTableBoxes::iterator it = ((SwTableLine*)rpLine)->GetTabBoxes().begin();
-             it != ((SwTableLine*)rpLine)->GetTabBoxes().end(); ++it)
-        _FndCntntBox(*it, pPara );
-    return sal_True;
+    BOOST_FOREACH( const SwTableBox* pBox, pLine->GetTabBoxes() )
+        _FndCntntBox(pBox, pPara );
 }
 
 // Find all Boxes with content in this Box
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index b07088d..8b1cb3d 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -202,7 +202,7 @@ void _CheckBoxWidth( const SwTableLine& rLine, SwTwips nSize );
 
 #define CHECKTABLELAYOUT                                            \
     {                                                               \
-        for ( sal_uInt16 i = 0; i < GetTabLines().Count(); ++i )        \
+        for ( sal_uInt16 i = 0; i < GetTabLines().size(); ++i )        \
         {                                                           \
             SwFrmFmt* pFmt = GetTabLines()[i]->GetFrmFmt();  \
             SwIterator<SwRowFrm,SwFmt> aIter( *pFmt );              \
@@ -345,7 +345,7 @@ static void lcl_CopyCol( _FndBox & rFndBox, _CpyPara *const pCpyPara)
             SwFmtFrmSize aFrmSz( pNewFmt->GetFrmSize() );
 
             bool bDiffCount = false;
-            if( pBox->GetTabLines().Count() )
+            if( pBox->GetTabLines().size() )
             {
                 pCmpLine = &rFndBox.GetLines().front();
                 if ( pCmpLine->GetBoxes().size() != pCmpLine->GetLine()->GetTabBoxes().size() )
@@ -461,12 +461,13 @@ static void lcl_CopyRow(_FndLine& rFndLine, _CpyPara *const pCpyPara)
                         rFndLine.GetBoxes().size(), pCpyPara->pInsBox );
     if( pCpyPara->pInsBox )
     {
-        pCpyPara->pInsBox->GetTabLines().C40_INSERT( SwTableLine, pNewLine, pCpyPara->nInsPos++ );
+        SwTableLines& rLines = pCpyPara->pInsBox->GetTabLines();
+        rLines.insert( rLines.begin() + pCpyPara->nInsPos++, pNewLine );
     }
     else
     {
-        pCpyPara->pTblNd->GetTable().GetTabLines().C40_INSERT( SwTableLine, pNewLine,
-                                                pCpyPara->nInsPos++ );
+        SwTableLines& rLines = pCpyPara->pTblNd->GetTable().GetTabLines();
+        rLines.insert( rLines.begin() + pCpyPara->nInsPos++, pNewLine );
     }
 
     _CpyPara aPara( *pCpyPara, pNewLine );
@@ -540,7 +541,7 @@ sal_Bool SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 n
         _FndBox aFndBox( 0, 0 );
         {
             _FndPara aPara( rBoxes, &aFndBox );
-            GetTabLines().ForEach( &_FndLineCopyCol, &aPara );
+            ForEach_FndLineCopyCol( GetTabLines(), &aPara );
         }
         if( aFndBox.GetLines().empty() )
             return sal_False;
@@ -591,7 +592,7 @@ sal_Bool SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
     _FndBox aFndBox( 0, 0 );
     {
         _FndPara aPara( rBoxes, &aFndBox );
-        GetTabLines().ForEach( &_FndLineCopyCol, &aPara );
+        ForEach_FndLineCopyCol( GetTabLines(), &aPara );
     }
     if( aFndBox.GetLines().empty() )
         return sal_False;
@@ -632,11 +633,11 @@ sal_Bool SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
     SwTableLine* pLine = pFndBox->GetLines()[ bBehind ?
                     pFndBox->GetLines().size()-1 : 0 ].GetLine();
     if( &aFndBox == pFndBox )
-        aCpyPara.nInsPos = GetTabLines().C40_GETPOS( SwTableLine, pLine );
+        aCpyPara.nInsPos = GetTabLines().GetPos( pLine );
     else
     {
         aCpyPara.pInsBox = pFndBox->GetBox();
-        aCpyPara.nInsPos = pFndBox->GetBox()->GetTabLines().C40_GETPOS( SwTableLine, pLine );
+        aCpyPara.nInsPos = pFndBox->GetBox()->GetTabLines().GetPos( pLine );
     }
 
     if( bBehind )
@@ -679,15 +680,16 @@ sal_Bool SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
     return sal_True;
 }
 
-sal_Bool _FndBoxAppendRowLine( const SwTableLine*& rpLine, void* pPara );
+void _FndBoxAppendRowLine( SwTableLine* pLine, _FndPara* pFndPara );
 
 static void _FndBoxAppendRowBox( SwTableBox* pBox, _FndPara* pFndPara )
 {
     _FndBox* pFndBox = new _FndBox( pBox, pFndPara->pFndLine );
-    if( pBox->GetTabLines().Count() )
+    if( pBox->GetTabLines().size() )
     {
         _FndPara aPara( *pFndPara, pFndBox );
-        pFndBox->GetBox()->GetTabLines().ForEach( &_FndBoxAppendRowLine, &aPara );
+        BOOST_FOREACH( SwTableLine* pLine, pFndBox->GetBox()->GetTabLines() )
+            _FndBoxAppendRowLine( pLine, &aPara );
         if( pFndBox->GetLines().empty() )
             delete pFndBox;
     }
@@ -695,10 +697,9 @@ static void _FndBoxAppendRowBox( SwTableBox* pBox, _FndPara* pFndPara )
         pFndPara->pFndLine->GetBoxes().push_back( pFndBox );
 }
 
-sal_Bool _FndBoxAppendRowLine( const SwTableLine*& rpLine, void* pPara )
+void _FndBoxAppendRowLine( SwTableLine* pLine, _FndPara* pFndPara )
 {
-    _FndPara* pFndPara = (_FndPara*)pPara;
-    _FndLine* pFndLine = new _FndLine( (SwTableLine*)rpLine, pFndPara->pFndBox );
+    _FndLine* pFndLine = new _FndLine( pLine, pFndPara->pFndBox );
     _FndPara aPara( *pFndPara, pFndLine );
     for( SwTableBoxes::iterator it = pFndLine->GetLine()->GetTabBoxes().begin();
              it != pFndLine->GetLine()->GetTabBoxes().end(); ++it)
@@ -709,7 +710,6 @@ sal_Bool _FndBoxAppendRowLine( const SwTableLine*& rpLine, void* pPara )
     }
     else
         delete pFndLine;
-    return sal_True;
 }
 
 sal_Bool SwTable::AppendRow( SwDoc* pDoc, sal_uInt16 nCnt )
@@ -721,12 +721,12 @@ sal_Bool SwTable::AppendRow( SwDoc* pDoc, sal_uInt16 nCnt )
     // Find all Boxes/Lines
     _FndBox aFndBox( 0, 0 );
     {
-        const SwTableLine* pLLine = GetTabLines()[ GetTabLines().Count()-1 ];
+        const SwTableLine* pLLine = GetTabLines().back();
 
         const SwSelBoxes* pBxs = 0;     // Dummy!!!
         _FndPara aPara( *pBxs, &aFndBox );
 
-        _FndBoxAppendRowLine( pLLine, &aPara );
+        _FndBoxAppendRowLine( (SwTableLine*)pLLine, &aPara );
     }
     if( aFndBox.GetLines().empty() )
         return sal_False;
@@ -744,7 +744,7 @@ sal_Bool SwTable::AppendRow( SwDoc* pDoc, sal_uInt16 nCnt )
 
     _CpyTabFrms aTabFrmArr;
     _CpyPara aCpyPara( pTblNd, 0, aTabFrmArr );
-    aCpyPara.nInsPos = GetTabLines().Count();
+    aCpyPara.nInsPos = GetTabLines().size();
     aCpyPara.nDelBorderFlag = 1;
 
     for( sal_uInt16 nCpyCnt = 0; nCpyCnt < nCnt; ++nCpyCnt )
@@ -778,7 +778,7 @@ void lcl_LastBoxSetWidth( SwTableBoxes &rBoxes, const long nOffset,
 void lcl_LastBoxSetWidthLine( SwTableLines &rLines, const long nOffset,
                                 sal_Bool bFirst, SwShareBoxFmts& rShareFmts )
 {
-    for ( sal_uInt16 i = 0; i < rLines.Count(); ++i )
+    for ( sal_uInt16 i = 0; i < rLines.size(); ++i )
         ::lcl_LastBoxSetWidth( rLines[i]->GetTabBoxes(), nOffset, bFirst,
                                 rShareFmts );
 }
@@ -927,20 +927,22 @@ void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* pUndo,
         if( !pUpperBox )
         {
             // Also delete the Line from the Table
-            nDelPos = rTbl.GetTabLines().C40_GETPOS( SwTableLine, pLine );
+            nDelPos = rTbl.GetTabLines().GetPos( pLine );
             if( pShareFmts )
                 pShareFmts->RemoveFormat( *rTbl.GetTabLines()[ nDelPos ]->GetFrmFmt() );
-            rTbl.GetTabLines().DeleteAndDestroy( nDelPos );
+            delete rTbl.GetTabLines()[ nDelPos ];
+            rTbl.GetTabLines().erase( rTbl.GetTabLines().begin() + nDelPos );
             break;      // we cannot delete more
         }
 
         // finally also delete the Line
         pBox = pUpperBox;
-        nDelPos = pBox->GetTabLines().C40_GETPOS( SwTableLine, pLine );
+        nDelPos = pBox->GetTabLines().GetPos( pLine );
         if( pShareFmts )
             pShareFmts->RemoveFormat( *pBox->GetTabLines()[ nDelPos ]->GetFrmFmt() );
-        pBox->GetTabLines().DeleteAndDestroy( nDelPos );
-    } while( !pBox->GetTabLines().Count() );
+        delete pBox->GetTabLines()[ nDelPos ];
+        pBox->GetTabLines().erase( pBox->GetTabLines().begin() + nDelPos );
+    } while( pBox->GetTabLines().empty() );
 }
 
 SwTableBox* lcl_FndNxtPrvDelBox( const SwTableLines& rTblLns,
@@ -972,9 +974,9 @@ SwTableBox* lcl_FndNxtPrvDelBox( const SwTableLines& rTblLns,
         {
             const SwTableLines& rLowLns = pFndBox->GetTabLines();
             if( bNxt )
-                pFndBox = rLowLns[ 0 ]->GetTabBoxes()[ 0 ];
+                pFndBox = rLowLns.front()->GetTabBoxes().front();
             else
-                pFndBox = rLowLns[ rLowLns.Count() - 1 ]->GetTabBoxes()[ 0 ];
+                pFndBox = rLowLns.back()->GetTabBoxes().front();
         }
 
         if( Abs( nFndWidth ) > COLFUZZY ||
@@ -994,7 +996,7 @@ SwTableBox* lcl_FndNxtPrvDelBox( const SwTableLines& rTblLns,
                 --*pCurPos;
             pAllDelBoxes->Remove( nFndPos );
         }
-    } while( bNxt ? ( nLinePos + 1 < rTblLns.Count() ) : nLinePos );
+    } while( bNxt ? ( nLinePos + 1 < (sal_uInt16)rTblLns.size() ) : nLinePos );
     return pFndBox;
 }
 
@@ -1036,7 +1038,7 @@ void lcl_SaveUpperLowerBorder( SwTable& rTbl, const SwTableBox& rBox,
             pPrvBox = ::lcl_FndNxtPrvDelBox( *pTblLns, nBoxStt, nBoxWidth,
                                 nLnPos, sal_False, pAllDelBoxes, pCurPos );
 
-        if( nLnPos + 1 < pTblLns->Count() )     // Successor?
+        if( nLnPos + 1 < (sal_uInt16)pTblLns->size() )     // Successor?
             pNxtBox = ::lcl_FndNxtPrvDelBox( *pTblLns, nBoxStt, nBoxWidth,
                                 nLnPos, sal_True, pAllDelBoxes, pCurPos );
 
@@ -1235,7 +1237,7 @@ sal_Bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16
                 pNewLine->ClaimFrmFmt()->SetFmtAttr( aFSz );
             }
 
-            pNewBox->GetTabLines().C40_INSERT( SwTableLine, pNewLine, i );
+            pNewBox->GetTabLines().insert( pNewBox->GetTabLines().begin() + i, pNewLine );
             // then a new Box in the Line
             if( !i )        // hang up the original Box
             {
@@ -1420,9 +1422,10 @@ void lcl_CpyLines( sal_uInt16 nStt, sal_uInt16 nEnd,
     for( sal_uInt16 n = nStt; n < nEnd; ++n )
         rLines[n]->SetUpper( pInsBox );
     if( USHRT_MAX == nPos )
-        nPos = pInsBox->GetTabLines().Count();
-    pInsBox->GetTabLines().Insert( &rLines, nPos, nStt, nEnd );
-    rLines.Remove( nStt, nEnd - nStt );
+        nPos = pInsBox->GetTabLines().size();
+    pInsBox->GetTabLines().insert( pInsBox->GetTabLines().begin() + nPos,
+                             rLines.begin() + nStt, rLines.begin() + nEnd );
+    rLines.erase( rLines.begin() + nStt, rLines.begin() + nEnd );
 }
 
 void lcl_CpyBoxes( sal_uInt16 nStt, sal_uInt16 nEnd,
@@ -1443,7 +1446,7 @@ void lcl_CalcWidth( SwTableBox* pBox )
 {
     // Assertion: Every Line in the Box is as large
     SwFrmFmt* pFmt = pBox->ClaimFrmFmt();
-    OSL_ENSURE( pBox->GetTabLines().Count(), "Box does not have any Lines" );
+    OSL_ENSURE( pBox->GetTabLines().size(), "Box does not have any Lines" );
 
     SwTableLine* pLine = pBox->GetTabLines()[0];
     OSL_ENSURE( pLine, "Box is not within a Line" );
@@ -1527,7 +1530,7 @@ static void lcl_Merge_MoveBox(_FndBox & rFndBox, _InsULPara *const pULPara)
     pBoxes = &pULPara->pInsLine->GetTabBoxes();
 
     // Is there still a level to step down to?
-    if (rFndBox.GetBox()->GetTabLines().Count())
+    if (rFndBox.GetBox()->GetTabLines().size())
     {
         SwTableBox* pBox = new SwTableBox(
                 static_cast<SwTableBoxFmt*>(rFndBox.GetBox()->GetFrmFmt()),
@@ -1539,7 +1542,7 @@ static void lcl_Merge_MoveBox(_FndBox & rFndBox, _InsULPara *const pULPara)
         {
             lcl_Merge_MoveLine(*it, &aPara );
         }
-        if( pBox->GetTabLines().Count() )
+        if( pBox->GetTabLines().size() )
         {
             if( USHRT_MAX == nInsPos )
                 nInsPos = pBoxes->size();
@@ -1575,15 +1578,15 @@ static void lcl_Merge_MoveLine(_FndLine& rFndLine, _InsULPara *const pULPara)
             if( pULPara->bUL )  // Upper ?
             {
                 // If there are Lines before it, move them
-                if( 0 != ( nPos = pLines->C40_GETPOS( SwTableLine, pFndLn )) )
+                if( 0 != ( nPos = pLines->GetPos( pFndLn )) )
                     lcl_CpyLines( 0, nPos, *pLines, pULPara->pInsBox );
             }
             else
                 // If there are Lines after it, move them
-                if( (nPos = pLines->C40_GETPOS( SwTableLine, pFndLn )) +1 < pLines->Count() )
+                if( (nPos = pLines->GetPos( pFndLn )) + 1 < (sal_uInt16)pLines->size() )
                 {
-                    nInsPos = pULPara->pInsBox->GetTabLines().Count();
-                    lcl_CpyLines( nPos+1, pLines->Count(), *pLines,
+                    nInsPos = pULPara->pInsBox->GetTabLines().size();
+                    lcl_CpyLines( nPos+1, pLines->size(), *pLines,
                                         pULPara->pInsBox );
                 }
         }
@@ -1600,7 +1603,7 @@ static void lcl_Merge_MoveLine(_FndLine& rFndLine, _InsULPara *const pULPara)
                         (SwTableLineFmt*)pInsLine->GetFrmFmt(), 2, pLMBox );
             pLMLn->ClaimFrmFmt()->ResetFmtAttr( RES_FRM_SIZE );
 
-            pLMBox->GetTabLines().C40_INSERT( SwTableLine, pLMLn, 0 );
+            pLMBox->GetTabLines().insert( pLMBox->GetTabLines().begin(), pLMLn );
 
             lcl_CpyBoxes( 0, 2, pInsLine->GetTabBoxes(), pLMLn );
 
@@ -1609,13 +1612,13 @@ static void lcl_Merge_MoveLine(_FndLine& rFndLine, _InsULPara *const pULPara)
             if( pULPara->bUL )  // Upper ?
             {
                 // If there are Lines before it, move them
-                if( 0 != ( nPos = pLines->C40_GETPOS( SwTableLine, pFndLn )) )
+                if( 0 != ( nPos = pLines->GetPos( pFndLn )) )
                     lcl_CpyLines( 0, nPos, *pLines, pLMBox, 0 );
             }
             else
                 // If there are Lines after it, move them
-                if( (nPos = pLines->C40_GETPOS( SwTableLine, pFndLn )) +1 < pLines->Count() )
-                    lcl_CpyLines( nPos+1, pLines->Count(), *pLines,
+                if( (nPos = pLines->GetPos( pFndLn )) + 1 < (sal_uInt16)pLines->size() )
+                    lcl_CpyLines( nPos+1, pLines->size(), *pLines,
                                         pLMBox );
             lcl_CalcWidth( pLMBox );        // calculate the Box's width
         }
@@ -1634,7 +1637,7 @@ static void lcl_Merge_MoveLine(_FndLine& rFndLine, _InsULPara *const pULPara)
                 SwTableLine* pRMLn = new SwTableLine(
                     (SwTableLineFmt*)pInsLine->GetFrmFmt(), 2, pRMBox );
                 pRMLn->ClaimFrmFmt()->ResetFmtAttr( RES_FRM_SIZE );
-                pRMBox->GetTabLines().C40_INSERT( SwTableLine, pRMLn, 0 );
+                pRMBox->GetTabLines().insert( pRMBox->GetTabLines().begin(), pRMLn );
 
                 lcl_CpyBoxes( 1, 3, pInsLine->GetTabBoxes(), pRMLn );
 
@@ -1652,16 +1655,17 @@ static void lcl_Merge_MoveLine(_FndLine& rFndLine, _InsULPara *const pULPara)
                 pRMBox = pInsLine->GetUpper();
 
                 // If there are already Lines, then these need to go into a new Line and Box
-                nMvPos = pRMBox->GetTabLines().C40_GETPOS( SwTableLine, pInsLine );
+                nMvPos = pRMBox->GetTabLines().GetPos( pInsLine );
                 if( pULPara->bUL ? nMvPos
-                                : nMvPos+1 < pRMBox->GetTabLines().Count() )
+                                : nMvPos+1 < (sal_uInt16)pRMBox->GetTabLines().size() )
                 {
                     // Merge all Lines into a new Line and Box
                     SwTableLine* pNewLn = new SwTableLine(
                         (SwTableLineFmt*)pInsLine->GetFrmFmt(), 1, pRMBox );
                     pNewLn->ClaimFrmFmt()->ResetFmtAttr( RES_FRM_SIZE );
-                    pRMBox->GetTabLines().C40_INSERT( SwTableLine, pNewLn,
-                            pULPara->bUL ? nMvPos : nMvPos+1 );
+                    pRMBox->GetTabLines().insert(
+                                pRMBox->GetTabLines().begin() + (pULPara->bUL ? nMvPos : nMvPos+1),
+                                pNewLn );
                     pRMBox = new SwTableBox( (SwTableBoxFmt*)pRMBox->GetFrmFmt(), 0, pNewLn );
                     pNewLn->GetTabBoxes().insert( pNewLn->GetTabBoxes().begin(), pRMBox );
 
@@ -1671,7 +1675,7 @@ static void lcl_Merge_MoveLine(_FndLine& rFndLine, _InsULPara *const pULPara)
                         nPos2 = nMvPos;
                     else
                         nPos1 = nMvPos+2,
-                        nPos2 = pNewLn->GetUpper()->GetTabLines().Count();
+                        nPos2 = pNewLn->GetUpper()->GetTabLines().size();
 
                     lcl_CpyLines( nPos1, nPos2,
                                 pNewLn->GetUpper()->GetTabLines(), pRMBox );
@@ -1684,13 +1688,13 @@ static void lcl_Merge_MoveLine(_FndLine& rFndLine, _InsULPara *const pULPara)
             if( pULPara->bUL )  // Upper ?
             {
                 // If there are Lines before it, move them
-                if( 0 != ( nPos = pLines->C40_GETPOS( SwTableLine, pFndLn )) )
+                if( 0 != ( nPos = pLines->GetPos( pFndLn )) )
                     lcl_CpyLines( 0, nPos, *pLines, pRMBox, 0 );
             }
             else
                 // If there are Lines after it, move them
-                if( (nPos = pLines->C40_GETPOS( SwTableLine, pFndLn )) +1 < pLines->Count() )
-                    lcl_CpyLines( nPos+1, pLines->Count(), *pLines,
+                if( (nPos = pLines->GetPos( pFndLn )) + 1 < (sal_uInt16)pLines->size() )
+                    lcl_CpyLines( nPos+1, pLines->size(), *pLines,
                                         pRMBox );
             lcl_CalcWidth( pRMBox );        // calculate the Box's width
         }
@@ -1721,14 +1725,14 @@ static void lcl_Merge_MoveLine(_FndLine& rFndLine, _InsULPara *const pULPara)
     if( !pNewLine->GetTabBoxes().empty() )
     {
         if( USHRT_MAX == nInsPos )
-            nInsPos = pLines->Count();
-        pLines->C40_INSERT( SwTableLine, pNewLine, nInsPos );
+            nInsPos = pLines->size();
+        pLines->insert( pLines->begin() + nInsPos, pNewLine );
     }
     else
         delete pNewLine;
 }
 
-static sal_Bool lcl_BoxSetHeadCondColl( SwTableBox* pBox );
+static void lcl_BoxSetHeadCondColl( const SwTableBox* pBox );
 
 sal_Bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
                         SwTableBox* pMergeBox, SwUndoTblMerge* pUndo )
@@ -1742,7 +1746,7 @@ sal_Bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
     _FndBox aFndBox( 0, 0 );
     {
         _FndPara aPara( rBoxes, &aFndBox );
-        GetTabLines().ForEach( &_FndLineCopyCol, &aPara );
+        ForEach_FndLineCopyCol( GetTabLines(), &aPara );
     }
     if( aFndBox.GetLines().empty() )
         return sal_False;
@@ -1778,8 +1782,8 @@ sal_Bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
                   &pFndBox->GetBox()->GetTabLines() :  &GetTabLines();
 
     SwTableLine* pNewLine = pFndBox->GetLines().front().GetLine();
-    sal_uInt16 nInsPos = pLines->C40_GETPOS( SwTableLine, pNewLine );
-    pLines->C40_INSERT( SwTableLine, pInsLine, nInsPos );
+    sal_uInt16 nInsPos = pLines->GetPos( pNewLine );
+    pLines->insert( pLines->begin() + nInsPos, pInsLine );
 
     SwTableBox* pLeftBox = new SwTableBox( (SwTableBoxFmt*)pMergeBox->GetFrmFmt(), 0, pInsLine );
     SwTableBox* pRightBox = new SwTableBox( (SwTableBoxFmt*)pMergeBox->GetFrmFmt(), 0, pInsLine );
@@ -1817,7 +1821,7 @@ sal_Bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
     BOOST_FOREACH(_FndLine& rFndLine, pFndBox->GetLines() )
         lcl_Merge_MoveLine( rFndLine, &aPara );
 
-    if( !pLeftBox->GetTabLines().Count() )
+    if( pLeftBox->GetTabLines().empty() )
         _DeleteBox( *this, pLeftBox, 0, sal_False, sal_False );
     else
     {
@@ -1825,7 +1829,7 @@ sal_Bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
         if( pUndo && pLeftBox->GetSttNd() )
             pUndo->AddNewBox( pLeftBox->GetSttIdx() );
     }
-    if( !pRightBox->GetTabLines().Count() )
+    if( pRightBox->GetTabLines().empty() )
         _DeleteBox( *this, pRightBox, 0, sal_False, sal_False );
     else
     {
@@ -1853,7 +1857,7 @@ sal_Bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
 
 void lcl_CheckRowSpan( SwTable &rTbl )
 {
-    sal_uInt16 nLineCount = rTbl.GetTabLines().Count();
+    sal_uInt16 nLineCount = rTbl.GetTabLines().size();
     sal_uInt16 nMaxSpan = nLineCount;
     long nMinSpan = 1;
     while( nMaxSpan )
@@ -2134,12 +2138,13 @@ lcl_CopyLineToDoc(const _FndLine& rFndLine, _CpyPara *const pCpyPara)
                         rFndLine.GetBoxes().size(), pCpyPara->pInsBox );
     if( pCpyPara->pInsBox )
     {
-        pCpyPara->pInsBox->GetTabLines().C40_INSERT( SwTableLine, pNewLine, pCpyPara->nInsPos++ );
+        SwTableLines& rLines = pCpyPara->pInsBox->GetTabLines();
+        rLines.insert( rLines.begin() + pCpyPara->nInsPos++, pNewLine );
     }
     else
     {
-        pCpyPara->pTblNd->GetTable().GetTabLines().C40_INSERT( SwTableLine, pNewLine,
-                            pCpyPara->nInsPos++ );
+        SwTableLines& rLines = pCpyPara->pTblNd->GetTable().GetTabLines();
+        rLines.insert( rLines.begin() + pCpyPara->nInsPos++, pNewLine);
     }
 
     _CpyPara aPara( *pCpyPara, pNewLine );
@@ -2187,7 +2192,7 @@ sal_Bool SwTable::CopyHeadlineIntoTable( SwTableNode& rTblNd )
     _FndBox aFndBox( 0, 0 );
     {
         _FndPara aPara( aSelBoxes, &aFndBox );
-        ((SwTableLines&)GetTabLines()).ForEach( &_FndLineCopyCol, &aPara );
+        ForEach_FndLineCopyCol( GetTabLines(), &aPara );
     }
     if( aFndBox.GetLines().empty() )
         return sal_False;
@@ -2231,7 +2236,7 @@ sal_Bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
     _FndBox aFndBox( 0, 0 );
     {
         _FndPara aPara( rSelBoxes, &aFndBox );
-        ((SwTableLines&)GetTabLines()).ForEach( &_FndLineCopyCol, &aPara );
+        ForEach_FndLineCopyCol( (SwTableLines&)GetTabLines(), &aPara );
     }
     if( aFndBox.GetLines().empty() )
         return sal_False;
@@ -2333,7 +2338,7 @@ sal_Bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
         pLn = pFndLn->GetLine();
         pTmp = pLn;
         nLnPos = GetTabLines().GetPos( pTmp );
-        if( nLnPos < GetTabLines().Count() - 1 )
+        if( nLnPos < GetTabLines().size() - 1 )
         {
             // There is a Line following it
             SwCollectTblLineBoxes aLnPara( sal_True, HEADLINE_BORDERCOPY );
@@ -2347,7 +2352,7 @@ sal_Bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
                                 lcl_GetLineWidth( *pFndLn )) )
             {
                 aLnPara.SetValues( sal_False );
-                pLn = pNewTbl->GetTabLines()[ pNewTbl->GetTabLines().Count()-1 ];
+                pLn = pNewTbl->GetTabLines().back();
                 for( SwTableBoxes::iterator it = pLn->GetTabBoxes().begin();
                          it != pLn->GetTabBoxes().end(); ++it)
                     lcl_BoxSetSplitBoxFmts(*it, &aLnPara );
@@ -2356,8 +2361,7 @@ sal_Bool SwTable::MakeCopy( SwDoc* pInsDoc, const SwPosition& rPos,
     }
 
     // We need to delete the initial Box
-    _DeleteBox( *pNewTbl, pNewTbl->GetTabLines()[
-                pNewTbl->GetTabLines().Count() - 1 ]->GetTabBoxes()[0],
+    _DeleteBox( *pNewTbl, pNewTbl->GetTabLines().back()->GetTabBoxes()[0],
                 0, sal_False, sal_False );
 
     if( pNewTbl->IsNewModel() )
@@ -2384,8 +2388,8 @@ SwTableBox* SwTableLine::FindNextBox( const SwTable& rTbl,
         nFndPos + 1 != (sal_uInt16)GetTabBoxes().size() )
     {
         pBox = GetTabBoxes()[ nFndPos + 1 ];
-        while( pBox->GetTabLines().Count() )
-            pBox = pBox->GetTabLines()[0]->GetTabBoxes()[0];
+        while( !pBox->GetTabLines().empty() )
+            pBox = pBox->GetTabLines().front()->GetTabBoxes()[0];
         return pBox;
     }
 
@@ -2394,7 +2398,7 @@ SwTableBox* SwTableLine::FindNextBox( const SwTable& rTbl,
         nFndPos = GetUpper()->GetTabLines().GetPos( pLine );
         OSL_ENSURE( USHRT_MAX != nFndPos, "Line is not in the Table" );
         // Is there another Line?
-        if( nFndPos+1 >= GetUpper()->GetTabLines().Count() )
+        if( nFndPos+1 >= (sal_uInt16)GetUpper()->GetTabLines().size() )
             return GetUpper()->GetUpper()->FindNextBox( rTbl, GetUpper(), bOvrTblLns );
         pLine = GetUpper()->GetTabLines()[nFndPos+1];
     }
@@ -2402,7 +2406,7 @@ SwTableBox* SwTableLine::FindNextBox( const SwTable& rTbl,
     {
         // Search for the next Line in the Table
         nFndPos = rTbl.GetTabLines().GetPos( pLine );
-        if( nFndPos + 1 >= rTbl.GetTabLines().Count() )
+        if( nFndPos + 1 >= (sal_uInt16)rTbl.GetTabLines().size() )
             return 0;           // there are no more Boxes
 
         pLine = rTbl.GetTabLines()[ nFndPos+1 ];
@@ -2413,8 +2417,8 @@ SwTableBox* SwTableLine::FindNextBox( const SwTable& rTbl,
     if( !pLine->GetTabBoxes().empty() )
     {
         pBox = pLine->GetTabBoxes().front();
-        while( pBox->GetTabLines().Count() )
-            pBox = pBox->GetTabLines()[0]->GetTabBoxes().front();
+        while( !pBox->GetTabLines().empty() )
+            pBox = pBox->GetTabLines().front()->GetTabBoxes().front();
         return pBox;
     }
     return pLine->FindNextBox( rTbl, 0, bOvrTblLns );
@@ -2432,9 +2436,9 @@ SwTableBox* SwTableLine::FindPreviousBox( const SwTable& rTbl,
         nFndPos )
     {
         pBox = GetTabBoxes()[ nFndPos - 1 ];
-        while( pBox->GetTabLines().Count() )
+        while( !pBox->GetTabLines().empty() )
         {
-            pLine = pBox->GetTabLines()[pBox->GetTabLines().Count()-1];
+            pLine = pBox->GetTabLines().back();
             pBox = pLine->GetTabBoxes().back();
         }
         return pBox;
@@ -2464,9 +2468,9 @@ SwTableBox* SwTableLine::FindPreviousBox( const SwTable& rTbl,
     if( !pLine->GetTabBoxes().empty() )
     {
         pBox = pLine->GetTabBoxes().back();
-        while( pBox->GetTabLines().Count() )
+        while( !pBox->GetTabLines().empty() )
         {
-            pLine = pBox->GetTabLines()[pBox->GetTabLines().Count()-1];
+            pLine = pBox->GetTabLines().back();
             pBox = pLine->GetTabBoxes().back();
         }
         return pBox;
@@ -2478,7 +2482,7 @@ SwTableBox* SwTableLine::FindPreviousBox( const SwTable& rTbl,
 SwTableBox* SwTableBox::FindNextBox( const SwTable& rTbl,
                          const SwTableBox* pSrchBox, sal_Bool bOvrTblLns ) const
 {
-    if( !pSrchBox  && !GetTabLines().Count() )
+    if( !pSrchBox  && GetTabLines().empty() )
         return (SwTableBox*)this;
     return GetUpper()->FindNextBox( rTbl, pSrchBox ? pSrchBox : this,
                                         bOvrTblLns );
@@ -2489,29 +2493,27 @@ SwTableBox* SwTableBox::FindNextBox( const SwTable& rTbl,
 SwTableBox* SwTableBox::FindPreviousBox( const SwTable& rTbl,
                          const SwTableBox* pSrchBox, sal_Bool bOvrTblLns ) const
 {
-    if( !pSrchBox && !GetTabLines().Count() )
+    if( !pSrchBox && GetTabLines().empty() )
         return (SwTableBox*)this;
     return GetUpper()->FindPreviousBox( rTbl, pSrchBox ? pSrchBox : this,
                                         bOvrTblLns );
 }
 
-static sal_Bool lcl_BoxSetHeadCondColl( SwTableBox* pBox )
+static void lcl_BoxSetHeadCondColl( const SwTableBox* pBox )
 {
     // We need to adapt the paragraphs with conditional templates in the HeadLine
     const SwStartNode* pSttNd = pBox->GetSttNd();
     if( pSttNd )
         pSttNd->CheckSectionCondColl();
     else
-        pBox->GetTabLines().ForEach( &lcl_LineSetHeadCondColl, 0 );
-    return sal_True;
+        BOOST_FOREACH( const SwTableLine* pLine, pBox->GetTabLines() )
+            lcl_LineSetHeadCondColl( pLine );
 }
 
-sal_Bool lcl_LineSetHeadCondColl( const SwTableLine*& rpLine, void* )
+void lcl_LineSetHeadCondColl( const SwTableLine* pLine )
 {
-    for( SwTableBoxes::iterator it = ((SwTableLine*)rpLine)->GetTabBoxes().begin();
-             it != ((SwTableLine*)rpLine)->GetTabBoxes().end(); ++it)
-        lcl_BoxSetHeadCondColl(*it);
-    return sal_True;
+    BOOST_FOREACH( const SwTableBox* pBox, pLine->GetTabBoxes() )
+        lcl_BoxSetHeadCondColl(pBox);
 }
 
 SwTwips lcl_GetDistance( SwTableBox* pBox, sal_Bool bLeft )
@@ -2549,7 +2551,7 @@ sal_Bool lcl_SetSelBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
 
         if( bCheck )
         {
-            for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
+            for( sal_uInt16 i = 0; i < pBox->GetTabLines().size(); ++i )
                 if( !::lcl_SetSelBoxWidth( pBox->GetTabLines()[ i ], rParam,
                                             nDist, sal_True ))
                     return sal_False;
@@ -2578,7 +2580,7 @@ sal_Bool lcl_SetSelBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
         else
         {
             SwTwips nLowerDiff = 0, nOldLower = rParam.nLowerDiff;
-            for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
+            for( sal_uInt16 i = 0; i < pBox->GetTabLines().size(); ++i )
             {
                 rParam.nLowerDiff = 0;
                 lcl_SetSelBoxWidth( pBox->GetTabLines()[ i ], rParam, nDist, sal_False );
@@ -2649,7 +2651,7 @@ sal_Bool lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
 
         if( bCheck )
         {
-            for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
+            for( sal_uInt16 i = 0; i < pBox->GetTabLines().size(); ++i )
                 if( !::lcl_SetOtherBoxWidth( pBox->GetTabLines()[ i ],
                                                     rParam, nDist, sal_True ))
                     return sal_False;
@@ -2678,7 +2680,7 @@ sal_Bool lcl_SetOtherBoxWidth( SwTableLine* pLine, CR_SetBoxWidth& rParam,
         else
         {
             SwTwips nLowerDiff = 0, nOldLower = rParam.nLowerDiff;
-            for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
+            for( sal_uInt16 i = 0; i < pBox->GetTabLines().size(); ++i )
             {
                 rParam.nLowerDiff = 0;
                 lcl_SetOtherBoxWidth( pBox->GetTabLines()[ i ], rParam,
@@ -2744,7 +2746,7 @@ sal_Bool lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
 
         if( bCheck )
         {
-            for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
+            for( sal_uInt16 i = 0; i < pBox->GetTabLines().size(); ++i )
                 if( !::lcl_InsSelBox( pBox->GetTabLines()[ i ], rParam,
                                             nDist, sal_True ))
                     return sal_False;
@@ -2778,7 +2780,7 @@ sal_Bool lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
         else
         {
             SwTwips nLowerDiff = 0, nOldLower = rParam.nLowerDiff;
-            for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
+            for( sal_uInt16 i = 0; i < pBox->GetTabLines().size(); ++i )
             {
                 rParam.nLowerDiff = 0;
                 lcl_InsSelBox( pBox->GetTabLines()[ i ], rParam, nDist, sal_False );
@@ -2902,7 +2904,7 @@ sal_Bool lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
 
         if( bCheck )
         {
-            for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
+            for( sal_uInt16 i = 0; i < pBox->GetTabLines().size(); ++i )
                 if( !::lcl_InsOtherBox( pBox->GetTabLines()[ i ],
                                                     rParam, nDist, sal_True ))
                     return sal_False;
@@ -2960,7 +2962,7 @@ sal_Bool lcl_InsOtherBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
         else
         {
             SwTwips nLowerDiff = 0, nOldLower = rParam.nLowerDiff;
-            for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
+            for( sal_uInt16 i = 0; i < pBox->GetTabLines().size(); ++i )
             {
                 rParam.nLowerDiff = 0;
                 lcl_InsOtherBox( pBox->GetTabLines()[ i ], rParam,
@@ -3084,7 +3086,7 @@ void lcl_DelSelBox_CorrLowers( SwTableLine& rLine, CR_SetBoxWidth& rParam,
             if( !pBox->GetSttNd() )
             {
                 // Has Lower itself, so also adjust that
-                for( sal_uInt16 i = pBox->GetTabLines().Count(); i; )
+                for( sal_uInt16 i = pBox->GetTabLines().size(); i; )
                     ::lcl_DelSelBox_CorrLowers( *pBox->GetTabLines()[ --i ],
                                                 rParam, nDiff  );
             }
@@ -3145,7 +3147,7 @@ void lcl_ChgBoxSize( SwTableBox& rBox, CR_SetBoxWidth& rParam,
         rParam.aShareFmts.SetSize( rBox, aNew );
 
         // Change the Lower once again
-        for( sal_uInt16 i = rBox.GetTabLines().Count(); i; )
+        for( sal_uInt16 i = rBox.GetTabLines().size(); i; )
             ::lcl_DelSelBox_CorrLowers( *rBox.GetTabLines()[ --i ], rParam,
                                             aNew.GetWidth() );
     }
@@ -3175,7 +3177,7 @@ sal_Bool lcl_DeleteBox_Rekursiv( CR_SetBoxWidth& rParam, SwTableBox& rBox,
     else
     {
         // We need to delete these sequentially via the ContentBoxes
-        for( sal_uInt16 i = rBox.GetTabLines().Count(); i; )
+        for( sal_uInt16 i = rBox.GetTabLines().size(); i; )
         {
             SwTableLine& rLine = *rBox.GetTabLines()[ --i ];
             for( sal_uInt16 n = rLine.GetTabBoxes().size(); n; )
@@ -3330,7 +3332,7 @@ sal_Bool lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
             sal_uInt16 nOldRemain = rParam.nRemainWidth;
             sal_uInt16 i;
 
-            for( i = pBox->GetTabLines().Count(); i; )
+            for( i = pBox->GetTabLines().size(); i; )
             {
                 rParam.nLowerDiff = nDelWidth + nOldLower;
                 rParam.nRemainWidth = nOldRemain;
@@ -3341,7 +3343,7 @@ sal_Bool lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
                 // Do the Box and its Lines still exist?
                 if( n < rBoxes.size() &&
                     pBox == rBoxes[ rParam.bLeft ? n : n-1 ] &&
-                    i < pBox->GetTabLines().Count() &&
+                    i < pBox->GetTabLines().size() &&
                     pLine == pBox->GetTabLines()[ i ] )
                 {
                     if( !bFirst && !bCorrLowers &&
@@ -3439,7 +3441,7 @@ sal_Bool lcl_DelSelBox( SwTableLine* pTabLine, CR_SetBoxWidth& rParam,
                     if( bCorrLowers )
                     {
                         // Adapt the Lower once again
-                        for( i = pBox->GetTabLines().Count(); i; )
+                        for( i = pBox->GetTabLines().size(); i; )
                             ::lcl_DelSelBox_CorrLowers( *pBox->
                                 GetTabLines()[ --i ], rParam, aNew.GetWidth() );
                     }
@@ -3476,7 +3478,7 @@ void lcl_AjustLines( SwTableLine* pLine, CR_SetBoxWidth& rParam )
         aSz.SetWidth( nWidth );
         rParam.aShareFmts.SetSize( *pBox, aSz );
 
-        for( sal_uInt16 i = 0; i < pBox->GetTabLines().Count(); ++i )
+        for( sal_uInt16 i = 0; i < pBox->GetTabLines().size(); ++i )
             ::lcl_AjustLines( pBox->GetTabLines()[ i ], rParam );
     }
 }
@@ -3494,7 +3496,7 @@ void _CheckBoxWidth( const SwTableLine& rLine, SwTwips nSize )
         const SwTwips nBoxW = pBox->GetFrmFmt()->GetFrmSize().GetWidth();
         nAktSize += nBoxW;
 
-        for( sal_uInt16 j = 0; j < pBox->GetTabLines().Count(); ++j )
+        for( sal_uInt16 j = 0; j < pBox->GetTabLines().size(); ++j )
             _CheckBoxWidth( *pBox->GetTabLines()[ j ], nBoxW );
     }
 
@@ -3516,10 +3518,10 @@ _FndBox* lcl_SaveInsDelData( CR_SetBoxWidth& rParam, SwUndo** ppUndo,
     {
         // Get the Boxes
         if( rParam.bBigger )
-            for( sal_uInt16 n = 0; n < rTbl.GetTabLines().Count(); ++n )
+            for( sal_uInt16 n = 0; n < rTbl.GetTabLines().size(); ++n )
                 ::lcl_DelSelBox( rTbl.GetTabLines()[ n ], rParam, nDistStt, sal_True );
         else
-            for( sal_uInt16 n = 0; n < rTbl.GetTabLines().Count(); ++n )
+            for( sal_uInt16 n = 0; n < rTbl.GetTabLines().size(); ++n )
                 ::lcl_InsSelBox( rTbl.GetTabLines()[ n ], rParam, nDistStt, sal_True );
     }
 
@@ -3533,7 +3535,7 @@ _FndBox* lcl_SaveInsDelData( CR_SetBoxWidth& rParam, SwUndo** ppUndo,
     else
     {
         _FndPara aPara( rParam.aBoxes, pFndBox );
-        rTbl.GetTabLines().ForEach( &_FndLineCopyCol, &aPara );
+        ForEach_FndLineCopyCol( rTbl.GetTabLines(), &aPara );
         OSL_ENSURE( pFndBox->GetLines().size(), "Where are the Boxes" );
         pFndBox->SetTableLines( rTbl );
 
@@ -3649,7 +3651,7 @@ sal_Bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
             else
             {
                 bRet = sal_True;
-                for( n = 0; n < aLines.Count(); ++n )
+                for( n = 0; n < aLines.size(); ++n )
                 {
                     aParam.LoopClear();
                     if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, sal_True ))
@@ -3694,7 +3696,7 @@ sal_Bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
                         // Break down to USHRT_MAX / 2
                         CR_SetBoxWidth aTmpPara( 0, aSz.GetWidth() / 2,
                                         0, aSz.GetWidth(), aSz.GetWidth(), aParam.pTblNd );
-                        for( sal_uInt16 nLn = 0; nLn < aLines.Count(); ++nLn )
+                        for( sal_uInt16 nLn = 0; nLn < aLines.size(); ++nLn )
                             ::lcl_AjustLines( aLines[ nLn ], aTmpPara );
                         aSz.SetWidth( aSz.GetWidth() / 2 );
                         aParam.nDiff = nRelDiff /= 2;
@@ -3756,7 +3758,7 @@ sal_Bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
 
                 UnlockModify();
 
-                for( n = aLines.Count(); n; )
+                for( n = aLines.size(); n; )
                 {
                     --n;
                     aParam.LoopClear();
@@ -3786,7 +3788,7 @@ sal_Bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
             {
                 if( aParam.bBigger )
                 {
-                    for( n = 0; n < aLines.Count(); ++n )
+                    for( n = 0; n < aLines.size(); ++n )
                     {
                         aParam.LoopClear();
                         if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, sal_True ))
@@ -3801,7 +3803,7 @@ sal_Bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
                     if( 0 != ( bRet = bLeft ? nDist != 0
                                             : ( rSz.GetWidth() - nDist ) > COLFUZZY ) )
                     {
-                        for( n = 0; n < aLines.Count(); ++n )
+                        for( n = 0; n < aLines.size(); ++n )
                         {
                             aParam.LoopClear();
                             if( !(*fnOtherBox)( aLines[ n ], aParam, 0, sal_True ))
@@ -3823,7 +3825,7 @@ sal_Bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
                         // We also need to test this!
                         bRet = sal_True;
 
-                        for( n = 0; n < aLines.Count(); ++n )
+                        for( n = 0; n < aLines.size(); ++n )
                         {
                             aParam.LoopClear();
                             if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, sal_True ))
@@ -3837,7 +3839,7 @@ sal_Bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
             }
             else if( aParam.bBigger )
             {
-                for( n = 0; n < aLines.Count(); ++n )
+                for( n = 0; n < aLines.size(); ++n )
                 {
                     aParam.LoopClear();
                     if( !(*fnOtherBox)( aLines[ n ], aParam, 0, sal_True ))
@@ -3849,7 +3851,7 @@ sal_Bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
             }
             else
             {
-                for( n = 0; n < aLines.Count(); ++n )
+                for( n = 0; n < aLines.size(); ++n )
                 {
                     aParam.LoopClear();
                     if( !(*fnSelBox)( aLines[ n ], aParam, nDistStt, sal_True ))
@@ -3881,7 +3883,7 @@ sal_Bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
                     ? ( TBLFIX_CHGABS == eTblChgMode ? bLeft : bLeft )
                     : ( TBLFIX_CHGABS != eTblChgMode && bLeft ) )
                 {
-                    for( n = aLines.Count(); n; )
+                    for( n = aLines.size(); n; )
                     {
                         --n;
                         aParam.LoopClear();
@@ -3891,7 +3893,7 @@ sal_Bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
                     }
                 }
                 else
-                    for( n = aLines.Count(); n; )
+                    for( n = aLines.size(); n; )
                     {
                         --n;
                         aParam.LoopClear();
@@ -4059,7 +4061,7 @@ _FndBox* lcl_SaveInsDelData( CR_SetLineHeight& rParam, SwUndo** ppUndo,
     else
     {
         _FndPara aPara( rParam.aBoxes, pFndBox );
-        rTbl.GetTabLines().ForEach( &_FndLineCopyCol, &aPara );
+        ForEach_FndLineCopyCol( rTbl.GetTabLines(), &aPara );
         OSL_ENSURE( pFndBox->GetLines().size(), "Where are the Boxes?" );
         pFndBox->SetTableLines( rTbl );
 
@@ -4107,7 +4109,7 @@ void SetLineHeight( SwTableLine& rLine, SwTwips nOldHeight, SwTwips nNewHeight,
     for( sal_uInt16 n = 0; n < rBoxes.size(); ++n )
     {
         SwTableBox& rBox = *rBoxes[ n ];
-        for( sal_uInt16 i = 0; i < rBox.GetTabLines().Count(); ++i )
+        for( sal_uInt16 i = 0; i < rBox.GetTabLines().size(); ++i )
             SetLineHeight( *rBox.GetTabLines()[ i ], nMyOldH, nMyNewH, bMinSize );
     }
 }
@@ -4215,10 +4217,10 @@ sal_Bool lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam,
                 pLines = &pLine->GetUpper()->GetTabLines();
             else
                 pLines = &rParam.pTblNd->GetTable().GetTabLines();
-            sal_uInt16 nPos = pLines->C40_GETPOS( SwTableLine, pLine );
+            sal_uInt16 nPos = pLines->GetPos( pLine );
             if( !rParam.bTop )
                 ++nPos;
-            pLines->C40_INSERT( SwTableLine, pNewLine, nPos );
+            pLines->insert( pLines->begin() + nPos, pNewLine );
 
             SwFrmFmt* pNewFmt = pNewLine->ClaimFrmFmt();
             pNewFmt->SetFmtAttr( SwFmtFrmSize( ATT_MIN_SIZE, 0, nDist ) );
@@ -4271,7 +4273,7 @@ sal_Bool lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam,
                 rParam.aBoxes.Insert( pBox );
             else
             {
-                for( sal_uInt16 i = pBox->GetTabLines().Count(); i; )
+                for( sal_uInt16 i = pBox->GetTabLines().size(); i; )
                     lcl_InsDelSelLine( pBox->GetTabLines()[ --i ],
                                         rParam, 0, sal_True );
             }
@@ -4296,7 +4298,7 @@ sal_Bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType,
         bTop = nsTblChgWidthHeightType::WH_ROW_TOP == ( eType & 0xff ) ||
                 nsTblChgWidthHeightType::WH_CELL_TOP == ( eType & 0xff ),
         bInsDel = 0 != (eType & nsTblChgWidthHeightType::WH_FLAG_INSDEL );
-    sal_uInt16 n, nBaseLinePos = GetTabLines().C40_GETPOS( SwTableLine, pBaseLine );
+    sal_uInt16 n, nBaseLinePos = GetTabLines().GetPos( pBaseLine );
     sal_uLong nBoxIdx = rAktBox.GetSttIdx();
 
     CR_SetLineHeight aParam( eType,
@@ -4321,7 +4323,7 @@ sal_Bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType,
 
         // Is a nested Line (Box!)
         pLines = &pLine->GetUpper()->GetTabLines();
-        nBaseLinePos = pLines->C40_GETPOS( SwTableLine, pLine );
+        nBaseLinePos = pLines->GetPos( pLine );
         pBaseLine = pLine;
         // no break!
 
@@ -4395,7 +4397,7 @@ sal_Bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType,
                 if( bTop )
                     nStt = 0, nEnd = nBaseLinePos;
                 else
-                    nStt = nBaseLinePos + 1, nEnd = pLines->Count();
+                    nStt = nBaseLinePos + 1, nEnd = pLines->size();
 
                 // Get the current Lines' height
                 if( TBLFIX_CHGPROP == eTblChgMode )
diff --git a/sw/source/core/docnode/ndcopy.cxx b/sw/source/core/docnode/ndcopy.cxx
index c94534c..e768ec5 100644
--- a/sw/source/core/docnode/ndcopy.cxx
+++ b/sw/source/core/docnode/ndcopy.cxx
@@ -55,6 +55,7 @@
 #include <SwNodeNum.hxx>
 #include <set>
 #include <vector>
+#include <boost/foreach.hpp>
 
 #ifdef DBG_UTIL
 #define CHECK_TABLE(t) (t).CheckConsistency();
@@ -324,7 +325,7 @@ struct _CopyTable
     {}
 };
 
-sal_Bool lcl_CopyTblLine( const SwTableLine*& rpLine, void* pPara );
+static void lcl_CopyTblLine( const SwTableLine* pLine, _CopyTable* pCT );
 
 static void lcl_CopyTblBox( SwTableBox* pBox, _CopyTable* pCT )
 {
@@ -360,7 +361,7 @@ static void lcl_CopyTblBox( SwTableBox* pBox, _CopyTable* pCT )
                                 pCT->rMapArr.Count() );
     }
 
-    sal_uInt16 nLines = pBox->GetTabLines().Count();
+    sal_uInt16 nLines = pBox->GetTabLines().size();
     SwTableBox* pNewBox;
     if( nLines )
         pNewBox = new SwTableBox( pBoxFmt, nLines, pCT->pInsLine );
@@ -379,43 +380,40 @@ static void lcl_CopyTblBox( SwTableBox* pBox, _CopyTable* pCT )
     {
         _CopyTable aPara( *pCT );
         aPara.pInsBox = pNewBox;
-        pBox->GetTabLines().ForEach( &lcl_CopyTblLine, &aPara );
+        BOOST_FOREACH( const SwTableLine* pLine, pBox->GetTabLines() )
+            lcl_CopyTblLine( pLine, &aPara );
     }
     else if( pNewBox->IsInHeadline( &pCT->pTblNd->GetTable() ))
         // in der HeadLine sind die Absaetze mit BedingtenVorlage anzupassen
         pNewBox->GetSttNd()->CheckSectionCondColl();
 }
 
-sal_Bool lcl_CopyTblLine( const SwTableLine*& rpLine, void* pPara )
+static void lcl_CopyTblLine( const SwTableLine* pLine, _CopyTable* pCT )
 {
-    _CopyTable* pCT = reinterpret_cast< _CopyTable* >(pPara);
-    SwTableLineFmt* pLineFmt = (SwTableLineFmt*)rpLine->GetFrmFmt();
+    SwTableLineFmt* pLineFmt = (SwTableLineFmt*)pLine->GetFrmFmt();
     pCT->rMapArr.ForEach( lcl_SrchNew, &pLineFmt );
-    if( pLineFmt == rpLine->GetFrmFmt() )   // ein neues anlegen ??
+    if( pLineFmt == pLine->GetFrmFmt() )   // ein neues anlegen ??
     {
         pLineFmt = pCT->pDoc->MakeTableLineFmt();
-        pLineFmt->CopyAttrs( *rpLine->GetFrmFmt() );
-        pCT->rMapArr.Insert( _MapTblFrmFmt( rpLine->GetFrmFmt(), pLineFmt ),
+        pLineFmt->CopyAttrs( *pLine->GetFrmFmt() );
+        pCT->rMapArr.Insert( _MapTblFrmFmt( pLine->GetFrmFmt(), pLineFmt ),
                                 pCT->rMapArr.Count());
     }
     SwTableLine* pNewLine = new SwTableLine( pLineFmt,
-                            rpLine->GetTabBoxes().size(), pCT->pInsBox );
+                            pLine->GetTabBoxes().size(), pCT->pInsBox );
     // die neue Zeile in die Tabelle eintragen
     if( pCT->pInsBox )
     {
-        pCT->pInsBox->GetTabLines().C40_INSERT( SwTableLine, pNewLine,
-                pCT->pInsBox->GetTabLines().Count() );
+        pCT->pInsBox->GetTabLines().push_back( pNewLine );
     }
     else
     {
-        pCT->pTblNd->GetTable().GetTabLines().C40_INSERT( SwTableLine, pNewLine,
-                pCT->pTblNd->GetTable().GetTabLines().Count() );
+        pCT->pTblNd->GetTable().GetTabLines().push_back( pNewLine );
     }
     pCT->pInsLine = pNewLine;
-    for( SwTableBoxes::iterator it = ((SwTableLine*)rpLine)->GetTabBoxes().begin();
-             it != ((SwTableLine*)rpLine)->GetTabBoxes().end(); ++it)
+    for( SwTableBoxes::iterator it = ((SwTableLine*)pLine)->GetTabBoxes().begin();
+             it != ((SwTableLine*)pLine)->GetTabBoxes().end(); ++it)
         lcl_CopyTblBox(*it, pCT );
-    return sal_True;
 }
 
 SwTableNode* SwTableNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
@@ -499,7 +497,8 @@ SwTableNode* SwTableNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
     _MapTblFrmFmts aMapArr;
     _CopyTable aPara( pDoc, aMapArr, GetIndex(), *pTblNd, &GetTable() );
 
-    ((SwTable&)GetTable()).GetTabLines().ForEach( &lcl_CopyTblLine, &aPara );
+    BOOST_FOREACH(const SwTableLine* pLine, GetTable().GetTabLines() )
+        lcl_CopyTblLine( pLine, &aPara );
 
     if( pDDEType )
         pDDEType->IncRefCnt();
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index 5822c63..c5dacc1 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -95,6 +95,7 @@
 #include <fldupde.hxx>
 #include <switerator.hxx>
 #include <boost/foreach.hpp>
+
 #ifdef DBG_UTIL
 #define CHECK_TABLE(t) (t).CheckConsistency();
 #else
@@ -271,7 +272,7 @@ sal_Bool SwNodes::InsBoxen( SwTableNode* pTblNd,
     if( !pPrvBox && !pNxtBox )
     {
         sal_Bool bSetIdxPos = sal_True;
-        if( pTblNd->GetTable().GetTabLines().Count() && !nInsPos )
+        if( pTblNd->GetTable().GetTabLines().size() && !nInsPos )
         {
             const SwTableLine* pTblLn = pLine;
             while( pTblLn->GetUpper() )
@@ -280,7 +281,7 @@ sal_Bool SwNodes::InsBoxen( SwTableNode* pTblNd,
             if( pTblNd->GetTable().GetTabLines()[ 0 ] == pTblLn )
             {
                 // also vor die erste Box der Tabelle
-                while( ( pNxtBox = pLine->GetTabBoxes()[0])->GetTabLines().Count() )
+                while( ( pNxtBox = pLine->GetTabBoxes()[0])->GetTabLines().size() )
                     pLine = pNxtBox->GetTabLines()[0];
                 nIdxPos = pNxtBox->GetSttIdx();
                 bSetIdxPos = sal_False;
@@ -492,7 +493,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
     for( sal_uInt16 n = 0; n < nRows; ++n )
     {
         SwTableLine* pLine = new SwTableLine( pLineFmt, nCols, 0 );
-        rLines.C40_INSERT( SwTableLine, pLine, n );
+        rLines.insert( rLines.begin() + n, pLine );
         SwTableBoxes& rBoxes = pLine->GetTabBoxes();
         for( sal_uInt16 i = 0; i < nCols; ++i )
         {
@@ -771,7 +772,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
 
         SwTableBoxFmt *pBoxF = 0;
         SwTableLines& rLines = pNdTbl->GetTabLines();
-        sal_uInt16 nRows = rLines.Count();
+        sal_uInt16 nRows = rLines.size();
         for( sal_uInt16 n = 0; n < nRows; ++n )
         {
             SwTableBoxes& rBoxes = rLines[ n ]->GetTabBoxes();
@@ -970,7 +971,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
         pTxtNd->pStartOfSection = pTblNd;
 
         pLine = new SwTableLine( pLineFmt, 1, 0 );
-        pTable->GetTabLines().C40_INSERT( SwTableLine, pLine, nLines );
+        pTable->GetTabLines().insert( pTable->GetTabLines().begin() + nLines, pLine );
 
         SwStartNode* pSttNd;
         SwPosition aCntPos( aSttIdx, SwIndex( pTxtNd ));
@@ -1029,7 +1030,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
     // die Tabelle ausgleichen, leere Sections einfuegen
     sal_uInt16 n;
 
-    for( n = 0; n < pTable->GetTabLines().Count(); ++n )
+    for( n = 0; n < pTable->GetTabLines().size(); ++n )
     {
         SwTableLine* pCurrLine = pTable->GetTabLines()[ n ];
         if( nMaxBoxes != ( nBoxes = pCurrLine->GetTabBoxes().size() ))
@@ -1057,7 +1058,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodeRange& rRange, sal_Unicode cCh,
             SwTableBoxFmt *pNewFmt = pDoc->MakeTableBoxFmt();
             pNewFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE,
                                                 aPosArr[ n ] - nLastPos ));
-            for( sal_uInt16 nTmpLine = 0; nTmpLine < rLns.Count(); ++nTmpLine )
+            for( sal_uInt16 nTmpLine = 0; nTmpLine < rLns.size(); ++nTmpLine )
                 //JP 24.06.98: hier muss ein Add erfolgen, da das BoxFormat
                 //              von der rufenden Methode noch gebraucht wird!
                 pNewFmt->Add( rLns[ nTmpLine ]->GetTabBoxes()[ n ] );
@@ -1341,7 +1342,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes,
         ++aRowIter, nLines++, nBoxes = 0 )
     {
         pLine = new SwTableLine( pLineFmt, 1, 0 );
-        pTable->GetTabLines().C40_INSERT( SwTableLine, pLine, nLines );
+        pTable->GetTabLines().insert( pTable->GetTabLines().begin() + nLines, pLine );
 
         std::vector< SwNodeRange >::const_iterator aCellIter = aRowIter->begin();
 
@@ -1384,7 +1385,7 @@ SwTableNode* SwNodes::TextToTable( const SwNodes::TableRanges_t & rTableNodes,
             SwTableBoxFmt *pNewFmt = pDoc->MakeTableBoxFmt();
             pNewFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE,
                                                 aPosArr[ n ] - nLastPos ));
-            for( sal_uInt16 nLines2 = 0; nLines2 < rLns.Count(); ++nLines2 )
+            for( sal_uInt16 nLines2 = 0; nLines2 < rLns.size(); ++nLines2 )
                 //JP 24.06.98: hier muss ein Add erfolgen, da das BoxFormat
                 //              von der rufenden Methode noch gebraucht wird!
                 pNewFmt->Add( rLns[ nLines2 ]->GetTabBoxes()[ n ] );
@@ -1470,17 +1471,16 @@ struct _DelTabPara
 // koennen.
 static void lcl_DelBox( SwTableBox* pBox, _DelTabPara* pDelPara );
 
-sal_Bool lcl_DelLine( const SwTableLine*& rpLine, void* pPara )
+static void lcl_DelLine( SwTableLine* pLine, _DelTabPara* pPara )
 {
     OSL_ENSURE( pPara, "die Parameter fehlen" );
-    _DelTabPara aPara( *(_DelTabPara*)pPara );
-    for( SwTableBoxes::iterator it = ((SwTableLine*)rpLine)->GetTabBoxes().begin();
-             it != ((SwTableLine*)rpLine)->GetTabBoxes().end(); ++it)
+    _DelTabPara aPara( *pPara );
+    for( SwTableBoxes::iterator it = pLine->GetTabBoxes().begin();
+             it != pLine->GetTabBoxes().end(); ++it)
         lcl_DelBox(*it, &aPara );
-    if( rpLine->GetUpper() )        // gibt es noch eine uebergeordnete Box ??
+    if( pLine->GetUpper() )        // gibt es noch eine uebergeordnete Box ??
         // dann gebe den letzten TextNode zurueck
-        ((_DelTabPara*)pPara)->pLastNd = aPara.pLastNd;
-    return sal_True;
+        pPara->pLastNd = aPara.pLastNd;
 }
 
 
@@ -1489,8 +1489,9 @@ static void lcl_DelBox( SwTableBox* pBox, _DelTabPara* pDelPara )
     OSL_ENSURE( pDelPara, "die Parameter fehlen" );
 
     // loesche erstmal die Lines der Box
-    if( pBox->GetTabLines().Count() )
-        pBox->GetTabLines().ForEach( &lcl_DelLine, pDelPara );
+    if( !pBox->GetTabLines().empty() )
+        BOOST_FOREACH( SwTableLine* pLine, pBox->GetTabLines() )
+            lcl_DelLine( pLine, pDelPara );
     else
     {
         SwDoc* pDoc = pDelPara->rNds.GetDoc();
@@ -1570,7 +1571,8 @@ sal_Bool SwNodes::TableToText( const SwNodeRange& rRange, sal_Unicode cCh,
 
     // dann "loeschen" die Tabellen und fasse alle Lines/Boxen zusammen
     _DelTabPara aDelPara( *this, cCh, pUndo );
-    pTblNd->pTable->GetTabLines().ForEach( &lcl_DelLine, &aDelPara );
+    BOOST_FOREACH( SwTableLine *pLine, pTblNd->pTable->GetTabLines() )
+        lcl_DelLine( pLine, &aDelPara );
 
     // jetzt ist aus jeder TableLine ein TextNode mit dem entsprechenden
     // Trenner erzeugt worden. Es braucht nur noch die Table-Section
@@ -1817,7 +1819,7 @@ sal_Bool SwDoc::DeleteRow( const SwCursor& rCursor )
         _FndBox aFndBox( 0, 0 );
         {
             _FndPara aPara( aBoxes, &aFndBox );
-            pTblNd->GetTable().GetTabLines().ForEach( &_FndLineCopyCol, &aPara );
+            ForEach_FndLineCopyCol( pTblNd->GetTable().GetTabLines(), &aPara );
         }
 
         if( !aFndBox.GetLines().size() )
@@ -1845,7 +1847,7 @@ sal_Bool SwDoc::DeleteRow( const SwCursor& rCursor )
         while( !pDelBox->GetSttNd() )
         {
             SwTableLine* pLn = pDelBox->GetTabLines()[
-                        pDelBox->GetTabLines().Count()-1 ];
+                        pDelBox->GetTabLines().size()-1 ];
             pDelBox = pLn->GetTabBoxes().back();
         }
         SwTableBox* pNextBox = pDelLine->FindNextBox( pTblNd->GetTable(),
@@ -3018,7 +3020,7 @@ sal_Bool lcl_Line_CollectBox( const SwTableLine*& rpLine, void* pPara )
 
 void lcl_Box_CollectBox( const SwTableBox* pBox, SwCollectTblLineBoxes* pSplPara )
 {
-    sal_uInt16 nLen = pBox->GetTabLines().Count();
+    sal_uInt16 nLen = pBox->GetTabLines().size();
     if( nLen )
     {
         // dann mit der richtigen Line weitermachen
@@ -3036,7 +3038,7 @@ void lcl_Box_CollectBox( const SwTableBox* pBox, SwCollectTblLineBoxes* pSplPara
 
 void lcl_BoxSetSplitBoxFmts( SwTableBox* pBox, SwCollectTblLineBoxes* pSplPara )
 {
-    sal_uInt16 nLen = pBox->GetTabLines().Count();
+    sal_uInt16 nLen = pBox->GetTabLines().size();
     if( nLen )
     {
         // dann mit der richtigen Line weitermachen
@@ -3155,7 +3157,7 @@ sal_Bool SwDoc::SplitTable( const SwPosition& rPos, sal_uInt16 eHdlnMode,
 
     if( pNew )
     {
-        SwSaveRowSpan* pSaveRowSp = pNew->GetTable().CleanUpTopRowSpan( rTbl.GetTabLines().Count() );
+        SwSaveRowSpan* pSaveRowSp = pNew->GetTable().CleanUpTopRowSpan( rTbl.GetTabLines().size() );
         SwUndoSplitTbl* pUndo = 0;
         if (GetIDocumentUndoRedo().DoesUndo())
         {
@@ -3174,7 +3176,7 @@ sal_Bool SwDoc::SplitTable( const SwPosition& rPos, sal_uInt16 eHdlnMode,
             {
                 SwCollectTblLineBoxes aPara( sal_False, eHdlnMode );
                 SwTableLine* pLn = rTbl.GetTabLines()[
-                            rTbl.GetTabLines().Count() - 1 ];
+                            rTbl.GetTabLines().size() - 1 ];
                 for( SwTableBoxes::iterator it = pLn->GetTabBoxes().begin();
                          it != pLn->GetTabBoxes().end(); ++it)
                     lcl_Box_CollectBox(*it, &aPara );
@@ -3262,7 +3264,7 @@ sal_Bool lcl_ChgTblSize( SwTable& rTbl )
     aTblMaxSz.SetWidth( 0 );
 
     SwTableLines& rLns = rTbl.GetTabLines();
-    for( sal_uInt16 nLns = 0; nLns < rLns.Count(); ++nLns )
+    for( sal_uInt16 nLns = 0; nLns < rLns.size(); ++nLns )
     {
         SwTwips nMaxLnWidth = 0;
         SwTableBoxes& rBoxes = rLns[ nLns ]->GetTabBoxes();
@@ -3311,25 +3313,21 @@ public:
 
 static void lcl_SplitTable_CpyBox( SwTableBox* pBox, _SplitTable_Para* pPara );
 
-sal_Bool lcl_SplitTable_CpyLine( const SwTableLine*& rpLine, void* pPara )
+static void lcl_SplitTable_CpyLine( SwTableLine* pLn, _SplitTable_Para* pPara )
 {
-    SwTableLine* pLn = (SwTableLine*)rpLine;
-    _SplitTable_Para& rPara = *(_SplitTable_Para*)pPara;
-
     SwFrmFmt *pSrcFmt = pLn->GetFrmFmt();
-    sal_uInt16 nPos = rPara.SrcFmt_GetPos( pSrcFmt );
+    sal_uInt16 nPos = pPara->SrcFmt_GetPos( pSrcFmt );
     if( USHRT_MAX == nPos )
     {
-        rPara.DestFmt_Insert( pLn->ClaimFrmFmt() );
-        rPara.SrcFmt_Insert( pSrcFmt );
+        pPara->DestFmt_Insert( pLn->ClaimFrmFmt() );
+        pPara->SrcFmt_Insert( pSrcFmt );
     }
     else
-        pLn->ChgFrmFmt( (SwTableLineFmt*)rPara.DestFmt_Get( nPos ) );
+        pLn->ChgFrmFmt( (SwTableLineFmt*)pPara->DestFmt_Get( nPos ) );
 
     for( SwTableBoxes::iterator it = pLn->GetTabBoxes().begin();
              it != pLn->GetTabBoxes().end(); ++it)
-        lcl_SplitTable_CpyBox(*it, (_SplitTable_Para*)pPara );
-    return sal_True;
+        lcl_SplitTable_CpyBox(*it, pPara );
 }
 
 static void lcl_SplitTable_CpyBox( SwTableBox* pBox, _SplitTable_Para* pPara )
@@ -3347,7 +3345,8 @@ static void lcl_SplitTable_CpyBox( SwTableBox* pBox, _SplitTable_Para* pPara )
     if( pBox->GetSttNd() )
         pPara->ChgBox( pBox );
     else
-        pBox->GetTabLines().ForEach( &lcl_SplitTable_CpyLine, pPara );
+        BOOST_FOREACH( SwTableLine* pLine, pBox->GetTabLines() )
+            lcl_SplitTable_CpyLine( pLine, pPara );
 }
 
 SwTableNode* SwNodes::SplitTable( const SwNodeIndex& rPos, sal_Bool bAfter,
@@ -3373,7 +3372,7 @@ SwTableNode* SwNodes::SplitTable( const SwNodeIndex& rPos, sal_Bool bAfter,
     // in pLine steht jetzt die GrundLine.
     sal_uInt16 nLinePos = rTbl.GetTabLines().C40_GETPOS( SwTableLine, pLine );
     if( USHRT_MAX == nLinePos ||
-        ( bAfter ? ++nLinePos >= rTbl.GetTabLines().Count() : !nLinePos ))
+        ( bAfter ? ++nLinePos >= rTbl.GetTabLines().size() : !nLinePos ))
         return 0;       // nicht gefunden oder letze Line !!
 
     // Suche jetzt die 1. Box der nachfolgenden Line
@@ -3407,7 +3406,8 @@ SwTableNode* SwNodes::SplitTable( const SwNodeIndex& rPos, sal_Bool bAfter,
     {
         // die Lines ruebermoven...
         SwTable& rNewTbl = pNewTblNd->GetTable();
-        rNewTbl.GetTabLines().Insert( &rTbl.GetTabLines(), 0, nLinePos );
+        rNewTbl.GetTabLines().insert( rNewTbl.GetTabLines().begin(),
+                      rTbl.GetTabLines().begin() + nLinePos, rTbl.GetTabLines().end() );
         //
         // von hinten (unten-rechts) nach vorn (oben-links) alle Boxen
         // beim chart data provider austragen (das modified event wird dann
@@ -3416,9 +3416,9 @@ SwTableNode* SwNodes::SplitTable( const SwNodeIndex& rPos, sal_Bool bAfter,
         SwChartDataProvider *pPCD = rTbl.GetFrmFmt()->getIDocumentChartDataProviderAccess()->GetChartDataProvider();
         if( pPCD )
         {
-            for (sal_uInt16 k = nLinePos;  k < rTbl.GetTabLines().Count();  ++k)
+            for (sal_uInt16 k = nLinePos;  k < rTbl.GetTabLines().size();  ++k)
             {
-                sal_uInt16 nLineIdx = (rTbl.GetTabLines().Count() - 1) - k + nLinePos;
+                sal_uInt16 nLineIdx = (rTbl.GetTabLines().size() - 1) - k + nLinePos;
                 sal_uInt16 nBoxCnt = rTbl.GetTabLines()[ nLineIdx ]->GetTabBoxes().size();
                 for (sal_uInt16 j = 0;  j < nBoxCnt;  ++j)
                 {
@@ -3429,13 +3429,14 @@ SwTableNode* SwNodes::SplitTable( const SwNodeIndex& rPos, sal_Bool bAfter,
         }
         //
         // ...und loeschen
-        sal_uInt16 nDeleted = rTbl.GetTabLines().Count() - nLinePos;
-        rTbl.GetTabLines().Remove( nLinePos, nDeleted );
+        sal_uInt16 nDeleted = rTbl.GetTabLines().size() - nLinePos;
+        rTbl.GetTabLines().erase( rTbl.GetTabLines().begin() + nLinePos, rTbl.GetTabLines().end() );
 
         // und die betr. Boxen verschieben. Dabei die Formate eindeutig
         // machen und die StartNodes korrigieren
         _SplitTable_Para aPara( pNewTblNd, rTbl );
-        rNewTbl.GetTabLines().ForEach( &lcl_SplitTable_CpyLine, &aPara );
+        BOOST_FOREACH( SwTableLine* pNewLine, rNewTbl.GetTabLines() )
+            lcl_SplitTable_CpyLine( pNewLine, &aPara );
         rTbl.CleanUpBottomRowSpan( nDeleted );
     }
 
@@ -3584,9 +3585,10 @@ sal_Bool SwNodes::MergeTable( const SwNodeIndex& rPos, sal_Bool bWithPrev,
     }
 
     // die Lines und Boxen ruebermoven
-    sal_uInt16 nOldSize = rTbl.GetTabLines().Count();
-    rTbl.GetTabLines().Insert( &rDelTbl.GetTabLines(), nOldSize );
-    rDelTbl.GetTabLines().Remove( 0, rDelTbl.GetTabLines().Count() );
+    sal_uInt16 nOldSize = rTbl.GetTabLines().size();
+    rTbl.GetTabLines().insert( rTbl.GetTabLines().begin() + nOldSize,
+                               rDelTbl.GetTabLines().begin(), rDelTbl.GetTabLines().end() );
+    rDelTbl.GetTabLines().clear();
 
     rTbl.GetTabSortBoxes().Insert( &rDelTbl.GetTabSortBoxes() );
     rDelTbl.GetTabSortBoxes().Remove( (sal_uInt16)0, rDelTbl.GetTabSortBoxes().Count() );
@@ -3615,7 +3617,7 @@ sal_Bool SwNodes::MergeTable( const SwNodeIndex& rPos, sal_Bool bWithPrev,
         // Header-Vorlagen in der Zeile setzen
         // und ggfs. in der History speichern fuers Undo!!!
     }
-    lcl_LineSetHeadCondColl( pFirstLn, 0 );
+    lcl_LineSetHeadCondColl( pFirstLn );
 
     // und die Borders "aufrauemen"
     if( nOldSize )
@@ -3731,7 +3733,7 @@ sal_Bool SwDoc::SetTableAutoFmt( const SwSelBoxes& rBoxes, const SwTableAutoFmt&
     _FndBox aFndBox( 0, 0 );
     {
         _FndPara aPara( rBoxes, &aFndBox );
-        pTblNd->GetTable().GetTabLines().ForEach( &_FndLineCopyCol, &aPara );
+        ForEach_FndLineCopyCol( pTblNd->GetTable().GetTabLines(), &aPara );
     }
     if( aFndBox.GetLines().empty() )
         return sal_False;
@@ -3818,7 +3820,7 @@ sal_Bool SwDoc::GetTableAutoFmt( const SwSelBoxes& rBoxes, SwTableAutoFmt& rGet
     _FndBox aFndBox( 0, 0 );
     {
         _FndPara aPara( rBoxes, &aFndBox );
-        pTblNd->GetTable().GetTabLines().ForEach( &_FndLineCopyCol, &aPara );
+        ForEach_FndLineCopyCol( pTblNd->GetTable().GetTabLines(), &aPara );
     }
     if( aFndBox.GetLines().empty() )
         return sal_False;
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index 9da8c06..ba2f350 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -215,9 +215,9 @@ sal_Bool _FindBox( _FndBox & rBox, LinesAndTable* pPara )
             const SwTableLines &rLines = (rBox.GetBox())
                                     ? rBox.GetBox()->GetTabLines()
                                     : pPara->rTable.GetTabLines();
-            if (rBox.GetLines().size() == rLines.Count())
+            if (rBox.GetLines().size() == rLines.size())
             {
-                for ( sal_uInt16 i = 0; i < rLines.Count(); ++i )
+                for ( sal_uInt16 i = 0; i < rLines.size(); ++i )
                     ::InsertLine( pPara->rLines,
                                   (SwTableLine*)rLines[i] );
             }
@@ -256,7 +256,7 @@ void lcl_CollectLines( SvPtrarr &rArr, const SwCursor& rCursor, bool bRemoveLine
     _FndBox aFndBox( 0, 0 );
     {
         _FndPara aTmpPara( aBoxes, &aFndBox );
-        ((SwTableLines&)rTable.GetTabLines()).ForEach( &_FndLineCopyCol, &aTmpPara );
+        ForEach_FndLineCopyCol( (SwTableLines&)rTable.GetTabLines(), &aTmpPara );
     }
 
     //Diejenigen Lines einsammeln, die nur selektierte Boxen enthalten.
@@ -316,11 +316,11 @@ void lcl_ProcessRowSize( SvPtrarr &rFmtCmp, SwTableLine *pLine, const SwFmtFrmSi
 void lcl_ProcessBoxSize( SvPtrarr &rFmtCmp, SwTableBox *pBox, const SwFmtFrmSize &rNew )
 {
     SwTableLines &rLines = pBox->GetTabLines();
-    if ( rLines.Count() )
+    if ( !rLines.empty() )
     {
         SwFmtFrmSize aSz( rNew );

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list