[Libreoffice-commits] .: filter/inc filter/source
Joseph Powers
jpowers at kemper.freedesktop.org
Sun Jun 12 07:03:58 PDT 2011
filter/inc/filter/msfilter/svdfppt.hxx | 5 +++--
filter/source/msfilter/svdfppt.cxx | 17 +++++++++--------
2 files changed, 12 insertions(+), 10 deletions(-)
New commits:
commit dd3cfffb58fb2a95e35557adb284be3d30d602e0
Author: Joseph Powers <jpowers27 at cox.net>
Date: Sun Jun 12 07:03:52 2011 -0700
Replace List with std::vector< PPTTextSpecInfo* >
diff --git a/filter/inc/filter/msfilter/svdfppt.hxx b/filter/inc/filter/msfilter/svdfppt.hxx
index f33184b..e9984e2 100644
--- a/filter/inc/filter/msfilter/svdfppt.hxx
+++ b/filter/inc/filter/msfilter/svdfppt.hxx
@@ -676,10 +676,11 @@ struct PPTTextSpecInfo
~PPTTextSpecInfo();
};
+typedef ::std::vector< PPTTextSpecInfo* > PPTTextSpecInfoList;
struct PPTTextSpecInfoAtomInterpreter
{
- sal_Bool bValid;
- List aList;
+ sal_Bool bValid;
+ PPTTextSpecInfoList aList;
PPTTextSpecInfoAtomInterpreter();
~PPTTextSpecInfoAtomInterpreter();
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 5393250..8b8d306 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -1619,8 +1619,8 @@ SdrPowerPointImport::SdrPowerPointImport( PowerPointImportParam& rParam, const S
if ( ( pE2->ePageKind == PPT_MASTERPAGE ) && ( pE2->aSlideAtom.nMasterId == 0 ) && ( pE2->bNotesMaster == 0 ) )
{
PPTTextSpecInfo aTxSI( 0 );
- if ( aTxSIStyle.bValid && aTxSIStyle.aList.Count() )
- aTxSI = *( ( (PPTTextSpecInfo*)aTxSIStyle.aList.GetObject( 0 ) ) );
+ if ( aTxSIStyle.bValid && !aTxSIStyle.aList.empty() )
+ aTxSI = *( aTxSIStyle.aList[ 0 ] );
pE2->pStyleSheet = new PPTStyleSheet( aSlideHd, rStCtrl, *this, aTxCFStyle, aTxPFStyle, aTxSI );
pDefaultSheet = pE2->pStyleSheet;
@@ -4758,7 +4758,7 @@ sal_Bool PPTTextSpecInfoAtomInterpreter::Read( SvStream& rIn, const DffRecordHea
}
nFlags &= ~i;
}
- aList.Insert( pEntry, LIST_APPEND );
+ aList.push_back( pEntry );
}
bValid = rIn.Tell() == rRecHd.GetRecEndFilePos();
return bValid;
@@ -4766,9 +4766,10 @@ sal_Bool PPTTextSpecInfoAtomInterpreter::Read( SvStream& rIn, const DffRecordHea
PPTTextSpecInfoAtomInterpreter::~PPTTextSpecInfoAtomInterpreter()
{
- void *pPtr;
- for ( pPtr = aList.First(); pPtr; pPtr = aList.Next() )
- delete (PPTTextSpecInfo*)pPtr;
+ for ( size_t i = 0, n = aList.size(); i < n; ++i ) {
+ delete aList[ i ];
+ }
+ aList.clear();
}
void StyleTextProp9::Read( SvStream& rIn )
@@ -6526,9 +6527,9 @@ PPTTextObj::PPTTextObj( SvStream& rIn, SdrPowerPointImport& rSdrPowerPointImport
{
sal_uInt32 nI = 0;
PPTTextSpecInfo* pSpecInfo;
- for ( pSpecInfo = (PPTTextSpecInfo*)aTextSpecInfoAtomInterpreter.aList.First();
- pSpecInfo; pSpecInfo =(PPTTextSpecInfo*)aTextSpecInfoAtomInterpreter.aList.Next() )
+ for ( size_t i = 0; i < aTextSpecInfoAtomInterpreter.aList.size(); ++i)
{
+ pSpecInfo = aTextSpecInfoAtomInterpreter.aList[ i ];
sal_uInt32 nCharIdx = pSpecInfo->nCharIdx;
// portions and text have to been splitted in some cases
More information about the Libreoffice-commits
mailing list