diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-08-28 15:33:44 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2015-08-31 13:53:13 +0200 |
commit | d58a58d027af25a445736ea16201e72d47e39fcc (patch) | |
tree | 236cbfc90b41f5299f9ca91c51eabed1647debd9 /filter/source/msfilter | |
parent | 1603f24434a351858c62ea9a06ff55273b8e46c8 (diff) |
eof isn't a Error, so use good not GetError
Change-Id: Ie1df87c7eb9d391d0fa4a579f744051a1f1b2ae1
(cherry picked from commit 078235028a8c4ea36b6b366348016e19759c456a)
Reviewed-on: https://gerrit.libreoffice.org/18118
Reviewed-by: David Tardon <dtardon@redhat.com>
Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'filter/source/msfilter')
-rw-r--r-- | filter/source/msfilter/msdffimp.cxx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index 47a89e01d6c8..bab72e3149d8 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -4147,17 +4147,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; @@ -4979,15 +4979,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: @@ -5017,7 +5017,7 @@ SdrObject* SvxMSDffManager::ProcessObj(SvStream& rSt, pImpRec->isHorizontalRule = true; break; } - if ( rSt.GetError() != 0 ) + if (!rSt.good()) break; nBytesLeft -= 6; } |