Resolves: ofz#820 an exception is an acceptable outcome

Change-Id: Ifc5be483387202c371596fd52f1e2ce682151ca8
This commit is contained in:
Caolán McNamara
2017-03-20 15:51:38 +00:00
parent d31cdf523c
commit 2ee7ad0151
2 changed files with 21 additions and 15 deletions

View File

@@ -118,6 +118,8 @@ HwpReader::~HwpReader()
extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportHWP(SvStream &rStream)
{
try
{
std::unique_ptr<HStream> stream(new HStream);
byte aData[32768];
std::size_t nRead, nBlock = 32768;
@@ -133,6 +135,11 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportHWP(SvStream &rStream)
HWPFile hwpfile;
if (hwpfile.ReadHwpFile(stream.release()))
return false;
}
catch (...)
{
return false;
}
return true;
}

View File

@@ -215,13 +215,12 @@ int ReadWordproFile(SvStream &rStream, uno::Reference<css::xml::sax::XDocumentHa
//Reset all static objects,because this function may be called many times.
XFGlobalReset();
reader.Read();
return 0;
}
catch (...)
{
return 1;
}
return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */