[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - filter/source sd/qa
Caolán McNamara
caolanm at redhat.com
Fri Aug 28 03:45:24 PDT 2015
filter/source/msfilter/msdffimp.cxx | 26 ++++++++++++++++++++++----
sd/qa/unit/data/ppt/pass/hang-11.ppt |binary
sd/qa/unit/data/ppt/pass/hang-12.ppt |binary
3 files changed, 22 insertions(+), 4 deletions(-)
New commits:
commit a50be4ba133d2a92af37dd7b78b70377a05d716d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Aug 27 15:59:46 2015 +0100
check returns of SeekToEndOfRecord
Change-Id: Ia593dd0e2239a97f17bb03f005d22028da482445
(cherry picked from commit d400f155fdc3867ad4a067c2bf85588fc0fbb2a2)
Reviewed-on: https://gerrit.libreoffice.org/18096
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 ba0aae0..09458f8 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -3253,12 +3253,19 @@ bool SvxMSDffManager::SeekToRec( SvStream& rSt, sal_uInt16 nRecId, sal_uLong nMa
if ( pRecHd != NULL )
*pRecHd = aHd;
else
- aHd.SeekToBegOfRecord( rSt );
+ {
+ bool bSeekSuccess = aHd.SeekToBegOfRecord(rSt);
+ if (!bSeekSuccess)
+ {
+ bRet = false;
+ break;
+ }
+ }
}
}
if ( !bRet )
{
- bool bSeekSuccess = aHd.SeekToEndOfRecord( rSt );
+ bool bSeekSuccess = aHd.SeekToEndOfRecord(rSt);
if (!bSeekSuccess)
break;
}
@@ -3287,11 +3294,22 @@ bool SvxMSDffManager::SeekToRec2( sal_uInt16 nRecId1, sal_uInt16 nRecId2, sal_uL
if ( pRecHd )
*pRecHd = aHd;
else
- aHd.SeekToBegOfRecord( rStCtrl );
+ {
+ bool bSeekSuccess = aHd.SeekToBegOfRecord(rStCtrl);
+ if (!bSeekSuccess)
+ {
+ bRet = false;
+ break;
+ }
+ }
}
}
if ( !bRet )
- aHd.SeekToEndOfRecord( rStCtrl );
+ {
+ bool bSeekSuccess = aHd.SeekToEndOfRecord(rStCtrl);
+ if (!bSeekSuccess)
+ break;
+ }
}
while ( rStCtrl.good() && rStCtrl.Tell() < nMaxFilePos && !bRet );
if ( !bRet )
diff --git a/sd/qa/unit/data/ppt/pass/hang-11.ppt b/sd/qa/unit/data/ppt/pass/hang-11.ppt
new file mode 100644
index 0000000..2d9ef18
Binary files /dev/null and b/sd/qa/unit/data/ppt/pass/hang-11.ppt differ
diff --git a/sd/qa/unit/data/ppt/pass/hang-12.ppt b/sd/qa/unit/data/ppt/pass/hang-12.ppt
new file mode 100644
index 0000000..921481c
Binary files /dev/null and b/sd/qa/unit/data/ppt/pass/hang-12.ppt differ
More information about the Libreoffice-commits
mailing list