summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/ww8par2.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-05-10 17:42:10 +0200
committerMichael Stahl <mstahl@redhat.com>2012-05-14 19:49:15 +0200
commitb8ace0f986769cc952718ab5e262808d899d5549 (patch)
treede7a7ee9ba280585506a4429a57af862aa79c938 /sw/source/filter/ww8/ww8par2.cxx
parent5031e17d4b11181be94448702b1026bd38e0b3c4 (diff)
Convert SV_DECL_PTRARR_DEL(SwTableBoxes) to std::vector
I added a GetPos() method because quite a lot of code used that method and the existing code is quite tied to the precise return values of that method. Change-Id: I9af6b923d978abe758b63d835f228495c020455a
Diffstat (limited to 'sw/source/filter/ww8/ww8par2.cxx')
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index e53a528d8fe4..1b5bd7588a0b 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -2577,9 +2577,9 @@ void WW8TabDesc::MergeCells()
sal_uInt16 nCol = pActBand->nTransCell[ i ];
if (!pActBand->bExist[i])
continue;
- OSL_ENSURE(nCol < pTabBoxes->Count(),
+ OSL_ENSURE(nCol < pTabBoxes->size(),
"Too few columns, table ended early");
- if (nCol >= pTabBoxes->Count())
+ if (nCol >= pTabBoxes->size())
return;
pTabBox = (*pTabBoxes)[nCol];
WW8_TCell& rCell = pActBand->pTCs[ i ];
@@ -2683,7 +2683,7 @@ void WW8TabDesc::ParkPaM()
if (SwTableLine *pLine = (*pTabLines)[nRow])
{
SwTableBoxes &rBoxes = pLine->GetTabBoxes();
- pTabBox2 = rBoxes.Count() ? rBoxes[0] : 0;
+ pTabBox2 = rBoxes.empty() ? 0 : rBoxes.front();
}
}
@@ -2880,7 +2880,7 @@ bool WW8TabDesc::SetPamInCell(short nWwCol, bool bPam)
pTabLine = (*pTabLines)[nAktRow];
pTabBoxes = &pTabLine->GetTabBoxes();
- if (nCol >= pTabBoxes->Count())
+ if (nCol >= pTabBoxes->size())
{
if (bPam)
{
@@ -2974,7 +2974,7 @@ void WW8TabDesc::InsertCells( short nIns )
pTabBox = (*pTabBoxes)[0];
pIo->rDoc.GetNodes().InsBoxen( pTblNd, pTabLine, (SwTableBoxFmt*)pTabBox->GetFrmFmt(),
- (SwTxtFmtColl*)pIo->pDfltTxtFmtColl, 0, pTabBoxes->Count(), nIns );
+ (SwTxtFmtColl*)pIo->pDfltTxtFmtColl, 0, pTabBoxes->size(), nIns );
// mit dem Dritten Parameter wird das FrmFmt der Boxen angegeben.
// hier kann man auch noch optimieren, um FrmFmts zu sparen
}
@@ -3130,7 +3130,7 @@ void WW8TabDesc::AdjustNewBand()
InsertCells( pActBand->nSwCols - nDefaultSwCols );
SetPamInCell( 0, false);
- OSL_ENSURE( pTabBoxes && pTabBoxes->Count() == (sal_uInt16)pActBand->nSwCols,
+ OSL_ENSURE( pTabBoxes && pTabBoxes->size() == (sal_uInt16)pActBand->nSwCols,
"Falsche Spaltenzahl in Tabelle" );
if( bClaimLineFmt )