summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-08-31 15:00:16 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-09-02 12:14:48 +0100
commit67cba3af55e94debe8eb6392bc8d0b2f00a7a199 (patch)
tree1729476153dace0d8d0f75d30fae3745b521510f /sw/source/ui
parent3fa329f6108c47b9e86724ed2d6e7d294239107e (diff)
coverity#707318 Uncaught exception
Change-Id: Ib2d4b2e6c4df70da1d8a4b5bf39f69efea45ad5e
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/uno/swdetect.cxx17
1 files changed, 12 insertions, 5 deletions
diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx
index 4304b67bb6d3..c37e9fcfe22e 100644
--- a/sw/source/ui/uno/swdetect.cxx
+++ b/sw/source/ui/uno/swdetect.cxx
@@ -86,12 +86,19 @@ OUString SAL_CALL SwFilterDetect::detect( Sequence< PropertyValue >& lDescriptor
if ( pInStrm->remainingSize() == 0 )
return OUString();
- SotStorageRef aStorage = new SotStorage ( pInStrm, false );
- if ( !aStorage->GetError() )
+ try
{
- bIsDetected = aStorage->IsContained( "WordDocument" );
- if ( bIsDetected && aTypeName.startsWith( "writer_MS_Word_97" ) )
- bIsDetected = ( aStorage->IsContained("0Table") || aStorage->IsContained("1Table") );
+ SotStorageRef aStorage = new SotStorage ( pInStrm, false );
+ if ( !aStorage->GetError() )
+ {
+ bIsDetected = aStorage->IsContained( "WordDocument" );
+ if ( bIsDetected && aTypeName.startsWith( "writer_MS_Word_97" ) )
+ bIsDetected = ( aStorage->IsContained("0Table") || aStorage->IsContained("1Table") );
+ }
+ }
+ catch (...)
+ {
+ bIsDetected = false;
}
}