[Libreoffice-commits] core.git: Branch 'libreoffice-4-4' - 2 commits - filter/source sd/qa sd/source
Caolán McNamara
caolanm at redhat.com
Fri Aug 28 04:25:52 PDT 2015
filter/source/msfilter/msdffimp.cxx | 26 ++++++++++++++++++++++----
sd/qa/unit/data/ppt/pass/hang-10.ppt |binary
sd/qa/unit/data/ppt/pass/hang-11.ppt |binary
sd/qa/unit/data/ppt/pass/hang-12.ppt |binary
sd/source/filter/ppt/pptin.cxx | 6 ++++--
5 files changed, 26 insertions(+), 6 deletions(-)
New commits:
commit 352b5eae4ea9c07d4fab595e75f73b44def7ab77
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Aug 27 14:28:35 2015 +0100
check status of SeekTo
(cherry picked from commit 932f6de91904f86f38d2914b9ce07b94dfadac0c)
Change-Id: Ia2bb397c3fdd783cab77a6b0dbc31c9e3d19326b
Reviewed-on: https://gerrit.libreoffice.org/18081
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/sd/qa/unit/data/ppt/pass/hang-10.ppt b/sd/qa/unit/data/ppt/pass/hang-10.ppt
new file mode 100644
index 0000000..99a81c4
Binary files /dev/null and b/sd/qa/unit/data/ppt/pass/hang-10.ppt differ
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index b22372a..db2a05c 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -773,7 +773,8 @@ bool ImplSdPPTImport::Import()
if ( nObjCount++ ) // skipping the first object
{
Rectangle aEmpty;
- aHd2.SeekToBegOfRecord( rStCtrl );
+ if (!aHd2.SeekToBegOfRecord( rStCtrl ))
+ break;
SdrObject* pImpObj = ImportObj( rStCtrl, (void*)&aProcessData, aEmpty, aEmpty );
if ( pImpObj )
{
@@ -782,7 +783,8 @@ bool ImplSdPPTImport::Import()
}
}
}
- aHd2.SeekToEndOfRecord( rStCtrl );
+ if (!aHd2.SeekToEndOfRecord(rStCtrl))
+ break;
}
}
}
commit c7d1a23c0a6a400beb14be2d72e084fe304ae250
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/18083
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
Tested-by: Michael Meeks <michael.meeks at collabora.com>
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index be3c003..4748cb9 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -3241,12 +3241,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;
}
@@ -3275,11 +3282,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