[Libreoffice-commits] .: 22 commits - sc/source sw/inc sw/source

Michael Stahl mst at kemper.freedesktop.org
Wed Apr 25 03:38:13 PDT 2012


 sc/source/filter/excel/tokstack.cxx          |   10 
 sc/source/filter/excel/xlroot.cxx            |    2 
 sc/source/filter/inc/tokstack.hxx            |    8 
 sc/source/filter/inc/xlroot.hxx              |    4 
 sw/inc/fmtclds.hxx                           |    8 
 sw/inc/swtable.hxx                           |    4 
 sw/inc/tblsel.hxx                            |   15 -
 sw/source/core/doc/docchart.cxx              |    5 
 sw/source/core/doc/docsort.cxx               |   60 ++---
 sw/source/core/doc/gctable.cxx               |   12 -
 sw/source/core/doc/tblcpy.cxx                |   52 ++--
 sw/source/core/doc/tblrwcl.cxx               |  303 ++++++++++++++-------------
 sw/source/core/docnode/ndtbl.cxx             |   95 ++++----
 sw/source/core/docnode/ndtbl1.cxx            |   71 +++---
 sw/source/core/draw/dflyobj.cxx              |    8 
 sw/source/core/frmedt/fetab.cxx              |   13 -
 sw/source/core/frmedt/tblsel.cxx             |  148 +++++--------
 sw/source/core/inc/tblrwcl.hxx               |   15 -
 sw/source/core/layout/atrfrm.cxx             |   70 +++---
 sw/source/core/layout/colfrm.cxx             |    6 
 sw/source/core/layout/trvlfrm.cxx            |    4 
 sw/source/core/unocore/unosett.cxx           |    2 
 sw/source/filter/rtf/rtffly.cxx              |    2 
 sw/source/filter/rtf/swparrtf.cxx            |    4 
 sw/source/filter/ww8/docxattributeoutput.cxx |    2 
 sw/source/filter/ww8/rtfattributeoutput.cxx  |    4 
 sw/source/filter/ww8/writerwordglue.cxx      |    2 
 sw/source/filter/ww8/wrtw8sty.cxx            |    2 
 sw/source/filter/ww8/ww8atr.cxx              |    6 
 sw/source/filter/ww8/ww8par6.cxx             |    2 
 sw/source/ui/cctrl/swlbox.cxx                |   36 +--
 sw/source/ui/config/uinums.cxx               |   21 -
 sw/source/ui/dbui/dbinsdlg.cxx               |   19 -
 sw/source/ui/dialog/uiregionsw.cxx           |    2 
 sw/source/ui/dochdl/gloshdl.cxx              |   18 -
 sw/source/ui/frmdlg/colex.cxx                |   14 -
 sw/source/ui/frmdlg/colmgr.cxx               |   12 -
 sw/source/ui/frmdlg/column.cxx               |    3 
 sw/source/ui/frmdlg/frmpage.cxx              |    8 
 sw/source/ui/inc/colmgr.hxx                  |    2 
 sw/source/ui/inc/dbinsdlg.hxx                |    4 
 sw/source/ui/inc/gloslst.hxx                 |    3 
 sw/source/ui/inc/redlndlg.hxx                |    8 
 sw/source/ui/inc/swlbox.hxx                  |    3 
 sw/source/ui/inc/uinums.hxx                  |    4 
 sw/source/ui/index/cnttab.cxx                |   28 +-
 sw/source/ui/misc/redlndlg.cxx               |   87 ++++---
 sw/source/ui/misc/srtdlg.cxx                 |    8 
 sw/source/ui/uiview/viewtab.cxx              |   44 +--
 sw/source/ui/utlui/content.cxx               |   18 -
 sw/source/ui/utlui/gloslst.cxx               |   48 ++--
 51 files changed, 664 insertions(+), 665 deletions(-)

New commits:
commit d8093cd3bb4b0ccef1e8b14c26c1aa8cbc6789ba
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Apr 25 12:13:30 2012 +0200

    Fix spelling of parameter pbLevelOrVisibiblityChanged

diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx
index 7458b7b..71dcc1f 100644
--- a/sw/source/ui/utlui/content.cxx
+++ b/sw/source/ui/utlui/content.cxx
@@ -479,17 +479,17 @@ void    SwContentType::Invalidate()
     Beschreibung: Liste der Inhalte fuellen
 ***************************************************************************/
 
-void    SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
+void    SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibilityChanged)
 {
     SwContentArr*   pOldMember = 0;
     int nOldMemberCount = -1;
     SwPtrMsgPoolItem aAskItem( RES_CONTENT_VISIBLE, 0 );
-    if(pMember && pbLevelOrVisibiblityChanged)
+    if(pMember && pbLevelOrVisibilityChanged)
     {
         pOldMember = pMember;
         nOldMemberCount = pOldMember->Count();
         pMember = new SwContentArr;
-        *pbLevelOrVisibiblityChanged = sal_False;
+        *pbLevelOrVisibilityChanged = sal_False;
     }
     else if(!pMember)
         pMember = new SwContentArr;
@@ -521,7 +521,7 @@ void    SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
                     // cast fuer Win16
                     if(nOldMemberCount > (int)nPos &&
                         ((SwOutlineContent*)pOldMember->GetObject(nPos))->GetOutlineLevel() != nLevel)
-                        *pbLevelOrVisibiblityChanged = sal_True;
+                        *pbLevelOrVisibilityChanged = sal_True;
 
                     nPos++;
                 }
@@ -551,7 +551,7 @@ void    SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
 
                 if(nOldMemberCount > (int)i &&
                     (pOldMember->GetObject(i))->IsInvisible() != pCnt->IsInvisible())
-                        *pbLevelOrVisibiblityChanged = sal_True;
+                        *pbLevelOrVisibilityChanged = sal_True;
             }
         }
         break;
@@ -595,7 +595,7 @@ void    SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
                 pMember->Insert(pCnt);
                 if(nOldMemberCount > (int)i &&
                     (pOldMember->GetObject(i))->IsInvisible() != pCnt->IsInvisible())
-                        *pbLevelOrVisibiblityChanged = sal_True;
+                        *pbLevelOrVisibilityChanged = sal_True;
             }
         }
         break;
@@ -650,7 +650,7 @@ void    SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
                     if(nOldMemberCount > nPos &&
                         (pOldMember->GetObject(nPos))->IsInvisible()
                                 != pCnt->IsInvisible())
-                            *pbLevelOrVisibiblityChanged = sal_True;
+                            *pbLevelOrVisibilityChanged = sal_True;
                 }
             }
             nMemberCount = pMember->Count();
@@ -711,7 +711,7 @@ void    SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
                 if(nOldMemberCount > nPos &&
                     (pOldMember->GetObject(nPos))->IsInvisible()
                             != pCnt->IsInvisible())
-                        *pbLevelOrVisibiblityChanged = sal_True;
+                        *pbLevelOrVisibilityChanged = sal_True;
             }
         }
         break;
@@ -783,7 +783,7 @@ void    SwContentType::FillMemberList(sal_Bool* pbLevelOrVisibiblityChanged)
                         nMemberCount++;
                         if(nOldMemberCount > (int)i &&
                             (pOldMember->GetObject((sal_uInt16)i))->IsInvisible() != pCnt->IsInvisible())
-                                *pbLevelOrVisibiblityChanged = sal_True;
+                                *pbLevelOrVisibilityChanged = sal_True;
                     }
                 }
             }
commit 12198134b1a7a467b8a6eb90ed4ade6dd2cbf58f
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Apr 25 12:12:51 2012 +0200

    Convert SV_DECL_PTRARR_DEL(_DB_Columns) to boost::ptr_vector

diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index f1ee6d8..0151f0f 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -176,9 +176,6 @@ struct _DB_Column
 };
 
 typedef _DB_Column* _DB_ColumnPtr;
-SV_DECL_PTRARR_DEL( _DB_Columns, _DB_ColumnPtr, 32 )
-SV_IMPL_PTRARR( _DB_Columns, _DB_ColumnPtr )
-
 SV_IMPL_OP_PTRARR_SORT( SwInsDBColumns, SwInsDBColumnPtr )
 
 
@@ -885,16 +882,16 @@ static void lcl_InsTextInArr( const String& rTxt, _DB_Columns& rColArr )
         if( 1 < nFndPos )
         {
             pNew = new _DB_Column( rTxt.Copy( nSttPos, nFndPos -1 ) );
-            rColArr.Insert( pNew, rColArr.Count() );
+            rColArr.push_back( pNew );
         }
         pNew = new _DB_Column;
-        rColArr.Insert( pNew, rColArr.Count() );
+        rColArr.push_back( pNew );
         nSttPos = nFndPos + 1;
     }
     if( nSttPos < rTxt.Len() )
     {
         pNew = new _DB_Column( rTxt.Copy( nSttPos ) );
-        rColArr.Insert( pNew, rColArr.Count() );
+        rColArr.push_back( pNew );
     }
 }
 
@@ -961,7 +958,7 @@ sal_Bool SwInsertDBColAutoPilot::SplitTextToColArr( const String& rTxt,
                 else
                     pNew = new _DB_Column( rFndCol, nFormat );
 
-                rColArr.Insert( pNew, rColArr.Count() );
+                rColArr.push_back( pNew );
             }
         }
     }
@@ -970,7 +967,7 @@ sal_Bool SwInsertDBColAutoPilot::SplitTextToColArr( const String& rTxt,
     if( sTxt.Len() )
         ::lcl_InsTextInArr( sTxt, rColArr );
 
-    return 0 != rColArr.Count();
+    return !rColArr.empty();
 }
 
 void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
@@ -1275,7 +1272,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
 
 
             sal_Bool bSetCrsr = sal_True;
-            sal_uInt16 n = 0, nCols = aColArr.Count();
+            sal_uInt16 n = 0, nCols = aColArr.size();
             ::sw::mark::IMark* pMark = NULL;
             for( sal_Int32 i = 0 ; ; ++i )
             {
@@ -1302,7 +1299,7 @@ void SwInsertDBColAutoPilot::DataToDoc( const Sequence<Any>& rSelection,
 
                 for( n = 0; n < nCols; ++n )
                 {
-                    _DB_Column* pDBCol = aColArr[ n ];
+                    _DB_Column* pDBCol = &aColArr[ n ];
                     String sIns;
                     switch( pDBCol->eColType )
                     {
diff --git a/sw/source/ui/inc/dbinsdlg.hxx b/sw/source/ui/inc/dbinsdlg.hxx
index 7b879f9..3018506 100644
--- a/sw/source/ui/inc/dbinsdlg.hxx
+++ b/sw/source/ui/inc/dbinsdlg.hxx
@@ -43,6 +43,7 @@
 #include <swdbdata.hxx>
 #include <com/sun/star/uno/Reference.h>
 #include <com/sun/star/uno/Sequence.h>
+#include <boost/ptr_container/ptr_vector.hpp>
 namespace com{namespace sun{namespace star{
     namespace sdbcx{
     class XColumnsSupplier;
@@ -58,7 +59,8 @@ class SwTableAutoFmt;
 class SwView;
 class SfxItemSet;
 class SwTableRep;
-class _DB_Columns;
+struct _DB_Column;
+typedef boost::ptr_vector<_DB_Column> _DB_Columns;
 
 struct SwInsDBColumn
 {
commit 11d40e46f1cfdf0532bf0612fd813d398dfd78d1
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Apr 25 12:12:51 2012 +0200

    Convert SV_DECL_PTRARR_DEL(TextBlockInfoArr) to boost::ptr_vector

diff --git a/sw/source/ui/dochdl/gloshdl.cxx b/sw/source/ui/dochdl/gloshdl.cxx
index 6e87f25..75dc1ea 100644
--- a/sw/source/ui/dochdl/gloshdl.cxx
+++ b/sw/source/ui/dochdl/gloshdl.cxx
@@ -81,9 +81,7 @@ struct TextBlockInfo_Impl
     String sLongName;
     String sGroupName;
 };
-typedef TextBlockInfo_Impl* TextBlockInfo_ImplPtr;
-SV_DECL_PTRARR_DEL( TextBlockInfoArr, TextBlockInfo_ImplPtr, 0 )
-SV_IMPL_PTRARR( TextBlockInfoArr, TextBlockInfo_ImplPtr )
+typedef boost::ptr_vector<TextBlockInfo_Impl> TextBlockInfoArr;
 SV_IMPL_REF( SwDocShell )
 
 /*------------------------------------------------------------------------
@@ -466,17 +464,17 @@ sal_Bool SwGlossaryHdl::Expand( const String& rShortName,
                         pData->sTitle = sTitle;
                         pData->sLongName = sLongName;
                         pData->sGroupName = sGroupName;
-                        aFoundArr.Insert(pData, aFoundArr.Count());
+                        aFoundArr.push_back(pData);
                     }
                 }
             }
         }
-        if( aFoundArr.Count() )  // one was found
+        if( !aFoundArr.empty() )  // one was found
         {
             pGlossaries->PutGroupDoc(pGlossary);
-            if(1 == aFoundArr.Count())
+            if(1 == aFoundArr.size())
             {
-                TextBlockInfo_Impl* pData = aFoundArr.GetObject(0);
+                TextBlockInfo_Impl* pData = &aFoundArr.front();
                 pGlossary = (SwTextBlocks *)pGlossaries->GetGroupDoc(pData->sGroupName);
                 nFound = pGlossary->GetIndex( aShortName );
             }
@@ -487,9 +485,9 @@ sal_Bool SwGlossaryHdl::Expand( const String& rShortName,
 
                 AbstractSwSelGlossaryDlg* pDlg = pFact->CreateSwSelGlossaryDlg( 0, aShortName, DLG_SEL_GLOS );
                 OSL_ENSURE(pDlg, "Dialogdiet fail!");
-                for(sal_uInt16 i = 0; i < aFoundArr.Count(); ++i)
+                for(sal_uInt16 i = 0; i < aFoundArr.size(); ++i)
                 {
-                    TextBlockInfo_Impl* pData = aFoundArr.GetObject(i);
+                    TextBlockInfo_Impl* pData = &aFoundArr[i];
                     pDlg->InsertGlos(pData->sTitle, pData->sLongName);
                 }
                 pDlg->SelectEntryPos(0);
@@ -499,7 +497,7 @@ sal_Bool SwGlossaryHdl::Expand( const String& rShortName,
                 delete pDlg;
                 if(LISTBOX_ENTRY_NOTFOUND != nRet)
                 {
-                    TextBlockInfo_Impl* pData = aFoundArr.GetObject(nRet);
+                    TextBlockInfo_Impl* pData = &aFoundArr[nRet];
                     pGlossary = (SwTextBlocks *)pGlossaries->GetGroupDoc(pData->sGroupName);
                     nFound = pGlossary->GetIndex( aShortName );
                 }
commit 36394723ac332424d4b74b69ce8d125da4c915fa
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Apr 25 12:12:02 2012 +0200

    Convert SV_DECL_PTRARR_DEL(SwColumns) to boost::ptr_vector

diff --git a/sw/inc/fmtclds.hxx b/sw/inc/fmtclds.hxx
index 7e1cc64..a7b08d3 100644
--- a/sw/inc/fmtclds.hxx
+++ b/sw/inc/fmtclds.hxx
@@ -34,6 +34,7 @@
 #include "swdllapi.h"
 #include <hintids.hxx>
 #include <format.hxx>
+#include <boost/ptr_container/ptr_vector.hpp>
 
 // ColumnDescriptor
 class SwColumn
@@ -49,7 +50,7 @@ class SwColumn
 public:
     SwColumn();
 
-    sal_Bool operator==( const SwColumn & );
+    sal_Bool operator==( const SwColumn & ) const;
 
 
     void SetWishWidth( sal_uInt16 nNew ) { nWish  = nNew; }
@@ -65,8 +66,7 @@ public:
     sal_uInt16 GetRight() const { return nRight; }
 };
 
-typedef SwColumn* SwColumnPtr;
-SV_DECL_PTRARR_DEL( SwColumns, SwColumnPtr, 0 )
+typedef boost::ptr_vector<SwColumn> SwColumns;
 
 enum SwColLineAdj
 {
@@ -119,7 +119,7 @@ public:
 
     const SwColumns &GetColumns() const { return aColumns; }
           SwColumns &GetColumns()       { return aColumns; }
-    sal_uInt16           GetNumCols() const { return aColumns.Count(); }
+    sal_uInt16           GetNumCols() const { return aColumns.size(); }
 
     editeng::SvxBorderStyle     GetLineStyle() const  { return eLineStyle;}
     sal_uLong           GetLineWidth() const  { return nLineWidth;}
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index 8e1e0a9..624010d 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -836,12 +836,12 @@ void SwVirtFlyDrawObj::NbcResize(const Point& rRef,
             const SwBorderAttrs &rAttrs = *aAccess.Get();
             long nMin = rAttrs.CalcLeftLine()+rAttrs.CalcRightLine();
             const SwFmtCol& rCol = rAttrs.GetAttrSet().GetCol();
-            if ( rCol.GetColumns().Count() > 1 )
+            if ( rCol.GetColumns().size() > 1 )
             {
-                for ( sal_uInt16 i = 0; i < rCol.GetColumns().Count(); ++i )
+                for ( sal_uInt16 i = 0; i < rCol.GetColumns().size(); ++i )
                 {
-                    nMin += rCol.GetColumns()[i]->GetLeft() +
-                            rCol.GetColumns()[i]->GetRight() +
+                    nMin += rCol.GetColumns()[i].GetLeft() +
+                            rCol.GetColumns()[i].GetRight() +
                             MINFLY;
                 }
                 nMin -= MINFLY;
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index e836f62..ce25435 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -113,8 +113,6 @@
 using namespace ::com::sun::star;
 using ::rtl::OUString;
 
-SV_IMPL_PTRARR(SwColumns,SwColumn*)
-
 TYPEINIT1(SwFmtVertOrient, SfxPoolItem);
 TYPEINIT1(SwFmtHoriOrient, SfxPoolItem);
 TYPEINIT2(SwFmtHeader,  SfxPoolItem, SwClient );
@@ -796,7 +794,7 @@ SwColumn::SwColumn() :
 {
 }
 
-sal_Bool SwColumn::operator==( const SwColumn &rCmp )
+sal_Bool SwColumn::operator==( const SwColumn &rCmp ) const
 {
     return (nWish    == rCmp.GetWishWidth() &&
             GetLeft()  == rCmp.GetLeft() &&
@@ -818,8 +816,8 @@ SwFmtCol::SwFmtCol( const SwFmtCol& rCpy )
 {
     for ( sal_uInt16 i = 0; i < rCpy.GetNumCols(); ++i )
     {
-        SwColumn *pCol = new SwColumn( *rCpy.GetColumns()[i] );
-        aColumns.Insert( pCol, aColumns.Count() );
+        SwColumn *pCol = new SwColumn( rCpy.GetColumns()[i] );
+        aColumns.push_back( pCol );
     }
 }
 
@@ -835,12 +833,12 @@ SwFmtCol& SwFmtCol::operator=( const SwFmtCol& rCpy )
     nWidth      = rCpy.GetWishWidth();
     bOrtho      = rCpy.IsOrtho();
 
-    if ( aColumns.Count() )
-        aColumns.DeleteAndDestroy( 0, aColumns.Count() );
+    if ( !aColumns.empty() )
+        aColumns.clear();
     for ( sal_uInt16 i = 0; i < rCpy.GetNumCols(); ++i )
     {
-        SwColumn *pCol = new SwColumn( *rCpy.GetColumns()[i] );
-        aColumns.Insert( pCol, aColumns.Count() );
+        SwColumn *pCol = new SwColumn( rCpy.GetColumns()[i] );
+        aColumns.push_back( pCol );
     }
     return *this;
 }
@@ -867,11 +865,11 @@ int SwFmtCol::operator==( const SfxPoolItem& rAttr ) const
           eAdj               == rCmp.GetLineAdj() &&
           nWidth             == rCmp.GetWishWidth() &&
           bOrtho             == rCmp.IsOrtho() &&
-          aColumns.Count() == rCmp.GetNumCols()) )
+          aColumns.size() == rCmp.GetNumCols()) )
         return 0;
 
-    for ( sal_uInt16 i = 0; i < aColumns.Count(); ++i )
-        if ( !(*aColumns[i] == *rCmp.GetColumns()[i]) )
+    for ( sal_uInt16 i = 0; i < aColumns.size(); ++i )
+        if ( !(aColumns[i] == rCmp.GetColumns()[i]) )
             return 0;
 
     return 1;
@@ -885,14 +883,14 @@ SfxPoolItem*  SwFmtCol::Clone( SfxItemPool* ) const
 sal_uInt16 SwFmtCol::GetGutterWidth( sal_Bool bMin ) const
 {
     sal_uInt16 nRet = 0;
-    if ( aColumns.Count() == 2 )
-        nRet = aColumns[0]->GetRight() + aColumns[1]->GetLeft();
-    else if ( aColumns.Count() > 2 )
+    if ( aColumns.size() == 2 )
+        nRet = aColumns[0].GetRight() + aColumns[1].GetLeft();
+    else if ( aColumns.size() > 2 )
     {
         sal_Bool bSet = sal_False;
-        for ( sal_uInt16 i = 1; i < aColumns.Count()-1; ++i )
+        for ( sal_uInt16 i = 1; i < aColumns.size()-1; ++i )
         {
-            const sal_uInt16 nTmp = aColumns[i]->GetRight() + aColumns[i+1]->GetLeft();
+            const sal_uInt16 nTmp = aColumns[i].GetRight() + aColumns[i+1].GetLeft();
             if ( bSet )
             {
                 if ( nTmp != nRet )
@@ -919,13 +917,13 @@ void SwFmtCol::SetGutterWidth( sal_uInt16 nNew, sal_uInt16 nAct )
     else
     {
         sal_uInt16 nHalf = nNew / 2;
-        for ( sal_uInt16 i = 0; i < aColumns.Count(); ++i )
-        {   SwColumn *pCol = aColumns[i];
+        for ( sal_uInt16 i = 0; i < aColumns.size(); ++i )
+        {   SwColumn *pCol = &aColumns[i];
             pCol->SetLeft ( nHalf );
             pCol->SetRight( nHalf );
             if ( i == 0 )
                 pCol->SetLeft( 0 );
-            else if ( i == (aColumns.Count() - 1) )
+            else if ( i == (aColumns.size() - 1) )
                 pCol->SetRight( 0 );
         }
     }
@@ -935,11 +933,11 @@ void SwFmtCol::Init( sal_uInt16 nNumCols, sal_uInt16 nGutterWidth, sal_uInt16 nA
 {
     // Deleting seems to be a bit radical on the first sight; but otherwise we
     // have to initialize all values of the remaining SwCloumns.
-    if ( aColumns.Count() )
-        aColumns.DeleteAndDestroy( 0, aColumns.Count() );
+    if ( !aColumns.empty() )
+        aColumns.clear();
     for ( sal_uInt16 i = 0; i < nNumCols; ++i )
     {   SwColumn *pCol = new SwColumn;
-        aColumns.Insert( pCol, i );
+        aColumns.push_back( pCol );
     }
     bOrtho = sal_True;
     nWidth = USHRT_MAX;
@@ -950,29 +948,29 @@ void SwFmtCol::Init( sal_uInt16 nNumCols, sal_uInt16 nGutterWidth, sal_uInt16 nA
 void SwFmtCol::SetOrtho( sal_Bool bNew, sal_uInt16 nGutterWidth, sal_uInt16 nAct )
 {
     bOrtho = bNew;
-    if ( bNew && aColumns.Count() )
+    if ( bNew && !aColumns.empty() )
         Calc( nGutterWidth, nAct );
 }
 
 sal_uInt16 SwFmtCol::CalcColWidth( sal_uInt16 nCol, sal_uInt16 nAct ) const
 {
-    OSL_ENSURE( nCol < aColumns.Count(), ":-( ColumnsArr over indexed." );
+    assert(nCol < aColumns.size());
     if ( nWidth != nAct )
     {
-        long nW = aColumns[nCol]->GetWishWidth();
+        long nW = aColumns[nCol].GetWishWidth();
         nW *= nAct;
         nW /= nWidth;
         return sal_uInt16(nW);
     }
     else
-        return aColumns[nCol]->GetWishWidth();
+        return aColumns[nCol].GetWishWidth();
 }
 
 sal_uInt16 SwFmtCol::CalcPrtColWidth( sal_uInt16 nCol, sal_uInt16 nAct ) const
 {
-    OSL_ENSURE( nCol < aColumns.Count(), ":-( ColumnsArr over indexed." );
+    assert(nCol < aColumns.size());
     sal_uInt16 nRet = CalcColWidth( nCol, nAct );
-    SwColumn *pCol = aColumns[nCol];
+    const SwColumn *pCol = &aColumns[nCol];
     nRet = nRet - pCol->GetLeft();
     nRet = nRet - pCol->GetRight();
     return nRet;
@@ -994,7 +992,7 @@ void SwFmtCol::Calc( sal_uInt16 nGutterWidth, sal_uInt16 nAct )
 
     //The fist column is PrtWidth + (gap width / 2)
     const sal_uInt16 nLeftWidth = nPrtWidth + nGutterHalf;
-    SwColumn *pCol = aColumns[0];
+    SwColumn *pCol = &aColumns.front();
     pCol->SetWishWidth( nLeftWidth );
     pCol->SetRight( nGutterHalf );
     pCol->SetLeft ( 0 );
@@ -1006,7 +1004,7 @@ void SwFmtCol::Calc( sal_uInt16 nGutterWidth, sal_uInt16 nAct )
 
     for ( i = 1; i < GetNumCols()-1; ++i )
     {
-        pCol = aColumns[i];
+        pCol = &aColumns[i];
         pCol->SetWishWidth( nMidWidth );
         pCol->SetLeft ( nGutterHalf );
         pCol->SetRight( nGutterHalf );
@@ -1015,15 +1013,15 @@ void SwFmtCol::Calc( sal_uInt16 nGutterWidth, sal_uInt16 nAct )
 
     //The last column is equivalent to the first one - to compensate rounding
     //errors we add the remaining space of the other columns to the last one.
-    pCol = aColumns[aColumns.Count()-1];
+    pCol = &aColumns.back();
     pCol->SetWishWidth( nAvail );
     pCol->SetLeft ( nGutterHalf );
     pCol->SetRight( 0 );
 
     //Convert the current width to the requested width.
-    for ( i = 0; i < aColumns.Count(); ++i )
+    for ( i = 0; i < aColumns.size(); ++i )
     {
-        pCol = aColumns[i];
+        pCol = &aColumns[i];
         long nTmp = pCol->GetWishWidth();
         nTmp *= GetWishWidth();
         nTmp /= nAct;
@@ -1064,7 +1062,7 @@ bool SwFmtCol::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
         {
             uno::Sequence<text::TextColumn> aSetColumns = xCols->getColumns();
             const text::TextColumn* pArray = aSetColumns.getConstArray();
-            aColumns.DeleteAndDestroy(0, aColumns.Count());
+            aColumns.clear();
             //max count is 64k here - this is something the array can't do
             sal_uInt16 nCount = Min( (sal_uInt16)aSetColumns.getLength(),
                                      (sal_uInt16) 0x3fff );
@@ -1079,7 +1077,7 @@ bool SwFmtCol::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
                     nWidthSum = static_cast<sal_uInt16>(nWidthSum + pArray[i].Width);
                     pCol->SetLeft ( static_cast<sal_uInt16>(MM100_TO_TWIP(pArray[i].LeftMargin)) );
                     pCol->SetRight( static_cast<sal_uInt16>(MM100_TO_TWIP(pArray[i].RightMargin)) );
-                    aColumns.Insert(pCol, i);
+                    aColumns.insert(aColumns.begin() + i, pCol);
                 }
             bRet = true;
             nWidth = nWidthSum;
diff --git a/sw/source/core/layout/colfrm.cxx b/sw/source/core/layout/colfrm.cxx
index 31fb081..5f08cda 100644
--- a/sw/source/core/layout/colfrm.cxx
+++ b/sw/source/core/layout/colfrm.cxx
@@ -283,9 +283,9 @@ void SwLayoutFrm::ChgColumns( const SwFmtCol &rOld, const SwFmtCol &rNew,
             bAdjustAttributes = sal_True;
         else
         {
-            sal_uInt16 nCount = Min( rNew.GetColumns().Count(), rOld.GetColumns().Count() );
+            sal_uInt16 nCount = Min( rNew.GetColumns().size(), rOld.GetColumns().size() );
             for ( sal_uInt16 i = 0; i < nCount; ++i )
-                if ( !(*rOld.GetColumns()[i] == *rNew.GetColumns()[i]) )
+                if ( !(rOld.GetColumns()[i] == rNew.GetColumns()[i]) )
                 {
                     bAdjustAttributes = sal_True;
                     break;
@@ -384,7 +384,7 @@ void SwLayoutFrm::AdjustColumns( const SwFmtCol *pAttr, sal_Bool bAdjustAttribut
 
         if ( bOrtho || bAdjustAttributes )
         {
-            const SwColumn *pC = pAttr->GetColumns()[i];
+            const SwColumn *pC = &pAttr->GetColumns()[i];
             const SwAttrSet* pSet = pCol->GetAttrSet();
             SvxLRSpaceItem aLR( pSet->GetLRSpace() );
 
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index 2de82b2..a6eba68 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -2380,7 +2380,7 @@ SwXTextColumns::SwXTextColumns(const SwFmtCol& rFmtCol) :
     const SwColumns& rCols = rFmtCol.GetColumns();
     for(sal_uInt16 i = 0; i < aTextColumns.getLength(); i++)
     {
-        SwColumn* pCol = rCols[i];
+        const SwColumn* pCol = &rCols[i];
 
         pColumns[i].Width = pCol->GetWishWidth();
         nReference += pColumns[i].Width;
diff --git a/sw/source/filter/rtf/rtffly.cxx b/sw/source/filter/rtf/rtffly.cxx
index 026fc4a..826cb7e 100644
--- a/sw/source/filter/rtf/rtffly.cxx
+++ b/sw/source/filter/rtf/rtffly.cxx
@@ -963,7 +963,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
         {
             for( sal_uInt16 n = 0, i = 0; n < aColumns.size(); n += 2, ++i )
             {
-                SwColumn* pCol = aCol.GetColumns()[ i ];
+                SwColumn* pCol = &aCol.GetColumns()[ i ];
                 sal_uLong nTmp = aColumns[ n ];
                 nTmp *= USHRT_MAX;
                 nTmp /= nWidth;
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx
index 30263be..ccc8124 100644
--- a/sw/source/filter/rtf/swparrtf.cxx
+++ b/sw/source/filter/rtf/swparrtf.cxx
@@ -601,7 +601,7 @@ bool rtfSections::SetCols(SwFrmFmt &rFmt, const rtfSection &rSection,
         sal_uInt16 nWishWidth = 0, nHalfPrev = 0;
         for(sal_uInt16 n=0, i=0; n < rSection.maPageInfo.maColumns.size() && i < nCols; n += 2, ++i )
         {
-            SwColumn* pCol = aCol.GetColumns()[ i ];
+            SwColumn* pCol = &aCol.GetColumns()[ i ];
             pCol->SetLeft( nHalfPrev );
             sal_uInt16 nSp = static_cast< sal_uInt16 >(rSection.maPageInfo.maColumns[ n+1 ]);
             nHalfPrev = nSp / 2;
@@ -2757,7 +2757,7 @@ sal_Bool lcl_SetFmtCol( SwFmt& rFmt, sal_uInt16 nCols, sal_uInt16 nColSpace,
             sal_uInt16 nWishWidth = 0, nHalfPrev = 0;
             for( sal_uInt16 n = 0, i = 0; n < rColumns.size(); n += 2, ++i )
             {
-                SwColumn* pCol = aCol.GetColumns()[ i ];
+                SwColumn* pCol = &aCol.GetColumns()[ i ];
                 pCol->SetLeft( nHalfPrev );
                 sal_uInt16 nSp = rColumns[ n+1 ];
                 nHalfPrev = nSp / 2;
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index ed18354..572e851 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -4243,7 +4243,7 @@ void DocxAttributeOutput::FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol&
 
             if ( n + 1 != nCols )
             {
-                sal_uInt16 nSpacing = rColumns[n]->GetRight( ) + rColumns[n + 1]->GetLeft( );
+                sal_uInt16 nSpacing = rColumns[n].GetRight( ) + rColumns[n + 1].GetLeft( );
                 pColAttrList->add( FSNS( XML_w, XML_space ),
                     OString::valueOf( sal_Int32( nSpacing ) ).getStr( ) );
             }
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 09705d9..528e940 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -2919,8 +2919,8 @@ void RtfAttributeOutput::FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol& r
             if( ++n != nCols )
             {
                 m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_COLSR;
-                m_rExport.OutLong( rColumns[ n-1 ]->GetRight() +
-                        rColumns[ n ]->GetLeft() );
+                m_rExport.OutLong( rColumns[ n-1 ].GetRight() +
+                        rColumns[ n ].GetLeft() );
             }
         }
     }
diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx
index de82476..eece703 100644
--- a/sw/source/filter/ww8/writerwordglue.cxx
+++ b/sw/source/filter/ww8/writerwordglue.cxx
@@ -360,7 +360,7 @@ namespace sw
             const SvxLRSpaceItem &rOneLR = rTitleFmt.GetLRSpace();
             const SvxLRSpaceItem &rTwoLR= rFollowFmt.GetLRSpace();
 
-            if (rFirstColumns.Count() != rFollowColumns.Count())
+            if (rFirstColumns.size() != rFollowColumns.size())
             {
                 //e.g. #i4320#
                 bPlausableTitlePage = false;
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index 02beffd..700066b 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -1027,7 +1027,7 @@ sal_uInt16 MSWordSections::NumberOfColumns( const SwDoc &rDoc, const WW8_SepInfo
 
     const SwFmtCol& rCol = (const SwFmtCol&)aSet.Get( RES_COL );
     const SwColumns& rColumns = rCol.GetColumns();
-    return rColumns.Count();
+    return rColumns.size();
 }
 
 const WW8_SepInfo* MSWordSections::CurrentSectionInfo()
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 16a5539..52cc2bc 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -4379,8 +4379,8 @@ void WW8AttributeOutput::FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol &
                 else
                     m_rWW8Export.pO->push_back( 137 );
                 m_rWW8Export.pO->push_back( static_cast<sal_uInt8>(n) );
-                m_rWW8Export.InsUInt16( rColumns[n]->GetRight(  ) +
-                                        rColumns[n + 1]->GetLeft(  ) );
+                m_rWW8Export.InsUInt16( rColumns[n].GetRight(  ) +
+                                        rColumns[n + 1].GetLeft(  ) );
             }
         }
     }
@@ -4390,7 +4390,7 @@ void AttributeOutputBase::FormatColumns( const SwFmtCol& rCol )
 {
     const SwColumns& rColumns = rCol.GetColumns();
 
-    sal_uInt16 nCols = rColumns.Count();
+    sal_uInt16 nCols = rColumns.size();
     if ( 1 < nCols && !GetExport( ).bOutFlyFrmAttrs )
     {
         // dann besorge mal die Seitenbreite ohne Raender !!
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 33baeb7..8a71999 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -365,7 +365,7 @@ bool wwSectionManager::SetCols(SwFrmFmt &rFmt, const wwSection &rSection,
         const sal_uInt16 maxIdx = SAL_N_ELEMENTS(rSep.rgdxaColumnWidthSpacing);
         for (sal_uInt16 i = 0, nIdx = 1; i < nCols && nIdx < maxIdx; i++, nIdx+=2 )
         {
-            SwColumn* pCol = aCol.GetColumns()[i];
+            SwColumn* pCol = &aCol.GetColumns()[i];
             const sal_Int32 nLeft = rSep.rgdxaColumnWidthSpacing[nIdx-1]/2;
             const sal_Int32 nRight = rSep.rgdxaColumnWidthSpacing[nIdx+1]/2;
             const sal_Int32 nWishWidth = rSep.rgdxaColumnWidthSpacing[nIdx]
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index 49104bf..f1ee6d8 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -721,7 +721,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblFmtHdl, PushButton*, pButton )
                 nEnd1 = nWidth;
             for( sal_uInt16 i = 0; i < nNum; ++i )
             {
-                SwColumn* pCol = rCols[i];
+                const SwColumn* pCol = &rCols[i];
                 nStart1 = pCol->GetLeft() + nWidth1;
                 nWidth1 += (long)rCol.CalcColWidth( i, (sal_uInt16)nWidth );
                 nEnd1 = nWidth1 - pCol->GetRight();
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index bc18bc8..caa4958 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -1584,7 +1584,7 @@ short   SwInsertSectionTabDialog::Ok()
         if(SFX_ITEM_SET == pOutputItemSet->GetItemState(RES_COL, sal_False, &pCol))
         {
             aRequest.AppendItem(SfxUInt16Item(SID_ATTR_COLUMNS,
-                ((const SwFmtCol*)pCol)->GetColumns().Count()));
+                ((const SwFmtCol*)pCol)->GetColumns().size()));
         }
         aRequest.AppendItem(SfxStringItem( FN_PARAM_REGION_NAME,
                     m_pSectionData->GetSectionName()));
diff --git a/sw/source/ui/frmdlg/colex.cxx b/sw/source/ui/frmdlg/colex.cxx
index a81e606..17575d6 100644
--- a/sw/source/ui/frmdlg/colex.cxx
+++ b/sw/source/ui/frmdlg/colex.cxx
@@ -385,7 +385,7 @@ void SwColumnOnlyExample::Paint( const Rectangle& /*rRect*/ )
 
     }
     const SwColumns& rCols = m_aCols.GetColumns();
-    sal_uInt16 nColCount = rCols.Count();
+    sal_uInt16 nColCount = rCols.size();
     if( nColCount )
     {
         DrawRect(aRect);
@@ -394,7 +394,7 @@ void SwColumnOnlyExample::Paint( const Rectangle& /*rRect*/ )
         long nSum = aTL.X();
         for(sal_uInt16 i = 0; i < nColCount; i++)
         {
-            SwColumn* pCol = rCols[i];
+            const SwColumn* pCol = &rCols[i];
             aFrmRect.Left()    = nSum + pCol->GetLeft();//nSum + pCol->GetLeft() + aTL.X();
             nSum              += pCol->GetWishWidth();
             aFrmRect.Right()   = nSum - pCol->GetRight();
@@ -405,7 +405,7 @@ void SwColumnOnlyExample::Paint( const Rectangle& /*rRect*/ )
             nSum = aTL.X();
             for(sal_uInt16 i = 0; i < nColCount - 1; i++)
             {
-                nSum += rCols[i]->GetWishWidth();
+                nSum += rCols[i].GetWishWidth();
                 aUp.X() = nSum;
                 aDown.X() = nSum;
                 DrawLine(aUp, aDown);
@@ -420,11 +420,11 @@ void  SwColumnOnlyExample::SetColumns(const SwFmtCol& rCol)
     sal_uInt16 nWishSum = m_aCols.GetWishWidth();
     long nFrmWidth = m_aFrmSize.Width();
     SwColumns& rCols = m_aCols.GetColumns();
-    sal_uInt16 nColCount = rCols.Count();
+    sal_uInt16 nColCount = rCols.size();
 
     for(sal_uInt16 i = 0; i < nColCount; i++)
     {
-        SwColumn* pCol = rCols[i];
+        SwColumn* pCol = &rCols[i];
         long nWish = pCol->GetWishWidth();
         nWish *= nFrmWidth;
         nWish /= nWishSum;
@@ -445,14 +445,14 @@ void  SwColumnOnlyExample::SetColumns(const SwFmtCol& rCol)
         sal_uInt16 i;
         for(i = 0; i < nColCount; ++i)
         {
-            SwColumn* pCol = rCols[i];
+            SwColumn* pCol = &rCols[i];
             nColumnWidthSum += pCol->GetWishWidth();
             nColumnWidthSum -= (pCol->GetRight() + pCol->GetLeft());
         }
         nColumnWidthSum /= nColCount;
         for(i = 0; i < nColCount; ++i)
         {
-            SwColumn* pCol = rCols[i];
+            SwColumn* pCol = &rCols[i];
             pCol->SetWishWidth( static_cast< sal_uInt16 >(nColumnWidthSum + pCol->GetRight() + pCol->GetLeft()));
         }
     }
diff --git a/sw/source/ui/frmdlg/colmgr.cxx b/sw/source/ui/frmdlg/colmgr.cxx
index 6a419d9..49ec5b6 100644
--- a/sw/source/ui/frmdlg/colmgr.cxx
+++ b/sw/source/ui/frmdlg/colmgr.cxx
@@ -43,11 +43,11 @@
 ------------------------------------------------------------------------*/
 void FitToActualSize(SwFmtCol& rCol, sal_uInt16 nWidth)
 {
-    const sal_uInt16 nCount = rCol.GetColumns().Count();
+    const sal_uInt16 nCount = rCol.GetColumns().size();
     for(sal_uInt16 i = 0; i < nCount; ++i)
     {
         const sal_uInt16 nTmp = rCol.CalcColWidth(i, nWidth);
-        rCol.GetColumns()[i]->SetWishWidth(nTmp);
+        rCol.GetColumns()[i].SetWishWidth(nTmp);
     }
     rCol.SetWishWidth(nWidth);
 }
@@ -72,7 +72,7 @@ sal_uInt16 SwColMgr::GetGutterWidth( sal_uInt16 nPos ) const
     {
         OSL_ENSURE(nPos < GetCount() - 1, "Spalte ueberindiziert" );
         const SwColumns& rCols = aFmtCol.GetColumns();
-        nRet = rCols.GetObject(nPos)->GetRight() + rCols.GetObject(nPos + 1)->GetLeft();
+        nRet = rCols[nPos].GetRight() + rCols[nPos + 1].GetLeft();
     }
     return nRet;
 }
@@ -86,8 +86,8 @@ void SwColMgr::SetGutterWidth(sal_uInt16 nGutterWidth, sal_uInt16 nPos )
         OSL_ENSURE(nPos < GetCount() - 1, "Spalte ueberindiziert" );
         SwColumns& rCols = aFmtCol.GetColumns();
         sal_uInt16 nGutterWidth2 = nGutterWidth / 2;
-        rCols.GetObject(nPos)->SetRight(nGutterWidth2);
-        rCols.GetObject(nPos + 1)->SetLeft(nGutterWidth2);
+        rCols[nPos].SetRight(nGutterWidth2);
+        rCols[nPos + 1].SetLeft(nGutterWidth2);
     }
 }
 
@@ -117,7 +117,7 @@ sal_uInt16 SwColMgr::GetColWidth(sal_uInt16 nIdx) const
 void SwColMgr::SetColWidth(sal_uInt16 nIdx, sal_uInt16 nWd)
 {
     OSL_ENSURE(nIdx < GetCount(), "Spaltenarray ueberindiziert.");
-    aFmtCol.GetColumns()[nIdx]->SetWishWidth(nWd);
+    aFmtCol.GetColumns()[nIdx].SetWishWidth(nWd);
 
 }
 
diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx
index e9059f7..3d3431f 100644
--- a/sw/source/ui/frmdlg/column.cxx
+++ b/sw/source/ui/frmdlg/column.cxx
@@ -76,9 +76,6 @@
 
 #define FRAME_FORMAT_WIDTH 1000
 
-// sw/inc/fmtclds.hxx
-SV_IMPL_PTRARR( SwColumns, SwColumnPtr )
-
 /*--------------------------------------------------------------------
     Description:  static data
  --------------------------------------------------------------------*/
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index c2d920d..19110e0 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -1750,12 +1750,12 @@ IMPL_LINK_NOARG(SwFrmPage, RangeModifyHdl)
             SFX_ITEM_DEFAULT <= GetTabDialog()->GetExampleSet()->GetItemState(RES_COL))
     {
         const SwFmtCol& rCol = (const SwFmtCol&)GetTabDialog()->GetExampleSet()->Get(RES_COL);
-        if ( rCol.GetColumns().Count() > 1 )
+        if ( rCol.GetColumns().size() > 1 )
         {
-            for ( sal_uInt16 i = 0; i < rCol.GetColumns().Count(); ++i )
+            for ( sal_uInt16 i = 0; i < rCol.GetColumns().size(); ++i )
             {
-                aVal.nMinWidth += rCol.GetColumns()[i]->GetLeft() +
-                                  rCol.GetColumns()[i]->GetRight() +
+                aVal.nMinWidth += rCol.GetColumns()[i].GetLeft() +
+                                  rCol.GetColumns()[i].GetRight() +
                                   MINFLY;
             }
             aVal.nMinWidth -= MINFLY;//one was already in there!
diff --git a/sw/source/ui/inc/colmgr.hxx b/sw/source/ui/inc/colmgr.hxx
index da8eae1..b53082a 100644
--- a/sw/source/ui/inc/colmgr.hxx
+++ b/sw/source/ui/inc/colmgr.hxx
@@ -121,7 +121,7 @@ inline void SwColMgr::SetAutoWidth(sal_Bool bOn, sal_uInt16 nGutterWidth)
 
 inline void SwColMgr::NoCols()
 {
-    aFmtCol.GetColumns().DeleteAndDestroy(0, aFmtCol.GetColumns().Count());
+    aFmtCol.GetColumns().clear();
 }
 inline sal_Bool SwColMgr::HasLine() const
 {
diff --git a/sw/source/ui/uiview/viewtab.cxx b/sw/source/ui/uiview/viewtab.cxx
index 49a54b2..f94c123 100644
--- a/sw/source/ui/uiview/viewtab.cxx
+++ b/sw/source/ui/uiview/viewtab.cxx
@@ -84,24 +84,24 @@ void lcl_FillSvxColumn(const SwFmtCol& rCol,
     const SwColumns& rCols = rCol.GetColumns();
     sal_uInt16 nWidth = 0;
 
-    sal_Bool bOrtho = rCol.IsOrtho() && rCols.Count();
+    sal_Bool bOrtho = rCol.IsOrtho() && rCols.size();
     long nInnerWidth = 0;
     if( bOrtho )
     {
         nInnerWidth = nTotalWidth;
-        for ( sal_uInt16 i = 0; i < rCols.Count(); ++i )
+        for ( sal_uInt16 i = 0; i < rCols.size(); ++i )
         {
-            SwColumn* pCol = rCols[i];
+            const SwColumn* pCol = &rCols[i];
             nInnerWidth -= pCol->GetLeft() + pCol->GetRight();
         }
         if( nInnerWidth < 0 )
             nInnerWidth = 0;
         else
-            nInnerWidth /= rCols.Count();
+            nInnerWidth /= rCols.size();
     }
-    for ( sal_uInt16 i = 0; i < rCols.Count(); ++i )
+    for ( sal_uInt16 i = 0; i < rCols.size(); ++i )
     {
-        SwColumn* pCol = rCols[i];
+        const SwColumn* pCol = &rCols[i];
         const sal_uInt16 nStart = sal_uInt16(pCol->GetLeft() + nWidth + nDistance);
         if( bOrtho )
             nWidth = static_cast< sal_uInt16 >(nWidth + nInnerWidth + pCol->GetLeft() + pCol->GetRight());
@@ -146,7 +146,7 @@ void lcl_ConvertToCols(const SvxColumnItem& rColItem,
         sal_uInt16 nWidth = static_cast< sal_uInt16 >(rColItem[i].nEnd - rColItem[i].nStart);
         nWidth += nLeft + nRight;
 
-        SwColumn* pCol = rArr[i];
+        SwColumn* pCol = &rArr[i];
         pCol->SetWishWidth( sal_uInt16(long(rCols.GetWishWidth()) * long(nWidth) /
                                                             long(nTotalWidth) ));
         pCol->SetLeft( nLeft );
@@ -155,11 +155,11 @@ void lcl_ConvertToCols(const SvxColumnItem& rColItem,
 
         nLeft = nRight;
     }
-    rArr[rColItem.Count()-1]->SetLeft( nLeft );
+    rArr[rColItem.Count()-1].SetLeft( nLeft );
 
     //Die Differenz aus der Gesamtwunschbreite und der Summe der bisher berechneten
     // Spalten und Raender sollte die Breite der letzten Spalte ergeben.
-    rArr[rColItem.Count()-1]->SetWishWidth( rCols.GetWishWidth() - (sal_uInt16)nSumAll );
+    rArr[rColItem.Count()-1].SetWishWidth( rCols.GetWishWidth() - (sal_uInt16)nSumAll );
 
     rCols.SetOrtho(sal_False, 0, 0 );
 }
@@ -222,9 +222,9 @@ void ResizeFrameCols(SwFmtCol& rCol,
     {
         // wenn die Wunschbreite zu gross wird, dann muessen alle Werte passend skaliert werden
         long nScale = (0xffffl << 8)/ nNewWishWidth;
-        for(sal_uInt16 i = 0; i < rArr.Count(); i++)
+        for(sal_uInt16 i = 0; i < rArr.size(); i++)
         {
-            SwColumn* pCol = rArr.GetObject(i);
+            SwColumn* pCol = &rArr[i];
             long nVal = pCol->GetWishWidth();
             lcl_Scale(nVal, nScale);
             pCol->SetWishWidth((sal_uInt16) nVal);
@@ -241,9 +241,9 @@ void ResizeFrameCols(SwFmtCol& rCol,
     rCol.SetWishWidth( (sal_uInt16) (nNewWishWidth) );
 
     if( nLeftDelta >= 2 || nLeftDelta <= -2)
-        rArr[0]->SetWishWidth(rArr[0]->GetWishWidth() + (sal_uInt16)nWishDiff);
+        rArr.front().SetWishWidth(rArr.front().GetWishWidth() + (sal_uInt16)nWishDiff);
     else
-        rArr[rArr.Count()-1]->SetWishWidth(rArr[rArr.Count()-1]->GetWishWidth() + (sal_uInt16)nWishDiff);
+        rArr.back().SetWishWidth(rArr.back().GetWishWidth() + (sal_uInt16)nWishDiff);
     //reset auto width
     rCol.SetOrtho(sal_False, 0, 0 );
 }
@@ -1348,7 +1348,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
                         SwSectionFmt *pFmt = pSect->GetFmt();
                         const SwFmtCol& rCol = pFmt->GetCol();
                         if(rSh.IsInRightToLeftText())
-                            nNum = rCol.GetColumns().Count() - nNum;
+                            nNum = rCol.GetColumns().size() - nNum;
                         else
                             --nNum;
                         SvxColumnItem aColItem(nNum);
@@ -1387,7 +1387,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
 
                         const SwFmtCol& rCol = pFmt->GetCol();
                         if(rSh.IsInRightToLeftText())
-                            nNum = rCol.GetColumns().Count() - nNum;
+                            nNum = rCol.GetColumns().size() - nNum;
                         else
                             nNum--;
                         SvxColumnItem aColItem(nNum);
@@ -1425,7 +1425,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
                     const SwFrmFmt& rMaster = rDesc.GetMaster();
                     SwFmtCol aCol(rMaster.GetCol());
                     if(rFrameDir.GetValue() == FRMDIR_HORI_RIGHT_TOP)
-                        nNum = aCol.GetColumns().Count() - nNum;
+                        nNum = aCol.GetColumns().size() - nNum;
                     else
                         nNum--;
 
@@ -1589,7 +1589,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
                                                    &rDesc.GetMaster().GetCol();
                     const SwColumns& rCols = pCols->GetColumns();
                     sal_uInt16 nNum = rSh.GetCurOutColNum();
-                    sal_uInt16 nCount = Min(sal_uInt16(nNum + 1), rCols.Count());
+                    sal_uInt16 nCount = Min(sal_uInt16(nNum + 1), sal_uInt16(rCols.size()));
                     const SwRect aRect( rSh.GetAnyCurRect( pFmt
                                                     ? RECT_FLY_PRT_EMBEDDED
                                                     : RECT_PAGE_PRT, pPt ));
@@ -1607,7 +1607,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
                     aRectangle.Left() = 0;
                     for ( sal_uInt16 i = 0; i < nCount; ++i )
                     {
-                        SwColumn* pCol = rCols[i];
+                        const SwColumn* pCol = &rCols[i];
                         nStart = pCol->GetLeft() + nWidth;
                         if(i == nNum - 2)
                             aRectangle.Left() = nStart;
@@ -1633,7 +1633,7 @@ void SwView::StateTabWin(SfxItemSet& rSet)
                         aRectangle.Right() -= (nOuterWidth - nTotalWidth) / 2;
                     }
 
-                    if(nNum < rCols.Count())
+                    if(nNum < rCols.size())
                     {
                         aRectangle.Right() += MINLAY;
                     }
@@ -1727,15 +1727,15 @@ void SwView::StateTabWin(SfxItemSet& rSet)
                         nStart = 0,
                         nEnd = nTotalWidth;
 
-                    if( nNum > rCols.Count() )
+                    if( nNum > rCols.size() )
                     {
                         OSL_ENSURE( !this, "wrong FmtCol is being edited!" );
-                        nNum = rCols.Count();
+                        nNum = rCols.size();
                     }
 
                     for( sal_uInt16 i = 0; i < nNum; ++i )
                     {
-                        SwColumn* pCol = rCols[i];
+                        const SwColumn* pCol = &rCols[i];
                         nStart = pCol->GetLeft() + nWidth;
                         nWidth += pCols->CalcColWidth( i, nTotalWidth );
                         nEnd = nWidth - pCol->GetRight();
commit 2915069a67c81f2ee8607112379c65de66648ff0
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Apr 25 11:55:10 2012 +0200

    Convert SV_DECL_PTRARR(AutoTextGroups) to std::vector

diff --git a/sw/source/ui/inc/gloslst.hxx b/sw/source/ui/inc/gloslst.hxx
index 7cb8473..66ed6d7 100644
--- a/sw/source/ui/inc/gloslst.hxx
+++ b/sw/source/ui/inc/gloslst.hxx
@@ -51,8 +51,7 @@ struct AutoTextGroup
 };
 
 
-typedef AutoTextGroup* AutoTextGroupPtr;
-SV_DECL_PTRARR(AutoTextGroups, AutoTextGroupPtr, 4)
+typedef std::vector<AutoTextGroup*> AutoTextGroups;
 
 class SwGlossaryList : public AutoTimer
 {
diff --git a/sw/source/ui/utlui/gloslst.cxx b/sw/source/ui/utlui/gloslst.cxx
index c19748e..f5be64a 100644
--- a/sw/source/ui/utlui/gloslst.cxx
+++ b/sw/source/ui/utlui/gloslst.cxx
@@ -130,11 +130,11 @@ sal_Bool SwGlossaryList::GetShortName(const String& rLongName,
 
     std::vector<TripleString> aTripleStrings;
 
-    sal_uInt16 nCount = aGroupArr.Count();
+    sal_uInt16 nCount = aGroupArr.size();
     sal_uInt16 nFound = 0;
     for(sal_uInt16 i = 0; i < nCount; i++ )
     {
-        AutoTextGroup* pGroup = aGroupArr.GetObject(i);
+        AutoTextGroup* pGroup = aGroupArr[i];
         if(rGroupName.Len() && rGroupName != pGroup->sName)
             continue;
 
@@ -193,7 +193,7 @@ sal_uInt16  SwGlossaryList::GetGroupCount()
 {
     if(!bFilled)
         Update();
-    return aGroupArr.Count();
+    return aGroupArr.size();
 }
 
 /********************************************************************
@@ -203,11 +203,11 @@ sal_uInt16  SwGlossaryList::GetGroupCount()
 
 String SwGlossaryList::GetGroupName(sal_uInt16 nPos, sal_Bool bNoPath, String* pTitle)
 {
-    OSL_ENSURE(aGroupArr.Count() > nPos, "group not available");
+    OSL_ENSURE(aGroupArr.size() > nPos, "group not available");
     String sRet(aEmptyStr);
-    if(nPos < aGroupArr.Count())
+    if(nPos < aGroupArr.size())
     {
-        AutoTextGroup* pGroup = aGroupArr.GetObject(nPos);
+        AutoTextGroup* pGroup = aGroupArr[nPos];
         sRet = pGroup->sName;
         if(bNoPath)
             sRet = sRet.GetToken(0, GLOS_DELIM);
@@ -225,10 +225,10 @@ String SwGlossaryList::GetGroupName(sal_uInt16 nPos, sal_Bool bNoPath, String* p
 
 sal_uInt16  SwGlossaryList::GetBlockCount(sal_uInt16 nGroup)
 {
-    OSL_ENSURE(aGroupArr.Count() > nGroup, "group not available");
-    if(nGroup < aGroupArr.Count())
+    OSL_ENSURE(aGroupArr.size() > nGroup, "group not available");
+    if(nGroup < aGroupArr.size())
     {
-        AutoTextGroup* pGroup = aGroupArr.GetObject(nGroup);
+        AutoTextGroup* pGroup = aGroupArr[nGroup];
         return pGroup->nCount;
     }
     return 0;
@@ -241,10 +241,10 @@ sal_uInt16  SwGlossaryList::GetBlockCount(sal_uInt16 nGroup)
 
 String  SwGlossaryList::GetBlockName(sal_uInt16 nGroup, sal_uInt16 nBlock, String& rShortName)
 {
-    OSL_ENSURE(aGroupArr.Count() > nGroup, "group not available");
-    if(nGroup < aGroupArr.Count())
+    OSL_ENSURE(aGroupArr.size() > nGroup, "group not available");
+    if(nGroup < aGroupArr.size())
     {
-        AutoTextGroup* pGroup = aGroupArr.GetObject(nGroup);
+        AutoTextGroup* pGroup = aGroupArr[nGroup];
         rShortName = pGroup->sShortNames.GetToken(nBlock, STRING_DELIM);
         return pGroup->sLongNames.GetToken(nBlock, STRING_DELIM);
     }
@@ -294,7 +294,7 @@ void SwGlossaryList::Update()
                                                 &pGroup->aDateModified,
                                                 &pGroup->aDateModified );
 
-                aGroupArr.Insert( pGroup, i );
+                aGroupArr.insert( aGroupArr.begin(), pGroup );
             }
         }
         bFilled = sal_True;
@@ -327,7 +327,7 @@ void SwGlossaryList::Update()
                     FillGroup( pFound, pGlossaries );
                     pFound->aDateModified = *pDT;
 
-                    aGroupArr.Insert(pFound, aGroupArr.Count());
+                    aGroupArr.push_back(pFound);
                 }
                 else if( pFound->aDateModified < *pDT )
                 {
@@ -340,11 +340,11 @@ void SwGlossaryList::Update()
                 delete pDT;
             }
 
-            sal_uInt16 nArrCount = aGroupArr.Count();
+            sal_uInt16 nArrCount = aGroupArr.size();
             for( sal_uInt16 i = nArrCount; i; --i)
             {
                 // evtl. geloeschte Gruppen entfernen
-                AutoTextGroup* pGroup = aGroupArr.GetObject(i - 1);
+                AutoTextGroup* pGroup = aGroupArr[i - 1];
                 sal_uInt16 nGroupPath = (sal_uInt16)pGroup->sName.GetToken( 1,
                                                         GLOS_DELIM).ToInt32();
                 // nur die Gruppen werden geprueft, die fuer den
@@ -358,7 +358,7 @@ void SwGlossaryList::Update()
 
                     if(!bFound)
                     {
-                        aGroupArr.Remove(i - 1);
+                        aGroupArr.erase(aGroupArr.begin() + i - 1);
                         delete pGroup;
                     }
                 }
@@ -386,9 +386,9 @@ void SwGlossaryList::Timeout()
 
 AutoTextGroup*  SwGlossaryList::FindGroup(const String& rGroupName)
 {
-    for(sal_uInt16 i = 0; i < aGroupArr.Count(); i++)
+    for(sal_uInt16 i = 0; i < aGroupArr.size(); i++)
     {
-        AutoTextGroup* pRet = aGroupArr.GetObject(i);
+        AutoTextGroup* pRet = aGroupArr[i];
         if(pRet->sName == rGroupName)
             return pRet;
     }
@@ -428,13 +428,13 @@ sal_Bool SwGlossaryList::HasLongName(const String& rBegin, SvStringsISortDtor* p
     if(!bFilled)
         Update();
     sal_uInt16 nFound = 0;
-    sal_uInt16 nCount = aGroupArr.Count();
+    sal_uInt16 nCount = aGroupArr.size();
     sal_uInt16 nBeginLen = rBegin.Len();
     const ::utl::TransliterationWrapper& rSCmp = GetAppCmpStrIgnore();
 
     for(sal_uInt16 i = 0; i < nCount; i++ )
     {
-        AutoTextGroup* pGroup = aGroupArr.GetObject(i);
+        AutoTextGroup* pGroup = aGroupArr[i];
         for(sal_uInt16 j = 0; j < pGroup->nCount; j++)
         {
             String sBlock = pGroup->sLongNames.GetToken(j, STRING_DELIM);
@@ -457,11 +457,11 @@ sal_Bool SwGlossaryList::HasLongName(const String& rBegin, SvStringsISortDtor* p
 ********************************************************************/
 void    SwGlossaryList::ClearGroups()
 {
-    sal_uInt16 nCount = aGroupArr.Count();
+    sal_uInt16 nCount = aGroupArr.size();
     for( sal_uInt16 i = 0; i < nCount; ++i )
-        delete aGroupArr.GetObject( i );
+        delete aGroupArr[ i ];
 
-    aGroupArr.Remove( 0, nCount );
+    aGroupArr.clear();
     bFilled = sal_False;
 }
 
commit 96938bd075ae9a59557d49d7f9b957da69767567
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Apr 25 11:55:09 2012 +0200

    fix previous commit:
    
    boost::ptr_vector::erase() will delete the element, but fortunately there
    is a transfer() method that can be used here.

diff --git a/sw/source/ui/cctrl/swlbox.cxx b/sw/source/ui/cctrl/swlbox.cxx
index 8139929..045fb1e 100644
--- a/sw/source/ui/cctrl/swlbox.cxx
+++ b/sw/source/ui/cctrl/swlbox.cxx
@@ -90,15 +90,19 @@ void SwComboBox::RemoveEntry(sal_uInt16 nPos)
 
     // Remove old element
     SwBoxEntry* pEntry = &aEntryLst[nPos];
-    aEntryLst.erase(aEntryLst.begin() + nPos);
     ComboBox::RemoveEntry(nPos);
 
     // Don't add new entries to the list
     if(pEntry->bNew)
-        return;
-
-    // add to DelEntryLst
-    aDelEntryLst.push_back(pEntry);
+    {
+        aEntryLst.erase(aEntryLst.begin() + nPos);
+    }
+    else
+    {
+        // add to DelEntryLst
+        aDelEntryLst.transfer(aDelEntryLst.end(),
+                aEntryLst.begin() + nPos, aEntryLst);
+    }
 }
 
 sal_uInt16 SwComboBox::GetEntryPos(const SwBoxEntry& rEntry) const
commit 2ebfe6fd314dd219183b611e27a48a12e3e5f223
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Apr 25 11:55:08 2012 +0200

    Convert SV_DECL_PTRARR_DEL(SwEntryLst) to boost::ptr_vector

diff --git a/sw/source/ui/cctrl/swlbox.cxx b/sw/source/ui/cctrl/swlbox.cxx
index 38f6aab..8139929 100644
--- a/sw/source/ui/cctrl/swlbox.cxx
+++ b/sw/source/ui/cctrl/swlbox.cxx
@@ -36,8 +36,6 @@
 using namespace nsSwComboBoxStyle;
 
 
-SV_IMPL_PTRARR(SwEntryLst, SwBoxEntry*)
-
 //     Description: ListboxElement
 SwBoxEntry::SwBoxEntry() :
     bModified(sal_False),
@@ -70,8 +68,8 @@ SwComboBox::SwComboBox(Window* pParent, const ResId& rId, sal_uInt16 nStyleBits
     sal_uInt16 nSize = GetEntryCount();
     for( sal_uInt16 i=0; i < nSize; ++i )
     {
-        const SwBoxEntry* pTmp = new SwBoxEntry(ComboBox::GetEntry(i), i);
-        aEntryLst.Insert(pTmp, aEntryLst.Count() );
+        SwBoxEntry* pTmp = new SwBoxEntry(ComboBox::GetEntry(i), i);
+        aEntryLst.push_back(pTmp);
     }
 }
 
@@ -87,12 +85,12 @@ void SwComboBox::InsertEntry(const SwBoxEntry& rEntry)
 
 void SwComboBox::RemoveEntry(sal_uInt16 nPos)
 {
-    if(nPos >= aEntryLst.Count())
+    if(nPos >= aEntryLst.size())
         return;
 
     // Remove old element
-    SwBoxEntry* pEntry = aEntryLst[nPos];
-    aEntryLst.Remove(nPos, 1);
+    SwBoxEntry* pEntry = &aEntryLst[nPos];
+    aEntryLst.erase(aEntryLst.begin() + nPos);
     ComboBox::RemoveEntry(nPos);
 
     // Don't add new entries to the list
@@ -100,7 +98,7 @@ void SwComboBox::RemoveEntry(sal_uInt16 nPos)
         return;
 
     // add to DelEntryLst
-    aDelEntryLst.C40_INSERT(SwBoxEntry, pEntry, aDelEntryLst.Count());
+    aDelEntryLst.push_back(pEntry);
 }
 
 sal_uInt16 SwComboBox::GetEntryPos(const SwBoxEntry& rEntry) const
@@ -110,21 +108,21 @@ sal_uInt16 SwComboBox::GetEntryPos(const SwBoxEntry& rEntry) const
 
 const SwBoxEntry& SwComboBox::GetEntry(sal_uInt16 nPos) const
 {
-    if(nPos < aEntryLst.Count())
-        return *aEntryLst[nPos];
+    if(nPos < aEntryLst.size())
+        return aEntryLst[nPos];
 
     return aDefault;
 }
 
 sal_uInt16 SwComboBox::GetRemovedCount() const
 {
-    return aDelEntryLst.Count();
+    return aDelEntryLst.size();
 }
 
 const SwBoxEntry& SwComboBox::GetRemovedEntry(sal_uInt16 nPos) const
 {
-    if(nPos < aDelEntryLst.Count())
-        return *aDelEntryLst[nPos];
+    if(nPos < aDelEntryLst.size())
+        return aDelEntryLst[nPos];
 
     return aDefault;
 }
@@ -133,7 +131,7 @@ void SwComboBox::InsertSorted(SwBoxEntry* pEntry)
 {
     ComboBox::InsertEntry(pEntry->aName);
     sal_uInt16 nPos = ComboBox::GetEntryPos(pEntry->aName);
-    aEntryLst.C40_INSERT(SwBoxEntry, pEntry, nPos);
+    aEntryLst.insert( aEntryLst.begin() + nPos, pEntry );
 }
 
 void SwComboBox::KeyInput( const KeyEvent& rKEvt )
diff --git a/sw/source/ui/inc/swlbox.hxx b/sw/source/ui/inc/swlbox.hxx
index d0f718c..95a4365 100644
--- a/sw/source/ui/inc/swlbox.hxx
+++ b/sw/source/ui/inc/swlbox.hxx
@@ -34,11 +34,12 @@
 
 #include <vcl/combobox.hxx>
 #include "swdllapi.h"
+#include <boost/ptr_container/ptr_vector.hpp>
 
 class SwBoxEntry;
 class Window;
 
-SV_DECL_PTRARR_DEL(SwEntryLst, SwBoxEntry*, 10)
+typedef boost::ptr_vector<SwBoxEntry> SwEntryLst;
 
 /*--------------------------------------------------------------------
      Description: SwBoxEntry
commit 362b4e9b6f7aa0bd2f9af02645124f5905f0bba3
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Apr 25 11:55:08 2012 +0200

    try not to change the serialization format

diff --git a/sw/source/ui/config/uinums.cxx b/sw/source/ui/config/uinums.cxx
index 22512d7..26be3dc 100644
--- a/sw/source/ui/config/uinums.cxx
+++ b/sw/source/ui/config/uinums.cxx
@@ -501,7 +501,7 @@ void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream )
     }
     rStream << nCharPoolId;
     rStream.WriteUniOrByteString( sCharFmtName, eEncoding );
-    rStream << aItems.size();
+    rStream << static_cast<sal_uInt16>(aItems.size());
 
     for( sal_uInt16 n = aItems.size(); n; )
     {
commit 5c8549c7cf53ff22a536e0f77d6f82aa1089e8a1
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Apr 25 11:55:07 2012 +0200

    Convert SV_DECL_PTRARR_DEL(_SwNumFmtsAttrs) to boost::ptr_vector

diff --git a/sw/source/ui/config/uinums.cxx b/sw/source/ui/config/uinums.cxx
index 1c40de6..22512d7 100644
--- a/sw/source/ui/config/uinums.cxx
+++ b/sw/source/ui/config/uinums.cxx
@@ -59,8 +59,6 @@ using namespace ::com::sun::star;
 #define NUMRULE_FILENAME "numrule.cfg"
 #define CHAPTER_FILENAME "chapter.cfg"
 
-SV_IMPL_PTRARR( _SwNumFmtsAttrs, SfxPoolItem* )
-
 
 // SwNumRulesWithName ----------------------------------------------------
 // PUBLIC METHODES -------------------------------------------------------
@@ -305,7 +303,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( const SwNumFmt& rFmt )
             const SfxPoolItem *pCurr = aIter.GetCurItem();
             while( sal_True )
             {
-                aItems.Insert( pCurr->Clone(), aItems.Count() );
+                aItems.push_back( pCurr->Clone() );
                 if( aIter.IsAtEnd() )
                     break;
                 pCurr = aIter.NextItem();
@@ -322,8 +320,8 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( const _SwNumFmtGlobal& rFm
     sCharFmtName( rFmt.sCharFmtName ),
     nCharPoolId( rFmt.nCharPoolId )
 {
-    for( sal_uInt16 n = rFmt.aItems.Count(); n; )
-        aItems.Insert( rFmt.aItems[ --n ]->Clone(), aItems.Count() );
+    for( sal_uInt16 n = rFmt.aItems.size(); n; )
+        aItems.push_back( rFmt.aItems[ --n ].Clone() );
 }
 
 SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
@@ -418,8 +416,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream,
         {
             sal_uInt16 nWhich, nVers;
             rStream >> nWhich >> nVers;
-            aItems.Insert( GetDfltAttr( nWhich )->Create( rStream, nVers ),
-                            aItems.Count() );
+            aItems.push_back( GetDfltAttr( nWhich )->Create( rStream, nVers ) );
         }
     }
 
@@ -504,11 +501,11 @@ void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream )
     }
     rStream << nCharPoolId;
     rStream.WriteUniOrByteString( sCharFmtName, eEncoding );
-    rStream << aItems.Count();
+    rStream << aItems.size();
 
-    for( sal_uInt16 n = aItems.Count(); n; )
+    for( sal_uInt16 n = aItems.size(); n; )
     {
-        SfxPoolItem* pItem = aItems[ --n ];
+        SfxPoolItem* pItem = &aItems[ --n ];
         sal_uInt16 nIVers = pItem->GetVersion( SOFFICE_FILEFORMAT_50 );
         OSL_ENSURE( nIVers != USHRT_MAX,
                 "Was'n das: Item-Version USHRT_MAX in der aktuellen Version" );
@@ -570,8 +567,8 @@ void SwNumRulesWithName::_SwNumFmtGlobal::ChgNumFmt( SwWrtShell& rSh,
                 pFmt = rSh.GetCharFmtFromPool( nCharPoolId );
 
             if( !pFmt->GetDepends() )       // set attributes
-                for( sal_uInt16 n = aItems.Count(); n; )
-                    pFmt->SetFmtAttr( *aItems[ --n ] );
+                for( sal_uInt16 n = aItems.size(); n; )
+                    pFmt->SetFmtAttr( aItems[ --n ] );
         }
     }
     ((SwNumFmt&)aFmt).SetCharFmt( pFmt );
diff --git a/sw/source/ui/inc/uinums.hxx b/sw/source/ui/inc/uinums.hxx
index cfb846f..f67df60 100644
--- a/sw/source/ui/inc/uinums.hxx
+++ b/sw/source/ui/inc/uinums.hxx
@@ -31,6 +31,7 @@
 #include <svl/svarray.hxx>
 #include <numrule.hxx>
 #include "swdllapi.h"
+#include <boost/ptr_container/ptr_vector.hpp>
 
 class SfxPoolItem;
 class SwWrtShell;
@@ -38,8 +39,7 @@ class SvStream;
 
 #define MAX_NUM_RULES 9
 
-typedef SfxPoolItem* SfxPoolItemPtr;
-SV_DECL_PTRARR_DEL( _SwNumFmtsAttrs, SfxPoolItemPtr, 5 )
+typedef boost::ptr_vector<SfxPoolItem> _SwNumFmtsAttrs;
 
 class SW_DLLPUBLIC SwNumRulesWithName
 {
commit 1f41dc40ad8e0465432b6ea089258c7f8902c247
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Apr 25 11:55:06 2012 +0200

    Convert SV_DECL_PTRARR_DEL(AutoMarkEntryArr) to boost::ptr_vector

diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 63248e7..84a6eec 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -156,9 +156,7 @@ struct AutoMarkEntry
         bCase(sal_False),
         bWord(sal_False){}
 };
-typedef AutoMarkEntry* AutoMarkEntryPtr;
-SV_DECL_PTRARR_DEL(AutoMarkEntryArr, AutoMarkEntryPtr, 0)
-SV_IMPL_PTRARR(AutoMarkEntryArr, AutoMarkEntryPtr);
+typedef boost::ptr_vector<AutoMarkEntry> AutoMarkEntryArr;
 
 typedef ::svt::EditBrowseBox SwEntryBrowseBox_Base;
 class SwEntryBrowseBox : public SwEntryBrowseBox_Base
@@ -3981,9 +3979,9 @@ sal_Bool    SwEntryBrowseBox::SeekRow( long nRow )
 String SwEntryBrowseBox::GetCellText(long nRow, sal_uInt16 nColumn) const
 {
     const String* pRet = &aEmptyStr;
-    if(aEntryArr.Count() > nRow)
+    if(static_cast<sal_uInt16>( aEntryArr.size() ) > nRow)
     {
-        AutoMarkEntry* pEntry = aEntryArr[ static_cast< sal_uInt16 >(nRow) ];
+        const AutoMarkEntry* pEntry = &aEntryArr[ nRow ];
         switch(nColumn)
         {
             case  ITEM_SEARCH       :pRet = &pEntry->sSearch; break;
@@ -4030,8 +4028,8 @@ sal_Bool SwEntryBrowseBox::SaveModified()
         pController = xCheckController;
         bVal = ((::svt::CheckBoxCellController*)pController)->GetCheckBox().IsChecked();
     }
-    AutoMarkEntry* pEntry = nRow >= aEntryArr.Count() ? new AutoMarkEntry
-                                                      : aEntryArr[nRow];
+    AutoMarkEntry* pEntry = nRow >= aEntryArr.size() ? new AutoMarkEntry
+                                                      : &aEntryArr[nRow];
     switch(nCol)
     {
         case  ITEM_SEARCH       : pEntry->sSearch = sNew; break;
@@ -4042,9 +4040,9 @@ sal_Bool SwEntryBrowseBox::SaveModified()
         case  ITEM_CASE         : pEntry->bCase = bVal; break;
         case  ITEM_WORDONLY     : pEntry->bWord = bVal; break;
     }
-    if(nRow >= aEntryArr.Count())
+    if(nRow >= aEntryArr.size())
     {
-        aEntryArr.Insert( pEntry, aEntryArr.Count() );
+        aEntryArr.push_back( pEntry );
         RowInserted(nRow, 1, sal_True, sal_True);
         if(nCol < ITEM_WORDONLY)
         {
@@ -4109,13 +4107,13 @@ void    SwEntryBrowseBox::ReadEntries(SvStream& rInStr)
                 sStr = sLine.GetToken(0, ';', nSttPos );
                 pToInsert->bWord = sStr.Len() && sStr != sZero;
 
-                aEntryArr.Insert( pToInsert, aEntryArr.Count() );
+                aEntryArr.push_back( pToInsert );
                 pToInsert = 0;
             }
             else
             {
                 if(pToInsert)
-                    aEntryArr.Insert(pToInsert, aEntryArr.Count());
+                    aEntryArr.push_back(pToInsert);
                 pToInsert = new AutoMarkEntry;
                 pToInsert->sComment = sLine;
                 pToInsert->sComment.Erase(0, 1);
@@ -4123,8 +4121,8 @@ void    SwEntryBrowseBox::ReadEntries(SvStream& rInStr)
         }
     }
     if( pToInsert )
-        aEntryArr.Insert(pToInsert, aEntryArr.Count());
-    RowInserted(0, aEntryArr.Count() + 1, sal_True);
+        aEntryArr.push_back(pToInsert);
+    RowInserted(0, aEntryArr.size() + 1, sal_True);
 }
 
 void    SwEntryBrowseBox::WriteEntries(SvStream& rOutStr)
@@ -4140,9 +4138,9 @@ void    SwEntryBrowseBox::WriteEntries(SvStream& rOutStr)
         GoToColumnId(nCol < ITEM_CASE ? ++nCol : --nCol );
 
     rtl_TextEncoding  eTEnc = osl_getThreadTextEncoding();
-    for(sal_uInt16 i = 0; i < aEntryArr.Count();i++)
+    for(sal_uInt16 i = 0; i < aEntryArr.size(); i++)
     {
-        AutoMarkEntry* pEntry = aEntryArr[i];
+        AutoMarkEntry* pEntry = &aEntryArr[i];
         if(pEntry->sComment.Len())
         {
             String sWrite('#');
commit 9fc0297b5f96062d636eb8f459df8a1aafc96252
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Apr 25 11:55:05 2012 +0200

    Convert SV_DECL_PTRARR(SvLBoxEntryArr) to std::vector

diff --git a/sw/source/ui/inc/redlndlg.hxx b/sw/source/ui/inc/redlndlg.hxx
index 13213f7..0d32d28 100644
--- a/sw/source/ui/inc/redlndlg.hxx
+++ b/sw/source/ui/inc/redlndlg.hxx
@@ -74,7 +74,7 @@ typedef boost::ptr_vector<SwRedlineDataChild> SwRedlineDataChildArr;
 
 
 typedef SvLBoxEntry* SvLBoxEntryPtr;
-SV_DECL_PTRARR(SvLBoxEntryArr, SvLBoxEntryPtr, 100)
+typedef std::vector<SvLBoxEntryPtr> SvLBoxEntryArr;
 
 class SW_DLLPUBLIC SwRedlineAcceptDlg
 {
diff --git a/sw/source/ui/misc/redlndlg.cxx b/sw/source/ui/misc/redlndlg.cxx
index 512619e..5be01f8 100644
--- a/sw/source/ui/misc/redlndlg.cxx
+++ b/sw/source/ui/misc/redlndlg.cxx
@@ -71,7 +71,6 @@
 SFX_IMPL_MODELESSDIALOG( SwRedlineAcceptChild, FN_REDLINE_ACCEPT )
 
 SV_IMPL_OP_PTRARR_SORT(SwRedlineDataParentSortArr, SwRedlineDataParentPtr)
-SV_IMPL_PTRARR(SvLBoxEntryArr, SvLBoxEntryPtr)
 
 static sal_uInt16 nSortMode = 0xffff;
 static sal_Bool   bSortDir = sal_True;
@@ -705,17 +704,17 @@ void SwRedlineAcceptDlg::RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd)
         SvLBoxEntry *pEntry = aRedlineParents[i].pTLBParent;
         if (pEntry)
         {
-            long nIdx = aLBoxArr.Count() - 1L;
+            long nIdx = aLBoxArr.size() - 1L;
             sal_uLong nAbsPos = pModel->GetAbsPos(pEntry);
             while (nIdx >= 0 &&
                     pModel->GetAbsPos(aLBoxArr[ static_cast< sal_uInt16 >(nIdx) ]) > nAbsPos)
                 nIdx--;
-            aLBoxArr.Insert( pEntry, static_cast< sal_uInt16 >(++nIdx) );
+            aLBoxArr.insert( aLBoxArr.begin() + static_cast< sal_uInt16 >(++nIdx) , pEntry);
         }
     }
 
     // clear TLB from behind
-    long nIdx = (long)aLBoxArr.Count() - 1L;
+    long nIdx = (long)aLBoxArr.size() - 1L;
     while (nIdx >= 0)
         pTable->RemoveEntry(aLBoxArr[ static_cast< sal_uInt16 >(nIdx--) ]);
 
commit 4552c996473b8a931e3d47335cca8acc9bb2bc4f
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Apr 25 11:55:05 2012 +0200

    Convert SV_DECL_PTRARR_DEL(SwRedlineDataChildArr) to ptr_vector

diff --git a/sw/source/ui/inc/redlndlg.hxx b/sw/source/ui/inc/redlndlg.hxx
index 301c262..13213f7 100644
--- a/sw/source/ui/inc/redlndlg.hxx
+++ b/sw/source/ui/inc/redlndlg.hxx
@@ -39,6 +39,7 @@
 #include <sfx2/dispatch.hxx>
 #include <svx/ctredlin.hxx>
 #include <svx/postattr.hxx>
+#include <boost/ptr_container/ptr_vector.hpp>
 
 class SwChildWinWrapper;
 
@@ -69,7 +70,7 @@ SV_DECL_PTRARR_SORT(SwRedlineDataParentSortArr, SwRedlineDataParentPtr, 10)
 
 
 typedef SwRedlineDataChild* SwRedlineDataChildPtr;
-SV_DECL_PTRARR_DEL(SwRedlineDataChildArr, SwRedlineDataChildPtr, 4)
+typedef boost::ptr_vector<SwRedlineDataChild> SwRedlineDataChildArr;
 
 
 typedef SvLBoxEntry* SvLBoxEntryPtr;
diff --git a/sw/source/ui/misc/redlndlg.cxx b/sw/source/ui/misc/redlndlg.cxx
index 146b6e1..512619e 100644
--- a/sw/source/ui/misc/redlndlg.cxx
+++ b/sw/source/ui/misc/redlndlg.cxx
@@ -71,7 +71,6 @@
 SFX_IMPL_MODELESSDIALOG( SwRedlineAcceptChild, FN_REDLINE_ACCEPT )
 
 SV_IMPL_OP_PTRARR_SORT(SwRedlineDataParentSortArr, SwRedlineDataParentPtr)
-SV_IMPL_PTRARR(SwRedlineDataChildArr, SwRedlineDataChildPtr)
 SV_IMPL_PTRARR(SvLBoxEntryArr, SvLBoxEntryPtr)
 
 static sal_uInt16 nSortMode = 0xffff;
@@ -269,7 +268,7 @@ void SwRedlineAcceptDlg::Init(sal_uInt16 nStart)
     else
     {
         pTable->Clear();
-        aRedlineChildren.DeleteAndDestroy(0, aRedlineChildren.Count());
+        aRedlineChildren.clear();
         aRedlineParents.erase(aRedlineParents.begin() + nStart, aRedlineParents.end());
     }
 
@@ -514,16 +513,22 @@ sal_uInt16 SwRedlineAcceptDlg::CalcDiff(sal_uInt16 nStart, sal_Bool bChild)
     if (bChild)     // should actually never happen, but just in case...
     {
         // throw away all entry's children and initialise newly
-        SwRedlineDataChildPtr pBackupData = (SwRedlineDataChildPtr)pParent->pNext;
-        SwRedlineDataChildPtr pNext;
+        SwRedlineDataChild* pBackupData = (SwRedlineDataChild*)pParent->pNext;
+        SwRedlineDataChild* pNext;
 
         while (pBackupData)
         {
-            pNext = (SwRedlineDataChildPtr)pBackupData->pNext;
+            pNext = (SwRedlineDataChild*)pBackupData->pNext;
             if (pBackupData->pTLBChild)
                 pTable->RemoveEntry(pBackupData->pTLBChild);
 
-            aRedlineChildren.DeleteAndDestroy(aRedlineChildren.GetPos(pBackupData), 1);
+            for( SwRedlineDataChildArr::iterator it = aRedlineChildren.begin();
+                 it != aRedlineChildren.end(); ++it)
+                if (&*it == pBackupData)
+                {
+                    aRedlineChildren.erase(it);
+                    break;
+                }
             pBackupData = pNext;
         }
         pParent->pNext = 0;
@@ -603,7 +608,7 @@ void SwRedlineAcceptDlg::InsertChildren(SwRedlineDataParent *pParent, const SwRe
 
         SwRedlineDataChildPtr pRedlineChild = new SwRedlineDataChild;
         pRedlineChild->pChild = pRedlineData;
-        aRedlineChildren.Insert(pRedlineChild, aRedlineChildren.Count());
+        aRedlineChildren.push_back(pRedlineChild);
 
         if ( pLastRedlineChild )
             pLastRedlineChild->pNext = pRedlineChild;
@@ -681,21 +686,21 @@ void SwRedlineAcceptDlg::RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd)
         if (!bChildrenRemoved && aRedlineParents[i].pNext)
         {
             SwRedlineDataChildPtr pChildPtr = (SwRedlineDataChildPtr)aRedlineParents[i].pNext;
-            sal_uInt16 nChildPos = aRedlineChildren.GetPos(pChildPtr);
-
-            if (nChildPos != USHRT_MAX)
-            {
-                sal_uInt16 nChildren = 0;
-
-                while (pChildPtr)
+            for( SwRedlineDataChildArr::iterator it = aRedlineChildren.begin();
+                 it != aRedlineChildren.end(); ++it)
+                if (&*it == pChildPtr)
                 {
-                    pChildPtr = (SwRedlineDataChildPtr)pChildPtr->pNext;
-                    nChildren++;
-                }
+                    sal_uInt16 nChildren = 0;
+                    while (pChildPtr)
+                    {
+                        pChildPtr = (SwRedlineDataChildPtr)pChildPtr->pNext;
+                        nChildren++;
+                    }
 
-                aRedlineChildren.DeleteAndDestroy(nChildPos, nChildren);
-                bChildrenRemoved = sal_True;
-            }
+                    aRedlineChildren.erase(it, it + nChildren);
+                    bChildrenRemoved = sal_True;
+                    break;
+                }
         }
         SvLBoxEntry *pEntry = aRedlineParents[i].pTLBParent;
         if (pEntry)
commit 62b7606fddfef9e1a7645a2d3d605f1fa3aee263
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Apr 25 11:55:04 2012 +0200

    Convert SV_DECL_PTRARR_DEL(SwRedlineDataParentArr) to ptr_vector

diff --git a/sw/source/ui/inc/redlndlg.hxx b/sw/source/ui/inc/redlndlg.hxx
index 81d678b..301c262 100644
--- a/sw/source/ui/inc/redlndlg.hxx
+++ b/sw/source/ui/inc/redlndlg.hxx
@@ -63,8 +63,7 @@ struct SwRedlineDataParent
 };
 
 typedef SwRedlineDataParent* SwRedlineDataParentPtr;
-SV_DECL_PTRARR_DEL(SwRedlineDataParentArr, SwRedlineDataParentPtr, 10)
-
+typedef boost::ptr_vector<SwRedlineDataParent> SwRedlineDataParentArr;
 
 SV_DECL_PTRARR_SORT(SwRedlineDataParentSortArr, SwRedlineDataParentPtr, 10)
 
diff --git a/sw/source/ui/misc/redlndlg.cxx b/sw/source/ui/misc/redlndlg.cxx
index cff5f3f..146b6e1 100644
--- a/sw/source/ui/misc/redlndlg.cxx
+++ b/sw/source/ui/misc/redlndlg.cxx
@@ -70,7 +70,6 @@
 
 SFX_IMPL_MODELESSDIALOG( SwRedlineAcceptChild, FN_REDLINE_ACCEPT )
 
-SV_IMPL_PTRARR(SwRedlineDataParentArr, SwRedlineDataParentPtr)
 SV_IMPL_OP_PTRARR_SORT(SwRedlineDataParentSortArr, SwRedlineDataParentPtr)
 SV_IMPL_PTRARR(SwRedlineDataChildArr, SwRedlineDataChildPtr)
 SV_IMPL_PTRARR(SvLBoxEntryArr, SvLBoxEntryPtr)
@@ -266,12 +265,12 @@ void SwRedlineAcceptDlg::Init(sal_uInt16 nStart)
     aUsedSeqNo.Remove((sal_uInt16)0, aUsedSeqNo.Count());
 
     if (nStart)
-        RemoveParents(nStart, aRedlineParents.Count() - 1);
+        RemoveParents(nStart, aRedlineParents.size() - 1);
     else
     {
         pTable->Clear();
         aRedlineChildren.DeleteAndDestroy(0, aRedlineChildren.Count());
-        aRedlineParents.DeleteAndDestroy(nStart, aRedlineParents.Count() - nStart);
+        aRedlineParents.erase(aRedlineParents.begin() + nStart, aRedlineParents.end());
     }
 
     // insert parents
@@ -424,14 +423,14 @@ void SwRedlineAcceptDlg::Activate()
     {
         const SwRedline& rRedln = pSh->GetRedline(i);
 
-        if (i >= aRedlineParents.Count())
+        if (i >= aRedlineParents.size())
         {
             // new entries have been appended
             Init(i);
             return;
         }
 
-        pParent = aRedlineParents[i];
+        pParent = &aRedlineParents[i];
         if (&rRedln.GetRedlineData() != pParent->pData)
         {
             // Redline-Parents were inserted, changed or deleted
@@ -468,7 +467,7 @@ void SwRedlineAcceptDlg::Activate()
         }
     }
 
-    if (nCount != aRedlineParents.Count())
+    if (nCount != aRedlineParents.size())
     {
         // Redlines were deleted at the end
         Init(nCount);
@@ -479,7 +478,7 @@ void SwRedlineAcceptDlg::Activate()
     for (i = 0; i < nCount; i++)
     {
         const SwRedline& rRedln = pSh->GetRedline(i);
-        pParent = aRedlineParents[i];
+        pParent = &aRedlineParents[i];
 
         if(!rRedln.GetComment().Equals(pParent->sComment))
         {
@@ -509,7 +508,7 @@ sal_uInt16 SwRedlineAcceptDlg::CalcDiff(sal_uInt16 nStart, sal_Bool bChild)
     SwView *pView   = ::GetActiveView();
     SwWrtShell* pSh = pView->GetWrtShellPtr();
     sal_uInt16 nAutoFmt = HasRedlineAutoFmt() ? nsRedlineType_t::REDLINE_FORM_AUTOFMT : 0;
-    SwRedlineDataParent *pParent = aRedlineParents[nStart];
+    SwRedlineDataParent *pParent = &aRedlineParents[nStart];
     const SwRedline& rRedln = pSh->GetRedline(nStart);
 
     if (bChild)     // should actually never happen, but just in case...
@@ -539,9 +538,9 @@ sal_uInt16 SwRedlineAcceptDlg::CalcDiff(sal_uInt16 nStart, sal_Bool bChild)
     // have entries been deleted?
     const SwRedlineData *pRedlineData = &rRedln.GetRedlineData();
     sal_uInt16 i;
-    for ( i = nStart + 1; i < aRedlineParents.Count(); i++)
+    for ( i = nStart + 1; i < aRedlineParents.size(); i++)
     {
-        if (aRedlineParents[i]->pData == pRedlineData)
+        if (aRedlineParents[i].pData == pRedlineData)
         {
             // remove entries from nStart to i-1
             RemoveParents(nStart, i - 1);
@@ -552,7 +551,7 @@ sal_uInt16 SwRedlineAcceptDlg::CalcDiff(sal_uInt16 nStart, sal_Bool bChild)
 
     // entries been inserted?
     sal_uInt16 nCount = pSh->GetRedlineCount();
-    pRedlineData = aRedlineParents[nStart]->pData;
+    pRedlineData = aRedlineParents[nStart].pData;
 
     for (i = nStart + 1; i < nCount; i++)
     {
@@ -664,12 +663,12 @@ void SwRedlineAcceptDlg::RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd)
 
     // set the cursor after the last entry because otherwise performance problem in TLB.
     // TLB would otherwise reset the cursor at every Remove (expensive)
-    sal_uInt16 nPos = Min((sal_uInt16)nCount, (sal_uInt16)aRedlineParents.Count());
+    sal_uInt16 nPos = Min((sal_uInt16)nCount, (sal_uInt16)aRedlineParents.size());
     SvLBoxEntry *pCurEntry = NULL;
     while( ( pCurEntry == NULL ) && ( nPos > 0 ) )
     {
         --nPos;
-        pCurEntry = aRedlineParents[nPos]->pTLBParent;
+        pCurEntry = aRedlineParents[nPos].pTLBParent;
     }
 
     if (pCurEntry)
@@ -679,9 +678,9 @@ void SwRedlineAcceptDlg::RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd)
 
     for (sal_uInt16 i = nStart; i <= nEnd; i++)
     {
-        if (!bChildrenRemoved && aRedlineParents[i]->pNext)
+        if (!bChildrenRemoved && aRedlineParents[i].pNext)
         {
-            SwRedlineDataChildPtr pChildPtr = (SwRedlineDataChildPtr)aRedlineParents[i]->pNext;
+            SwRedlineDataChildPtr pChildPtr = (SwRedlineDataChildPtr)aRedlineParents[i].pNext;
             sal_uInt16 nChildPos = aRedlineChildren.GetPos(pChildPtr);
 
             if (nChildPos != USHRT_MAX)
@@ -698,7 +697,7 @@ void SwRedlineAcceptDlg::RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd)
                 bChildrenRemoved = sal_True;
             }
         }
-        SvLBoxEntry *pEntry = aRedlineParents[i]->pTLBParent;
+        SvLBoxEntry *pEntry = aRedlineParents[i].pTLBParent;
         if (pEntry)
         {
             long nIdx = aLBoxArr.Count() - 1L;
@@ -720,7 +719,7 @@ void SwRedlineAcceptDlg::RemoveParents(sal_uInt16 nStart, sal_uInt16 nEnd)
     // unfortunately by Remove it was selected from the TLB always again ...
     pTable->SelectAll(sal_False);
 
-    aRedlineParents.DeleteAndDestroy( nStart, nEnd - nStart + 1);
+    aRedlineParents.erase( aRedlineParents.begin() + nStart, aRedlineParents.begin() + nEnd);
 }
 
 void SwRedlineAcceptDlg::InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd)
@@ -765,7 +764,7 @@ void SwRedlineAcceptDlg::InsertParents(sal_uInt16 nStart, sal_uInt16 nEnd)
         String sComment(rRedln.GetComment());
         sComment.SearchAndReplaceAll((sal_Unicode)_LF,(sal_Unicode)' ');
         pRedlineParent->sComment = sComment;
-        aRedlineParents.Insert(pRedlineParent, i);
+        aRedlineParents.insert(aRedlineParents.begin() + i, pRedlineParent);
 
         pData = new RedlinData;
         pData->pData = pRedlineParent;
commit 4dcc1b650e4e2451e9e39f971ddfc49309203f25
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Apr 25 11:55:03 2012 +0200

    Convert SV_DECL_PTRARR_DEL(SwSelUnions) to boost::ptr_vector

diff --git a/sw/inc/tblsel.hxx b/sw/inc/tblsel.hxx
index 6621d55..d75a18d 100644
--- a/sw/inc/tblsel.hxx
+++ b/sw/inc/tblsel.hxx
@@ -172,7 +172,9 @@ public:
           SwTabFrm *GetTable()       { return pTable; }
 };
 
-SV_DECL_PTRARR_DEL( SwSelUnions, SwSelUnion*, 10 )
+// Determines tables affected by a table selection and union rectangles
+// of the selection (also for split tables)
+typedef boost::ptr_vector<SwSelUnion> SwSelUnions;
 
 // Gets the tables involved in a table selection and the union-rectangles of the selections
 // - also for split tables.
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index 38e1642..da40f24 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -595,7 +595,7 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
     SwSelUnions aUnions;
     ::MakeSelUnions( aUnions, pStart, pEnd );
 
-    if( aUnions.Count() )
+    if( !aUnions.empty() )
     {
         SwTable& rTable = pTblNd->GetTable();
         if (GetIDocumentUndoRedo().DoesUndo())
@@ -651,12 +651,12 @@ void SwDoc::SetTabBorders( const SwCursor& rCursor, const SfxItemSet& rSet )
         }
 
         sal_Bool bFirst = sal_True;
-        for ( sal_uInt16 i = 0; i < aUnions.Count(); ++i )
+        for ( sal_uInt16 i = 0; i < aUnions.size(); ++i )
         {
-            SwSelUnion *pUnion = aUnions[i];
+            SwSelUnion *pUnion = &aUnions[i];
             SwTabFrm *pTab = pUnion->GetTable();
             const SwRect &rUnion = pUnion->GetUnion();
-            const sal_Bool bLast  = i == aUnions.Count() - 1 ? sal_True : sal_False;
+            const sal_Bool bLast  = i == aUnions.size() - 1 ? sal_True : sal_False;
 
             SvPtrarr aCellArr( 255 );
             ::lcl_CollectCells( aCellArr, pUnion->GetUnion(), pTab );
@@ -842,7 +842,7 @@ void SwDoc::SetTabLineStyle( const SwCursor& rCursor,
     SwSelUnions aUnions;
     ::MakeSelUnions( aUnions, pStart, pEnd );
 
-    if( aUnions.Count() )
+    if( !aUnions.empty() )
     {
         SwTable& rTable = pTblNd->GetTable();
         if (GetIDocumentUndoRedo().DoesUndo())
@@ -850,9 +850,9 @@ void SwDoc::SetTabLineStyle( const SwCursor& rCursor,
             GetIDocumentUndoRedo().AppendUndo(new SwUndoAttrTbl(*pTblNd));
         }
 
-        for( sal_uInt16 i = 0; i < aUnions.Count(); ++i )
+        for( sal_uInt16 i = 0; i < aUnions.size(); ++i )
         {
-            SwSelUnion *pUnion = aUnions[i];
+            SwSelUnion *pUnion = &aUnions[i];
             SwTabFrm *pTab = pUnion->GetTable();
             SvPtrarr aCellArr( 255 );
             ::lcl_CollectCells( aCellArr, pUnion->GetUnion(), pTab );
@@ -917,7 +917,7 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const
     SwSelUnions aUnions;
     ::MakeSelUnions( aUnions, pStart, pEnd );
 
-    if( aUnions.Count() )
+    if( !aUnions.empty() )
     {
         SvxBoxItem     aSetBox    ((const SvxBoxItem    &) rSet.Get(RES_BOX    ));
         SvxBoxInfoItem aSetBoxInfo((const SvxBoxInfoItem&) rSet.Get(SID_ATTR_BORDER_INNER));
@@ -932,13 +932,13 @@ void SwDoc::GetTabBorders( const SwCursor& rCursor, SfxItemSet& rSet ) const
 
         aSetBoxInfo.ResetFlags();
 
-        for ( sal_uInt16 i = 0; i < aUnions.Count(); ++i )
+        for ( sal_uInt16 i = 0; i < aUnions.size(); ++i )
         {
-            SwSelUnion *pUnion = aUnions[i];
+            SwSelUnion *pUnion = &aUnions[i];
             const SwTabFrm *pTab = pUnion->GetTable();
             const SwRect &rUnion = pUnion->GetUnion();
             const sal_Bool bFirst = i == 0 ? sal_True : sal_False;
-            const sal_Bool bLast  = i == aUnions.Count() - 1 ? sal_True : sal_False;
+            const sal_Bool bLast  = i == aUnions.size() - 1 ? sal_True : sal_False;
 
             SvPtrarr aCellArr( 255 );
             ::lcl_CollectCells( aCellArr, rUnion, (SwTabFrm*)pTab );
@@ -1375,9 +1375,9 @@ void lcl_CalcColValues( std::vector<sal_uInt16> &rToFill, const SwTabCols &rCols
     ::MakeSelUnions( aUnions, pStart, pEnd,
                     bWishValues ? nsSwTblSearchType::TBLSEARCH_NONE : nsSwTblSearchType::TBLSEARCH_COL );
 
-    for ( sal_uInt16 i2 = 0; i2 < aUnions.Count(); ++i2 )
+    for ( sal_uInt16 i2 = 0; i2 < aUnions.size(); ++i2 )
     {
-        SwSelUnion *pSelUnion = aUnions[i2];
+        SwSelUnion *pSelUnion = &aUnions[i2];
         const SwTabFrm *pTab = pSelUnion->GetTable();
         const SwRect &rUnion = pSelUnion->GetUnion();
 
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index 6e7cce2..9e5253e 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -293,9 +293,9 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
         const SwCellFrm* pCurrentBottomRightFrm  = 0;
 
         // Now find boxes for each entry and emit
-        for( i = 0; i < aUnions.Count() && bTblIsValid; ++i )
+        for( i = 0; i < aUnions.size() && bTblIsValid; ++i )
         {
-            SwSelUnion *pUnion = aUnions[i];
+            SwSelUnion *pUnion = &aUnions[i];
             const SwTabFrm *pTable = pUnion->GetTable();
             if( !pTable->IsValid() && nLoopMax )
             {
@@ -408,7 +408,7 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
         SwDeletionChecker aDelCheck( pStart );
 
         // otherwise quickly "calculate" the table layout and start over
-        SwTabFrm *pTable = aUnions[0]->GetTable();
+        SwTabFrm *pTable = aUnions.front().GetTable();
         while( pTable )
         {
             if( pTable->IsValid() )
@@ -492,10 +492,10 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd )
         ::MakeSelUnions( aUnions, pStart, pEnd, nsSwTblSearchType::TBLSEARCH_NO_UNION_CORRECT );
 
         // find boxes for each entry and emit
-        for( i = 0; i < aUnions.Count() && bTblIsValid &&
+        for( i = 0; i < aUnions.size() && bTblIsValid &&
                                     bValidChartSel; ++i )
         {
-            SwSelUnion *pUnion = aUnions[i];
+            SwSelUnion *pUnion = &aUnions[i];
             const SwTabFrm *pTable = pUnion->GetTable();
 
             SWRECTFN( pTable )
@@ -650,8 +650,8 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd )
             break;
 
         // otherwise quickly "calculate" table layout and start over
-        SwTabFrm *pTable = aUnions[0]->GetTable();
-        for( i = 0; i < aUnions.Count(); ++i )
+        SwTabFrm *pTable = aUnions.front().GetTable();
+        for( i = 0; i < aUnions.size(); ++i )
         {
             if( pTable->IsValid() )
                 pTable->InvalidatePos();
@@ -718,9 +718,9 @@ sal_Bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
     sal_uInt16 i;
 
     // 1. check if box above contains value/formula
-    for( i = 0; i < aUnions.Count(); ++i )
+    for( i = 0; i < aUnions.size(); ++i )
     {
-        SwSelUnion *pUnion = aUnions[i];
+        SwSelUnion *pUnion = &aUnions[i];
         const SwTabFrm *pTable = pUnion->GetTable();
 
         // Skip any repeated headlines in the follow:
@@ -771,7 +771,7 @@ sal_Bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
             }
             if( bFound )
             {
-                i = aUnions.Count();
+                i = aUnions.size();
                 break;
             }
             pRow = (const SwLayoutFrm*)pRow->GetNext();
@@ -785,12 +785,12 @@ sal_Bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
         bFound = sal_False;
 
         rBoxes.clear();
-        aUnions.DeleteAndDestroy( 0, aUnions.Count() );
+        aUnions.clear();
         ::MakeSelUnions( aUnions, pStart, pEnd, nsSwTblSearchType::TBLSEARCH_ROW );
 
-        for( i = 0; i < aUnions.Count(); ++i )
+        for( i = 0; i < aUnions.size(); ++i )
         {
-            SwSelUnion *pUnion = aUnions[i];
+            SwSelUnion *pUnion = &aUnions[i];
             const SwTabFrm *pTable = pUnion->GetTable();
 
             // Skip any repeated headlines in the follow:
@@ -839,7 +839,7 @@ sal_Bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
                 }
                 if( !bTstRow )
                 {
-                    i = aUnions.Count();
+                    i = aUnions.size();
                     break;
                 }
 
@@ -947,10 +947,10 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
     // First, compute tables and rectangles
     SwSelUnions aUnions;
     ::MakeSelUnions( aUnions, pStart, pEnd );
-    if( !aUnions.Count() )
+    if( aUnions.empty() )
         return;
 
-    const SwTable *pTable = aUnions[0]->GetTable()->GetTable();
+    const SwTable *pTable = aUnions.front().GetTable()->GetTable();
     SwDoc* pDoc = (SwDoc*)pStart->GetFmt()->GetDoc();
     SwTableNode* pTblNd = (SwTableNode*)pTable->GetTabSortBoxes()[ 0 ]->
                                         GetSttNd()->FindTableNode();
@@ -961,11 +961,11 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
 
     SWRECTFN( pStart->GetUpper() )
 
-    for ( sal_uInt16 i = 0; i < aUnions.Count(); ++i )
+    for ( sal_uInt16 i = 0; i < aUnions.size(); ++i )
     {
-        const SwTabFrm *pTabFrm = aUnions[i]->GetTable();
+        const SwTabFrm *pTabFrm = aUnions[i].GetTable();
 
-        SwRect &rUnion = aUnions[i]->GetUnion();
+        SwRect &rUnion = aUnions[i].GetUnion();
 
         // Skip any repeated headlines in the follow:
         const SwLayoutFrm* pRow = pTabFrm->IsFollow() ?
@@ -1511,10 +1511,6 @@ sal_uInt16 CheckMergeSel( const SwSelBoxes& rBoxes )
     return eRet;
 }
 
-// Determines tables affected by a table selection and union rectangles
-// of the selection (also for split tables)
-SV_IMPL_PTRARR( SwSelUnions, SwSelUnion* );
-
 SwTwips lcl_CalcWish( const SwLayoutFrm *pCell, long nWish,
                                                 const long nAct )
 {
@@ -1955,7 +1951,7 @@ void MakeSelUnions( SwSelUnions& rUnions, const SwLayoutFrm *pStart,
         if( (aUnion.*fnRect->fnGetWidth)() )
         {
             SwSelUnion *pTmp = new SwSelUnion( aUnion, (SwTabFrm*)pTable );
-            rUnions.C40_INSERT( SwSelUnion, pTmp, rUnions.Count() );
+            rUnions.push_back( pTmp );
         }
 
         pTable = pTable->GetFollow();
@@ -2005,9 +2001,9 @@ sal_Bool CheckSplitCells( const SwCursor& rCrsr, sal_uInt16 nDiv,
     ::MakeSelUnions( aUnions, pStart, pEnd, eSearchType );
 
     // now search boxes for each entry and emit
-    for ( sal_uInt16 i = 0; i < aUnions.Count(); ++i )
+    for ( sal_uInt16 i = 0; i < aUnions.size(); ++i )
     {
-        SwSelUnion *pUnion = aUnions[i];
+        SwSelUnion *pUnion = &aUnions[i];
         const SwTabFrm *pTable = pUnion->GetTable();
 
         // Skip any repeated headlines in the follow:
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index d2c3d4e..00b4960 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -1922,9 +1922,9 @@ bool SwRootFrm::MakeTblCrsrs( SwTableCursor& rTblCrsr )
 
         const sal_Bool bReadOnlyAvailable = rTblCrsr.IsReadOnlyAvailable();
 
-        for ( sal_uInt16 i = 0; i < aUnions.Count(); ++i )
+        for ( sal_uInt16 i = 0; i < aUnions.size(); ++i )
         {
-            SwSelUnion *pUnion = aUnions[i];
+            SwSelUnion *pUnion = &aUnions[i];
             const SwTabFrm *pTable = pUnion->GetTable();
 
             // Skip any repeated headlines in the follow:
commit 7cd899bc6cdf885837f77e7250c21a0995a75aab
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Apr 25 11:55:03 2012 +0200

    Remove data structures there dead i.e. not doing any actual work

diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx
index 24fb199..f6de56e 100644
--- a/sw/inc/swtable.hxx
+++ b/sw/inc/swtable.hxx
@@ -53,8 +53,6 @@ class SwTabCols;
 class SwDoc;
 class SwSelBoxes;
 class SwTblCalcPara;
-class SwChartBoxes;
-class SwChartLines;
 struct SwPosition;
 class SwNodeIndex;
 class SwNode;
@@ -285,8 +283,7 @@ public:
     sal_Bool IsTblComplex() const;
 
     // Returns sal_True if table or selection is balanced.
-    sal_Bool IsTblComplexForChart( const String& rSel,
-                                SwChartLines* pGetCLines = 0  ) const;
+    sal_Bool IsTblComplexForChart( const String& rSel ) const;
 
     // Search all content-bearing boxes of the base line on which this box stands.
     // rBoxes as a return value for immediate use.
diff --git a/sw/inc/tblsel.hxx b/sw/inc/tblsel.hxx
index e177d1a..6621d55 100644
--- a/sw/inc/tblsel.hxx
+++ b/sw/inc/tblsel.hxx
@@ -130,11 +130,7 @@ sal_Bool GetAutoSumSel( const SwCrsrShell&, SwCellFrms& );
 sal_Bool HasProtectedCells( const SwSelBoxes& rBoxes );
 
 // Check if selection is balanced.
-class SwChartBoxes : public std::vector<SwTableBoxPtr> {};
-class SwChartLines : public boost::ptr_vector<SwChartBoxes> {};
-
-sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
-                    SwChartLines* pGetCLines = 0 );
+sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd);
 
 // Check if cell is part of SSelection.
 // (Became a function, in order to make sure that GetTblSel() and MakeTblCrsr()
diff --git a/sw/source/core/doc/docchart.cxx b/sw/source/core/doc/docchart.cxx
index 22ed3f8..92df356 100644
--- a/sw/source/core/doc/docchart.cxx
+++ b/sw/source/core/doc/docchart.cxx
@@ -64,8 +64,7 @@ void SwTable::UpdateCharts() const
     GetFrmFmt()->GetDoc()->UpdateCharts( GetFrmFmt()->GetName() );
 }
 
-sal_Bool SwTable::IsTblComplexForChart( const String& rSelection,
-                                    SwChartLines* pGetCLines ) const
+sal_Bool SwTable::IsTblComplexForChart( const String& rSelection ) const
 {
     const SwTableBox* pSttBox, *pEndBox;
     if( 2 < rSelection.Len() )
@@ -101,7 +100,7 @@ sal_Bool SwTable::IsTblComplexForChart( const String& rSelection,
     }
 
     return !pSttBox || !pEndBox || !::ChkChartSel( *pSttBox->GetSttNd(),
-                                        *pEndBox->GetSttNd(), pGetCLines );
+                                        *pEndBox->GetSttNd() );
 }
 
 void SwDoc::DoUpdateAllCharts()
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index 72c9cd6..6e7cce2 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -437,8 +437,7 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
 
 
 
-sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
-                    SwChartLines* pGetCLines )
+sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd )
 {
     const SwTableNode* pTNd = rSttNd.FindTableNode();
     if( !pTNd )
@@ -645,25 +644,6 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
                 else if( nRowCells != nCellCnt )
                     bValidChartSel = sal_False;
             }
-
-            if( bValidChartSel && pGetCLines )
-            {
-                nYPos = LONG_MAX;
-                SwChartBoxes* pBoxes = 0;
-                for( n = 0; n < aCellFrms.size(); ++n )
-                {
-                    const _Sort_CellFrm& rCF = aCellFrms[ n ];
-                    if( (rCF.pFrm->Frm().*fnRect->fnGetTop)() != nYPos )
-                    {
-                        pBoxes = new SwChartBoxes();
-                        pBoxes->reserve( 255 < nRowCells ? 255 : (sal_uInt8)nRowCells);
-                        pGetCLines->push_back( pBoxes );
-                        nYPos = (rCF.pFrm->Frm().*fnRect->fnGetTop)();
-                    }
-                    SwTableBoxPtr pBox = (SwTableBox*)rCF.pFrm->GetTabBox();
-                    pBoxes->push_back( pBox );
-                }
-            }
         }
 
         if( bTblIsValid )
@@ -682,15 +662,10 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
                 break;
         }
         --nLoopMax;
-        if( pGetCLines )
-            pGetCLines->clear();
     } while( sal_True );
 
     OSL_ENSURE( nLoopMax, "table layout is still invalid!" );
 
-    if( !bValidChartSel && pGetCLines )
-        pGetCLines->clear();
-
     return bValidChartSel;
 }
 
commit 40bd5dab1d8c35a722f4ce2337e6ae1fae3cddc1
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Apr 25 11:55:02 2012 +0200

    Convert SV_DECL_PTRARR(SwChartBoxes) to std::vector

diff --git a/sw/inc/tblsel.hxx b/sw/inc/tblsel.hxx
index 25d5d8e..e177d1a 100644
--- a/sw/inc/tblsel.hxx
+++ b/sw/inc/tblsel.hxx
@@ -130,7 +130,7 @@ sal_Bool GetAutoSumSel( const SwCrsrShell&, SwCellFrms& );
 sal_Bool HasProtectedCells( const SwSelBoxes& rBoxes );
 
 // Check if selection is balanced.
-SV_DECL_PTRARR( SwChartBoxes, SwTableBoxPtr, 16)
+class SwChartBoxes : public std::vector<SwTableBoxPtr> {};
 class SwChartLines : public boost::ptr_vector<SwChartBoxes> {};
 
 sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index f4e0ac1..72c9cd6 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -115,8 +115,6 @@ struct _Sort_CellFrm
 
 typedef std::deque< _Sort_CellFrm > _Sort_CellFrms;
 
-SV_IMPL_PTRARR( SwChartBoxes, SwTableBoxPtr );
-
 const SwLayoutFrm *lcl_FindCellFrm( const SwLayoutFrm *pLay )
 {
     while ( pLay && !pLay->IsCellFrm() )
@@ -657,13 +655,13 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
                     const _Sort_CellFrm& rCF = aCellFrms[ n ];
                     if( (rCF.pFrm->Frm().*fnRect->fnGetTop)() != nYPos )
                     {
-                        pBoxes = new SwChartBoxes( 255 < nRowCells
-                                                    ? 255 : (sal_uInt8)nRowCells);
+                        pBoxes = new SwChartBoxes();
+                        pBoxes->reserve( 255 < nRowCells ? 255 : (sal_uInt8)nRowCells);
                         pGetCLines->push_back( pBoxes );
                         nYPos = (rCF.pFrm->Frm().*fnRect->fnGetTop)();
                     }
                     SwTableBoxPtr pBox = (SwTableBox*)rCF.pFrm->GetTabBox();
-                    pBoxes->Insert( pBox, pBoxes->Count() );
+                    pBoxes->push_back( pBox );
                 }
             }
         }
commit d93db90e19923b524d4c6f9cdfe0544f1dc46d22
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Apr 25 11:55:01 2012 +0200

    Convert SV_DECL_PTRARR_DEL(SwChartLines) to boost::ptr_vector
    
    Had to use a class for the typedef declaration because the data
    structure is referenced in other header files.

diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx
index 6473986..24fb199 100644
--- a/sw/inc/swtable.hxx
+++ b/sw/inc/swtable.hxx
@@ -53,6 +53,7 @@ class SwTabCols;
 class SwDoc;
 class SwSelBoxes;
 class SwTblCalcPara;
+class SwChartBoxes;
 class SwChartLines;
 struct SwPosition;
 class SwNodeIndex;
diff --git a/sw/inc/tblsel.hxx b/sw/inc/tblsel.hxx
index d5ec831..25d5d8e 100644
--- a/sw/inc/tblsel.hxx
+++ b/sw/inc/tblsel.hxx
@@ -131,7 +131,7 @@ sal_Bool HasProtectedCells( const SwSelBoxes& rBoxes );
 
 // Check if selection is balanced.
 SV_DECL_PTRARR( SwChartBoxes, SwTableBoxPtr, 16)
-SV_DECL_PTRARR_DEL( SwChartLines, SwChartBoxes*, 25 )
+class SwChartLines : public boost::ptr_vector<SwChartBoxes> {};
 
 sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
                     SwChartLines* pGetCLines = 0 );
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index 12998fe..f4e0ac1 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -116,7 +116,6 @@ struct _Sort_CellFrm
 typedef std::deque< _Sort_CellFrm > _Sort_CellFrms;
 
 SV_IMPL_PTRARR( SwChartBoxes, SwTableBoxPtr );
-SV_IMPL_PTRARR( SwChartLines, SwChartBoxes* );
 
 const SwLayoutFrm *lcl_FindCellFrm( const SwLayoutFrm *pLay )
 {
@@ -660,7 +659,7 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
                     {
                         pBoxes = new SwChartBoxes( 255 < nRowCells
                                                     ? 255 : (sal_uInt8)nRowCells);
-                        pGetCLines->C40_INSERT( SwChartBoxes, pBoxes, pGetCLines->Count() );
+                        pGetCLines->push_back( pBoxes );
                         nYPos = (rCF.pFrm->Frm().*fnRect->fnGetTop)();
                     }
                     SwTableBoxPtr pBox = (SwTableBox*)rCF.pFrm->GetTabBox();
@@ -686,13 +685,13 @@ sal_Bool ChkChartSel( const SwNode& rSttNd, const SwNode& rEndNd,
         }
         --nLoopMax;
         if( pGetCLines )
-            pGetCLines->DeleteAndDestroy( 0, pGetCLines->Count() );
+            pGetCLines->clear();
     } while( sal_True );
 
     OSL_ENSURE( nLoopMax, "table layout is still invalid!" );
 
     if( !bValidChartSel && pGetCLines )
-        pGetCLines->DeleteAndDestroy( 0, pGetCLines->Count() );
+        pGetCLines->clear();
 
     return bValidChartSel;
 }
commit 07f4021c9a22f5acc91d362b796ee6f16b6fe3aa
Author: Michael Stahl <mstahl at redhat.com>
Date:   Wed Apr 25 11:54:41 2012 +0200

    move some functions from tblrwcl.hxx into cxx files

diff --git a/sw/source/core/doc/gctable.cxx b/sw/source/core/doc/gctable.cxx
index 4764f94..d61151c 100644
--- a/sw/source/core/doc/gctable.cxx
+++ b/sw/source/core/doc/gctable.cxx
@@ -336,7 +336,9 @@ struct _GCLinePara
     {}
 };
 
-sal_Bool lcl_MergeGCBox( const SwTableBox*& rpTblBox, void* pPara )
+static bool lcl_MergeGCLine(const SwTableLine*& rpLine, void*const pPara);
+
+static bool lcl_MergeGCBox(const SwTableBox*& rpTblBox, void*const pPara)
 {
     SwTableBox*& rpBox = (SwTableBox*&)rpTblBox;
     sal_uInt16 n, nLen = rpBox->GetTabLines().Count();
@@ -364,13 +366,13 @@ sal_Bool lcl_MergeGCBox( const SwTableBox*& rpTblBox, void* pPara )
             // Delete the old Box with the Line
             pInsLine->GetTabBoxes().DeleteAndDestroy( nInsPos );
 
-            return sal_False; // set up anew
+            return false; // set up anew

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list