diff options
author | Noel Grandin <noel@peralex.com> | 2012-06-22 13:32:49 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-06-25 20:13:18 +0200 |
commit | 51bf3fb3aa35ccd7e777186b34969450c03e4515 (patch) | |
tree | 1107b90af33c4aadc403cfeaab4912a979887be6 /sw | |
parent | Remove unnecessary forward declaration (diff) | |
download | core-51bf3fb3aa35ccd7e777186b34969450c03e4515.tar.gz core-51bf3fb3aa35ccd7e777186b34969450c03e4515.zip |
Convert local vars in lcl_FindStartEndRow from Svptrarr to std::vector
Change-Id: I4c429fa1b2e175f3cf5f24cad7d0d2ff401ed473
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/frmedt/tblsel.cxx | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/sw/source/core/frmedt/tblsel.cxx b/sw/source/core/frmedt/tblsel.cxx index 1730e3761d81..8444e870ec06 100644 --- a/sw/source/core/frmedt/tblsel.cxx +++ b/sw/source/core/frmedt/tblsel.cxx @@ -1579,37 +1579,35 @@ void lcl_FindStartEndRow( const SwLayoutFrm *&rpStart, while ( rpEnd->GetNext() ) rpEnd = (SwLayoutFrm*)rpEnd->GetNext(); - SvPtrarr aSttArr( 8 ), aEndArr( 8 ); + std::deque<const SwLayoutFrm *> aSttArr, aEndArr; const SwLayoutFrm *pTmp; for( pTmp = rpStart; (FRM_CELL|FRM_ROW) & pTmp->GetType(); pTmp = pTmp->GetUpper() ) { - void* p = (void*)pTmp; - aSttArr.Insert( p, 0 ); + aSttArr.push_front( pTmp ); } for( pTmp = rpEnd; (FRM_CELL|FRM_ROW) & pTmp->GetType(); pTmp = pTmp->GetUpper() ) { - void* p = (void*)pTmp; - aEndArr.Insert( p, 0 ); + aEndArr.push_front( pTmp ); } - for( sal_uInt16 n = 0; n < aEndArr.Count() && n < aSttArr.Count(); ++n ) + for( sal_uInt16 n = 0; n < aEndArr.size() && n < aSttArr.size(); ++n ) if( aSttArr[ n ] != aEndArr[ n ] ) { // first unequal line or box - all odds are if( n & 1 ) // 1, 3, 5, ... are boxes { - rpStart = (SwLayoutFrm*)aSttArr[ n ]; - rpEnd = (SwLayoutFrm*)aEndArr[ n ]; + rpStart = aSttArr[ n ]; + rpEnd = aEndArr[ n ]; } else // 0, 2, 4, ... are lines { // check if start & end line are the first & last Line of the // box. If not return these cells. // Else the hole line with all Boxes has to be deleted. - rpStart = (SwLayoutFrm*)aSttArr[ n+1 ]; - rpEnd = (SwLayoutFrm*)aEndArr[ n+1 ]; + rpStart = aSttArr[ n+1 ]; + rpEnd = aEndArr[ n+1 ]; if( n ) { const SwCellFrm* pCellFrm = (SwCellFrm*)aSttArr[ n-1 ]; |