Kaydet (Commit) d93db90e authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Michael Stahl

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.
üst 07f4021c
......@@ -53,6 +53,7 @@ class SwTabCols;
class SwDoc;
class SwSelBoxes;
class SwTblCalcPara;
class SwChartBoxes;
class SwChartLines;
struct SwPosition;
class SwNodeIndex;
......
......@@ -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 );
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment