diff options
author | Joseph Powers <jpowers27@cox.net> | 2011-06-12 14:19:48 -0700 |
---|---|---|
committer | Joseph Powers <jpowers27@cox.net> | 2011-06-12 14:20:04 -0700 |
commit | 0fa6dbcdab49b79852c451c173867fac0d8f213a (patch) | |
tree | 3655564d20717c6f6ae54c7dc9d3776d7c066e32 | |
parent | 5d54fc918fc63c9ac844c6d02df45daa2a86f993 (diff) |
Replace List with std::vector< sal_uInt32 >
-rw-r--r-- | filter/inc/filter/msfilter/svdfppt.hxx | 2 | ||||
-rw-r--r-- | filter/source/msfilter/svdfppt.cxx | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/filter/inc/filter/msfilter/svdfppt.hxx b/filter/inc/filter/msfilter/svdfppt.hxx index 0a2c90b70602..3e1b5ef209dc 100644 --- a/filter/inc/filter/msfilter/svdfppt.hxx +++ b/filter/inc/filter/msfilter/svdfppt.hxx @@ -1040,7 +1040,7 @@ struct StyleTextProp9 struct PPTStyleTextPropReader { - List aSpecMarkerList; // hiword -> Flags, loword -> Position + ::std::vector< sal_uInt32 > aSpecMarkerList; // hiword -> Flags, loword -> Position List aParaPropList; List aCharPropList; diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx index 9b91b873fe4f..3c0ca1945391 100644 --- a/filter/source/msfilter/svdfppt.cxx +++ b/filter/source/msfilter/svdfppt.cxx @@ -5089,13 +5089,13 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, SdrPowerPointImport& rMan, con if ( !nChar ) break; if ( ( nChar & 0xff00 ) == 0xf000 ) // in this special case we got a symbol - aSpecMarkerList.Insert( (void*)(sal_uIntPtr)( i | PPT_SPEC_SYMBOL ), LIST_APPEND ); + aSpecMarkerList.push_back( (sal_uInt32)( i | PPT_SPEC_SYMBOL ) ); else if ( nChar == 0xd ) { if ( nInstance == TSS_TYPE_PAGETITLE ) *pPtr = 0xb; else - aSpecMarkerList.Insert( (void*)(sal_uIntPtr)( i | PPT_SPEC_NEWLINE ), LIST_APPEND ); + aSpecMarkerList.push_back( (sal_uInt32)( i | PPT_SPEC_NEWLINE ) ); } } if ( i ) @@ -5118,7 +5118,7 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, SdrPowerPointImport& rMan, con if ( nInstance == TSS_TYPE_PAGETITLE ) *pPtr = 0xb; else - aSpecMarkerList.Insert( (void*)( (pPtr - pBuf) | PPT_SPEC_NEWLINE ), LIST_APPEND ); + aSpecMarkerList.push_back( (sal_uInt32)( (pPtr - pBuf) | PPT_SPEC_NEWLINE ) ); } pPtr++; } @@ -5163,7 +5163,8 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, SdrPowerPointImport& rMan, con sal_Bool bEmptyParaPossible = sal_True; sal_uInt32 nCharAnzRead = 0; sal_uInt32 nCurrentPara = 0; - sal_uInt32 nCurrentSpecMarker = (sal_uInt32)(sal_uIntPtr)aSpecMarkerList.First(); + size_t i = 1; // points to the next element to process + sal_uInt32 nCurrentSpecMarker = aSpecMarkerList.empty() ? 0 : aSpecMarkerList[0]; sal_uInt16 nStringLen = aString.Len(); while ( nCharAnzRead < nStringLen ) @@ -5231,7 +5232,7 @@ void PPTStyleTextPropReader::Init( SvStream& rIn, SdrPowerPointImport& rMan, con nCharAnzRead++; bEmptyParaPossible = sal_False; } - nCurrentSpecMarker = (sal_uInt32)(sal_uIntPtr)aSpecMarkerList.Next(); + nCurrentSpecMarker = ( i < aSpecMarkerList.size() ) ? aSpecMarkerList[ i++ ] : 0; } else { |