[Libreoffice-commits] .: filter/inc filter/source
Joseph Powers
jpowers at kemper.freedesktop.org
Sun Jun 12 06:14:56 PDT 2011
filter/inc/filter/msfilter/svdfppt.hxx | 4 +++-
filter/source/msfilter/svdfppt.cxx | 10 ++++++----
2 files changed, 9 insertions(+), 5 deletions(-)
New commits:
commit e10afb0a8a09fa0c008f3a33c930b9a864dd3599
Author: Joseph Powers <jpowers27 at cox.net>
Date: Sun Jun 12 05:53:59 2011 -0700
Replace List with std::vector< SdHyperlinkEntry* >
diff --git a/filter/inc/filter/msfilter/svdfppt.hxx b/filter/inc/filter/msfilter/svdfppt.hxx
index 06f9964..f33184b 100644
--- a/filter/inc/filter/msfilter/svdfppt.hxx
+++ b/filter/inc/filter/msfilter/svdfppt.hxx
@@ -521,8 +521,10 @@ struct ProcessData
////////////////////////////////////////////////////////////////////////////////////////////////////
+typedef ::std::vector< SdHyperlinkEntry* > SdHyperlinkEntryList;
class SdrTextObj;
class SfxObjectShell;
+
class MSFILTER_DLLPUBLIC SdrPowerPointImport : public SdrEscherImport
{
protected:
@@ -535,7 +537,7 @@ protected:
sal_Bool bOk;
PptUserEditAtom aUserEditAtom;
PptColorSchemeAtom aPageColors;
- List aHyperList;
+ SdHyperlinkEntryList aHyperList;
sal_uInt32* pPersistPtr;
sal_uLong nPersistPtrAnz;
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 08618f8..5393250 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -1668,8 +1668,10 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const S
SdrPowerPointImport::~SdrPowerPointImport()
{
- for ( void* pPtr = aHyperList.First(); pPtr; pPtr = aHyperList.Next() )
- delete (SdHyperlinkEntry*)pPtr;
+ for ( size_t i = 0, n = aHyperList.size(); i < n; ++i ) {
+ delete aHyperList[ i ];
+ }
+ aHyperList.clear();
delete pMasterPages;
delete pSlidePages;
delete pNotePages;
@@ -6706,9 +6708,9 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
{
PptInteractiveInfoAtom aInteractiveInfoAtom;
rIn >> aInteractiveInfoAtom;
- for ( SdHyperlinkEntry* pHyperlink = (SdHyperlinkEntry*)rSdrPowerPointImport.aHyperList.First();
- pHyperlink; pHyperlink = (SdHyperlinkEntry*)rSdrPowerPointImport.aHyperList.Next() )
+ for ( size_t i = 0; i < rSdrPowerPointImport.aHyperList.size(); ++i )
{
+ SdHyperlinkEntry* pHyperlink = rSdrPowerPointImport.aHyperList[ i ];
if ( pHyperlink->nIndex == aInteractiveInfoAtom.nExHyperlinkId )
{
aTextHd.SeekToEndOfRecord( rIn );
More information about the Libreoffice-commits
mailing list