summaryrefslogtreecommitdiff
path: root/sw/source/filter/rtf
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/rtf
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/rtf')
-rw-r--r--sw/source/filter/rtf/rtftbl.cxx18
-rw-r--r--sw/source/filter/rtf/swparrtf.cxx2
2 files changed, 10 insertions, 10 deletions
diff --git a/sw/source/filter/rtf/rtftbl.cxx b/sw/source/filter/rtf/rtftbl.cxx
index 677710cfe6a7..86c315424dea 100644
--- a/sw/source/filter/rtf/rtftbl.cxx
+++ b/sw/source/filter/rtf/rtftbl.cxx
@@ -187,8 +187,8 @@ void SwRTFParser::ReadTable( int nToken )
if( pLine )
{
sal_uInt16 nTmpBox = m_nCurrentBox;
- if( nTmpBox > pLine->GetTabBoxes().Count() )
- nTmpBox = pLine->GetTabBoxes().Count();
+ if( nTmpBox > pLine->GetTabBoxes().size() )
+ nTmpBox = pLine->GetTabBoxes().size();
for (sal_uInt16 n = nTmpBox; n; )
{
@@ -548,7 +548,7 @@ void SwRTFParser::ReadTable( int nToken )
pNewLine = (*pLns)[ pLns->Count() - 1 ];
// jetzt die Boxen abgleichen
- sal_uInt16 nBoxes = Min( pNewLine->GetTabBoxes().Count(), (sal_uInt16)aBoxFmts.size() );
+ sal_uInt16 nBoxes = Min( pNewLine->GetTabBoxes().size(), aBoxFmts.size() );
sal_uInt16 n;
for( n = 0; n < nBoxes; ++n )
@@ -567,7 +567,7 @@ void SwRTFParser::ReadTable( int nToken )
{
// remove ContentIndex of other Bound
pPam->SetMark(); pPam->DeleteMark();
- while( n < pNewLine->GetTabBoxes().Count() )
+ while( n < pNewLine->GetTabBoxes().size() )
_DeleteBox( pTableNode->GetTable(),
pNewLine->GetTabBoxes()[ n ], 0, sal_False, sal_False );
}
@@ -747,7 +747,7 @@ void SwRTFParser::ReadTable( int nToken )
if (pNewLine)
{
SwTableBoxes &rBoxes = pNewLine->GetTabBoxes();
- if (SwTableBox* pBox = ((m_nCurrentBox < rBoxes.Count())
+ if (SwTableBox* pBox = ((m_nCurrentBox < rBoxes.size())
? rBoxes[m_nCurrentBox] : 0))
{
if (const SwStartNode *pStart = pBox->GetSttNd())
@@ -816,7 +816,7 @@ void SwRTFParser::GotoNextBox()
SwTableLines& rLns = pTableNode->GetTable().GetTabLines();
SwTableLine* pLine = rLns[ rLns.Count()-1 ];
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
- SwTableBox* pBox = rBoxes[ rBoxes.Count()-1 ];
+ SwTableBox* pBox = rBoxes.back();
if( ++m_nCurrentBox >= aMergeBoxes.size() )
m_nCurrentBox = aMergeBoxes.size()-1;
@@ -831,7 +831,7 @@ void SwRTFParser::GotoNextBox()
if( !aMergeBoxes[ nTmp ] )
++nRealBox;
- if( nRealBox < rBoxes.Count() )
+ if( nRealBox < rBoxes.size() )
{
pPam->GetPoint()->nNode = *rBoxes[ nRealBox ]->GetSttNd()->EndOfSectionNode();
pPam->Move( fnMoveBackward, fnGoCntnt );
@@ -870,7 +870,7 @@ void SwRTFParser::NewTblLine()
SwTableLines* pLns = &pTableNode->GetTable().GetTabLines();
SwTableLine* pLine = (*pLns)[ pLns->Count()-1 ];
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
- SwTableBox* pBox = rBoxes[ rBoxes.Count()-1 ];
+ SwTableBox* pBox = rBoxes.back();
if(nRowsToRepeat>0)
pTableNode->GetTable().SetRowsToRepeat( nRowsToRepeat );
@@ -919,7 +919,7 @@ void SwRTFParser::NewTblLine()
pPam->SetMark();
pLine = (*pLns)[ pLns->Count()-1 ];
- pBox = pLine->GetTabBoxes()[ pLine->GetTabBoxes().Count() -1 ];
+ pBox = pLine->GetTabBoxes().back();
pPam->GetPoint()->nNode = *pBox->GetSttNd()->EndOfSectionNode();
pPam->Move( fnMoveBackward );
pDoc->SetTxtFmtColl( *pPam, pColl );
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx
index ccc8124e8e3b..221b512248bf 100644
--- a/sw/source/filter/rtf/swparrtf.cxx
+++ b/sw/source/filter/rtf/swparrtf.cxx
@@ -1785,7 +1785,7 @@ void SwRTFParser::NextToken( int nToken )
const SwTableBox* pBox = pTblNd->GetTable().GetTblBox(
pBoxStt->GetIndex() );
const SwTableLine* pLn = pBox->GetUpper();
- pBox = pLn->GetTabBoxes()[ pLn->GetTabBoxes().Count() - 1 ];
+ pBox = pLn->GetTabBoxes().back();
rIdx = *pBox->GetSttNd()->EndOfSectionNode();
pPam->Move( fnMoveForward, fnGoNode );
}