diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/docedt.cxx | 14 | ||||
-rw-r--r-- | sw/source/core/inc/mvsave.hxx | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index 14df0e5262ae..90f5e8c2ae38 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -666,16 +666,16 @@ _SaveRedlEndPosForRestore::_SaveRedlEndPosForRestore( const SwNodeIndex& rInsIdx const SwPosition* pEnd; SwPosition aSrcPos( rInsIdx, SwIndex( rNd.GetCntntNode(), nCnt )); const SwRedline* pRedl = pDest->GetRedline( aSrcPos, &nFndPos ); - while( nFndPos-- && *( pEnd = ( pRedl = - pDest->GetRedlineTbl()[ nFndPos ] )->End() ) == aSrcPos && *pRedl->Start() < aSrcPos ) + while( nFndPos-- + && *( pEnd = ( pRedl = pDest->GetRedlineTbl()[ nFndPos ] )->End() ) == aSrcPos + && *pRedl->Start() < aSrcPos ) { if( !pSavArr ) { - pSavArr = new SvPtrarr( 2 ); + pSavArr = new std::vector<SwPosition*>; pSavIdx = new SwNodeIndex( rInsIdx, -1 ); } - void* p = (void*)pEnd; - pSavArr->Insert( p, pSavArr->Count() ); + pSavArr->push_back( (SwPosition*)pEnd ); } } } @@ -695,8 +695,8 @@ void _SaveRedlEndPosForRestore::_Restore() if( pNode ) { SwPosition aPos( *pSavIdx, SwIndex( pNode, nSavCntnt )); - for( sal_uInt16 n = pSavArr->Count(); n; ) - *((SwPosition*)pSavArr->GetObject( --n )) = aPos; + for( sal_uInt16 n = pSavArr->size(); n; ) + *(*pSavArr)[ --n ] = aPos; } } diff --git a/sw/source/core/inc/mvsave.hxx b/sw/source/core/inc/mvsave.hxx index 1e68caece132..fd91329771a5 100644 --- a/sw/source/core/inc/mvsave.hxx +++ b/sw/source/core/inc/mvsave.hxx @@ -195,7 +195,7 @@ public: class _SaveRedlEndPosForRestore { - SvPtrarr* pSavArr; + std::vector<SwPosition*>* pSavArr; SwNodeIndex* pSavIdx; xub_StrLen nSavCntnt; |