[Libreoffice-commits] core.git: sd/source
Caolán McNamara
caolanm at redhat.com
Thu Mar 1 20:19:15 UTC 2018
sd/source/filter/ppt/pptin.cxx | 36 +++++++++++++++++-------------------
1 file changed, 17 insertions(+), 19 deletions(-)
New commits:
commit f203f834b1855dc1dc90766d19082f7f91bec074
Author: Caolán McNamara <caolanm at redhat.com>
Date: Thu Mar 1 09:13:39 2018 +0000
ofz#6625 just don't care about exceptions during fuzzing
Change-Id: I41cc7491529d2486d96cb3893e6a3b4e5713d078
Reviewed-on: https://gerrit.libreoffice.org/50585
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 5befe39a9526..3e8c16943e92 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2763,36 +2763,34 @@ extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool ImportPPT(
extern "C" SAL_DLLPUBLIC_EXPORT bool TestImportPPT(SvStream &rStream)
{
- tools::SvRef<SotStorage> xStorage;
+ bool bRet = false;
try
{
- xStorage = tools::SvRef<SotStorage>(new SotStorage(rStream));
+ tools::SvRef<SotStorage> xStorage = tools::SvRef<SotStorage>(new SotStorage(rStream));
if (xStorage->GetError())
return false;
- }
- catch (...)
- {
- return false;
- }
-
- tools::SvRef<SotStorageStream> xDocStream(xStorage->OpenSotStream( "PowerPoint Document", StreamMode::STD_READ));
- if ( !xDocStream.is() )
- return false;
- SdDLL::Init();
+ tools::SvRef<SotStorageStream> xDocStream(xStorage->OpenSotStream( "PowerPoint Document", StreamMode::STD_READ));
+ if ( !xDocStream.is() )
+ return false;
- SfxMedium aSrcMed("", StreamMode::STD_READ);
+ SdDLL::Init();
- xDocStream->SetVersion(xStorage->GetVersion());
- xDocStream->SetCryptMaskKey(xStorage->GetKey());
+ SfxMedium aSrcMed("", StreamMode::STD_READ);
- ::sd::DrawDocShellRef xDocShRef = new ::sd::DrawDocShell(SfxObjectCreateMode::EMBEDDED, false, DocumentType::Impress);
- SdDrawDocument *pDoc = xDocShRef->GetDoc();
+ xDocStream->SetVersion(xStorage->GetVersion());
+ xDocStream->SetCryptMaskKey(xStorage->GetKey());
- bool bRet = ImportPPT(pDoc, *xDocStream, *xStorage, aSrcMed);
+ ::sd::DrawDocShellRef xDocShRef = new ::sd::DrawDocShell(SfxObjectCreateMode::EMBEDDED, false, DocumentType::Impress);
+ SdDrawDocument *pDoc = xDocShRef->GetDoc();
- xDocShRef->DoClose();
+ bRet = ImportPPT(pDoc, *xDocStream, *xStorage, aSrcMed);
+ xDocShRef->DoClose();
+ }
+ catch (...)
+ {
+ }
return bRet;
}
More information about the Libreoffice-commits
mailing list