Commit 2c67e840 authored by Yusei Tahara's avatar Yusei Tahara

if document is empty, don't try to convert.

oood does not work for empty data, so it is waste of time.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16148 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 03e67d80
......@@ -312,6 +312,11 @@ class OOoDocument(File, ConversionCacheMixin):
If a conversion is already stored for this format, it is returned
directly, otherwise the conversion is stored for the next time.
"""
#XXX if document is empty, stop to try to convert.
#XXX but I don't know what is a appropriate mime-type.(Yusei)
if self.get_size()==0:
return 'text/plain', ''
# Make sure we can support html and pdf by default
is_html = 0
original_format = format
......
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