Kaydet (Commit) b89bf99f authored tarafından Rafael Dominguez's avatar Rafael Dominguez Kaydeden (comit) Luboš Luňák

Replace List with std:vector<EPPTHyperlink>.

üst a7eb227c
......@@ -465,8 +465,6 @@ PPTWriter::~PPTWriter()
while( aStyleSheetIter < maStyleSheetList.end() )
delete *aStyleSheetIter++;
for ( pPtr = maHyperlink.First(); pPtr; pPtr = maHyperlink.Next() )
delete (EPPTHyperlink*)pPtr;
for ( pPtr = maExOleObj.First(); pPtr; pPtr = maExOleObj.Next() )
delete (PPTExOleObjEntry*)pPtr;
......@@ -962,7 +960,7 @@ sal_Bool PPTWriter::ImplCreateHyperBlob( SvMemoryStream& rStrm )
rStrm << (sal_uInt32)0; // property size
rStrm << (sal_uInt32)0; // property count
for ( EPPTHyperlink* pLink = (EPPTHyperlink*)maHyperlink.First(); pLink; pLink = (EPPTHyperlink*)maHyperlink.Next() )
for ( std::vector<EPPTHyperlink>::const_iterator pIter = maHyperlink.begin(); pIter != maHyperlink.end(); ++pIter )
{
nParaCount += 6;
rStrm << (sal_uInt32)3 // Type VT_I4
......@@ -986,15 +984,15 @@ sal_Bool PPTWriter::ImplCreateHyperBlob( SvMemoryStream& rStrm )
// = 7 : " " " " (PPT) text range
// = 8 : " " " " (Project) task
sal_uInt32 nUrlLen = pLink->aURL.Len();
const sal_Unicode* pUrl = pLink->aURL.GetBuffer();
sal_uInt32 nUrlLen = pIter->aURL.Len();
const sal_Unicode* pUrl = pIter->aURL.GetBuffer();
sal_uInt32 nInfo = 7;
rStrm << (sal_uInt32)3 // Type VT_I4
<< nInfo; // Info
switch( pLink->nType & 0xff )
switch( pIter->nType & 0xff )
{
case 1 : // click action to slidenumber
{
......
......@@ -213,7 +213,7 @@ class PPTWriter : public PPTWriterBase, public PPTExBulletProvider
sal_uInt32 mnShapeMasterTitle;
sal_uInt32 mnShapeMasterBody;
List maHyperlink;
std::vector<EPPTHyperlink> maHyperlink;
ppt::ExSoundCollection maSoundCollection;
......
......@@ -413,7 +413,7 @@ sal_uInt32 PPTWriter::ImplInsertBookmarkURL( const String& rBookmarkURL, const s
if ( !aRelUrl.isEmpty() )
sBookmarkURL = aRelUrl;
}
maHyperlink.Insert( new EPPTHyperlink( sBookmarkURL, nType ), LIST_APPEND );
maHyperlink.push_back( EPPTHyperlink( sBookmarkURL, nType ) );
*mpExEmbed << (sal_uInt16)0xf
<< (sal_uInt16)EPP_ExHyperlink
......
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