Commit bc5f8d9e authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

update mimetypes list for LibreOffice 4.3.3.2

also remove filters that now work from default black list.
parent 2b439b12
...@@ -134,13 +134,15 @@ class MimeMapper(object): ...@@ -134,13 +134,15 @@ class MimeMapper(object):
raise ValueError(stdout) raise ValueError(stdout)
filter_dict, type_dict = json.loads(stdout) filter_dict, type_dict = json.loads(stdout)
ooo_disable_filter_list = kw.get("ooo_disable_filter_list") or [] + [ ooo_disable_filter_list = kw.get("ooo_disable_filter_list") or []
'writer_jpg_Export', # Seems not working from cloudooo in Libre Office 4.2.0.4. # The following two export filters seem not working from cloudooo
'writer_png_Export', # Seems not working from cloudooo in Libre Office 4.2.0.4. # in Libre Office 4.2.0.4 but works fine in Libre Office 4.3.0.4.
] # 'writer_jpg_Export',
# 'writer_png_Export',
ooo_disable_filter_name_list = kw.get("ooo_disable_filter_name_list") or [] + [ ooo_disable_filter_name_list = kw.get("ooo_disable_filter_name_list") or [] + [
'Text', # Use 'Text Encoded' instead 'Text', # Use 'Text - Choose Encoding' instead
'Text (StarWriter/Web)', # Use 'Text Encoded (Writer/Web)' instead 'Text (StarWriter/Web)', # Use 'Text - Choose Encoding (Writer/Web)' instead
] ]
for filter_name, value in filter_dict.iteritems(): for filter_name, value in filter_dict.iteritems():
if filter_name in ooo_disable_filter_list: if filter_name in ooo_disable_filter_list:
......
...@@ -34,14 +34,14 @@ text_expected_tuple = ( ...@@ -34,14 +34,14 @@ text_expected_tuple = (
('doc', 'Microsoft Word 97/2000/XP/2003'), ('doc', 'Microsoft Word 97/2000/XP/2003'),
('ms.docx', 'Microsoft Word 2007/2010/2013 XML'), ('ms.docx', 'Microsoft Word 2007/2010/2013 XML'),
('docx', 'Office Open XML Text'), ('docx', 'Office Open XML Text'),
('fodt', 'OpenDocument Text (Flat XML)'), ('fodt', 'Flat XML ODF Text Document'),
('html', 'HTML Document (Writer)'), ('html', 'HTML Document (Writer)'),
# ('jpg', 'JPEG - Joint Photographic Experts Group'), ('jpg', 'JPEG - Joint Photographic Experts Group'),
('odt', 'ODF Text Document'), ('odt', 'ODF Text Document'),
('pdf', 'PDF - Portable Document Format'), ('pdf', 'PDF - Portable Document Format'),
# ('png', 'PNG - Portable Network Graphic'), ('png', 'PNG - Portable Network Graphic'),
('rtf', 'Rich Text'), ('rtf', 'Rich Text'),
('txt', 'Text Encoded'), ('txt', 'Text - Choose Encoding'),
) )
global_expected_tuple = ( global_expected_tuple = (
...@@ -51,7 +51,7 @@ drawing_expected_tuple = ( ...@@ -51,7 +51,7 @@ drawing_expected_tuple = (
('bmp', 'BMP - Windows Bitmap'), ('bmp', 'BMP - Windows Bitmap'),
('emf', 'EMF - Enhanced Metafile'), ('emf', 'EMF - Enhanced Metafile'),
('eps', 'EPS - Encapsulated PostScript'), ('eps', 'EPS - Encapsulated PostScript'),
('fodg', 'OpenDocument Drawing (Flat XML)'), ('fodg', 'Flat XML ODF Drawing'),
('gif', 'GIF - Graphics Interchange Format'), ('gif', 'GIF - Graphics Interchange Format'),
('html', 'HTML Document (Draw)'), ('html', 'HTML Document (Draw)'),
('jpg', 'JPEG - Joint Photographic Experts Group'), ('jpg', 'JPEG - Joint Photographic Experts Group'),
...@@ -77,14 +77,14 @@ web_expected_tuple = ( ...@@ -77,14 +77,14 @@ web_expected_tuple = (
('pdf', 'PDF - Portable Document Format'), ('pdf', 'PDF - Portable Document Format'),
('sxw', 'OpenOffice.org 1.0 Text Document (Writer/Web)'), ('sxw', 'OpenOffice.org 1.0 Text Document (Writer/Web)'),
('txt', 'Text (Writer/Web)'), ('txt', 'Text (Writer/Web)'),
('txt', 'Text Encoded (Writer/Web)'), ('txt', 'Text - Choose Encoding (Writer/Web)'),
) )
presentation_expected_tuple = ( presentation_expected_tuple = (
('bmp', 'BMP - Windows Bitmap'), ('bmp', 'BMP - Windows Bitmap'),
('emf', 'EMF - Enhanced Metafile'), ('emf', 'EMF - Enhanced Metafile'),
('eps', 'EPS - Encapsulated PostScript'), ('eps', 'EPS - Encapsulated PostScript'),
('fodp', 'OpenDocument Presentation (Flat XML)'), ('fodp', 'Flat XML ODF Presentation'),
('gif', 'GIF - Graphics Interchange Format'), ('gif', 'GIF - Graphics Interchange Format'),
('html', 'HTML Document (Impress)'), ('html', 'HTML Document (Impress)'),
('jpg', 'JPEG - Joint Photographic Experts Group'), ('jpg', 'JPEG - Joint Photographic Experts Group'),
...@@ -113,8 +113,8 @@ presentation_expected_tuple = ( ...@@ -113,8 +113,8 @@ presentation_expected_tuple = (
spreadsheet_expected_tuple = ( spreadsheet_expected_tuple = (
('csv', 'Text CSV'), ('csv', 'Text CSV'),
('fods', 'Flat XML ODF Spreadsheet'),
('html', 'HTML Document (Calc)'), ('html', 'HTML Document (Calc)'),
('fods', 'OpenDocument Spreadsheet (Flat XML)'),
('ods', 'ODF Spreadsheet'), ('ods', 'ODF Spreadsheet'),
('pdf', 'PDF - Portable Document Format'), ('pdf', 'PDF - Portable Document Format'),
('slk', 'SYLK'), ('slk', 'SYLK'),
......
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