summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorJoseph Powers <jpowers27@cox.net>2011-06-12 05:55:50 -0700
committerJoseph Powers <jpowers27@cox.net>2011-06-12 05:55:50 -0700
commit221d4b8da1230600f362c5b376f71ba50a408d5a (patch)
treea2fa226675fcfb3e09947bb642682853b66e91c9 /sd
parent093898ba3b532cb2d56b1275a2e0e2c102c6a15f (diff)
Replace List with std::vector< SdHyperlinkEntry* >
Diffstat (limited to 'sd')
-rw-r--r--sd/source/filter/ppt/pptin.cxx16
1 files changed, 9 insertions, 7 deletions
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 7652ed5a6e40..6ce7c23382d1 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -502,7 +502,7 @@ sal_Bool ImplSdPPTImport::Import()
}
}
}
- aHyperList.Insert( pHyperlink, LIST_APPEND );
+ aHyperList.push_back( pHyperlink );
}
if ( i != nPropCount )
delete pHyperlink;
@@ -524,15 +524,16 @@ sal_Bool ImplSdPPTImport::Import()
if ( SeekToRec( rStCtrl, PPT_PST_ExObjList, maDocHd.GetRecEndFilePos(), &aHyperHd ) )
{
sal_uInt32 nExObjHyperListLen = aHyperHd.GetRecEndFilePos();
- for ( void* pPtr = aHyperList.First(); pPtr; pPtr = aHyperList.Next() )
+ for ( size_t i = 0, n = aHyperList.size(); i < n; ++i )
{
+ SdHyperlinkEntry* pPtr = aHyperList[ i ];
DffRecordHeader aHyperE;
if ( !SeekToRec( rStCtrl, PPT_PST_ExHyperlink, nExObjHyperListLen, &aHyperE ) )
break;
if ( !SeekToRec( rStCtrl, PPT_PST_ExHyperlinkAtom, nExObjHyperListLen, NULL, 0 ) )
break;
rStCtrl.SeekRel( 8 );
- rStCtrl >> ((SdHyperlinkEntry*)pPtr)->nIndex;
+ rStCtrl >> pPtr->nIndex;
aHyperE.SeekToEndOfRecord( rStCtrl );
}
}
@@ -2094,11 +2095,12 @@ void ImplSdPPTImport::FillSdAnimationInfo( SdAnimationInfo* pInfo, PptInteractiv
break;
case 0x04 :
{
- SdHyperlinkEntry* pPtr;
- for ( pPtr = (SdHyperlinkEntry*)aHyperList.First(); pPtr; pPtr = (SdHyperlinkEntry*)aHyperList.Next() )
- {
- if ( pPtr->nIndex == pIAtom->nExHyperlinkId )
+ SdHyperlinkEntry* pPtr = NULL;
+ for ( size_t i = 0, n = aHyperList.size(); i < n; ++i ) {
+ if ( aHyperList[ i ]->nIndex == pIAtom->nExHyperlinkId ) {
+ pPtr = aHyperList[ i ];
break;
+ }
}
if ( pPtr )
{