[Libreoffice-commits] .: filter/inc filter/source

Joseph Powers jpowers at kemper.freedesktop.org
Sun Jun 12 14:20:11 PDT 2011


 filter/inc/filter/msfilter/svdfppt.hxx |    2 +-
 filter/source/msfilter/svdfppt.cxx     |   11 ++++++-----
 2 files changed, 7 insertions(+), 6 deletions(-)

New commits:
commit 922c77358e922f60f245e979b23f71d765d13f54
Author: Joseph Powers <jpowers27 at cox.net>
Date:   Sun Jun 12 14:19:48 2011 -0700

    Replace List with std::vector< sal_uInt32 >

diff --git a/filter/inc/filter/msfilter/svdfppt.hxx b/filter/inc/filter/msfilter/svdfppt.hxx
index 0a2c90b..3e1b5ef 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 9b91b87..3c0ca19 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
                 {


More information about the Libreoffice-commits mailing list