[Libreoffice-commits] .: sd/source

Lubos Lunak llunak at kemper.freedesktop.org
Mon Apr 2 10:44:57 PDT 2012


 sd/source/filter/eppt/eppt.cxx   |   10 ++++------
 sd/source/filter/eppt/eppt.hxx   |    2 +-
 sd/source/filter/eppt/epptso.cxx |    2 +-
 3 files changed, 6 insertions(+), 8 deletions(-)

New commits:
commit b89bf99ff2c8008951d72d58747793790b13299d
Author: Rafael Dominguez <venccsralph at gmail.com>
Date:   Sat Mar 24 18:08:59 2012 -0430

    Replace List with std:vector<EPPTHyperlink>.

diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index 1f7606f..f3c79df 100644
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -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
             {
diff --git a/sd/source/filter/eppt/eppt.hxx b/sd/source/filter/eppt/eppt.hxx
index 96f19c4..d8bbc56 100644
--- a/sd/source/filter/eppt/eppt.hxx
+++ b/sd/source/filter/eppt/eppt.hxx
@@ -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;
 
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 6841e54..6e8f8ca 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -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


More information about the Libreoffice-commits mailing list