Kaydet (Commit) 1199f99b authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Michael Stahl

Convert fields in class SwUpdFtnEndNtAtEnd from Svptrarr to std::vector

Change-Id: I67631707788ec273b994d59db6e08aabb6b62991
üst 3a92dc80
......@@ -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 );
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment