summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-06-17 21:03:42 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-06-17 21:04:23 +0100
commit9c56cbf6e9e2f72441920a91bf8c1a4803e7231d (patch)
tree8196d4fd42ab19a37ef769ae84683a0b215b7ea4 /sw/source
parent4c1d68ca54029660624de7a1ed5043dbbbd9ff18 (diff)
ofz#2289 catch bad storage exception
Change-Id: I51b44a49eb05da0bf89ae2db7b5f2d4647c3ee87
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/filter/ww8/ww8par.cxx11
1 files changed, 10 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 22ca6889474d..1ce758822888 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -6178,7 +6178,16 @@ bool SAL_CALL TestImportDOC(SvStream &rStream, const OUString &rFltName)
pReader->pStrm = &rStream;
if (rFltName != "WW6")
{
- xStorage = tools::SvRef<SotStorage>(new SotStorage(rStream));
+ try
+ {
+ xStorage = tools::SvRef<SotStorage>(new SotStorage(rStream));
+ if (xStorage->GetError())
+ return false;
+ }
+ catch (...)
+ {
+ return false;
+ }
pReader->pStg = xStorage.get();
}
pReader->SetFltName(rFltName);