diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2013-07-03 17:14:32 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2013-07-03 17:15:08 +0200 |
commit | 36c64c875f5819bf5ada2bb657c490441bc24644 (patch) | |
tree | c233293a102355092359551d5211d047cccb1420 /sw | |
parent | 9a9b8f0b34bc647a923fc7e79d8b5f61535c1f7b (diff) |
Ugly workaround for historic sxw files produced once by libwpd/wpd2sxw
Change-Id: I2d22c12896b241d79ded723acb0a6753cc1468ee
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/uno/swdetect.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sw/source/ui/uno/swdetect.cxx b/sw/source/ui/uno/swdetect.cxx index fd23917d9944..5c3d987ba782 100644 --- a/sw/source/ui/uno/swdetect.cxx +++ b/sw/source/ui/uno/swdetect.cxx @@ -116,7 +116,7 @@ OUString SAL_CALL SwFilterDetect::detect( Sequence< PropertyValue >& lDescriptor lDescriptor[nProperty].Value >>= sTemp; aURL = sTemp; } - else if( !aURL.Len() && lDescriptor[nProperty].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("FileName")) ) + else if( !aURL.Len() && lDescriptor[nProperty].Name == "FileName" ) { lDescriptor[nProperty].Value >>= sTemp; aURL = sTemp; @@ -241,7 +241,11 @@ OUString SAL_CALL SwFilterDetect::detect( Sequence< PropertyValue >& lDescriptor } catch (const WrappedTargetException& aWrap) { - if (!bDeepDetection) + /* Cater for non-compliant sxw files created once upon a time by old libwpd/wpd2sxw combo + Don't bail-out early if the document is considered as corrupted. This allows us not to + reach the -- apparently -- catch-all SmFilterDetect::detect. + */ + if (!bDeepDetection && aTypeName != "writer_StarOffice_XML_Writer") // Bail out early unless it's a deep detection. return OUString(); |