diff options
author | August Sodora <augsod@gmail.com> | 2012-01-21 00:44:46 -0500 |
---|---|---|
committer | August Sodora <augsod@gmail.com> | 2012-01-21 01:54:18 -0500 |
commit | 5a37be04ba5fec4f201984ab6d539c312c30fddc (patch) | |
tree | 5dbfa66db5b6ea228b1e67f53de395b1f9e31bb5 /sw | |
parent | de8d1f922acca8e0df5ecb016d27126124e2c3d1 (diff) |
SV_DECL_PTRARR->std::vector
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/doctxm.cxx | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 23f03873e02a..1aebb1625a5a 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -95,9 +95,7 @@ struct LinkStruct nEndTextPos(nEnd) {} }; -typedef LinkStruct* LinkStructPtr; -SV_DECL_PTRARR(LinkStructArr, LinkStructPtr, 0, 5 ) -SV_IMPL_PTRARR(LinkStructArr, LinkStructPtr) +typedef std::vector<LinkStruct*> LinkStructArr; sal_uInt16 SwDoc::GetTOIKeys( SwTOIKeyType eTyp, std::vector<String>& rArr ) const { @@ -1816,7 +1814,7 @@ void SwTOXBaseSection::GenerateText( sal_uInt16 nArrayIdx, pNewLink->aINetFmt.SetVisitedFmtId(USHRT_MAX); pNewLink->aINetFmt.SetINetFmtId(USHRT_MAX); } - aLinkArr.Insert( pNewLink, aLinkArr.Count() ); + aLinkArr.push_back(pNewLink); nLinkStartPosition = STRING_NOTFOUND; sLinkCharacterStyle.Erase(); } @@ -1854,13 +1852,11 @@ void SwTOXBaseSection::GenerateText( sal_uInt16 nArrayIdx, pTOXNd->SetAttr( aTStops ); } - if(aLinkArr.Count()) - for(sal_uInt16 i = 0; i < aLinkArr.Count(); ++i ) - { - LinkStruct* pTmp = aLinkArr.GetObject(i); - pTOXNd->InsertItem( pTmp->aINetFmt, pTmp->nStartTextPos, - pTmp->nEndTextPos); - } + for(LinkStructArr::const_iterator i = aLinkArr.begin(); i != aLinkArr.end(); ++i) + { + pTOXNd->InsertItem((*i)->aINetFmt, (*i)->nStartTextPos, + (*i)->nEndTextPos); + } } /*-------------------------------------------------------------------- |