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