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 | |
parent | Convert local var from Svptrarr to std::vector (diff) | |
download | core-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.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/ftnidx.cxx | 9 |
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; |