summaryrefslogtreecommitdiffstats
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-06-22 17:55:56 +0200
committerMichael Stahl <mstahl@redhat.com>2012-06-25 20:13:20 +0200
commit1199f99b26034b6e84e6c59ab1eb288ac64e048e (patch)
treed873bfb7f4423524eaa0638d478c226f7fcbbd76 /sw
parentConvert local var from Svptrarr to std::vector (diff)
downloadcore-1199f99b26034b6e84e6c59ab1eb288ac64e048e.tar.gz
core-1199f99b26034b6e84e6c59ab1eb288ac64e048e.zip
Convert fields in class SwUpdFtnEndNtAtEnd from Svptrarr to std::vector
Change-Id: I67631707788ec273b994d59db6e08aabb6b62991
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/ftnidx.hxx4
-rw-r--r--sw/source/core/doc/ftnidx.cxx9
2 files changed, 6 insertions, 7 deletions
diff --git a/sw/inc/ftnidx.hxx b/sw/inc/ftnidx.hxx
index 055d6d54921d..40b969fb4c55 100644
--- a/sw/inc/ftnidx.hxx
+++ b/sw/inc/ftnidx.hxx
@@ -58,11 +58,11 @@ public:
class SwUpdFtnEndNtAtEnd
{
- SvPtrarr aFtnSects, aEndSects;
+ std::vector<const SwSectionNode*> aFtnSects, aEndSects;
std::vector<sal_uInt16> aFtnNums, aEndNums;
public:
- SwUpdFtnEndNtAtEnd() : aFtnSects( 0 ), aEndSects( 0 ) {}
+ SwUpdFtnEndNtAtEnd() : aFtnSects(), aEndSects() {}
static const SwSectionNode* FindSectNdWithEndAttr(
const SwTxtFtn& rTxtFtn );
diff --git a/sw/source/core/doc/ftnidx.cxx b/sw/source/core/doc/ftnidx.cxx
index b3ceedc79c63..1b6393cee092 100644
--- a/sw/source/core/doc/ftnidx.cxx
+++ b/sw/source/core/doc/ftnidx.cxx
@@ -338,7 +338,7 @@ sal_uInt16 SwUpdFtnEndNtAtEnd::GetNumber( const SwTxtFtn& rTxtFtn,
const SwSectionNode& rNd )
{
sal_uInt16 nRet = 0, nWh;
- SvPtrarr* pArr;
+ std::vector<const SwSectionNode*>* pArr;
std::vector<sal_uInt16> *pNum;
if( rTxtFtn.GetFtn().IsEndNote() )
{
@@ -352,10 +352,9 @@ sal_uInt16 SwUpdFtnEndNtAtEnd::GetNumber( const SwTxtFtn& rTxtFtn,
pNum = &aFtnNums;
nWh = RES_FTN_AT_TXTEND;
}
- void* pNd = (void*)&rNd;
- for( sal_uInt16 n = pArr->Count(); n; )
- if( pArr->GetObject( --n ) == pNd )
+ for( sal_uInt16 n = pArr->size(); n; )
+ if( (*pArr)[ --n ] == &rNd )
{
nRet = ++((*pNum)[ n ]);
break;
@@ -363,7 +362,7 @@ sal_uInt16 SwUpdFtnEndNtAtEnd::GetNumber( const SwTxtFtn& rTxtFtn,
if( !nRet )
{
- pArr->Insert( pNd, pArr->Count() );
+ pArr->push_back( &rNd );
nRet = ((SwFmtFtnEndAtTxtEnd&)rNd.GetSection().GetFmt()->
GetFmtAttr( nWh )).GetOffset();
++nRet;