summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-06-25 14:38:13 +0200
committerMichael Stahl <mstahl@redhat.com>2012-07-04 23:23:19 +0200
commitdf436372344ffa8ae12a64606cde54d4b4ea7a6a (patch)
tree9f34377a111589c669066a15deb47d28bdd20d44
parent6b35f10b83a8142644a2831bae63f5aa566ed635 (diff)
Convert Svptrarr to std::vector<SwRedline*>
Change-Id: I0185a08d2ebb6751b802972f14bf46edfc63c9e7
-rw-r--r--sw/source/core/doc/docedt.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index d5fca9ec60a0..14df0e5262ae 100644
--- a/sw/source/core/doc/docedt.cxx
+++ b/sw/source/core/doc/docedt.cxx
@@ -1125,7 +1125,7 @@ bool SwDoc::MoveNodeRange( SwNodeRange& rRange, SwNodeIndex& rPos,
}
_SaveRedlines aSaveRedl;
- SvPtrarr aSavRedlInsPosArr( 0 );
+ std::vector<SwRedline*> aSavRedlInsPosArr;
if( DOC_MOVEREDLINES & eMvFlags && GetRedlineTbl().Count() )
{
lcl_SaveRedlines( rRange, aSaveRedl );
@@ -1142,8 +1142,7 @@ bool SwDoc::MoveNodeRange( SwNodeRange& rRange, SwNodeIndex& rPos,
pREnd = pTmp->End();
if( pREnd->nNode == rPos && pRStt->nNode < rPos )
{
- void* p = pTmp;
- aSavRedlInsPosArr.Insert( p, aSavRedlInsPosArr.Count() );
+ aSavRedlInsPosArr.push_back( pTmp );
}
} while( pRStt->nNode < rPos && ++nRedlPos < GetRedlineTbl().Count());
}
@@ -1192,12 +1191,12 @@ bool SwDoc::MoveNodeRange( SwNodeRange& rRange, SwNodeIndex& rPos,
++pBkmk)
pBkmk->SetInDoc(this, aIdx);
- if( aSavRedlInsPosArr.Count() )
+ if( !aSavRedlInsPosArr.empty() )
{
SwNode* pNewNd = &aIdx.GetNode();
- for( sal_uInt16 n = 0; n < aSavRedlInsPosArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aSavRedlInsPosArr.size(); ++n )
{
- SwRedline* pTmp = (SwRedline*)aSavRedlInsPosArr[ n ];
+ SwRedline* pTmp = aSavRedlInsPosArr[ n ];
if( USHRT_MAX != GetRedlineTbl().GetPos( pTmp ) )
{
SwPosition* pEnd = pTmp->End();