[Erp5-report] r37498 gabriel - in /erp5/trunk/utils/cloudooo/cloudooo: ./ bin/

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Aug 5 01:10:19 CEST 2010


Author: gabriel
Date: Thu Aug  5 01:10:18 2010
New Revision: 37498

URL: http://svn.erp5.org?rev=37498&view=rev
Log:
bug fix. When is a zipfile is need return the zip mimetype

Modified:
    erp5/trunk/utils/cloudooo/cloudooo/bin/unoconverter.py
    erp5/trunk/utils/cloudooo/cloudooo/manager.py

Modified: erp5/trunk/utils/cloudooo/cloudooo/bin/unoconverter.py
URL: http://svn.erp5.org/erp5/trunk/utils/cloudooo/cloudooo/bin/unoconverter.py?rev=37498&r1=37497&r2=37498&view=diff
==============================================================================
--- erp5/trunk/utils/cloudooo/cloudooo/bin/unoconverter.py [utf8] (original)
+++ erp5/trunk/utils/cloudooo/cloudooo/bin/unoconverter.py [utf8] Thu Aug  5 01:10:18 2010
@@ -93,7 +93,7 @@ class UnoConverter(object):
       property_list.append(property)
       property = ooolib.createProperty("FilterName", filter_name)
       property_list.append(property)
-      if destination_format == "html":
+      if "htm" in destination_format:
         # XXX - condition to obtain a property that returns all images in png
         # format
         property_list.append(ooolib.createHTMLProperty())

Modified: erp5/trunk/utils/cloudooo/cloudooo/manager.py
URL: http://svn.erp5.org/erp5/trunk/utils/cloudooo/cloudooo/manager.py?rev=37498&r1=37497&r2=37498&view=diff
==============================================================================
--- erp5/trunk/utils/cloudooo/cloudooo/manager.py [utf8] (original)
+++ erp5/trunk/utils/cloudooo/cloudooo/manager.py [utf8] Thu Aug  5 01:10:18 2010
@@ -199,7 +199,9 @@ class Manager(object):
       response_dict = {}
       response_dict['data'] = self.convertFile(file, orig_format, format, zip)
       # FIXME: Fast solution to obtain the html or pdf mimetypes
-      if format == "html":
+      if zip:
+        response_dict['mime'] = "application/zip"
+      elif format == "html":
         response_dict['mime'] = "text/html"
       elif format == "pdf":
         response_dict['mime'] = "application/pdf"




More information about the Erp5-report mailing list