summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-04-25 11:55:01 +0200
committerMichael Stahl <mstahl@redhat.com>2012-04-25 12:35:32 +0200
commitd93db90e19923b524d4c6f9cdfe0544f1dc46d22 (patch)
tree4cdfad75c392d2adbce1e4685a8b7093bd4b0375 /sw
parent07f4021c9a22f5acc91d362b796ee6f16b6fe3aa (diff)
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.
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/swtable.hxx1
-rw-r--r--sw/inc/tblsel.hxx2
-rw-r--r--sw/source/core/frmedt/tblsel.cxx7
3 files changed, 5 insertions, 5 deletions
diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx
index 6473986640d2..24fb1990b99f 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 d5ec8313a57b..25d5d8e87b87 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 12998fe0ba1c..f4e0ac176877 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;
}