summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-06-26 14:19:46 +0200
committerMichael Stahl <mstahl@redhat.com>2012-07-04 23:23:20 +0200
commitb1a59ddfc8ad8177fb5310e8c58e2138c2305f20 (patch)
tree44976fe5a080a4172724920eac8260153248ad51 /sw
parent7a2206ce0d78a26acff3d60b471cfcc93e827559 (diff)
Convert Svptrarr to std::vector<SwPosition*>
Change-Id: I0e6db9fb0e628cc0d4e6556c71542bd0efc48a86
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/docedt.cxx14
-rw-r--r--sw/source/core/inc/mvsave.hxx2
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;