summaryrefslogtreecommitdiff
path: root/sd/source/filter/ppt/pptin.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/filter/ppt/pptin.cxx')
-rw-r--r--sd/source/filter/ppt/pptin.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 4e3ca127c265..3b2589384909 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2759,9 +2759,17 @@ extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL ImportPPT(
extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportPPT(SvStream &rStream)
{
- tools::SvRef<SotStorage> xStorage(new SotStorage(rStream));
- if (xStorage->GetError())
+ tools::SvRef<SotStorage> xStorage;
+ try
+ {
+ 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() )