Commit e290cc32 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

ignore filters that are marked as NotInFileDialog or NotInChooser flags.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk/utils@42451 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 6e2b19d3
...@@ -124,7 +124,7 @@ class MimeMapper(object): ...@@ -124,7 +124,7 @@ class MimeMapper(object):
# UsesOptions (deprecated):0x80, Default:0x100, # UsesOptions (deprecated):0x80, Default:0x100,
# NotInFileDialog:0x1000, NotInChooser:0x2000, # NotInFileDialog:0x1000, NotInChooser:0x2000,
# ThirdParty:0x80000, Preferred:0x10000000 # ThirdParty:0x80000, Preferred:0x10000000
if not flag & 2: if not flag & 0x02 or flag & 0x1000 or flag & 0x2000:
continue continue
ui_name = value.get('UIName') ui_name = value.get('UIName')
filter_type = value.get('Type') filter_type = value.get('Type')
......
...@@ -53,7 +53,6 @@ text_expected_tuple = ( ...@@ -53,7 +53,6 @@ text_expected_tuple = (
) )
global_expected_tuple = ( global_expected_tuple = (
('html', 'HTML (Writer/Global)'),
('odm', 'ODF Master Document'), ('odm', 'ODF Master Document'),
('odt', 'ODF Text Document'), ('odt', 'ODF Text Document'),
('pdf', 'PDF - Portable Document Format'), ('pdf', 'PDF - Portable Document Format'),
...@@ -171,9 +170,7 @@ math_expected_tuple = ( ...@@ -171,9 +170,7 @@ math_expected_tuple = (
) )
chart_expected_tuple = ( chart_expected_tuple = (
('odc', 'ODF Chart'),
# ('odc', 'OpenOffice.org 1.0 Report Chart'), # ('odc', 'OpenOffice.org 1.0 Report Chart'),
('sxs', 'OpenOffice.org 1.0 Chart'),
) )
OPENOFFICE = True OPENOFFICE = True
...@@ -229,7 +226,10 @@ class TestMimeMapper(CloudoooTestCase): ...@@ -229,7 +226,10 @@ class TestMimeMapper(CloudoooTestCase):
type = document_type_dict.get("text") type = document_type_dict.get("text")
self.assertEquals(type, 'com.sun.star.text.TextDocument') self.assertEquals(type, 'com.sun.star.text.TextDocument')
type = document_type_dict.get("chart") type = document_type_dict.get("chart")
self.assertEquals(type, 'com.sun.star.chart2.ChartDocument') # For now, chart document filters are maked as NotInFileDialog and
# NotInChooser.
# self.assertEquals(type, 'com.sun.star.chart2.ChartDocument')
self.assertEquals(type, None)
type = document_type_dict.get("drawing") type = document_type_dict.get("drawing")
self.assertEquals(type, 'com.sun.star.drawing.DrawingDocument') self.assertEquals(type, 'com.sun.star.drawing.DrawingDocument')
type = document_type_dict.get("presentation") type = document_type_dict.get("presentation")
......
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