summaryrefslogtreecommitdiffstats
path: root/starmath
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2013-07-03 17:09:02 +0200
committerFridrich Štrba <fridrich.strba@bluewin.ch>2013-07-03 17:15:08 +0200
commit9a9b8f0b34bc647a923fc7e79d8b5f61535c1f7b (patch)
treec2bf2e89a7efbc37c7fb0cd48c2d559a8bc355b1 /starmath
parentsw: remove SwDoc::ShareLayout (diff)
downloadcore-9a9b8f0b34bc647a923fc7e79d8b5f61535c1f7b.tar.gz
core-9a9b8f0b34bc647a923fc7e79d8b5f61535c1f7b.zip
Bail early the same way as in 709f6ba6a
Change-Id: I8447d776ba315db5ef961818bc577d13e4f35a20
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/smdetect.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/starmath/source/smdetect.cxx b/starmath/source/smdetect.cxx
index 39b67b7da5f0..d82fa0337f94 100644
--- a/starmath/source/smdetect.cxx
+++ b/starmath/source/smdetect.cxx
@@ -95,6 +95,7 @@ OUString SAL_CALL SmFilterDetect::detect( Sequence< PropertyValue >& lDescriptor
sal_Bool bRepairPackage = sal_False;
sal_Bool bRepairAllowed = sal_False;
+ bool bDeepDetection = false;
// now some parameters that can already be in the array, but may be overwritten or new inserted here
// remember their indices in the case new values must be added to the array
@@ -145,6 +146,8 @@ OUString SAL_CALL SmFilterDetect::detect( Sequence< PropertyValue >& lDescriptor
lDescriptor[nProperty].Value >>= bRepairPackage;
else if( lDescriptor[nProperty].Name == "DocumentTitle" )
nIndexOfDocumentTitle = nProperty;
+ else if (lDescriptor[nProperty].Name == "DeepDetection")
+ bDeepDetection = lDescriptor[nProperty].Value.get<sal_Bool>();
}
// can't check the type for external filters, so set the "dont" flag accordingly
@@ -230,6 +233,10 @@ OUString SAL_CALL SmFilterDetect::detect( Sequence< PropertyValue >& lDescriptor
}
catch( const WrappedTargetException& aWrap )
{
+ if (!bDeepDetection)
+ // Bail out early unless it's a deep detection.
+ return OUString();
+
packages::zip::ZipIOException aZipException;
// repairing is done only if this type is requested from outside