summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-07-19 14:03:42 +0200
committerMichael Stahl <mstahl@redhat.com>2012-07-26 14:30:09 +0200
commitdeaa69b1558ef76f5338a714fdedaeccf9394096 (patch)
treeaca62c2ec074c3418aefa4046cf9b1a935ddda3f /sw/source
parent5c47e5f63a79a9e72ec4a100786b1bbf65137ed4 (diff)
Convert SV_DECL_PTRARR_SORT(SwSelBoxes) to o3tl::sorted_vector
Change-Id: I4af9e86257a9e40b91351fd34ac70fe053d02367
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/access/acccell.cxx2
-rw-r--r--sw/source/core/access/acctable.cxx6
-rw-r--r--sw/source/core/crsr/swcrsr.cxx28
-rw-r--r--sw/source/core/crsr/trvltbl.cxx12
-rw-r--r--sw/source/core/crsr/unocrsr.cxx2
-rw-r--r--sw/source/core/crsr/viscrs.cxx12
-rw-r--r--sw/source/core/doc/doclay.cxx4
-rw-r--r--sw/source/core/doc/docsort.cxx4
-rw-r--r--sw/source/core/doc/tblcpy.cxx18
-rw-r--r--sw/source/core/doc/tblrwcl.cxx71
-rw-r--r--sw/source/core/docnode/ndtbl.cxx46
-rw-r--r--sw/source/core/docnode/ndtbl1.cxx12
-rw-r--r--sw/source/core/edit/edglss.cxx4
-rw-r--r--sw/source/core/edit/edtab.cxx8
-rw-r--r--sw/source/core/fields/cellfml.cxx15
-rw-r--r--sw/source/core/frmedt/fecopy.cxx6
-rw-r--r--sw/source/core/frmedt/fefly1.cxx2
-rw-r--r--sw/source/core/frmedt/fetab.cxx55
-rw-r--r--sw/source/core/frmedt/tblsel.cxx73
-rw-r--r--sw/source/core/inc/tblrwcl.hxx6
-rw-r--r--sw/source/core/layout/trvlfrm.cxx2
-rw-r--r--sw/source/core/table/swnewtable.cxx72
-rw-r--r--sw/source/core/undo/untbl.cxx16
-rw-r--r--sw/source/core/unocore/unochart.cxx6
-rw-r--r--sw/source/core/unocore/unotbl.cxx10
-rw-r--r--sw/source/filter/ww1/fltshell.cxx7
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx8
27 files changed, 228 insertions, 279 deletions
diff --git a/sw/source/core/access/acccell.cxx b/sw/source/core/access/acccell.cxx
index 275e5ab4b43e..4c6b622c725e 100644
--- a/sw/source/core/access/acccell.cxx
+++ b/sw/source/core/access/acccell.cxx
@@ -72,7 +72,7 @@ sal_Bool SwAccessibleCell::IsSelected()
static_cast< const SwCellFrm * >( GetFrm() );
SwTableBox *pBox =
const_cast< SwTableBox *>( pCFrm->GetTabBox() ); //SVPtrArr!
- bRet = pCSh->GetTableCrsr()->GetBoxes().Seek_Entry( pBox );
+ bRet = pCSh->GetTableCrsr()->GetBoxes().find( pBox ) != pCSh->GetTableCrsr()->GetBoxes().end();
}
}
diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx
index 66533c6e3231..744b42e0e98c 100644
--- a/sw/source/core/access/acctable.cxx
+++ b/sw/source/core/access/acctable.cxx
@@ -295,7 +295,7 @@ void SwAccessibleTableData_Impl::GetSelection(
static_cast < const SwCellFrm * >( pLower );
SwTableBox *pBox =
const_cast< SwTableBox *>( pCFrm->GetTabBox() ); //SVPtrArr!
- if( !rSelBoxes.Seek_Entry( pBox ) )
+ if( rSelBoxes.find( pBox ) == rSelBoxes.end() )
{
const Int32Set_Impl rRowsOrCols =
bColumns ? maColumns : maRows;
@@ -659,7 +659,7 @@ sal_Bool SwAccessibleTable::IsChildSelected( sal_Int32 nChildIndex ) const
{
const SwTableBox* pBox = GetTableBox( nChildIndex );
OSL_ENSURE( pBox != NULL, "We need the table box." );
- bRet = pSelBoxes->Seek_Entry( const_cast<SwTableBox*>( pBox ) );
+ bRet = pSelBoxes->find( const_cast<SwTableBox*>( pBox ) ) != pSelBoxes->end();
}
return bRet;
@@ -1199,7 +1199,7 @@ sal_Bool SAL_CALL SwAccessibleTable::isAccessibleSelected(
const SwCellFrm *pCFrm = static_cast < const SwCellFrm * >( pFrm );
SwTableBox *pBox =
const_cast< SwTableBox *>( pCFrm->GetTabBox() ); //SVPtrArr!
- bRet = pSelBoxes->Seek_Entry( pBox );
+ bRet = pSelBoxes->find( pBox ) != pSelBoxes->end();
}
}
diff --git a/sw/source/core/crsr/swcrsr.cxx b/sw/source/core/crsr/swcrsr.cxx
index 6e1098363318..ff8a90b64bbb 100644
--- a/sw/source/core/crsr/swcrsr.cxx
+++ b/sw/source/core/crsr/swcrsr.cxx
@@ -2102,7 +2102,7 @@ sal_Bool lcl_SeekEntry( const SwSelBoxes& rTmp, const SwStartNode* pSrch, sal_uI
{
sal_uLong nIdx = pSrch->GetIndex();
- sal_uInt16 nO = rTmp.Count();
+ sal_uInt16 nO = rTmp.size();
if( nO > 0 )
{
nO--;
@@ -2145,8 +2145,7 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr )
// create temporary copies so that all boxes that
// have already cursors can be removed
- SwSelBoxes aTmp;
- aTmp.Insert( &aSelBoxes );
+ SwSelBoxes aTmp( aSelBoxes );
// compare old and new ones
SwNodes& rNds = pAktCrsr->GetDoc()->GetNodes();
@@ -2181,7 +2180,7 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr )
pPos->nNode = *pNd;
pPos->nContent.Assign( (SwCntntNode*)pNd, ((SwCntntNode*)pNd)->Len() );
- aTmp.Remove( nPos );
+ aTmp.erase( aTmp.begin() + nPos );
}
else
bDel = sal_True;
@@ -2198,7 +2197,7 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr )
}
} while ( pAktCrsr != pCur );
- for( nPos = 0; nPos < aTmp.Count(); ++nPos )
+ for( nPos = 0; nPos < aTmp.size(); ++nPos )
{
pSttNd = aTmp[ nPos ]->GetSttNd();
@@ -2239,7 +2238,7 @@ SwCursor* SwTableCursor::MakeBoxSels( SwCursor* pAktCrsr )
void SwTableCursor::InsertBox( const SwTableBox& rTblBox )
{
SwTableBox* pBox = (SwTableBox*)&rTblBox;
- aSelBoxes.Insert( pBox );
+ aSelBoxes.insert( pBox );
bChg = sal_True;
}
@@ -2255,8 +2254,7 @@ bool SwTableCursor::NewTableSelection()
pTableNode->GetTable().IsNewModel() )
{
bRet = true;
- SwSelBoxes aNew;
- aNew.Insert( &aSelBoxes );
+ SwSelBoxes aNew( aSelBoxes );
pTableNode->GetTable().CreateSelection( pStart, pEnd, aNew,
SwTable::SEARCH_NONE, false );
ActualizeSelection( aNew );
@@ -2268,10 +2266,10 @@ bool SwTableCursor::NewTableSelection()
void SwTableCursor::ActualizeSelection( const SwSelBoxes &rNew )
{
sal_uInt16 nOld = 0, nNew = 0;
- while ( nOld < aSelBoxes.Count() && nNew < rNew.Count() )
+ while ( nOld < aSelBoxes.size() && nNew < rNew.size() )
{
- const SwTableBox* pPOld = *( aSelBoxes.GetData() + nOld );
- const SwTableBox* pPNew = *( rNew.GetData() + nNew );
+ const SwTableBox* pPOld = aSelBoxes[ nOld ];
+ const SwTableBox* pPNew = rNew[ nNew ];
if( pPOld == pPNew )
{ // this box will stay
++nOld;
@@ -2287,11 +2285,11 @@ void SwTableCursor::ActualizeSelection( const SwSelBoxes &rNew )
}
}
- while( nOld < aSelBoxes.Count() )
+ while( nOld < aSelBoxes.size() )
DeleteBox( nOld ); // some more to delete
- for( ; nNew < rNew.Count(); ++nNew ) // some more to insert
- InsertBox( **( rNew.GetData() + nNew ) );
+ for( ; nNew < rNew.size(); ++nNew ) // some more to insert
+ InsertBox( *rNew[ nNew ] );
}
sal_Bool SwTableCursor::IsCrsrMovedUpdt()
@@ -2330,7 +2328,7 @@ void SwTableCursor::ParkCrsr()
sal_Bool SwTableCursor::HasReadOnlyBoxSel() const
{
sal_Bool bRet = sal_False;
- for( sal_uInt16 n = aSelBoxes.Count(); n; )
+ for( sal_uInt16 n = aSelBoxes.size(); n; )
if( aSelBoxes[ --n ]->GetFrmFmt()->GetProtect().IsCntntProtected() )
{
bRet = sal_True;
diff --git a/sw/source/core/crsr/trvltbl.cxx b/sw/source/core/crsr/trvltbl.cxx
index 2defc1b7d224..eb400e5c2a6f 100644
--- a/sw/source/core/crsr/trvltbl.cxx
+++ b/sw/source/core/crsr/trvltbl.cxx
@@ -165,11 +165,11 @@ sal_Bool SwCrsrShell::_SelTblRowOrCol( bool bRow, bool bRowSimple )
{
GetTblSel( *this, aBoxes, eType );
- if( !aBoxes.Count() )
+ if( aBoxes.empty() )
return sal_False;
pStt = aBoxes[0];
- pEnd = aBoxes[aBoxes.Count() - 1];
+ pEnd = aBoxes.back();
}
// #i32329# Enhanced table selection
else if ( pTable->IsNewModel() )
@@ -177,11 +177,11 @@ sal_Bool SwCrsrShell::_SelTblRowOrCol( bool bRow, bool bRowSimple )
const SwShellCrsr *pCrsr = _GetCrsr();
SwTable::SearchType eSearchType = bRow ? SwTable::SEARCH_ROW : SwTable::SEARCH_COL;
pTable->CreateSelection( *pCrsr, aBoxes, eSearchType, bCheckProtected );
- if( !aBoxes.Count() )
+ if( aBoxes.empty() )
return sal_False;
pStt = aBoxes[0];
- pEnd = aBoxes[aBoxes.Count() - 1];
+ pEnd = aBoxes.back();
}
else
{
@@ -213,13 +213,13 @@ sal_Bool SwCrsrShell::_SelTblRowOrCol( bool bRow, bool bRowSimple )
static_cast<const SwCellFrm*>(pEndFrm),
aBoxes, bSelectUp ? 0 : &aCells, eType );
- if( !aBoxes.Count() || ( !bSelectUp && 4 != aCells.size() ) )
+ if( aBoxes.empty() || ( !bSelectUp && 4 != aCells.size() ) )
return sal_False;
if ( bSelectUp )
{
pStt = aBoxes[0];
- pEnd = aBoxes[aBoxes.Count() - 1];
+ pEnd = aBoxes.back();
}
else
{
diff --git a/sw/source/core/crsr/unocrsr.cxx b/sw/source/core/crsr/unocrsr.cxx
index a86caec73e37..571c3136cfb3 100644
--- a/sw/source/core/crsr/unocrsr.cxx
+++ b/sw/source/core/crsr/unocrsr.cxx
@@ -235,7 +235,7 @@ void SwUnoTableCrsr::MakeBoxSels()
{
SwSelBoxes& rTmpBoxes = (SwSelBoxes&)GetBoxes();
sal_uInt16 nCount = 0;
- while( nCount < rTmpBoxes.Count() )
+ while( nCount < rTmpBoxes.size() )
DeleteBox( nCount );
}
diff --git a/sw/source/core/crsr/viscrs.cxx b/sw/source/core/crsr/viscrs.cxx
index 95a55210cc77..139461ceed0d 100644
--- a/sw/source/core/crsr/viscrs.cxx
+++ b/sw/source/core/crsr/viscrs.cxx
@@ -637,15 +637,15 @@ void SwShellTableCrsr::SaveTblBoxCntnt( const SwPosition* pPos )
void SwShellTableCrsr::FillRects()
{
// Calculate the new rectangles. If the cursor is still "parked" do nothing
- if( !aSelBoxes.Count() || bParked ||
+ if( aSelBoxes.empty() || bParked ||
!GetPoint()->nNode.GetIndex() )
return;
SwRegionRects aReg( GetShell()->VisArea() );
SwNodes& rNds = GetDoc()->GetNodes();
- for( sal_uInt16 n = 0; n < aSelBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aSelBoxes.size(); ++n )
{
- const SwStartNode* pSttNd = (*(aSelBoxes.GetData() + n ))->GetSttNd();
+ const SwStartNode* pSttNd = aSelBoxes[n]->GetSttNd();
const SwTableNode* pSelTblNd = pSttNd->FindTableNode();
SwNodeIndex aIdx( *pSttNd );
@@ -688,14 +688,14 @@ void SwShellTableCrsr::FillRects()
sal_Bool SwShellTableCrsr::IsInside( const Point& rPt ) const
{
// Calculate the new rectangles. If the cursor is still "parked" do nothing
- if( !aSelBoxes.Count() || bParked ||
+ if( aSelBoxes.empty() || bParked ||
!GetPoint()->nNode.GetIndex() )
return sal_False;
SwNodes& rNds = GetDoc()->GetNodes();
- for( sal_uInt16 n = 0; n < aSelBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aSelBoxes.size(); ++n )
{
- SwNodeIndex aIdx( *(*(aSelBoxes.GetData() + n ))->GetSttNd() );
+ SwNodeIndex aIdx( *aSelBoxes[ n ]->GetSttNd() );
SwCntntNode* pCNd = rNds.GoNextSection( &aIdx, sal_True, sal_False );
if( !pCNd )
continue;
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 18bd0c2c4e50..d6193e260d57 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -784,7 +784,7 @@ SwFlyFrmFmt* SwDoc::MakeFlyAndMove( const SwPaM& rPam, const SfxItemSet& rSet,
SwPosition aPos( aIndex );
aPos.nContent.Assign( pNode, 0 );
- if( pSelBoxes && pSelBoxes->Count() )
+ if( pSelBoxes && !pSelBoxes->empty() )
{
// Table selection
// Copy parts of a table: create a table with the same width as the
@@ -799,7 +799,7 @@ SwFlyFrmFmt* SwDoc::MakeFlyAndMove( const SwPaM& rPam, const SfxItemSet& rSet,
SwTable& rTbl = pTblNd->GetTable();
// Did we select the whole table?
- if( pSelBoxes->Count() == rTbl.GetTabSortBoxes().size() )
+ if( pSelBoxes->size() == rTbl.GetTabSortBoxes().size() )
{
// move the whole table
SwNodeRange aRg( *pTblNd, 0, *pTblNd->EndOfSectionNode(), 1 );
diff --git a/sw/source/core/doc/docsort.cxx b/sw/source/core/doc/docsort.cxx
index 5f2ce443c5e2..fea5026f5028 100644
--- a/sw/source/core/doc/docsort.cxx
+++ b/sw/source/core/doc/docsort.cxx
@@ -492,7 +492,7 @@ sal_Bool SwDoc::SortText(const SwPaM& rPaM, const SwSortOptions& rOpt)
sal_Bool SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
{
// Via SwDoc for Undo!
- OSL_ENSURE( rBoxes.Count(), "no valid Box list" );
+ OSL_ENSURE( !rBoxes.empty(), "no valid Box list" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
return sal_False;
@@ -561,7 +561,7 @@ sal_Bool SwDoc::SortTbl(const SwSelBoxes& rBoxes, const SwSortOptions& rOpt)
if (GetIDocumentUndoRedo().DoesUndo())
{
pUndoSort = new SwUndoSort( rBoxes[0]->GetSttIdx(),
- rBoxes[rBoxes.Count()-1]->GetSttIdx(),
+ rBoxes.back()->GetSttIdx(),
*pTblNd, rOpt, aFlatBox.HasItemSets() );
GetIDocumentUndoRedo().AppendUndo(pUndoSort);
}
diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx
index ede8835d5681..590740ade181 100644
--- a/sw/source/core/doc/tblcpy.cxx
+++ b/sw/source/core/doc/tblcpy.cxx
@@ -192,7 +192,7 @@ namespace
{
if( !rFndBox.GetLines().empty() )
{
- bool bNoSelection = rSelBoxes.Count() < 2;
+ bool bNoSelection = rSelBoxes.size() < 2;
_FndLines &rFndLines = rFndBox.GetLines();
maCols.push_front(0);
const SwTableLine* pLine = rFndLines.front().GetLine();
@@ -317,13 +317,13 @@ namespace
{
BoxSpanInfo aInfo;
if( pSelBoxes &&
- USHRT_MAX != pSelBoxes->GetPos( pBox ) )
+ pSelBoxes->end() != pSelBoxes->find( pBox ) )
{
aInfo.mbSelected = true;
if( mnStartCol == USHRT_MAX )
{
mnStartCol = (sal_uInt16)maLines[nLine].size();
- if( pSelBoxes->Count() < 2 )
+ if( pSelBoxes->size() < 2 )
{
pSelBoxes = 0;
aInfo.mbSelected = false;
@@ -690,7 +690,7 @@ sal_Bool SwTable::InsNewTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBox
if( aTarget.mnAddLine && IsNewModel() )
{
SwSelBoxes aBoxes;
- aBoxes.Insert( GetTabLines().back()->GetTabBoxes().front() );
+ aBoxes.insert( GetTabLines().back()->GetTabBoxes().front() );
if( pUndo )
pUndo->InsertRow( *this, aBoxes, aTarget.mnAddLine );
else
@@ -817,7 +817,7 @@ sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwNodeIndex& rSttBox,
sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
SwUndoTblCpyTbl* pUndo )
{
- OSL_ENSURE( rSelBoxes.Count(), "Missing selection" );
+ OSL_ENSURE( !rSelBoxes.empty(), "Missing selection" );
SetHTMLTableLayout( 0 ); // Delete HTML Layout
@@ -869,7 +869,7 @@ sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
// If we don't have enough Lines, then see if we can insert
// new ones to reach our goal. But only if the SSelection
// contains a Box!
- if( 1 < rSelBoxes.Count() )
+ if( 1 < rSelBoxes.size() )
return sal_False;
sal_uInt16 nNewLns = rCpyTbl.GetTabLines().size() -
@@ -1011,7 +1011,7 @@ sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes,
if( 1 == rCpyTbl.GetTabSortBoxes().size() )
{
SwTableBox *pTmpBx = rCpyTbl.GetTabSortBoxes()[0];
- for( sal_uInt16 n = 0; n < rSelBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rSelBoxes.size(); ++n )
lcl_CpyBox( rCpyTbl, pTmpBx, *this,
(SwTableBox*)rSelBoxes[n], sal_True, pUndo );
}
@@ -1042,7 +1042,7 @@ static void _FndCntntBox( const SwTableBox* pBox, SwSelBoxes* pPara )
BOOST_FOREACH( const SwTableLine* pLine, pBox->GetTabLines() )
_FndCntntLine( pLine, pPara );
else
- pPara->Insert( (SwTableBox*)pBox );
+ pPara->insert( (SwTableBox*)pBox );
}
static void _FndCntntLine( const SwTableLine* pLine, SwSelBoxes* pPara )
@@ -1061,7 +1061,7 @@ SwSelBoxes& SwTable::SelLineFromBox( const SwTableBox* pBox,
pLine = pLine->GetUpper()->GetUpper();
// Delete all old ones
- rBoxes.Remove( sal_uInt16(0), rBoxes.Count() );
+ rBoxes.clear();
for( SwTableBoxes::iterator it = pLine->GetTabBoxes().begin();
it != pLine->GetTabBoxes().end(); ++it)
_FndCntntBox(*it, &rBoxes );
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index 0bbab2e27377..37e618383e6e 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -519,7 +519,7 @@ SwRowFrm* GetRowFrm( SwTableLine& rLine )
sal_Bool SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt, sal_Bool bBehind )
{
- OSL_ENSURE( rBoxes.Count() && nCnt, "No valid Box List" );
+ OSL_ENSURE( !rBoxes.empty() && nCnt, "No valid Box List" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
return sal_False;
@@ -575,7 +575,7 @@ sal_Bool SwTable::InsertCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 n
sal_Bool SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
sal_uInt16 nCnt, sal_Bool bBehind )
{
- OSL_ENSURE( pDoc && rBoxes.Count() && nCnt, "No valid Box List" );
+ OSL_ENSURE( pDoc && !rBoxes.empty() && nCnt, "No valid Box List" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
return sal_False;
@@ -977,16 +977,17 @@ SwTableBox* lcl_FndNxtPrvDelBox( const SwTableLines& rTblLns,
else if( pAllDelBoxes )
{
// If the predecessor will also be deleted, there's nothing to do
- sal_uInt16 nFndPos;
- if( !pAllDelBoxes->Seek_Entry( pFndBox, &nFndPos ) )
+ SwSelBoxes::const_iterator aFndIt = pAllDelBoxes->find( pFndBox);
+ if( aFndIt == pAllDelBoxes->end() )
break;
+ sal_uInt16 nFndPos = aFndIt - pAllDelBoxes->begin() ;
// else, we keep on searching.
// We do not need to recheck the Box, however
pFndBox = 0;
if( nFndPos <= *pCurPos )
--*pCurPos;
- pAllDelBoxes->Remove( nFndPos );
+ pAllDelBoxes->erase( pAllDelBoxes->begin() + nFndPos );
}
} while( bNxt ? ( nLinePos + 1 < (sal_uInt16)rTblLns.size() ) : nLinePos );
return pFndBox;
@@ -1074,7 +1075,7 @@ sal_Bool SwTable::DeleteSel(
{
OSL_ENSURE( pDoc, "No doc?" );
SwTableNode* pTblNd = 0;
- if( rBoxes.Count() )
+ if( !rBoxes.empty() )
{
pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
@@ -1087,9 +1088,9 @@ sal_Bool SwTable::DeleteSel(
_FndBox aFndBox( 0, 0 );
if ( bDelMakeFrms )
{
- if( pMerged && pMerged->Count() )
+ if( pMerged && !pMerged->empty() )
aFndBox.SetTableLines( *pMerged, *this );
- else if( rBoxes.Count() )
+ else if( !rBoxes.empty() )
aFndBox.SetTableLines( rBoxes, *this );
aFndBox.DelFrms( *this );
}
@@ -1099,9 +1100,8 @@ sal_Bool SwTable::DeleteSel(
// First switch the Border, then delete
if( bCorrBorder )
{
- SwSelBoxes aBoxes;
- aBoxes.Insert( &rBoxes );
- for( sal_uInt16 n = 0; n < aBoxes.Count(); ++n )
+ SwSelBoxes aBoxes( rBoxes );
+ for( sal_uInt16 n = 0; n < aBoxes.size(); ++n )
::lcl_SaveUpperLowerBorder( *this, *rBoxes[ n ], aShareFmts,
&aBoxes, &n );
}
@@ -1110,9 +1110,9 @@ sal_Bool SwTable::DeleteSel(
SwChartDataProvider *pPCD = pDoc->GetChartDataProvider();
// Delete boxes from last to first
- for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.size(); ++n )
{
- sal_uInt16 nIdx = rBoxes.Count() - 1 - n;
+ sal_uInt16 nIdx = rBoxes.size() - 1 - n;
// First adapt the data-sequence for chart if necessary
// (needed to move the implementation cursor properly to it's new
@@ -1142,7 +1142,7 @@ sal_Bool SwTable::DeleteSel(
sal_Bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt,
sal_Bool bSameHeight )
{
- OSL_ENSURE( pDoc && rBoxes.Count() && nCnt, "No valid values" );
+ OSL_ENSURE( pDoc && !rBoxes.empty() && nCnt, "No valid values" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
return sal_False;
@@ -1159,10 +1159,10 @@ sal_Bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16
long* pRowHeights = 0;
if ( bSameHeight )
{
- pRowHeights = new long[ rBoxes.Count() ];
- for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
+ pRowHeights = new long[ rBoxes.size() ];
+ for( sal_uInt16 n = 0; n < rBoxes.size(); ++n )
{
- SwTableBox* pSelBox = *( rBoxes.GetData() + n );
+ SwTableBox* pSelBox = rBoxes[n];
const SwRowFrm* pRow = GetRowFrm( *pSelBox->GetUpper() );
OSL_ENSURE( pRow, "Where is the SwTableLine's Frame?" );
SWRECTFN( pRow )
@@ -1175,9 +1175,9 @@ sal_Bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16
aFndBox.SetTableLines( rBoxes, *this );
aFndBox.DelFrms( *this );
- for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.size(); ++n )
{
- SwTableBox* pSelBox = *( rBoxes.GetData() + n );
+ SwTableBox* pSelBox = rBoxes[n];
OSL_ENSURE( pSelBox, "Box is not within the Table" );
// Insert nCnt new Lines into the Box
@@ -1284,7 +1284,7 @@ sal_Bool SwTable::OldSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16
sal_Bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nCnt )
{
- OSL_ENSURE( pDoc && rBoxes.Count() && nCnt, "No valid values" );
+ OSL_ENSURE( pDoc && !rBoxes.empty() && nCnt, "No valid values" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
return sal_False;
@@ -1295,8 +1295,7 @@ sal_Bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nC
pDoc->CreateChartInternalDataProviders( this );
SetHTMLTableLayout( 0 ); // Delete HTML Layout
- SwSelBoxes aSelBoxes;
- aSelBoxes.Insert(rBoxes.GetData(), rBoxes.Count());
+ SwSelBoxes aSelBoxes(rBoxes);
ExpandSelection( aSelBoxes );
// Find Lines for the Layout update
@@ -1307,9 +1306,9 @@ sal_Bool SwTable::SplitCol( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16 nC
_CpyTabFrms aFrmArr;
std::vector<SwTableBoxFmt*> aLastBoxArr;
sal_uInt16 nFndPos;
- for( sal_uInt16 n = 0; n < aSelBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aSelBoxes.size(); ++n )
{
- SwTableBox* pSelBox = *( aSelBoxes.GetData() + n );
+ SwTableBox* pSelBox = aSelBoxes[n];
OSL_ENSURE( pSelBox, "Box steht nicht in der Tabelle" );
// We don't want to split small table cells into very very small cells
@@ -1728,7 +1727,7 @@ static void lcl_BoxSetHeadCondColl( const SwTableBox* pBox );
sal_Bool SwTable::OldMerge( SwDoc* pDoc, const SwSelBoxes& rBoxes,
SwTableBox* pMergeBox, SwUndoTblMerge* pUndo )
{
- OSL_ENSURE( rBoxes.Count() && pMergeBox, "no valid values" );
+ OSL_ENSURE( !rBoxes.empty() && pMergeBox, "no valid values" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
return sal_False;
@@ -2763,7 +2762,7 @@ sal_Bool lcl_InsSelBox( SwTableLine* pLine, CR_SetBoxWidth& rParam,
return sal_False;
if( pBox->GetSttNd() )
- rParam.aBoxes.Insert( pBox );
+ rParam.aBoxes.insert( pBox );
break;
}
@@ -3158,7 +3157,7 @@ sal_Bool lcl_DeleteBox_Rekursiv( CR_SetBoxWidth& rParam, SwTableBox& rBox,
else
{
SwTableBox* pBox = &rBox;
- rParam.aBoxes.Insert( pBox );
+ rParam.aBoxes.insert( pBox );
}
}
else
@@ -3505,7 +3504,7 @@ _FndBox* lcl_SaveInsDelData( CR_SetBoxWidth& rParam, SwUndo** ppUndo,
// Find all Boxes/Lines
SwTable& rTbl = rParam.pTblNd->GetTable();
- if( !rParam.aBoxes.Count() )
+ if( rParam.aBoxes.empty() )
{
// Get the Boxes
if( rParam.bBigger )
@@ -3517,7 +3516,7 @@ _FndBox* lcl_SaveInsDelData( CR_SetBoxWidth& rParam, SwUndo** ppUndo,
}
// Prevent deleting the whole Table
- if( rParam.bBigger && rParam.aBoxes.Count() == rTbl.GetTabSortBoxes().size() )
+ if( rParam.bBigger && rParam.aBoxes.size() == rTbl.GetTabSortBoxes().size() )
return 0;
_FndBox* pFndBox = new _FndBox( 0, 0 );
@@ -3659,7 +3658,7 @@ sal_Bool SwTable::SetColWidth( SwTableBox& rAktBox, sal_uInt16 eType,
{
pFndBox = ::lcl_SaveInsDelData( aParam, ppUndo,
aTmpLst, nDistStt );
- if( aParam.bBigger && aParam.aBoxes.Count() ==
+ if( aParam.bBigger && aParam.aBoxes.size() ==
aSortCntBoxes.size() )
{
// This whole Table is to be deleted!
@@ -4040,10 +4039,10 @@ _FndBox* lcl_SaveInsDelData( CR_SetLineHeight& rParam, SwUndo** ppUndo,
// Find all Boxes/Lines
SwTable& rTbl = rParam.pTblNd->GetTable();
- OSL_ENSURE( rParam.aBoxes.Count(), "We can't go on without Boxes!" );
+ OSL_ENSURE( !rParam.aBoxes.empty(), "We can't go on without Boxes!" );
// Prevent deleting the whole Table
- if( !rParam.bBigger && rParam.aBoxes.Count() == rTbl.GetTabSortBoxes().size() )
+ if( !rParam.bBigger && rParam.aBoxes.size() == rTbl.GetTabSortBoxes().size() )
return 0;
_FndBox* pFndBox = new _FndBox( 0, 0 );
@@ -4261,7 +4260,7 @@ sal_Bool lcl_InsDelSelLine( SwTableLine* pLine, CR_SetLineHeight& rParam,
return sal_False;
if( pBox->GetSttNd() )
- rParam.aBoxes.Insert( pBox );
+ rParam.aBoxes.insert( pBox );
else
{
for( sal_uInt16 i = pBox->GetTabLines().size(); i; )
@@ -4354,7 +4353,7 @@ sal_Bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType,
{
if( bInsDel )
{
- if( !aParam.aBoxes.Count() )
+ if( aParam.aBoxes.empty() )
::lcl_InsDelSelLine( (*pLines)[ nBaseLinePos ],
aParam, 0, sal_True );
@@ -4362,7 +4361,7 @@ sal_Bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType,
// delete complete table when last row is deleted
if( !bBigger &&
- aParam.aBoxes.Count() == aSortCntBoxes.size() )
+ aParam.aBoxes.size() == aSortCntBoxes.size() )
{
GetFrmFmt()->GetDoc()->DeleteRowCol( aParam.aBoxes );
return sal_False;
@@ -4440,7 +4439,7 @@ sal_Bool SwTable::SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType,
// Adjust
if( bInsDel )
{
- if( !aParam.aBoxes.Count() )
+ if( aParam.aBoxes.empty() )
::lcl_InsDelSelLine( (*pLines)[ nBaseLinePos ],
aParam, 0, sal_True );
pFndBox = ::lcl_SaveInsDelData( aParam, ppUndo, aTmpLst );
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index c759090495c4..604e4c4ccd86 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -1682,7 +1682,7 @@ sal_Bool SwDoc::InsertCol( const SwCursor& rCursor, sal_uInt16 nCnt, sal_Bool bB
::GetTblSel( rCursor, aBoxes, nsSwTblSearchType::TBLSEARCH_COL );
sal_Bool bRet = sal_False;
- if( aBoxes.Count() )
+ if( !aBoxes.empty() )
bRet = InsertCol( aBoxes, nCnt, bBehind );
return bRet;
}
@@ -1690,7 +1690,7 @@ sal_Bool SwDoc::InsertCol( const SwCursor& rCursor, sal_uInt16 nCnt, sal_Bool bB
sal_Bool SwDoc::InsertCol( const SwSelBoxes& rBoxes, sal_uInt16 nCnt, sal_Bool bBehind )
{
// uebers SwDoc fuer Undo !!
- OSL_ENSURE( rBoxes.Count(), "keine gueltige Box-Liste" );
+ OSL_ENSURE( !rBoxes.empty(), "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
return sal_False;
@@ -1745,7 +1745,7 @@ sal_Bool SwDoc::InsertRow( const SwCursor& rCursor, sal_uInt16 nCnt, sal_Bool bB
GetTblSel( rCursor, aBoxes, nsSwTblSearchType::TBLSEARCH_ROW );
sal_Bool bRet = sal_False;
- if( aBoxes.Count() )
+ if( !aBoxes.empty() )
bRet = InsertRow( aBoxes, nCnt, bBehind );
return bRet;
}
@@ -1753,7 +1753,7 @@ sal_Bool SwDoc::InsertRow( const SwCursor& rCursor, sal_uInt16 nCnt, sal_Bool bB
sal_Bool SwDoc::InsertRow( const SwSelBoxes& rBoxes, sal_uInt16 nCnt, sal_Bool bBehind )
{
// uebers SwDoc fuer Undo !!
- OSL_ENSURE( rBoxes.Count(), "keine gueltige Box-Liste" );
+ OSL_ENSURE( !rBoxes.empty(), "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
return sal_False;
@@ -1940,7 +1940,7 @@ sal_Bool SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
return sal_False;
// uebers SwDoc fuer Undo !!
- OSL_ENSURE( rBoxes.Count(), "keine gueltige Box-Liste" );
+ OSL_ENSURE( !rBoxes.empty(), "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
return sal_False;
@@ -1949,8 +1949,7 @@ sal_Bool SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
return sal_False;
::ClearFEShellTabCols();
- SwSelBoxes aSelBoxes;
- aSelBoxes.Insert(rBoxes.GetData(), rBoxes.Count());
+ SwSelBoxes aSelBoxes( rBoxes );
SwTable &rTable = pTblNd->GetTable();
long nMin = 0;
long nMax = 0;
@@ -1964,9 +1963,8 @@ sal_Bool SwDoc::DeleteRowCol( const SwSelBoxes& rBoxes, bool bColumn )
// soll die gesamte Tabelle geloescht werden ??
const sal_uLong nTmpIdx1 = pTblNd->GetIndex();
- const sal_uLong nTmpIdx2 = aSelBoxes[ aSelBoxes.Count()-1 ]->GetSttNd()->
- EndOfSectionIndex()+1;
- if( pTblNd->GetTable().GetTabSortBoxes().size() == aSelBoxes.Count() &&
+ const sal_uLong nTmpIdx2 = aSelBoxes.back()->GetSttNd()->EndOfSectionIndex() + 1;
+ if( pTblNd->GetTable().GetTabSortBoxes().size() == aSelBoxes.size() &&
aSelBoxes[0]->GetSttIdx()-1 == nTmpIdx1 &&
nTmpIdx2 == pTblNd->EndOfSectionIndex() )
{
@@ -2150,7 +2148,7 @@ sal_Bool SwDoc::SplitTbl( const SwSelBoxes& rBoxes, sal_Bool bVert, sal_uInt16 n
sal_Bool bSameHeight )
{
// uebers SwDoc fuer Undo !!
- OSL_ENSURE( rBoxes.Count() && nCnt, "keine gueltige Box-Liste" );
+ OSL_ENSURE( !rBoxes.empty() && nCnt, "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
return sal_False;
@@ -2170,7 +2168,7 @@ sal_Bool SwDoc::SplitTbl( const SwSelBoxes& rBoxes, sal_Bool bVert, sal_uInt16 n
aTmpLst.insert( rTbl.GetTabSortBoxes() );
if( !bVert )
{
- for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.size(); ++n )
{
const SwStartNode* pSttNd = rBoxes[ n ]->GetSttNd();
aNdsCnts.push_back( pSttNd->EndOfSectionIndex() -
@@ -2546,7 +2544,7 @@ bool FuzzyCompare::operator() ( long s1, long s2 ) const
bool lcl_IsFrmInColumn( const SwCellFrm& rFrm, SwSelBoxes& rBoxes )
{
- for( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rBoxes.size(); ++i )
{
if ( rFrm.GetTabBox() == rBoxes[ i ] )
return true;
@@ -2949,7 +2947,7 @@ void SwCollectTblLineBoxes::AddBox( const SwTableBox& rBox )
{
aPosArr.push_back(nWidth);
SwTableBox* p = (SwTableBox*)&rBox;
- aBoxes.Insert( p, aBoxes.Count() );
+ aBoxes.insert( p );
nWidth = nWidth + (sal_uInt16)rBox.GetFrmFmt()->GetFrmSize().GetWidth();
}
@@ -2983,7 +2981,7 @@ sal_Bool SwCollectTblLineBoxes::Resize( sal_uInt16 nOffset, sal_uInt16 nOldWidth
{
sal_uInt16 n;
- if( aPosArr.size() )
+ if( !aPosArr.empty() )
{
for( n = 0; n < aPosArr.size(); ++n )
{
@@ -2997,8 +2995,8 @@ sal_Bool SwCollectTblLineBoxes::Resize( sal_uInt16 nOffset, sal_uInt16 nOldWidth
}
}
- aPosArr.erase(aPosArr.begin(), aPosArr.begin()+n);
- aBoxes.Remove( 0, n );
+ aPosArr.erase( aPosArr.begin(), aPosArr.begin() + n );
+ aBoxes.erase( aBoxes.begin(), aBoxes.begin() + n );
// dann die Positionen der neuen Size anpassen
for( n = 0; n < aPosArr.size(); ++n )
@@ -3009,7 +3007,7 @@ sal_Bool SwCollectTblLineBoxes::Resize( sal_uInt16 nOffset, sal_uInt16 nOldWidth
aPosArr[ n ] = sal_uInt16( nSize );
}
}
- return 0 != aPosArr.size();
+ return !aPosArr.empty();
}
sal_Bool lcl_Line_CollectBox( const SwTableLine*& rpLine, void* pPara )
@@ -3727,7 +3725,7 @@ sal_Bool lcl_SetAFmtBox( _FndBox & rBox, _SetAFmtTabPara *pSetPara )
// AutoFormat fuer die Tabelle/TabellenSelection
sal_Bool SwDoc::SetTableAutoFmt( const SwSelBoxes& rBoxes, const SwTableAutoFmt& rNew )
{
- OSL_ENSURE( rBoxes.Count(), "keine gueltige Box-Liste" );
+ OSL_ENSURE( !rBoxes.empty(), "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
return sal_False;
@@ -3814,7 +3812,7 @@ sal_Bool SwDoc::SetTableAutoFmt( const SwSelBoxes& rBoxes, const SwTableAutoFmt&
// Erfrage wie attributiert ist
sal_Bool SwDoc::GetTableAutoFmt( const SwSelBoxes& rBoxes, SwTableAutoFmt& rGet )
{
- OSL_ENSURE( rBoxes.Count(), "keine gueltige Box-Liste" );
+ OSL_ENSURE( !rBoxes.empty(), "keine gueltige Box-Liste" );
SwTableNode* pTblNd = (SwTableNode*)rBoxes[0]->GetSttNd()->FindTableNode();
if( !pTblNd )
return sal_False;
@@ -4349,7 +4347,7 @@ sal_Bool SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
// no complex into complex, but copy into or from new model is welcome
if( ( !pSrcTblNd->GetTable().IsTblComplex() || pInsTblNd->GetTable().IsNewModel() )
- && ( bDelCpyDoc || rBoxes.Count() ) )
+ && ( bDelCpyDoc || !rBoxes.empty() ) )
{
// dann die Tabelle "relativ" kopieren
const SwSelBoxes* pBoxes;
@@ -4360,7 +4358,7 @@ sal_Bool SwDoc::InsCopyOfTbl( SwPosition& rInsPos, const SwSelBoxes& rBoxes,
SwTableBox* pBox = pInsTblNd->GetTable().GetTblBox(
pSttNd->GetIndex() );
OSL_ENSURE( pBox, "Box steht nicht in dieser Tabelle" );
- aBoxes.Insert( pBox );
+ aBoxes.insert( pBox );
pBoxes = &aBoxes;
}
else
@@ -4462,14 +4460,14 @@ sal_Bool SwDoc::UnProtectCells( const String& rName )
sal_Bool SwDoc::UnProtectCells( const SwSelBoxes& rBoxes )
{
sal_Bool bChgd = sal_False;
- if( rBoxes.Count() )
+ if( !rBoxes.empty() )
{
SwUndoAttrTbl *const pUndo = (GetIDocumentUndoRedo().DoesUndo())
? new SwUndoAttrTbl( *rBoxes[0]->GetSttNd()->FindTableNode() )
: 0;
std::vector<SwFrmFmt*> aFmts, aNewFmts;
- for( sal_uInt16 i = rBoxes.Count(); i; )
+ for( sal_uInt16 i = rBoxes.size(); i; )
{
SwTableBox* pBox = rBoxes[ --i ];
SwFrmFmt* pBoxFmt = pBox->GetFrmFmt();
diff --git a/sw/source/core/docnode/ndtbl1.cxx b/sw/source/core/docnode/ndtbl1.cxx
index e96634ce048a..c10e7222e5e9 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -147,12 +147,12 @@ sal_Bool lcl_GetBoxSel( const SwCursor& rCursor, SwSelBoxes& rBoxes,
{
SwTableBox* pBox = (SwTableBox*)pNd->FindTableNode()->GetTable().
GetTblBox( pNd->GetIndex() );
- rBoxes.Insert( pBox );
+ rBoxes.insert( pBox );
}
} while( bAllCrsr &&
pSttPam != ( pCurPam = (SwPaM*)pCurPam->GetNext()) );
}
- return 0 != rBoxes.Count();
+ return !rBoxes.empty();
}
/***********************************************************************
@@ -1137,8 +1137,8 @@ void SwDoc::SetBoxAttr( const SwCursor& rCursor, const SfxPoolItem &rNew )
}
std::vector<SwTblFmtCmp*> aFmtCmp;
- aFmtCmp.reserve( Max( 255, (int)aBoxes.Count() ) );
- for ( sal_uInt16 i = 0; i < aBoxes.Count(); ++i )
+ aFmtCmp.reserve( Max( 255, (int)aBoxes.size() ) );
+ for ( sal_uInt16 i = 0; i < aBoxes.size(); ++i )
{
SwTableBox *pBox = aBoxes[i];
@@ -1183,7 +1183,7 @@ sal_Bool SwDoc::GetBoxAttr( const SwCursor& rCursor, SfxPoolItem& rToFill ) cons
bRet = sal_True;
sal_Bool bOneFound = sal_False;
const sal_uInt16 nWhich = rToFill.Which();
- for( sal_uInt16 i = 0; i < aBoxes.Count(); ++i )
+ for( sal_uInt16 i = 0; i < aBoxes.size(); ++i )
{
switch ( nWhich )
{
@@ -1253,7 +1253,7 @@ sal_uInt16 SwDoc::GetBoxAlign( const SwCursor& rCursor ) const
SwTableNode* pTblNd = rCursor.GetPoint()->nNode.GetNode().FindTableNode();
SwSelBoxes aBoxes;
if( pTblNd && ::lcl_GetBoxSel( rCursor, aBoxes ))
- for( sal_uInt16 i = 0; i < aBoxes.Count(); ++i )
+ for( sal_uInt16 i = 0; i < aBoxes.size(); ++i )
{
const SwFmtVertOrient &rOri =
aBoxes[i]->GetFrmFmt()->GetVertOrient();
diff --git a/sw/source/core/edit/edglss.cxx b/sw/source/core/edit/edglss.cxx
index b454c40deb5c..71dd8b047814 100644
--- a/sw/source/core/edit/edglss.cxx
+++ b/sw/source/core/edit/edglss.cxx
@@ -208,11 +208,11 @@ sal_Bool SwEditShell::_CopySelToDoc( SwDoc* pInsDoc, SwNodeIndex* pSttNd )
SwTableNode* pTblNd;
SwSelBoxes aBoxes;
GetTblSel( *this, aBoxes );
- if( aBoxes.Count() && 0 != (pTblNd = (SwTableNode*)aBoxes[0]
+ if( !aBoxes.empty() && 0 != (pTblNd = (SwTableNode*)aBoxes[0]
->GetSttNd()->FindTableNode() ))
{
// teste ob der TabellenName kopiert werden kann
- sal_Bool bCpyTblNm = aBoxes.Count() == pTblNd->GetTable().GetTabSortBoxes().size();
+ sal_Bool bCpyTblNm = aBoxes.size() == pTblNd->GetTable().GetTabSortBoxes().size();
if( bCpyTblNm )
{
const String& rTblName = pTblNd->GetTable().GetFrmFmt()->GetName();
diff --git a/sw/source/core/edit/edtab.cxx b/sw/source/core/edit/edtab.cxx
index 2900cdd66dc0..43f09ca30f05 100644
--- a/sw/source/core/edit/edtab.cxx
+++ b/sw/source/core/edit/edtab.cxx
@@ -267,12 +267,12 @@ sal_Bool SwEditShell::GetTblBoxFormulaAttrs( SfxItemSet& rSet ) const
if ( pFrm )
{
SwTableBox *pBox = (SwTableBox*)((SwCellFrm*)pFrm)->GetTabBox();
- aBoxes.Insert( pBox );
+ aBoxes.insert( pBox );
}
} while( sal_False );
}
- for( sal_uInt16 n = 0; n < aBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aBoxes.size(); ++n )
{
const SwTableBox* pSelBox = aBoxes[ n ];
const SwTableBoxFmt* pTblFmt = (SwTableBoxFmt*)pSelBox->GetFrmFmt();
@@ -309,7 +309,7 @@ void SwEditShell::SetTblBoxFormulaAttrs( const SfxItemSet& rSet )
if ( pFrm )
{
SwTableBox *pBox = (SwTableBox*)((SwCellFrm*)pFrm)->GetTabBox();
- aBoxes.Insert( pBox );
+ aBoxes.insert( pBox );
}
} while( sal_False );
}
@@ -320,7 +320,7 @@ void SwEditShell::SetTblBoxFormulaAttrs( const SfxItemSet& rSet )
StartAllAction();
GetDoc()->GetIDocumentUndoRedo().StartUndo( UNDO_START, NULL );
- for( sal_uInt16 n = 0; n < aBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aBoxes.size(); ++n )
GetDoc()->SetTblBoxFormulaAttrs( *aBoxes[ n ], rSet );
GetDoc()->GetIDocumentUndoRedo().EndUndo( UNDO_END, NULL );
EndAllAction();
diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx
index c3e849f978ee..102b1e23ee31 100644
--- a/sw/source/core/fields/cellfml.cxx
+++ b/sw/source/core/fields/cellfml.cxx
@@ -346,7 +346,7 @@ void SwTableFormula::_MakeFormula( const SwTable& rTbl, String& rNewStr,
rNewStr += '(';
bool bDelim = false;
- for( sal_uInt16 n = 0; n < aBoxes.Count() &&
+ for( sal_uInt16 n = 0; n < aBoxes.size() &&
!pCalcPara->rCalc.IsCalcError(); ++n )
{
const SwTableBox* pTblBox = aBoxes[n];
@@ -872,12 +872,11 @@ String lcl_BoxNmToRel( const SwTable& rTbl, const SwTableNode& rTblNd,
sal_uInt16 SwTableFormula::GetBoxesOfFormula( const SwTable& rTbl,
SwSelBoxes& rBoxes )
{
- if( rBoxes.Count() )
- rBoxes.Remove( sal_uInt16(0), rBoxes.Count() );
+ rBoxes.clear();
BoxNmToPtr( &rTbl );
ScanString( &SwTableFormula::_GetFmlBoxes, rTbl, &rBoxes );
- return rBoxes.Count();
+ return rBoxes.size();
}
void SwTableFormula::_GetFmlBoxes( const SwTable& rTbl, String& ,
@@ -909,10 +908,10 @@ void SwTableFormula::_GetFmlBoxes( const SwTable& rTbl, String& ,
// deren Werte
SwSelBoxes aBoxes;
GetBoxes( *pSttBox, *pEndBox, aBoxes );
- pBoxes->Insert( &aBoxes );
+ pBoxes->insert( aBoxes );
}
else if( pSttBox ) // nur die StartBox ?
- pBoxes->Insert( pSttBox );
+ pBoxes->insert( pSttBox );
}
void SwTableFormula::GetBoxes( const SwTableBox& rSttBox,
@@ -957,14 +956,14 @@ void SwTableFormula::GetBoxes( const SwTableBox& rSttBox,
break;
// dann mal die Tabellenkoepfe raus:
- for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.size(); ++n )
{
pLine = rBoxes[n]->GetUpper();
while( pLine->GetUpper() )
pLine = pLine->GetUpper()->GetUpper();
if( pTbl->IsHeadline( *pLine ) )
- rBoxes.Remove( n--, 1 );
+ rBoxes.erase( rBoxes.begin() + n-- );
}
} while( sal_False );
}
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index ac22e7c3ab49..e9d430d38fa1 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -587,7 +587,7 @@ sal_Bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
const SwTableNode* pTblNd;
SwSelBoxes aBoxes;
GetTblSel( *this, aBoxes );
- if( aBoxes.Count() &&
+ if( !aBoxes.empty() &&
0 != (pTblNd = aBoxes[0]->GetSttNd()->FindTableNode()) )
{
SwPosition* pDstPos = 0;
@@ -614,7 +614,7 @@ sal_Bool SwFEShell::Copy( SwFEShell* pDestShell, const Point& rSttPt,
bRet = pDestShell->GetDoc()->InsCopyOfTbl( *pDstPos, aBoxes,0,
bIsMove && this == pDestShell &&
- aBoxes.Count() == pTblNd->GetTable().
+ aBoxes.size() == pTblNd->GetTable().
GetTabSortBoxes().size(),
this != pDestShell );
@@ -857,7 +857,7 @@ sal_Bool SwFEShell::Paste( SwDoc* pClpDoc, sal_Bool bIncludingPageFrames )
SwTableBox* pBox = pDestNd->GetTable().GetTblBox(
pSttNd->GetIndex() );
OSL_ENSURE( pBox, "Box steht nicht in dieser Tabelle" );
- aBoxes.Insert( pBox );
+ aBoxes.insert( pBox );
}
SwNodeIndex aNdIdx( *pDestNd->EndOfSectionNode());
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index fe065599fe7a..8c575f4dba4b 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -611,7 +611,7 @@ const SwFrmFmt *SwFEShell::NewFlyFrm( const SfxItemSet& rSet, sal_Bool bAnchVali
if( IsTableMode() )
{
GetTblSel( *this, aBoxes );
- if( aBoxes.Count() )
+ if( !aBoxes.empty() )
{
// Crsr should be removed from the removal area.
// Always put it after/on the table; via the
diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx
index c7902f18824b..8e04d6e75f1c 100644
--- a/sw/source/core/frmedt/fetab.cxx
+++ b/sw/source/core/frmedt/fetab.cxx
@@ -219,10 +219,10 @@ sal_Bool SwFEShell::InsertRow( sal_uInt16 nCnt, sal_Bool bBehind )
SwSelBoxes aBoxes;
GetTblSel( *this, aBoxes, nsSwTblSearchType::TBLSEARCH_ROW );
- TblWait( nCnt, pFrm, *GetDoc()->GetDocShell(), aBoxes.Count() );
+ TblWait( nCnt, pFrm, *GetDoc()->GetDocShell(), aBoxes.size() );
sal_Bool bRet = sal_False;
- if ( aBoxes.Count() )
+ if ( aBoxes.size() )
bRet = GetDoc()->InsertRow( aBoxes, nCnt, bBehind );
EndAllActionAndCall();
@@ -257,10 +257,10 @@ sal_Bool SwFEShell::InsertCol( sal_uInt16 nCnt, sal_Bool bBehind )
SwSelBoxes aBoxes;
GetTblSel( *this, aBoxes, nsSwTblSearchType::TBLSEARCH_COL );
- TblWait( nCnt, pFrm, *GetDoc()->GetDocShell(), aBoxes.Count() );
+ TblWait( nCnt, pFrm, *GetDoc()->GetDocShell(), aBoxes.size() );
sal_Bool bRet = sal_False;
- if( aBoxes.Count() )
+ if( !aBoxes.empty() )
bRet = GetDoc()->InsertCol( aBoxes, nCnt, bBehind );
EndAllActionAndCall();
@@ -312,9 +312,9 @@ sal_Bool SwFEShell::DeleteCol()
sal_Bool bRet;
SwSelBoxes aBoxes;
GetTblSel( *this, aBoxes, nsSwTblSearchType::TBLSEARCH_COL );
- if ( aBoxes.Count() )
+ if ( !aBoxes.empty() )
{
- TblWait( aBoxes.Count(), pFrm, *GetDoc()->GetDocShell() );
+ TblWait( aBoxes.size(), pFrm, *GetDoc()->GetDocShell() );
// remove crsr from the deletion area.
// Put them behind/on the table; via the
@@ -359,9 +359,9 @@ sal_Bool SwFEShell::DeleteRow()
SwSelBoxes aBoxes;
GetTblSel( *this, aBoxes, nsSwTblSearchType::TBLSEARCH_ROW );
- if( aBoxes.Count() )
+ if( !aBoxes.empty() )
{
- TblWait( aBoxes.Count(), pFrm, *GetDoc()->GetDocShell() );
+ TblWait( aBoxes.size(), pFrm, *GetDoc()->GetDocShell() );
// Delete cursors from the deletion area.
// Then the cursor is:
@@ -518,9 +518,9 @@ sal_Bool SwFEShell::SplitTab( sal_Bool bVert, sal_uInt16 nCnt, sal_Bool bSameHei
sal_Bool bRet;
SwSelBoxes aBoxes;
GetTblSel( *this, aBoxes );
- if( aBoxes.Count() )
+ if( !aBoxes.empty() )
{
- TblWait( nCnt, pFrm, *GetDoc()->GetDocShell(), aBoxes.Count() );
+ TblWait( nCnt, pFrm, *GetDoc()->GetDocShell(), aBoxes.size() );
// now delete the columns
bRet = GetDoc()->SplitTbl( aBoxes, bVert, nCnt, bSameHeight );
@@ -929,13 +929,12 @@ sal_Bool SwFEShell::HasWholeTabSelection() const
{
SwSelBoxes aBoxes;
::GetTblSelCrs( *this, aBoxes );
- if( aBoxes.Count() )
+ if( !aBoxes.empty() )
{
const SwTableNode *pTblNd = IsCrsrInTbl();
- return ( pTblNd && aBoxes[0]->GetSttIdx()-1 == pTblNd->
- EndOfSectionNode()->StartOfSectionIndex() &&
- aBoxes[aBoxes.Count()-1]->GetSttNd()->EndOfSectionIndex()+1
- == pTblNd->EndOfSectionIndex() );
+ return pTblNd &&
+ aBoxes[0]->GetSttIdx() - 1 == pTblNd->EndOfSectionNode()->StartOfSectionIndex() &&
+ aBoxes.back()->GetSttNd()->EndOfSectionIndex() + 1 == pTblNd->EndOfSectionIndex();
}
}
return sal_False;
@@ -1023,11 +1022,11 @@ void SwFEShell::UnProtectCells()
if( pFrm )
{
SwTableBox *pBox = (SwTableBox*)((SwCellFrm*)pFrm)->GetTabBox();
- aBoxes.Insert( pBox );
+ aBoxes.insert( pBox );
}
}
- if( aBoxes.Count() )
+ if( !aBoxes.empty() )
GetDoc()->UnProtectCells( aBoxes );
EndAllActionAndCall();
@@ -1066,10 +1065,10 @@ sal_Bool SwFEShell::CanUnProtectCells() const
if( pFrm )
{
SwTableBox *pBox = (SwTableBox*)((SwCellFrm*)pFrm)->GetTabBox();
- aBoxes.Insert( pBox );
+ aBoxes.insert( pBox );
}
}
- if( aBoxes.Count() )
+ if( !aBoxes.empty() )
bUnProtectAvailable = ::HasProtectedCells( aBoxes );
}
return bUnProtectAvailable;
@@ -1226,18 +1225,18 @@ sal_Bool SwFEShell::IsAdjustCellWidthAllowed( sal_Bool bBalance ) const
::GetTblSelCrs( *this, aBoxes );
if ( bBalance )
- return aBoxes.Count() > 1;
+ return aBoxes.size() > 1;
- if ( !aBoxes.Count() )
+ if ( aBoxes.empty() )
{
do
{ pFrm = pFrm->GetUpper();
} while ( !pFrm->IsCellFrm() );
SwTableBox *pBox = (SwTableBox*)((SwCellFrm*)pFrm)->GetTabBox();
- aBoxes.Insert( pBox );
+ aBoxes.insert( pBox );
}
- for ( sal_uInt16 i = 0; i < aBoxes.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aBoxes.size(); ++i )
{
SwTableBox *pBox = aBoxes[i];
if ( pBox->GetSttNd() )
@@ -1280,12 +1279,12 @@ sal_Bool SwFEShell::SetTableAutoFmt( const SwTableAutoFmt& rNew )
for( sal_uInt16 n = 0; n < rTBoxes.size(); ++n )
{
SwTableBox* pBox = rTBoxes[ n ];
- aBoxes.Insert( pBox );
+ aBoxes.insert( pBox );
}
}
sal_Bool bRet;
- if( aBoxes.Count() )
+ if( !aBoxes.empty() )
{
SET_CURR_SHELL( this );
StartAllAction();
@@ -1319,7 +1318,7 @@ sal_Bool SwFEShell::GetTableAutoFmt( SwTableAutoFmt& rGet )
for( sal_uInt16 n = 0; n < rTBoxes.size(); ++n )
{
SwTableBox* pBox = rTBoxes[ n ];
- aBoxes.Insert( pBox );
+ aBoxes.insert( pBox );
}
}
@@ -1351,9 +1350,9 @@ sal_Bool SwFEShell::DeleteTblSel()
sal_Bool bRet;
SwSelBoxes aBoxes;
GetTblSelCrs( *this, aBoxes );
- if( aBoxes.Count() )
+ if( !aBoxes.empty() )
{
- TblWait( aBoxes.Count(), pFrm, *GetDoc()->GetDocShell() );
+ TblWait( aBoxes.size(), pFrm, *GetDoc()->GetDocShell() );
// cursor should be removed from deletion area.
// Put them behind/on the table; via the document
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx
index 8444e870ec06..529d0ba1f020 100644
--- a/sw/source/core/frmedt/tblsel.cxx
+++ b/sw/source/core/frmedt/tblsel.cxx
@@ -75,41 +75,6 @@
#undef DEL_EMPTY_BOXES_AT_START_AND_END
#define DEL_ALL_EMPTY_BOXES
-_SV_IMPL_SORTAR_ALG( SwSelBoxes, SwTableBoxPtr )
-sal_Bool SwSelBoxes::Seek_Entry( const SwTableBoxPtr rSrch, sal_uInt16* pFndPos ) const
-{
- sal_uLong nIdx = rSrch->GetSttIdx();
-
- sal_uInt16 nO = Count(), nM, nU = 0;
- if( nO > 0 )
- {
- nO--;
- while( nU <= nO )
- {
- nM = nU + ( nO - nU ) / 2;
- if( (*this)[ nM ]->GetSttNd() == rSrch->GetSttNd() )
- {
- if( pFndPos )
- *pFndPos = nM;
- return sal_True;
- }
- else if( (*this)[ nM ]->GetSttIdx() < nIdx )
- nU = nM + 1;
- else if( nM == 0 )
- {
- if( pFndPos )
- *pFndPos = nU;
- return sal_False;
- }
- else
- nO = nM - 1;
- }
- }
- if( pFndPos )
- *pFndPos = nU;
- return sal_False;
-}
-
struct _CmpLPt
{
Point aPos;
@@ -172,16 +137,14 @@ const SwLayoutFrm *lcl_FindNextCellFrm( const SwLayoutFrm *pLay )
void GetTblSelCrs( const SwCrsrShell &rShell, SwSelBoxes& rBoxes )
{
- if( rBoxes.Count() )
- rBoxes.Remove( sal_uInt16(0), rBoxes.Count() );
+ rBoxes.clear();
if( rShell.IsTableMode() && ((SwCrsrShell&)rShell).UpdateTblSelBoxes())
- rBoxes.Insert( &rShell.GetTableCrsr()->GetBoxes() );
+ rBoxes.insert( (SwSelBoxes&)rShell.GetTableCrsr()->GetBoxes() );
}
void GetTblSelCrs( const SwTableCursor& rTblCrsr, SwSelBoxes& rBoxes )
{
- if( rBoxes.Count() )
- rBoxes.Remove( sal_uInt16(0), rBoxes.Count() );
+ rBoxes.clear();
if( rTblCrsr.IsChgd() || !rTblCrsr.GetBoxesCount() )
{
@@ -190,7 +153,7 @@ void GetTblSelCrs( const SwTableCursor& rTblCrsr, SwSelBoxes& rBoxes )
}
if( rTblCrsr.GetBoxesCount() )
- rBoxes.Insert( &rTblCrsr.GetBoxes() );
+ rBoxes.insert( (SwSelBoxes&)rTblCrsr.GetBoxes() );
}
void GetTblSel( const SwCrsrShell& rShell, SwSelBoxes& rBoxes,
@@ -264,7 +227,7 @@ void GetTblSel( const SwCursor& rCrsr, SwSelBoxes& rBoxes,
// check for cell protection??
if( !bChkProtected ||
!pBox->GetFrmFmt()->GetProtect().IsCntntProtected() )
- rBoxes.Insert( pBox );
+ rBoxes.insert( pBox );
}
}
}
@@ -367,7 +330,7 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
// check for cell protection??
if( !bChkProtected ||
!pBox->GetFrmFmt()->GetProtect().IsCntntProtected() )
- rBoxes.Insert( pBox );
+ rBoxes.insert( pBox );
if ( pCells )
{
@@ -460,7 +423,7 @@ void GetTblSel( const SwLayoutFrm* pStart, const SwLayoutFrm* pEnd,
}
i = 0;
- rBoxes.Remove( i, rBoxes.Count() );
+ rBoxes.erase( rBoxes.begin() + i, rBoxes.end() );
--nLoopMax;
} while( sal_True );
@@ -886,7 +849,7 @@ sal_Bool GetAutoSumSel( const SwCrsrShell& rShell, SwCellFrms& rBoxes )
sal_Bool HasProtectedCells( const SwSelBoxes& rBoxes )
{
sal_Bool bRet = sal_False;
- for( sal_uInt16 n = 0, nCnt = rBoxes.Count(); n < nCnt; ++n )
+ for( sal_uInt16 n = 0, nCnt = rBoxes.size(); n < nCnt; ++n )
if( rBoxes[ n ]->GetFrmFmt()->GetProtect().IsCntntProtected() )
{
bRet = sal_True;
@@ -958,8 +921,7 @@ sal_Bool IsEmptyBox( const SwTableBox& rBox, SwPaM& rPam )
void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
SwTableBox** ppMergeBox, SwUndoTblMerge* pUndo )
{
- if( rBoxes.Count() )
- rBoxes.Remove( sal_uInt16(0), rBoxes.Count() );
+ rBoxes.clear();
OSL_ENSURE( rPam.GetCntntNode() && rPam.GetCntntNode( sal_False ),
"Tabselection not on Cnt." );
@@ -1039,7 +1001,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
pBox->GetFrmFmt()->SetFmtAttr( aNew );
// this box is selected
pLastBox = pBox;
- rBoxes.Insert( pBox );
+ rBoxes.insert( pBox );
aPosArr.Insert(
_CmpLPt( (pCell->Frm().*fnRect->fnGetPos)(),
pBox, bVert ) );
@@ -1056,7 +1018,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
{
// this box is selected
pLastBox = pBox;
- rBoxes.Insert( pBox );
+ rBoxes.insert( pBox );
#if OSL_DEBUG_LEVEL > 1
Point aInsPoint( (pCell->Frm().*fnRect->fnGetPos)() );
#endif
@@ -1107,7 +1069,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
// this box is selected
pLastBox = pBox;
- rBoxes.Insert( pBox );
+ rBoxes.insert( pBox );
aPosArr.Insert(
_CmpLPt( (pCell->Frm().*fnRect->fnGetPos)(),
pBox, bVert ) );
@@ -1149,7 +1111,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
pBox->GetFrmFmt()->SetFmtAttr( aNew );
pLastBox = pBox;
- rBoxes.Insert( pBox );
+ rBoxes.insert( pBox );
aPosArr.Insert( _CmpLPt( Point( rUnion.Left(),
pCell->Frm().Top()), pBox, bVert ));
@@ -1173,7 +1135,7 @@ void GetMergeSel( const SwPaM& rPam, SwSelBoxes& rBoxes,
}
// no SSelection / no boxes found
- if( 1 >= rBoxes.Count() )
+ if( 1 >= rBoxes.size() )
return;
// now search all horizontally adjacent boxes and connect
@@ -1505,7 +1467,7 @@ sal_uInt16 CheckMergeSel( const SwPaM& rPam )
sal_uInt16 CheckMergeSel( const SwSelBoxes& rBoxes )
{
sal_uInt16 eRet = TBLMERGE_NOSELECTION;
- if( rBoxes.Count() )
+ if( !rBoxes.empty() )
{
eRet = TBLMERGE_OK;
@@ -2110,8 +2072,7 @@ static void _FndBoxCopyCol( SwTableBox* pBox, _FndPara* pFndPara )
}
else
{
- sal_uInt16 nFndPos;
- if( !pFndPara->rBoxes.Seek_Entry( pBox, &nFndPos ))
+ if( pFndPara->rBoxes.find( pBox ) == pFndPara->rBoxes.end())
{
delete pFndBox;
return;
@@ -2152,7 +2113,7 @@ void _FndBox::SetTableLines( const SwSelBoxes &rBoxes, const SwTable &rTable )
sal_uInt16 nStPos = USHRT_MAX;
sal_uInt16 nEndPos= 0;
- for ( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < rBoxes.size(); ++i )
{
SwTableLine *pLine = rBoxes[i]->GetUpper();
while ( pLine->GetUpper() )
diff --git a/sw/source/core/inc/tblrwcl.hxx b/sw/source/core/inc/tblrwcl.hxx
index 98ee2a623a8f..56195d8a9239 100644
--- a/sw/source/core/inc/tblrwcl.hxx
+++ b/sw/source/core/inc/tblrwcl.hxx
@@ -71,7 +71,7 @@ SW_DLLPUBLIC void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* pUndo = 0
class SwCollectTblLineBoxes
{
std::vector<sal_uInt16> aPosArr;
- SwSelBoxes_SAR aBoxes;
+ SwSelBoxes aBoxes;
SwHistory* pHst;
sal_uInt16 nMode, nWidth;
sal_Bool bGetFromTop : 1;
@@ -79,7 +79,7 @@ class SwCollectTblLineBoxes
public:
SwCollectTblLineBoxes( sal_Bool bTop, sal_uInt16 nMd = 0, SwHistory* pHist=0 )
- : aBoxes( 16 ),
+ : aBoxes(),
pHst( pHist ), nMode( nMd ), nWidth( 0 ),
bGetFromTop( bTop ), bGetValues( sal_True )
@@ -89,7 +89,7 @@ public:
const SwTableBox* GetBoxOfPos( const SwTableBox& rBox );
void AddToUndoHistory( const SwCntntNode& rNd );
- sal_uInt16 Count() const { return aBoxes.Count(); }
+ sal_uInt16 Count() const { return aBoxes.size(); }
const SwTableBox& GetBox( std::size_t nPos, sal_uInt16* pWidth = 0 ) const
{
// hier wird die EndPos der Spalte benoetigt!
diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
index 577705c916df..e32f8ac60e15 100644
--- a/sw/source/core/layout/trvlfrm.cxx
+++ b/sw/source/core/layout/trvlfrm.cxx
@@ -1962,7 +1962,7 @@ bool SwRootFrm::MakeTblCrsrs( SwTableCursor& rTblCrsr )
{
SwTableBox* pInsBox = (SwTableBox*)
((SwCellFrm*)pCell)->GetTabBox();
- aNew.Insert( pInsBox );
+ aNew.insert( pInsBox );
}
if ( pCell->GetNext() )
{
diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx
index 18b46888af4c..603dfd4869cc 100644
--- a/sw/source/core/table/swnewtable.cxx
+++ b/sw/source/core/table/swnewtable.cxx
@@ -407,7 +407,7 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
{
if( nCurrBox )
{
- pBoxes->Insert( pBox );
+ pBoxes->insert( pBox );
pInnerBox = pBox;
pLeftBox = pLine->GetTabBoxes()[nCurrBox-1];
nDiff = nMin - nLeft;
@@ -438,7 +438,7 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
}
else if( nRight <= nMax )
{
- pBoxes->Insert( pBox );
+ pBoxes->insert( pBox );
if( nRow == nTop && nRowSpan < 0 )
{
bOkay = false;
@@ -457,7 +457,7 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const
{
if( nCurrBox+1 < nCount )
{
- pBoxes->Insert( pBox );
+ pBoxes->insert( pBox );
pInnerBox = pBox;
pRightBox = pLine->GetTabBoxes()[nCurrBox+1];
nDiff = nRight - nMax;
@@ -610,7 +610,7 @@ long lcl_InsertPosition( SwTable &rTable, std::vector<sal_uInt16>& rInsPos,
{
sal_Int32 nAddWidth = 0;
long nCount = 0;
- for( sal_uInt16 j = 0; j < rBoxes.Count(); ++j )
+ for( sal_uInt16 j = 0; j < rBoxes.size(); ++j )
{
SwTableBox *pBox = rBoxes[j];
SwTableLine* pLine = pBox->GetUpper();
@@ -814,7 +814,7 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes,
if( !bNewModel )
{
::GetMergeSel( rPam, rBoxes, ppMergeBox, pUndo );
- return rBoxes.Count() > 1;
+ return rBoxes.size() > 1;
}
CHECK_TABLE( *this )
// We have to assert a "rectangular" box selection before we start to merge
@@ -852,16 +852,16 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes,
{
// The selected boxes in the current line
const SwSelBoxes* pBoxes = pSel->aBoxes[ nCurrLine ];
- sal_uInt16 nColCount = pBoxes->Count();
+ sal_uInt16 nColCount = pBoxes->size();
// Iteration over the selected cell in the current row
for( sal_uInt16 nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
{
SwTableBox* pBox = (*pBoxes)[nCurrCol];
- rMerged.Insert( pBox );
+ rMerged.insert( pBox );
// Only the first selected cell in every row will be alive,
// the other will be deleted => put into rBoxes
if( nCurrCol )
- rBoxes.Insert( pBox );
+ rBoxes.insert( pBox );
else
{
if( nCurrLine == 1 )
@@ -930,7 +930,7 @@ bool SwTable::PrepareMerge( const SwPaM& rPam, SwSelBoxes& rBoxes,
for( sal_uInt16 nCurrLine = 0; nCurrLine < nLineCount; ++nCurrLine )
{
const SwSelBoxes* pBoxes = pSel->aBoxes[ nCurrLine ];
- sal_uInt16 nColCount = pBoxes->Count();
+ sal_uInt16 nColCount = pBoxes->size();
for( sal_uInt16 nCurrCol = 0; nCurrCol < nColCount; ++nCurrCol )
{
SwTableBox* pBox = (*pBoxes)[nCurrCol];
@@ -972,10 +972,10 @@ void SwTable::_FindSuperfluousRows( SwSelBoxes& rBoxes,
{
if( !pFirstLn || !pLastLn )
{
- if( !rBoxes.Count() )
+ if( rBoxes.empty() )
return;
pFirstLn = rBoxes[0]->GetUpper();
- pLastLn = rBoxes[ rBoxes.Count() - 1 ]->GetUpper();
+ pLastLn = rBoxes.back()->GetUpper();
}
sal_uInt16 nFirstLn = GetTabLines().C40_GETPOS(SwTableLine, pFirstLn );
sal_uInt16 nLastLn = GetTabLines().C40_GETPOS(SwTableLine, pLastLn );
@@ -989,7 +989,7 @@ void SwTable::_FindSuperfluousRows( SwSelBoxes& rBoxes,
{
SwTableBox *pBox = pLine->GetTabBoxes()[nCol];
if( pBox->getRowSpan() > 0 &&
- USHRT_MAX == rBoxes.GetPos( pBox ) )
+ rBoxes.end() == rBoxes.find( pBox ) )
{
bSuperfl = false;
break;
@@ -1000,7 +1000,7 @@ void SwTable::_FindSuperfluousRows( SwSelBoxes& rBoxes,
for( sal_uInt16 nCol = 0; nCol < nCols; ++nCol )
{
SwTableBox* pBox = pLine->GetTabBoxes()[nCol];
- rBoxes.Insert( pBox );
+ rBoxes.insert( pBox );
}
}
}
@@ -1068,7 +1068,7 @@ void lcl_getAllMergedBoxes( const SwTable& rTable, SwSelBoxes& rBoxes, SwTableBo
{
SwTableBox* pBox = &rBox;
OSL_ENSURE( pBox == &rBox.FindStartOfRowSpan( rTable, USHRT_MAX ), "Not a master box" );
- rBoxes.Insert( pBox );
+ rBoxes.insert( pBox );
if( pBox->getRowSpan() == 1 )
return;
const SwTableLine* pMyUpper = pBox->GetUpper();
@@ -1079,7 +1079,7 @@ void lcl_getAllMergedBoxes( const SwTable& rTable, SwSelBoxes& rBoxes, SwTableBo
{
pBox = lcl_LeftBorder2Box( nLeftBorder, rTable.GetTabLines()[nLine] );
if( pBox )
- rBoxes.Insert( pBox );
+ rBoxes.insert( pBox );
};
}
@@ -1092,7 +1092,7 @@ void lcl_UnMerge( const SwTable& rTable, SwTableBox& rBox, sal_uInt16 nCnt,
{
SwSelBoxes aBoxes;
lcl_getAllMergedBoxes( rTable, aBoxes, rBox );
- sal_uInt16 nCount = aBoxes.Count();
+ sal_uInt16 nCount = aBoxes.size();
if( nCount < 2 )
return;
if( nCnt > nCount )
@@ -1143,9 +1143,8 @@ void lcl_UnMerge( const SwTable& rTable, SwTableBox& rBox, sal_uInt16 nCnt,
void lcl_FillSelBoxes( SwSelBoxes &rBoxes, SwTableLine &rLine )
{
sal_uInt16 nBoxCount = rLine.GetTabBoxes().size();
- sal_uInt16 nCurrBox;
- for( nCurrBox = 0; nCurrBox < nBoxCount; ++nCurrBox )
- rBoxes.Insert( rLine.GetTabBoxes()[nCurrBox] );
+ for( sal_uInt16 i = 0; i < nBoxCount; ++i )
+ rBoxes.insert( rLine.GetTabBoxes()[i] );
}
/** SwTable::InsertSpannedRow(..) inserts "superfluous" rows, i.e. rows containig
@@ -1207,7 +1206,7 @@ void lcl_SophisticatedFillLineIndices( SwLineOffsetArray &rArr,
{
std::list< SwLineOffset > aBoxes;
SwLineOffset aLnOfs( USHRT_MAX, USHRT_MAX );
- for( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rBoxes.size(); ++i )
{ // Collect all end line indices and the row spans
const SwTableBox &rBox = rBoxes[ i ]->FindStartOfRowSpan( rTable );
OSL_ENSURE( rBox.getRowSpan() > 0, "Didn't I say 'StartOfRowSpan' ??" );
@@ -1306,7 +1305,7 @@ sal_uInt16 lcl_CalculateSplitLineHeights( SwSplitLines &rCurr, SwSplitLines &rNe
SwLineOffset aLnOfs( USHRT_MAX, USHRT_MAX );
sal_uInt16 nFirst = USHRT_MAX; // becomes the index of the first line
sal_uInt16 nLast = 0; // becomes the index of the last line of the splitting
- for( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rBoxes.size(); ++i )
{ // Collect all pairs (start+end) of line indices to split
const SwTableBox &rBox = rBoxes[ i ]->FindStartOfRowSpan( rTable );
OSL_ENSURE( rBox.getRowSpan() > 0, "Didn't I say 'StartOfRowSpan' ??" );
@@ -1363,7 +1362,7 @@ sal_uInt16 lcl_LineIndex( const SwTable& rTable, const SwSelBoxes& rBoxes,
{
sal_uInt16 nDirect = USHRT_MAX;
sal_uInt16 nSpan = USHRT_MAX;
- for( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rBoxes.size(); ++i )
{
SwTableBox *pBox = rBoxes[i];
const SwTableLine* pLine = rBoxes[i]->GetUpper();
@@ -1460,7 +1459,7 @@ sal_Bool SwTable::NewSplitRow( SwDoc* pDoc, const SwSelBoxes& rBoxes, sal_uInt16
}
std::set< sal_uInt16> aIndices;
- for( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rBoxes.size(); ++i )
{
OSL_ENSURE( rBoxes[i]->getRowSpan() != 1, "Forgot to split?" );
if( rBoxes[i]->getRowSpan() > 1 )
@@ -1548,7 +1547,7 @@ void SwTable::PrepareDelBoxes( const SwSelBoxes& rBoxes )
{
if( IsNewModel() )
{
- for( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rBoxes.size(); ++i )
{
SwTableBox* pBox = rBoxes[i];
long nRowSpan = pBox->getRowSpan();
@@ -1628,9 +1627,9 @@ void lcl_SearchSelBox( const SwTable &rTable, SwSelBoxes& rBoxes, long nMin, lon
( !bChkProtected ||
!pBox->GetFrmFmt()->GetProtect().IsCntntProtected() ) )
{
- sal_uInt16 nOldCnt = rBoxes.Count();
- rBoxes.Insert( pBox );
- if( bColumn && nRowSpan != 1 && nOldCnt < rBoxes.Count() )
+ sal_uInt16 nOldCnt = rBoxes.size();
+ rBoxes.insert( pBox );
+ if( bColumn && nRowSpan != 1 && nOldCnt < rBoxes.size() )
{
SwTableBox *pMasterBox = pBox->getRowSpan() > 0 ? pBox
: &pBox->FindStartOfRowSpan( rTable, USHRT_MAX );
@@ -1667,12 +1666,7 @@ void SwTable::CreateSelection( const SwPaM& rPam, SwSelBoxes& rBoxes,
void SwTable::CreateSelection( const SwNode* pStartNd, const SwNode* pEndNd,
SwSelBoxes& rBoxes, const SearchType eSearch, bool bChkProtected ) const
{
- // SwSelBoxes aKeepBoxes;
- if( rBoxes.Count() )
- {
- // aKeepBoxes.Insert( &rBoxes );
- rBoxes.Remove( sal_uInt16(0), rBoxes.Count() );
- }
+ rBoxes.clear();
// Looking for start and end of the selection given by SwNode-pointer
sal_uInt16 nLines = aLines.size();
// nTop becomes the line number of the upper box
@@ -1699,7 +1693,7 @@ void SwTable::CreateSelection( const SwNode* pStartNd, const SwNode* pEndNd,
{
if( !bChkProtected ||
!pBox->GetFrmFmt()->GetProtect().IsCntntProtected() )
- rBoxes.Insert( pBox );
+ rBoxes.insert( pBox );
if( nFound )
{
nBottom = nRow;
@@ -1742,7 +1736,7 @@ void SwTable::CreateSelection( const SwNode* pStartNd, const SwNode* pEndNd,
OSL_ENSURE( pBox, "Missing table box" );
if( pBox->getRowSpan() > 0 && ( !bChkProtected ||
!pBox->GetFrmFmt()->GetProtect().IsCntntProtected() ) )
- rBoxes.Insert( pBox );
+ rBoxes.insert( pBox );
}
}
return;
@@ -1804,11 +1798,11 @@ void SwTable::ExpandColumnSelection( SwSelBoxes& rBoxes, long &rMin, long &rMax
OSL_ENSURE( bNewModel, "Don't call me for old tables" );
rMin = 0;
rMax = 0;
- if( aLines.empty() || !rBoxes.Count() )
+ if( aLines.empty() || rBoxes.empty() )
return;
sal_uInt16 nLineCnt = aLines.size();
- sal_uInt16 nBoxCnt = rBoxes.Count();
+ sal_uInt16 nBoxCnt = rBoxes.size();
sal_uInt16 nBox = 0;
for( sal_uInt16 nRow = 0; nRow < nLineCnt && nBox < nBoxCnt; ++nRow )
{
@@ -1840,7 +1834,7 @@ void SwTable::ExpandColumnSelection( SwSelBoxes& rBoxes, long &rMin, long &rMax
SwTableBox* pBox = pLine->GetTabBoxes()[nCurrBox];
nRight += pBox->GetFrmFmt()->GetFrmSize().GetWidth();
if( nLeft >= rMin && nRight <= rMax )
- rBoxes.Insert( pBox );
+ rBoxes.insert( pBox );
}
}
}
@@ -1902,7 +1896,7 @@ void SwTable::PrepareDeleteCol( long nMin, long nMax )
void SwTable::ExpandSelection( SwSelBoxes& rBoxes ) const
{
- for( sal_uInt16 i = 0; i < rBoxes.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rBoxes.size(); ++i )
{
SwTableBox *pBox = rBoxes[i];
long nRowSpan = pBox->getRowSpan();
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 0e175ff4ada7..f508d4111a7c 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -1521,10 +1521,10 @@ SwUndoTblNdsChg::SwUndoTblNdsChg( SwUndoId nAction,
void SwUndoTblNdsChg::ReNewBoxes( const SwSelBoxes& rBoxes )
{
- if( rBoxes.Count() != aBoxes.size() )
+ if( rBoxes.size() != aBoxes.size() )
{
aBoxes.clear();
- for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.size(); ++n )
aBoxes.insert( rBoxes[n]->GetSttIdx() );
}
}
@@ -1596,7 +1596,7 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd,
OSL_ENSURE( ! IsDelBox(), "wrong Action" );
pNewSttNds.reset( new std::set<_BoxMove> );
- OSL_ENSURE( rTbl.IsNewModel() || rOld.size() + nCount * rBoxes.Count() == rTblBoxes.size(),
+ OSL_ENSURE( rTbl.IsNewModel() || rOld.size() + nCount * rBoxes.size() == rTblBoxes.size(),
"unexpected boxes" );
OSL_ENSURE( rOld.size() <= rTblBoxes.size(), "more unexpected boxes" );
for( sal_uInt16 n = 0, i = 0; i < rTblBoxes.size(); ++i )
@@ -1621,7 +1621,7 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd,
const SwTableLine* pBoxLine = pBox->GetUpper();
sal_uInt16 nLineDiff = lcl_FindParentLines(rTbl,*pBox).C40_GETPOS(SwTableLine,pBoxLine);
sal_uInt16 nLineNo = 0;
- for( sal_uInt16 j = 0; j < rBoxes.Count(); ++j )
+ for( sal_uInt16 j = 0; j < rBoxes.size(); ++j )
{
pCheckBox = rBoxes[j];
if( pCheckBox->GetUpper()->GetUpper() == pBox->GetUpper()->GetUpper() )
@@ -1810,7 +1810,7 @@ void SwUndoTblNdsChg::RedoImpl(::sw::UndoRedoContext & rContext)
for( std::set<sal_uLong>::iterator it = aBoxes.begin(); it != aBoxes.end(); ++it )
{
SwTableBox* pBox = pTblNd->GetTable().GetTblBox( *it );
- aSelBoxes.Insert( pBox );
+ aSelBoxes.insert( pBox );
}
// create SelBoxes and call InsertCell/-Row/SplitTbl
@@ -1963,7 +1963,7 @@ CHECKTABLE(pTblNd->GetTable())
pCpyBox->GetUpper() );
rLnBoxes.push_back( pBox );
- aSelBoxes.Insert( pBox );
+ aSelBoxes.insert( pBox );
}
CHECKTABLE(pTblNd->GetTable())
@@ -2097,7 +2097,7 @@ void SwUndoTblMerge::MoveBoxCntnt( SwDoc* pDoc, SwNodeRange& rRg, SwNodeIndex& r
void SwUndoTblMerge::SetSelBoxes( const SwSelBoxes& rBoxes )
{
// memorize selection
- for( sal_uInt16 n = 0; n < rBoxes.Count(); ++n )
+ for( sal_uInt16 n = 0; n < rBoxes.size(); ++n )
aBoxes.insert( rBoxes[n]->GetSttIdx() );
// as separator for inserts of new boxes after shifting
@@ -2105,7 +2105,7 @@ void SwUndoTblMerge::SetSelBoxes( const SwSelBoxes& rBoxes )
// The new table model does not delete overlapped cells (by row span),
// so the rBoxes array might be empty even some cells have been merged.
- if( rBoxes.Count() )
+ if( !rBoxes.empty() )
nTblNode = rBoxes[ 0 ]->GetSttNd()->FindTableNode()->GetIndex();
}
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index df04bca69077..732d94ab5ede 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -1684,12 +1684,12 @@ void SwChartDataProvider::AddRowCols(
if (rTable.IsTblComplex())
return;
- const sal_uInt16 nBoxes = rBoxes.Count();
+ const sal_uInt16 nBoxes = rBoxes.size();
if (nBoxes < 1 || nLines < 1)
return;
- SwTableBox* pFirstBox = *( rBoxes.GetData() + 0 );
- SwTableBox* pLastBox = *( rBoxes.GetData() + nBoxes - 1 );
+ SwTableBox* pFirstBox = rBoxes[0];
+ SwTableBox* pLastBox = rBoxes.back();
if (pFirstBox && pLastBox)
{
diff --git a/sw/source/core/unocore/unotbl.cxx b/sw/source/core/unocore/unotbl.cxx
index a36227b7bb8d..bd6a44b36911 100644
--- a/sw/source/core/unocore/unotbl.cxx
+++ b/sw/source/core/unocore/unotbl.cxx
@@ -1534,8 +1534,8 @@ SwXTextTableCursor::SwXTextTableCursor(SwFrmFmt& rTableFmt, const SwTableCursor*
}
const SwSelBoxes& rBoxes = pTableSelection->GetBoxes();
SwTableCursor* pTableCrsr = dynamic_cast<SwTableCursor*>(pUnoCrsr);
- for(sal_uInt16 i = 0; i < rBoxes.Count(); i++)
- pTableCrsr->InsertBox( *rBoxes.GetObject(i) );
+ for(sal_uInt16 i = 0; i < rBoxes.size(); i++)
+ pTableCrsr->InsertBox( *rBoxes[i] );
pUnoCrsr->Add(&aCrsrDepend);
SwUnoTableCrsr* pTblCrsr = dynamic_cast<SwUnoTableCrsr*>(pUnoCrsr);
@@ -2382,7 +2382,7 @@ void SwXTextTable::dispose(void) throw( uno::RuntimeException )
SwTableSortBoxes& rBoxes = pTable->GetTabSortBoxes();
SwSelBoxes aSelBoxes;
for(SwTableSortBoxes::const_iterator it = rBoxes.begin(); it != rBoxes.end(); ++it )
- aSelBoxes.Insert( *it );
+ aSelBoxes.insert( *it );
pFmt->GetDoc()->DeleteRowCol(aSelBoxes);
}
else
@@ -2951,7 +2951,7 @@ void SwXTextTable::sort(const uno::Sequence< beans::PropertyValue >& rDescriptor
for( sal_uInt16 n = 0; n < rTBoxes.size(); ++n )
{
SwTableBox* pBox = rTBoxes[ n ];
- aBoxes.Insert( pBox );
+ aBoxes.insert( pBox );
}
UnoActionContext aContext( pFmt->GetDoc() );
pFmt->GetDoc()->SortTbl(aBoxes, aSortOpt);
@@ -2979,7 +2979,7 @@ void SwXTextTable::autoFormat(const OUString& aName) throw( lang::IllegalArgumen
for( sal_uInt16 n = 0; n < rTBoxes.size(); ++n )
{
SwTableBox* pBox = rTBoxes[ n ];
- aBoxes.Insert( pBox );
+ aBoxes.insert( pBox );
}
UnoActionContext aContext( pFmt->GetDoc() );
pFmt->GetDoc()->SetTableAutoFmt( aBoxes, aAutoFmtTbl[i] );
diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx
index 23ffe9a5a9ae..5669c8692477 100644
--- a/sw/source/filter/ww1/fltshell.cxx
+++ b/sw/source/filter/ww1/fltshell.cxx
@@ -1487,7 +1487,7 @@ void SwFltOutDoc::NextTableRow()
{
// duplicate row:
SwSelBoxes aSelBoxes;
- aSelBoxes.Insert( pTableBox );
+ aSelBoxes.insert( pTableBox );
GetDoc().InsertRow(aSelBoxes);
usTableX = 0;
SeekCell(++usTableY, usTableX, sal_True);
@@ -1602,9 +1602,10 @@ void SwFltOutDoc::SetCellSpace(sal_uInt16 nDist)
void SwFltOutDoc::DeleteCell(sal_uInt16 nCell /* = USHRT_MAX */)
{
SwTableBox* pTableBox = GetBox(usTableY, nCell);
- if(pTableBox){
+ if( pTableBox )
+ {
SwSelBoxes aSelBoxes;
- aSelBoxes.Insert( pTableBox );
+ aSelBoxes.insert( pTableBox );
GetDoc().DeleteRowCol(aSelBoxes);
usTableX--;
}
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 1b1597493c92..15889c0911e4 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -80,7 +80,7 @@
using namespace ::com::sun::star;
-class WW8SelBoxInfo: public SwSelBoxes_SAR
+class WW8SelBoxInfo: public SwSelBoxes
{
private:
WW8SelBoxInfo(const WW8SelBoxInfo&);
@@ -2739,11 +2739,11 @@ void WW8TabDesc::FinishSwTable()
groupIt != aMergeGroups.end();
++groupIt)
{
- sal_uInt16 nActBoxCount = groupIt->Count();
+ sal_uInt16 nActBoxCount = groupIt->size();
if( ( 1 < nActBoxCount ) && (*groupIt)[0] )
{
- const sal_uInt16 nRowSpan = groupIt->Count();
+ const sal_uInt16 nRowSpan = groupIt->size();
for (sal_uInt16 n = 0; n < nRowSpan; ++n)
{
SwTableBox* pCurrentBox = (*groupIt)[n];
@@ -3331,7 +3331,7 @@ SwTableBox* WW8TabDesc::UpdateTableMergeGroup( WW8_TCell& rCell,
if( pTheMergeGroup )
{
// aktuelle Box der Merge-Gruppe hinzufuegen
- pTheMergeGroup->Insert( pActBox, pTheMergeGroup->Count() );
+ pTheMergeGroup->insert( pActBox );
// Target-Box zurueckmelden
pResult = (*pTheMergeGroup)[ 0 ];