[Libreoffice-commits] .: writerperfect/source
Fridrich Strba
fridrich at kemper.freedesktop.org
Mon Jun 6 15:04:24 PDT 2011
writerperfect/source/wpdimp/WordPerfectImportFilter.cxx | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
New commits:
commit 0f21385da03c66e9add208d20bf4d3dd19ab4d22
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Tue Jun 7 00:03:53 2011 +0200
Fix parsing of WordPerfect documents that are not password protected
diff --git a/writerperfect/source/wpdimp/WordPerfectImportFilter.cxx b/writerperfect/source/wpdimp/WordPerfectImportFilter.cxx
index ab86baf..41d7fc6 100644
--- a/writerperfect/source/wpdimp/WordPerfectImportFilter.cxx
+++ b/writerperfect/source/wpdimp/WordPerfectImportFilter.cxx
@@ -123,7 +123,6 @@ sal_Bool SAL_CALL WordPerfectImportFilter::importImpl( const Sequence< ::com::su
OString aUtf8Passwd;
-#if 1
WPDConfidence confidence = WPDocument::isFileFormatSupported(&input);
if (WPD_CONFIDENCE_SUPPORTED_ENCRYPTION == confidence)
@@ -146,7 +145,6 @@ sal_Bool SAL_CALL WordPerfectImportFilter::importImpl( const Sequence< ::com::su
return sal_False;
}
}
-#endif
// An XML import service: what we push sax messages to..
OUString sXMLImportService ( RTL_CONSTASCII_USTRINGPARAM ( "com.sun.star.comp.Writer.XMLOasisImporter" ) );
@@ -162,7 +160,7 @@ sal_Bool SAL_CALL WordPerfectImportFilter::importImpl( const Sequence< ::com::su
OdtGenerator collector(&xHandler, ODF_FLAT_XML);
collector.registerEmbeddedObjectHandler("image/x-wpg", &handleEmbeddedWPG);
- if (WPD_OK == WPDocument::parse(&input, &collector, aUtf8Passwd.getStr()))
+ if (WPD_OK == WPDocument::parse(&input, &collector, aUtf8Passwd.getLength() ? aUtf8Passwd.getStr() : 0))
return sal_True;
return sal_False;
}
More information about the Libreoffice-commits
mailing list