Commit 60daafcc authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

update for LibreOffice 5.0.0.5.

writer_png_Export filter now works but draw_eps_Export and impress_eps_Export do not work.
parent 3241978a
......@@ -100,19 +100,15 @@ class MimeMapper(object):
"""
alternative_extension_dict = {
'Microsoft Excel 2007 XML':'ms.xlsx',
'Microsoft Excel 2007/2010 XML':'ms.xlsx',
'Microsoft Excel 2007/2010/2013 XML':'ms.xlsx',
'Microsoft Excel 2007-2013 XML':'ms.xlsx',
'Microsoft Excel 5.0':'5.xls',
'Microsoft Excel 95':'95.xls',
'Microsoft PowerPoint 2007 XML AutoPlay':'ms.ppsx',
'Microsoft PowerPoint 2007/2010 XML AutoPlay':'ms.ppsx',
'Microsoft PowerPoint 2007/2010/2013 XML AutoPlay':'ms.ppsx',
'Microsoft PowerPoint 2007-2013 XML AutoPlay':'ms.ppsx',
'Microsoft PowerPoint 2007 XML':'ms.pptx',
'Microsoft PowerPoint 2007/2010 XML':'ms.pptx',
'Microsoft PowerPoint 2007/2010/2013 XML':'ms.pptx',
'Microsoft PowerPoint 2007-2013 XML':'ms.pptx',
'Microsoft Word 2007 XML':'ms.docx',
'Microsoft Word 2007/2010 XML':'ms.docx',
'Microsoft Word 2007/2010/2013 XML':'ms.docx',
'Microsoft Word 2007-2013 XML':'ms.docx',
'Microsoft Word 6.0':'6.doc',
'Microsoft Word 95':'95.doc',
}
......@@ -136,7 +132,8 @@ class MimeMapper(object):
ooo_disable_filter_list = kw.get("ooo_disable_filter_list") or [] + [
'writer_jpg_Export', # Seems not working from cloudooo in Libre Office 4.3.3.2
'writer_png_Export', # Seems not working from cloudooo in Libre Office 4.3.3.2
'draw_eps_Export', # Seems not working from cloudooo in Libre Office 5.0.0.5
'impress_eps_Export', # Seems not working from cloudooo in Libre Office 5.0.0.5
]
ooo_disable_filter_name_list = kw.get("ooo_disable_filter_name_list") or [] + [
'Text', # Use 'Text - Choose Encoding' instead
......
......@@ -31,15 +31,15 @@ from cloudooo.handler.ooo.application.openoffice import openoffice
from cloudooo.handler.ooo.mimemapper import MimeMapper
text_expected_tuple = (
('doc', 'Microsoft Word 97/2000/XP/2003'),
('ms.docx', 'Microsoft Word 2007/2010/2013 XML'),
('doc', 'Microsoft Word 97-2003'),
('ms.docx', 'Microsoft Word 2007-2013 XML'),
('docx', 'Office Open XML Text'),
('fodt', 'Flat XML ODF Text Document'),
('html', 'HTML Document (Writer)'),
# ('jpg', 'JPEG - Joint Photographic Experts Group'),
('odt', 'ODF Text Document'),
('pdf', 'PDF - Portable Document Format'),
# ('png', 'PNG - Portable Network Graphic'),
('png', 'PNG - Portable Network Graphic'),
('rtf', 'Rich Text'),
('txt', 'Text - Choose Encoding'),
)
......@@ -50,7 +50,7 @@ global_expected_tuple = (
drawing_expected_tuple = (
('bmp', 'BMP - Windows Bitmap'),
('emf', 'EMF - Enhanced Metafile'),
('eps', 'EPS - Encapsulated PostScript'),
# ('eps', 'EPS - Encapsulated PostScript'),
('fodg', 'Flat XML ODF Drawing'),
('gif', 'GIF - Graphics Interchange Format'),
('html', 'HTML Document (Draw)'),
......@@ -83,7 +83,7 @@ web_expected_tuple = (
presentation_expected_tuple = (
('bmp', 'BMP - Windows Bitmap'),
('emf', 'EMF - Enhanced Metafile'),
('eps', 'EPS - Encapsulated PostScript'),
# ('eps', 'EPS - Encapsulated PostScript'),
('fodp', 'Flat XML ODF Presentation'),
('gif', 'GIF - Graphics Interchange Format'),
('html', 'HTML Document (Impress)'),
......@@ -97,11 +97,11 @@ presentation_expected_tuple = (
('pgm', 'PGM - Portable Graymap'),
('png', 'PNG - Portable Network Graphic'),
('ppm', 'PPM - Portable Pixelmap'),
('pps', 'Microsoft PowerPoint 97/2000/XP/2003 AutoPlay'),
('ms.ppsx', 'Microsoft PowerPoint 2007/2010/2013 XML AutoPlay'),
('pps', 'Microsoft PowerPoint 97-2003 AutoPlay'),
('ms.ppsx', 'Microsoft PowerPoint 2007-2013 XML AutoPlay'),
('ppsx', 'Office Open XML Presentation AutoPlay'),
('ppt', 'Microsoft PowerPoint 97/2000/XP/2003'),
('ms.pptx', 'Microsoft PowerPoint 2007/2010/2013 XML'),
('ppt', 'Microsoft PowerPoint 97-2003'),
('ms.pptx', 'Microsoft PowerPoint 2007-2013 XML'),
('pptx', 'Office Open XML Presentation'),
('ras', 'RAS - Sun Raster Image'),
('svg', 'SVG - Scalable Vector Graphics'),
......@@ -118,8 +118,8 @@ spreadsheet_expected_tuple = (
('ods', 'ODF Spreadsheet'),
('pdf', 'PDF - Portable Document Format'),
('slk', 'SYLK'),
('xls', 'Microsoft Excel 97/2000/XP/2003'),
('ms.xlsx', 'Microsoft Excel 2007/2010/2013 XML'),
('xls', 'Microsoft Excel 97-2003'),
('ms.xlsx', 'Microsoft Excel 2007-2013 XML'),
('xlsx', 'Office Open XML Spreadsheet'),
)
......
......@@ -480,11 +480,11 @@ class TestServer(TestCase):
"""Test if getImageItemList can get the list of images items from odt file"""
data = encodestring(open("./data/granulate_test.odt").read())
image_list = self.proxy.getImageItemList(data, "odt")
self.assertEquals([['10000000000000C80000009CA3D5C3B7.jpg', ''],
['10000201000000C80000004E7B947D46.png', 'TioLive Logo'],
['10000201000000C80000004E7B947D46.png', ''],
self.assertEquals([['10000000000000C80000009C76245A92.jpg', ''],
['10000201000000C80000004EE2BCEED0.png', 'TioLive Logo'],
['10000201000000C80000004EE2BCEED0.png', ''],
['2000004F00004233000013707E7DE37A.svm', 'Python Logo'],
['10000201000000C80000004E7B947D46.png',
['10000201000000C80000004EE2BCEED0.png',
'Again TioLive Logo']],
image_list)
......@@ -492,11 +492,11 @@ class TestServer(TestCase):
"""Test if getImageItemList can get the list of images items from doc file"""
data = encodestring(open("./data/granulate_test.doc").read())
image_list = self.proxy.getImageItemList(data, "doc")
self.assertEquals([['10000000000000C80000009CA3D5C3B7.jpg', ''],
['10000201000000C80000004E7B947D46.png', 'TioLive Logo'],
['10000201000000C80000004E7B947D46.png', ''],
self.assertEquals([['10000000000000C80000009C76245A92.jpg', ''],
['10000201000000C80000004EE2BCEED0.png', 'TioLive Logo'],
['10000201000000C80000004EE2BCEED0.png', ''],
['2000031600004233000013706A5EA1C8.wmf', 'Python Logo'],
['10000201000000C80000004E7B947D46.png',
['10000201000000C80000004EE2BCEED0.png',
'Again TioLive Logo']],
image_list)
......@@ -516,7 +516,7 @@ class TestServer(TestCase):
#so compare with the server return.
data_odt = self.proxy.convertFile(data, 'doc', 'odt', False)
zip = ZipFile(StringIO(decodestring(data_odt)))
image_id = '10000000000000C80000009CA3D5C3B7.jpg'
image_id = '10000000000000C80000009C76245A92.jpg'
original_image = zip.read('Pictures/%s' % image_id)
geted_image = decodestring(self.proxy.getImage(data, image_id, "doc"))
self.assertEquals(original_image, geted_image)
......
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