[Libreoffice-commits] .: 2 commits - sw/source

Caolán McNamara caolan at kemper.freedesktop.org
Sat Jul 2 14:02:13 PDT 2011


 sw/source/filter/ww8/ww8par2.cxx    |    8 ++++----
 sw/source/filter/ww8/ww8toolbar.cxx |    6 ++++--
 2 files changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 1e232c44978e7dc4d134195a411f834610faa67d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Jul 2 21:34:14 2011 +0100

    Resolves: fdo#34023 hang on load of .doc

diff --git a/sw/source/filter/ww8/ww8toolbar.cxx b/sw/source/filter/ww8/ww8toolbar.cxx
index 49f06a5..57fd027 100644
--- a/sw/source/filter/ww8/ww8toolbar.cxx
+++ b/sw/source/filter/ww8/ww8toolbar.cxx
@@ -913,12 +913,13 @@ bool Tcg255::Read(SvStream *pS)
 {
     OSL_TRACE("Tcg255::Read() stream pos 0x%x", pS->Tell() );
     nOffSet = pS->Tell();
-    sal_uInt8 nId = 0; //
+    sal_uInt8 nId = 0x40;
     *pS >> nId;
     while (  nId != 0x40  )
     {
         if ( !processSubStruct( nId, pS ) )
             return false;
+        nId = 0x40;
         *pS >> nId;
     }
     return true;
@@ -955,9 +956,10 @@ bool Tcg255SubStruct::Read(SvStream *pS)
     return true;
 }
 
-PlfMcd::PlfMcd( bool bReadId ): Tcg255SubStruct( bReadId ), rgmcd( NULL )
+PlfMcd::PlfMcd( bool bReadId ): Tcg255SubStruct( bReadId ), iMac(0), rgmcd( NULL )
 {
 }
+
 PlfMcd::~PlfMcd()
 {
     if ( rgmcd )
commit ff6dcb8eaf47d056f179ebcdb289ae66e96b124b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Sat Jul 2 01:55:56 2011 +0100

    Related: fdo#37057 use standard sprm iterator

diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index a4829e1..92cf106 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -3701,11 +3701,11 @@ void WW8RStyle::ImportSprms(sal_uInt8 *pSprms, short nLen, bool bPap)
         nSprmsLen = nLen;
     }
 
-    while ( nLen > 0 )
+    WW8SprmIter aSprmIter(pSprms, nLen, maSprmParser);
+    while (const sal_uInt8* pSprm = aSprmIter.GetSprms())
     {
-        sal_uInt16 nL1 = pIo->ImportSprm(pSprms);
-        nLen = nLen - nL1;
-        pSprms += nL1;
+        pIo->ImportSprm(pSprm);
+        aSprmIter.advance();
     }
 
     pParaSprms = 0;


More information about the Libreoffice-commits mailing list