summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-06-25 14:35:39 +0200
committerMichael Stahl <mstahl@redhat.com>2012-07-04 23:23:19 +0200
commit6b35f10b83a8142644a2831bae63f5aa566ed635 (patch)
treeb154ef48e2d3b20577eb56242389f7edcd79367d /sw
parentdb36d83392792fa672d64460c617c9a72d779f1d (diff)
Convert Svptrarr to std::vector<SwPosition*>
Change-Id: I1527f6c319d536286e1dc12c8c9ffa3b6a0e3713
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/docredln.cxx22
1 files changed, 9 insertions, 13 deletions
diff --git a/sw/source/core/doc/docredln.cxx b/sw/source/core/doc/docredln.cxx
index b32ae8ba81f5..88c3749d9c0f 100644
--- a/sw/source/core/doc/docredln.cxx
+++ b/sw/source/core/doc/docredln.cxx
@@ -3545,7 +3545,7 @@ void SwRedline::MoveFromSection()
{
SwDoc* pDoc = GetDoc();
const SwRedlineTbl& rTbl = pDoc->GetRedlineTbl();
- SvPtrarr aBeforeArr( 16 ), aBehindArr( 16 );
+ std::vector<SwPosition*> aBeforeArr, aBehindArr;
sal_uInt16 nMyPos = rTbl.GetPos( this );
OSL_ENSURE( this, "this is not in the array?" );
sal_Bool bBreak = sal_False;
@@ -3556,14 +3556,12 @@ void SwRedline::MoveFromSection()
bBreak = sal_True;
if( rTbl[ n ]->GetBound(sal_True) == *GetPoint() )
{
- void* pTmp = &rTbl[ n ]->GetBound(sal_True);
- aBehindArr.Insert( pTmp, aBehindArr.Count());
+ aBehindArr.push_back( &rTbl[ n ]->GetBound(sal_True) );
bBreak = sal_False;
}
if( rTbl[ n ]->GetBound(sal_False) == *GetPoint() )
{
- void* pTmp = &rTbl[ n ]->GetBound(sal_False);
- aBehindArr.Insert( pTmp, aBehindArr.Count() );
+ aBehindArr.push_back( &rTbl[ n ]->GetBound(sal_False) );
bBreak = sal_False;
}
}
@@ -3573,14 +3571,12 @@ void SwRedline::MoveFromSection()
bBreak = sal_True;
if( rTbl[ n ]->GetBound(sal_True) == *GetPoint() )
{
- void* pTmp = &rTbl[ n ]->GetBound(sal_True);
- aBeforeArr.Insert( pTmp, aBeforeArr.Count() );
+ aBeforeArr.push_back( &rTbl[ n ]->GetBound(sal_True) );
bBreak = sal_False;
}
if( rTbl[ n ]->GetBound(sal_False) == *GetPoint() )
{
- void* pTmp = &rTbl[ n ]->GetBound(sal_False);
- aBeforeArr.Insert( pTmp, aBeforeArr.Count() );
+ aBeforeArr.push_back( &rTbl[ n ]->GetBound(sal_False) );
bBreak = sal_False;
}
}
@@ -3650,10 +3646,10 @@ void SwRedline::MoveFromSection()
// adjustment of redline table positions must take start and
// end into account, not point and mark.
- for( n = 0; n < aBeforeArr.Count(); ++n )
- *(SwPosition*)aBeforeArr[ n ] = *Start();
- for( n = 0; n < aBehindArr.Count(); ++n )
- *(SwPosition*)aBehindArr[ n ] = *End();
+ for( n = 0; n < aBeforeArr.size(); ++n )
+ *aBeforeArr[ n ] = *Start();
+ for( n = 0; n < aBehindArr.size(); ++n )
+ *aBehindArr[ n ] = *End();
}
else
InvalidateRange();