Kaydet (Commit) bf89444c authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#707196 Uncaught exception

Change-Id: I4f42040c7e12507365f12d09f80d3641b4d5ca02
üst c12a2997
...@@ -66,8 +66,12 @@ OUString SAL_CALL SmFilterDetect::detect( Sequence< PropertyValue >& lDescriptor ...@@ -66,8 +66,12 @@ OUString SAL_CALL SmFilterDetect::detect( Sequence< PropertyValue >& lDescriptor
if ( pInStrm->remainingSize() == 0 ) if ( pInStrm->remainingSize() == 0 )
return OUString(); return OUString();
bool bStorageOk = false;
try
{
SotStorageRef aStorage = new SotStorage( pInStrm, false ); SotStorageRef aStorage = new SotStorage( pInStrm, false );
if ( !aStorage->GetError() ) bStorageOk = !aStorage->GetError();
if (bStorageOk)
{ {
if ( aStorage->IsStream("Equation Native") ) if ( aStorage->IsStream("Equation Native") )
{ {
...@@ -76,7 +80,13 @@ OUString SAL_CALL SmFilterDetect::detect( Sequence< PropertyValue >& lDescriptor ...@@ -76,7 +80,13 @@ OUString SAL_CALL SmFilterDetect::detect( Sequence< PropertyValue >& lDescriptor
return OUString("math_MathType_3x"); return OUString("math_MathType_3x");
} }
} }
else }
catch (const css::ucb::ContentCreationException &e)
{
SAL_WARN("starmath", "SmFilterDetect::detect caught " << e.Message);
}
if (!bStorageOk)
{ {
// 200 should be enough for the XML // 200 should be enough for the XML
// version, encoding and !DOCTYPE // version, encoding and !DOCTYPE
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment