diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-07-30 08:00:48 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-07-30 12:47:50 +0100 |
commit | 2b049bb03a6d7bf55cac2eedceff52b998167e3c (patch) | |
tree | 290c628e0c657ea8cb51b465df03494f1aad4b71 /sw | |
parent | b3a31f640f9af732f9f9949baf9985b98b65b209 (diff) |
C40_GETPOS is unnecessary now
Change-Id: Ida64fbeba996c8e3deb7591be825b61d17044d9c
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/tblcpy.cxx | 10 | ||||
-rw-r--r-- | sw/source/core/docnode/ndtbl.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/frmedt/tblsel.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/table/swnewtable.cxx | 22 | ||||
-rw-r--r-- | sw/source/core/table/swtable.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/undo/untbl.cxx | 6 |
6 files changed, 24 insertions, 24 deletions
diff --git a/sw/source/core/doc/tblcpy.cxx b/sw/source/core/doc/tblcpy.cxx index 590740ade181..273a8659501b 100644 --- a/sw/source/core/doc/tblcpy.cxx +++ b/sw/source/core/doc/tblcpy.cxx @@ -196,12 +196,12 @@ namespace _FndLines &rFndLines = rFndBox.GetLines(); maCols.push_front(0); const SwTableLine* pLine = rFndLines.front().GetLine(); - sal_uInt16 nStartLn = rTable.GetTabLines().C40_GETPOS( SwTableLine, pLine ); + sal_uInt16 nStartLn = rTable.GetTabLines().GetPos( pLine ); sal_uInt16 nEndLn = nStartLn; if( rFndLines.size() > 1 ) { pLine = rFndLines.back().GetLine(); - nEndLn = rTable.GetTabLines().C40_GETPOS( SwTableLine, pLine ); + nEndLn = rTable.GetTabLines().GetPos( pLine ); } if( nStartLn < USHRT_MAX && nEndLn < USHRT_MAX ) { @@ -795,7 +795,7 @@ sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwNodeIndex& rSttBox, SwTableLine* pNxtLine = pMyBox->GetUpper(); while( pNxtLine->GetUpper() ) pNxtLine = pNxtLine->GetUpper()->GetUpper(); - sal_uInt16 nPos = GetTabLines().C40_GETPOS( SwTableLine, pNxtLine ); + sal_uInt16 nPos = GetTabLines().GetPos( pNxtLine ); // Is there a next? if( nPos + 1 >= (sal_uInt16)GetTabLines().size() ) bDelCntnt = sal_False; // there is none, all goes into the last Box @@ -847,7 +847,7 @@ sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes, if( 1 != rCpyTbl.GetTabSortBoxes().size() ) { SwTableLine* pSttLine = pSttBox->GetUpper(); - sal_uInt16 nSttLine = GetTabLines().C40_GETPOS( SwTableLine, pSttLine ); + sal_uInt16 nSttLine = GetTabLines().GetPos( pSttLine ); _FndBox* pFndBox; sal_uInt16 nFndCnt = aFndBox.GetLines().size(); @@ -858,7 +858,7 @@ sal_Bool SwTable::InsTable( const SwTable& rCpyTbl, const SwSelBoxes& rSelBoxes, sal_uInt16 nTstLns = 0; pFLine = &aFndBox.GetLines().front(); pSttLine = pFLine->GetLine(); - nSttLine = GetTabLines().C40_GETPOS( SwTableLine, pSttLine ); + nSttLine = GetTabLines().GetPos( pSttLine ); // Do we have as many rows, actually? if( 1 == nFndCnt ) { diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx index f89ff9c73377..944e92011bfc 100644 --- a/sw/source/core/docnode/ndtbl.cxx +++ b/sw/source/core/docnode/ndtbl.cxx @@ -3145,7 +3145,7 @@ sal_Bool SwDoc::SplitTable( const SwPosition& rPos, sal_uInt16 eHdlnMode, pLine = pLine->GetUpper()->GetUpper(); // in pLine steht jetzt die GrundLine. - aMsgHnt.nSplitLine = rTbl.GetTabLines().C40_GETPOS( SwTableLine, pLine ); + aMsgHnt.nSplitLine = rTbl.GetTabLines().GetPos( pLine ); } String sNewTblNm( GetUniqueTblName() ); @@ -3371,7 +3371,7 @@ SwTableNode* SwNodes::SplitTable( const SwNodeIndex& rPos, sal_Bool bAfter, pLine = pLine->GetUpper()->GetUpper(); // in pLine steht jetzt die GrundLine. - sal_uInt16 nLinePos = rTbl.GetTabLines().C40_GETPOS( SwTableLine, pLine ); + sal_uInt16 nLinePos = rTbl.GetTabLines().GetPos( pLine ); if( USHRT_MAX == nLinePos || ( bAfter ? ++nLinePos >= rTbl.GetTabLines().size() : !nLinePos )) return 0; // nicht gefunden oder letze Line !! diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 00e1b48d1815..aa8fbc43924a 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -2146,13 +2146,13 @@ void _FndBox::SetTableLines( const SwTable &rTable ) return; SwTableLine* pTmpLine = GetLines().front().GetLine(); - sal_uInt16 nPos = rTable.GetTabLines().C40_GETPOS( SwTableLine, pTmpLine ); + sal_uInt16 nPos = rTable.GetTabLines().GetPos( pTmpLine ); OSL_ENSURE( USHRT_MAX != nPos, "Line steht nicht in der Tabelle" ); if( nPos ) pLineBefore = rTable.GetTabLines()[ nPos - 1 ]; pTmpLine = GetLines().back().GetLine(); - nPos = rTable.GetTabLines().C40_GETPOS( SwTableLine, pTmpLine ); + nPos = rTable.GetTabLines().GetPos( pTmpLine ); OSL_ENSURE( USHRT_MAX != nPos, "Line steht nicht in der Tabelle" ); if( ++nPos < rTable.GetTabLines().size() ) pLineBehind = rTable.GetTabLines()[nPos]; diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx index 603dfd4869cc..5fa237713931 100644 --- a/sw/source/core/table/swnewtable.cxx +++ b/sw/source/core/table/swnewtable.cxx @@ -501,7 +501,7 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const pOuterBox->FindStartOfRowSpan( *this, USHRT_MAX ); nOutSpan = rBox.getRowSpan(); const SwTableLine* pTmpL = rBox.GetUpper(); - nCheck = GetTabLines().C40_GETPOS( SwTableLine, pTmpL ); + nCheck = GetTabLines().GetPos( pTmpL ); if( nCheck < nTop ) bOkay = false; if( pOuterBox == pLeftBox ) @@ -617,7 +617,7 @@ long lcl_InsertPosition( SwTable &rTable, std::vector<sal_uInt16>& rInsPos, long nWidth = rBoxes[j]->GetFrmFmt()->GetFrmSize().GetWidth(); nAddWidth += nWidth; sal_uInt16 nCurrBox = pLine->GetTabBoxes().GetPos( pBox ); - sal_uInt16 nCurrLine = rTable.GetTabLines().C40_GETPOS(SwTableLine, pLine ); + sal_uInt16 nCurrLine = rTable.GetTabLines().GetPos( pLine ); OSL_ENSURE( nCurrLine != USHRT_MAX, "Time to say Good-Bye.." ); if( rInsPos[ nCurrLine ] == USHRT_MAX ) { @@ -977,8 +977,8 @@ void SwTable::_FindSuperfluousRows( SwSelBoxes& rBoxes, pFirstLn = rBoxes[0]->GetUpper(); pLastLn = rBoxes.back()->GetUpper(); } - sal_uInt16 nFirstLn = GetTabLines().C40_GETPOS(SwTableLine, pFirstLn ); - sal_uInt16 nLastLn = GetTabLines().C40_GETPOS(SwTableLine, pLastLn ); + sal_uInt16 nFirstLn = GetTabLines().GetPos( pFirstLn ); + sal_uInt16 nLastLn = GetTabLines().GetPos( pLastLn ); for( sal_uInt16 nRow = nFirstLn; nRow <= nLastLn; ++nRow ) { SwTableLine* pLine = aLines[nRow]; @@ -1018,7 +1018,7 @@ SwTableBox& SwTableBox::FindStartOfRowSpan( const SwTable& rTable, sal_uInt16 nM long nLeftBorder = lcl_Box2LeftBorder( *this ); SwTableBox* pBox = this; const SwTableLine* pMyUpper = GetUpper(); - sal_uInt16 nLine = rTable.GetTabLines().C40_GETPOS(SwTableLine, pMyUpper ); + sal_uInt16 nLine = rTable.GetTabLines().GetPos( pMyUpper ); if( nLine && nLine < rTable.GetTabLines().size() ) { SwTableBox* pNext; @@ -1048,7 +1048,7 @@ SwTableBox& SwTableBox::FindEndOfRowSpan( const SwTable& rTable, sal_uInt16 nMax if( nMaxStep > --nAbsSpan ) nMaxStep = (sal_uInt16)nAbsSpan; const SwTableLine* pMyUpper = GetUpper(); - sal_uInt16 nLine = rTable.GetTabLines().C40_GETPOS(SwTableLine, pMyUpper ); + sal_uInt16 nLine = rTable.GetTabLines().GetPos( pMyUpper ); nMaxStep = nLine + nMaxStep; if( nMaxStep >= rTable.GetTabLines().size() ) nMaxStep = rTable.GetTabLines().size() - 1; @@ -1072,7 +1072,7 @@ void lcl_getAllMergedBoxes( const SwTable& rTable, SwSelBoxes& rBoxes, SwTableBo if( pBox->getRowSpan() == 1 ) return; const SwTableLine* pMyUpper = pBox->GetUpper(); - sal_uInt16 nLine = rTable.GetTabLines().C40_GETPOS(SwTableLine, pMyUpper ); + sal_uInt16 nLine = rTable.GetTabLines().GetPos( pMyUpper ); long nLeftBorder = lcl_Box2LeftBorder( *pBox ); sal_uInt16 nCount = rTable.GetTabLines().size(); while( ++nLine < nCount && pBox && pBox->getRowSpan() != -1 ) @@ -1214,7 +1214,7 @@ void lcl_SophisticatedFillLineIndices( SwLineOffsetArray &rArr, { const SwTableLine *pLine = rBox.GetUpper(); const sal_uInt16 nEnd = sal_uInt16( rBox.getRowSpan() + - rTable.GetTabLines().C40_GETPOS( SwTableLine, pLine ) ); + rTable.GetTabLines().GetPos( pLine ) ); // The next if statement is a small optimization if( aLnOfs.first != nEnd || aLnOfs.second != rBox.getRowSpan() ) { @@ -1310,7 +1310,7 @@ sal_uInt16 lcl_CalculateSplitLineHeights( SwSplitLines &rCurr, SwSplitLines &rNe const SwTableBox &rBox = rBoxes[ i ]->FindStartOfRowSpan( rTable ); OSL_ENSURE( rBox.getRowSpan() > 0, "Didn't I say 'StartOfRowSpan' ??" ); const SwTableLine *pLine = rBox.GetUpper(); - const sal_uInt16 nStart = rTable.GetTabLines().C40_GETPOS( SwTableLine, pLine ); + const sal_uInt16 nStart = rTable.GetTabLines().GetPos( pLine ); const sal_uInt16 nEnd = sal_uInt16( rBox.getRowSpan() + nStart - 1 ); // The next if statement is a small optimization if( aLnOfs.first != nStart || aLnOfs.second != nEnd ) @@ -1366,7 +1366,7 @@ sal_uInt16 lcl_LineIndex( const SwTable& rTable, const SwSelBoxes& rBoxes, { SwTableBox *pBox = rBoxes[i]; const SwTableLine* pLine = rBoxes[i]->GetUpper(); - sal_uInt16 nPos = rTable.GetTabLines().C40_GETPOS( SwTableLine, pLine ); + sal_uInt16 nPos = rTable.GetTabLines().GetPos( pLine ); if( USHRT_MAX != nPos ) { if( bBehind ) @@ -1555,7 +1555,7 @@ void SwTable::PrepareDelBoxes( const SwSelBoxes& rBoxes ) { long nLeft = lcl_Box2LeftBorder( *pBox ); SwTableLine *pLine = pBox->GetUpper(); - sal_uInt16 nLinePos = GetTabLines().C40_GETPOS(SwTableLine, pLine); + sal_uInt16 nLinePos = GetTabLines().GetPos( pLine); OSL_ENSURE( nLinePos < USHRT_MAX, "Box/table mismatch" ); if( nRowSpan > 1 ) { diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index 200c5a69df13..3d1371bc1031 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -1293,7 +1293,7 @@ void SwTable::NewSetTabCols( Parm &rParm, const SwTabCols &rNew, if( bCurRowOnly ) { const SwTableLine* pCurrLine = pStart->GetUpper(); - sal_uInt16 nCurr = rLines.C40_GETPOS( SwTableLine, pCurrLine ); + sal_uInt16 nCurr = rLines.GetPos( pCurrLine ); if( nCurr >= USHRT_MAX ) return; diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx index 10fa4ed3e8ab..27e398359300 100644 --- a/sw/source/core/undo/untbl.cxx +++ b/sw/source/core/undo/untbl.cxx @@ -1568,7 +1568,7 @@ SwTableLine* lcl_FindTableLine( const SwTable& rTable, rBox.GetUpper()->GetUpper()->GetTabLines() : rTable.GetTabLines(); const SwTableLine* pLine = rBox.GetUpper(); - sal_uInt16 nLineNo = rTableLines.C40_GETPOS( SwTableLine, pLine ); + sal_uInt16 nLineNo = rTableLines.GetPos( pLine ); pRet = rTableLines[nLineNo - 1]; return pRet; @@ -1619,7 +1619,7 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd, const SwTableBox* pSourceBox = NULL; const SwTableBox* pCheckBox = NULL; const SwTableLine* pBoxLine = pBox->GetUpper(); - sal_uInt16 nLineDiff = lcl_FindParentLines(rTbl,*pBox).C40_GETPOS(SwTableLine,pBoxLine); + sal_uInt16 nLineDiff = lcl_FindParentLines(rTbl,*pBox).GetPos(pBoxLine); sal_uInt16 nLineNo = 0; for( sal_uInt16 j = 0; j < rBoxes.size(); ++j ) { @@ -1628,7 +1628,7 @@ void SwUndoTblNdsChg::SaveNewBoxes( const SwTableNode& rTblNd, { const SwTableLine* pCheckLine = pCheckBox->GetUpper(); sal_uInt16 nCheckLine = lcl_FindParentLines( rTbl, *pCheckBox ). - C40_GETPOS( SwTableLine, pCheckLine ); + GetPos( pCheckLine ); if( ( !pSourceBox || nCheckLine > nLineNo ) && nCheckLine < nLineDiff ) { nLineNo = nCheckLine; |