Commit 4aae0f75 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

update for LibreOffice 5.1.0.3.

parent f05f03ae
......@@ -131,10 +131,10 @@ class MimeMapper(object):
filter_dict, type_dict = json.loads(stdout)
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
# '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
......
......@@ -36,7 +36,7 @@ text_expected_tuple = (
('docx', 'Office Open XML Text'),
('fodt', 'Flat XML ODF Text Document'),
('html', 'HTML Document (Writer)'),
# ('jpg', 'JPEG - Joint Photographic Experts Group'),
('jpg', 'JPEG - Joint Photographic Experts Group'),
('odt', 'ODF Text Document'),
('pdf', 'PDF - Portable Document Format'),
# ('png', 'PNG - Portable Network Graphic'),
......@@ -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)'),
......@@ -117,8 +117,10 @@ spreadsheet_expected_tuple = (
('html', 'HTML Document (Calc)'),
('ods', 'ODF Spreadsheet'),
('pdf', 'PDF - Portable Document Format'),
('png', 'PNG - Portable Network Graphic'),
('slk', 'SYLK'),
('xls', 'Microsoft Excel 97-2003'),
('xlsm', 'Microsoft Excel 2007-2016 XML (macro enabled)'),
('ms.xlsx', 'Microsoft Excel 2007-2013 XML'),
('xlsx', 'Office Open XML Spreadsheet'),
)
......
......@@ -480,24 +480,22 @@ 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([['10000000000000C80000009C76245A92.jpg', ''],
['10000201000000C80000004EE2BCEED0.png', 'TioLive Logo'],
['10000201000000C80000004EE2BCEED0.png', ''],
['2000004F00004233000013707E7DE37A.svm', 'Python Logo'],
['10000201000000C80000004EE2BCEED0.png',
'Again TioLive Logo']],
self.assertEquals([['10000000000000C80000009CBF079A6E41EE290C.jpg', ''],
['10000201000000C80000004EF26C99A54A61B987.png', 'TioLive Logo'],
['10000201000000C80000004EF26C99A54A61B987.png', ''],
['2000004F0000423300001370ADF6545B2997B448.svm', 'Python Logo'],
['10000201000000C80000004EF26C99A54A61B987.png', 'Again TioLive Logo']],
image_list)
def testGetImageItemListFromDoc(self):
"""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([['10000000000000C80000009C76245A92.jpg', ''],
['10000201000000C80000004EE2BCEED0.png', 'TioLive Logo'],
['10000201000000C80000004EE2BCEED0.png', ''],
['2000031600004233000013706A5EA1C8.wmf', 'Python Logo'],
['10000201000000C80000004EE2BCEED0.png',
'Again TioLive Logo']],
self.assertEquals([['10000000000000C80000009CBF079A6E41EE290C.jpg', ''],
['10000201000000C80000004EF26C99A54A61B987.png', 'TioLive Logo'],
['10000201000000C80000004EF26C99A54A61B987.png', ''],
['2000031600004233000013702113A0E70B910778.wmf', 'Python Logo'],
['10000201000000C80000004EF26C99A54A61B987.png', 'Again TioLive Logo']],
image_list)
def testGetImageFromOdt(self):
......@@ -516,7 +514,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 = '10000000000000C80000009C76245A92.jpg'
image_id = '10000000000000C80000009CBF079A6E41EE290C.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