[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - filter/source sd/qa

Caolán McNamara caolanm at redhat.com
Sat Aug 29 01:12:46 PDT 2015


 filter/source/msfilter/msdffimp.cxx  |   28 ++++++++++++++--------------
 sd/qa/unit/data/ppt/pass/hang-19.ppt |binary
 2 files changed, 14 insertions(+), 14 deletions(-)

New commits:
commit 1f9fa2e7832208961e1ab6fe97456c6cebdd87bd
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Fri Aug 28 15:33:44 2015 +0100

    eof isn't a Error, so use good not GetError
    
    Change-Id: Ie1df87c7eb9d391d0fa4a579f744051a1f1b2ae1
    (cherry picked from commit 078235028a8c4ea36b6b366348016e19759c456a)
    Reviewed-on: https://gerrit.libreoffice.org/18114
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 5e9a34c..b68b9af 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -4159,17 +4159,17 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
         SEEK_FROM_BEGINNING ) )
     {
         sal_uInt32  nBytesLeft = maShapeRecords.Current()->nRecLen;
-        sal_uInt32  nUDData;
-        sal_uInt16  nPID;
         while( 5 < nBytesLeft )
         {
-            rSt.ReadUInt16( nPID );
-            if ( rSt.GetError() != 0 )
+            sal_uInt16 nPID(0);
+            rSt.ReadUInt16(nPID);
+            if (!rSt.good())
                 break;
-            rSt.ReadUInt32( nUDData );
-            if ( rSt.GetError() != 0 )
+            sal_uInt32 nUDData(0);
+            rSt.ReadUInt32(nUDData);
+            if (!rSt.good())
                 break;
-            if ( nPID == 447 )
+            if (nPID == 447)
             {
                 mbRotateGranientFillWithAngle = nUDData & 0x20;
                 break;
@@ -4993,15 +4993,15 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
             && maShapeRecords.Current()->nRecLen )
         {
             sal_uInt32  nBytesLeft = maShapeRecords.Current()->nRecLen;
-            sal_uInt32  nUDData;
-            sal_uInt16  nPID;
             while( 5 < nBytesLeft )
             {
-                rSt.ReadUInt16( nPID );
-                if ( rSt.GetError() != 0 )
+                sal_uInt16 nPID(0);
+                rSt.ReadUInt16(nPID);
+                if (!rSt.good())
                     break;
-                rSt.ReadUInt32( nUDData );
-                switch( nPID )
+                sal_uInt32 nUDData(0);
+                rSt.ReadUInt32(nUDData);
+                switch (nPID)
                 {
                     case 0x038F: pImpRec->nXAlign = nUDData; break;
                     case 0x0390:
@@ -5031,7 +5031,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt,
                         pImpRec->isHorizontalRule = true;
                         break;
                 }
-                if ( rSt.GetError() != 0 )
+                if (!rSt.good())
                     break;
                 nBytesLeft  -= 6;
             }
diff --git a/sd/qa/unit/data/ppt/pass/hang-19.ppt b/sd/qa/unit/data/ppt/pass/hang-19.ppt
new file mode 100644
index 0000000..942a58a
Binary files /dev/null and b/sd/qa/unit/data/ppt/pass/hang-19.ppt differ


More information about the Libreoffice-commits mailing list