summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-08-13 11:17:45 +0200
committerMichael Stahl <mstahl@redhat.com>2012-08-13 22:48:13 +0200
commit9173bdf522375e99c0145b31f027678d8d9c9770 (patch)
tree55dd1a1266c71c1e327a227035a26ccc9b2cfb2c /sd
parentf5ec08d4d8ff64cbae83e47ac2159eb3a546bc79 (diff)
Convert tools/list.hxx to std::vector in maExOleObj field of PPTWriter class
Change-Id: Ie677ef12d8443c36069dd6910b42b81b48beb974
Diffstat (limited to 'sd')
-rw-r--r--sd/source/filter/eppt/eppt.cxx16
-rw-r--r--sd/source/filter/eppt/eppt.hxx3
-rw-r--r--sd/source/filter/eppt/epptso.cxx4
3 files changed, 9 insertions, 14 deletions
diff --git a/sd/source/filter/eppt/eppt.cxx b/sd/source/filter/eppt/eppt.cxx
index d041683c61eb..65d3ff30a47e 100644
--- a/sd/source/filter/eppt/eppt.cxx
+++ b/sd/source/filter/eppt/eppt.cxx
@@ -451,21 +451,18 @@ void PPTWriter::ImplWriteSlideMaster( sal_uInt32 nPageNum, Reference< XPropertyS
PPTWriter::~PPTWriter()
{
- void* pPtr;
delete mpExEmbed;
delete mpPptEscherEx;
delete mpCurUserStrm;
delete mpPicStrm;
delete mpStrm;
-
-
std::vector< PPTExStyleSheet* >::iterator aStyleSheetIter( maStyleSheetList.begin() );
while( aStyleSheetIter < maStyleSheetList.end() )
delete *aStyleSheetIter++;
- for ( pPtr = maExOleObj.First(); pPtr; pPtr = maExOleObj.Next() )
- delete (PPTExOleObjEntry*)pPtr;
+ for ( std::vector<PPTExOleObjEntry*>::const_iterator it = maExOleObj.begin(); it != maExOleObj.end(); ++it )
+ delete *it;
if ( mbStatusIndicator )
mXStatusIndicator->end();
@@ -1287,13 +1284,12 @@ void PPTWriter::ImplWriteVBA()
void PPTWriter::ImplWriteOLE( )
{
- PPTExOleObjEntry* pPtr;
SvxMSExportOLEObjects aOleExport( mnCnvrtFlags );
- for ( pPtr = (PPTExOleObjEntry*)maExOleObj.First(); pPtr;
- pPtr = (PPTExOleObjEntry*)maExOleObj.Next() )
+ for ( std::vector<PPTExOleObjEntry*>::const_iterator it = maExOleObj.begin(); it != maExOleObj.end(); ++it )
{
+ PPTExOleObjEntry* pPtr = *it;
SvMemoryStream* pStrm = NULL;
pPtr->nOfsB = mpStrm->Tell();
switch ( pPtr->eType )
@@ -1419,9 +1415,9 @@ sal_Bool PPTWriter::ImplWriteAtomEnding()
}
}
// Ole persists
- PPTExOleObjEntry* pPtr;
- for ( pPtr = (PPTExOleObjEntry*)maExOleObj.First(); pPtr; pPtr = (PPTExOleObjEntry*)maExOleObj.Next() )
+ for ( std::vector<PPTExOleObjEntry*>::const_iterator it = maExOleObj.begin(); it != maExOleObj.end(); ++it )
{
+ PPTExOleObjEntry* pPtr = *it;
nOfs = mpPptEscherEx->PtGetOffsetByID( EPP_Persist_ExObj );
if ( nOfs )
{
diff --git a/sd/source/filter/eppt/eppt.hxx b/sd/source/filter/eppt/eppt.hxx
index d368bb9ff853..aa3b65b807a3 100644
--- a/sd/source/filter/eppt/eppt.hxx
+++ b/sd/source/filter/eppt/eppt.hxx
@@ -36,7 +36,6 @@
#include <vcl/graph.hxx>
#include <unotools/fontcvt.hxx>
#include <tools/string.hxx>
-#include <tools/list.hxx>
#include "pptexanimations.hxx"
#include <pptexsoundcollection.hxx>
@@ -197,7 +196,7 @@ class PPTWriter : public PPTWriterBase, public PPTExBulletProvider
SvStream* mpPicStrm;
PptEscherEx* mpPptEscherEx;
- List maExOleObj;
+ std::vector<PPTExOleObjEntry*> maExOleObj;
sal_uInt32 mnVBAOleOfs;
SvMemoryStream* mpVBA;
sal_uInt32 mnExEmbed;
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index 857619337640..47013f7af97b 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -2559,7 +2559,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
<< nPageId;
PPTExOleObjEntry* pEntry = new PPTExOleObjEntry( OCX_CONTROL, mpExEmbed->Tell() );
pEntry->xControlModel = aXControlModel;
- maExOleObj.Insert( pEntry );
+ maExOleObj.push_back( pEntry );
mnExEmbed++;
@@ -3075,7 +3075,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
PPTExOleObjEntry* pE = new PPTExOleObjEntry( NORMAL_OLE_OBJECT, mpExEmbed->Tell() );
pE->xShape = mXShape;
- maExOleObj.Insert( pE );
+ maExOleObj.push_back( pE );
mnExEmbed++;