diff options
author | Noel Grandin <noel@peralex.com> | 2012-06-22 17:55:56 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-06-25 20:13:20 +0200 |
commit | 1199f99b26034b6e84e6c59ab1eb288ac64e048e (patch) | |
tree | d873bfb7f4423524eaa0638d478c226f7fcbbd76 /sw/source | |
parent | 3a92dc80e39b9c92571324b04c6be3b73e4c02f9 (diff) |
Convert fields in class SwUpdFtnEndNtAtEnd from Svptrarr to std::vector
Change-Id: I67631707788ec273b994d59db6e08aabb6b62991
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/doc/ftnidx.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
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; |