Commit 71592244 authored by Gabriel Monnerat's avatar Gabriel Monnerat

fix issue to export spreadsheet to html

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@38317 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5cb23e4a
......@@ -102,7 +102,6 @@ def application(global_config, **local_config):
mimemapper.loadFilterList(application_hostname,
openoffice_port)
openoffice.release()
from manager import Manager
timeout_response = int(local_config.get('timeout_response'))
kw = dict(timeout=timeout_response)
......
......@@ -202,11 +202,13 @@ class Manager(object):
# XXX - use html format instead of xhtml
if orig_format == "presentation" and format == "xhtml":
format = 'html'
elif orig_format == "spreadsheet" and format in ("html", "xhtml"):
format = "htm"
response_dict['data'] = self.convertFile(file, orig_format, format, zip)
# FIXME: Fast solution to obtain the html or pdf mimetypes
if zip:
response_dict['mime'] = "application/zip"
elif format == "html":
elif format in ("html", "htm", "xhtml"):
response_dict['mime'] = "text/html"
elif format == "pdf":
response_dict['mime'] = "application/pdf"
......
......@@ -75,7 +75,7 @@ def createSpecificProperty(filter_name):
property = PropertyValue('FilterData', 0,
uno.Any('[]com.sun.star.beans.PropertyValue',
(PropertyValue('ExportNotesPages', 0, True, 0),),), 0)
elif filter_name == "draw_html_Export":
elif filter_name in ("draw_html_Export", "HTML (StarCalc)"):
property = PropertyValue('FilterData', 0,
uno.Any('[]com.sun.star.beans.PropertyValue',
(PropertyValue('Format', 0, 2, 0),),), 0)
......
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