Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
cloudooo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
cloudooo
Commits
bc5f8d9e
Commit
bc5f8d9e
authored
Aug 07, 2014
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update mimetypes list for LibreOffice 4.3.3.2
also remove filters that now work from default black list.
parent
2b439b12
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
14 deletions
+16
-14
cloudooo/handler/ooo/mimemapper.py
cloudooo/handler/ooo/mimemapper.py
+8
-6
cloudooo/handler/ooo/tests/testOooMimemapper.py
cloudooo/handler/ooo/tests/testOooMimemapper.py
+8
-8
No files found.
cloudooo/handler/ooo/mimemapper.py
View file @
bc5f8d9e
...
...
@@ -134,13 +134,15 @@ class MimeMapper(object):
raise
ValueError
(
stdout
)
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.2.0.4.
'writer_png_Export'
,
# Seems not working from cloudooo in Libre Office 4.2.0.4.
]
ooo_disable_filter_list
=
kw
.
get
(
"ooo_disable_filter_list"
)
or
[]
# The following two export filters seem not working from cloudooo
# 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
[]
+
[
'Text'
,
# Use 'Text
Encoded
' instead
'Text (StarWriter/Web)'
,
# Use 'Text
Encoded
(Writer/Web)' instead
'Text'
,
# Use 'Text
- Choose Encoding
' instead
'Text (StarWriter/Web)'
,
# Use 'Text
- Choose Encoding
(Writer/Web)' instead
]
for
filter_name
,
value
in
filter_dict
.
iteritems
():
if
filter_name
in
ooo_disable_filter_list
:
...
...
cloudooo/handler/ooo/tests/testOooMimemapper.py
View file @
bc5f8d9e
...
...
@@ -34,14 +34,14 @@ text_expected_tuple = (
(
'doc'
,
'Microsoft Word 97/2000/XP/2003'
),
(
'ms.docx'
,
'Microsoft Word 2007/2010/2013 XML'
),
(
'docx'
,
'Office Open XML Text'
),
(
'fodt'
,
'
OpenDocument Text (Flat XML)
'
),
(
'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'),
(
'png'
,
'PNG - Portable Network Graphic'
),
(
'rtf'
,
'Rich Text'
),
(
'txt'
,
'Text
Encoded
'
),
(
'txt'
,
'Text
- Choose Encoding
'
),
)
global_expected_tuple
=
(
...
...
@@ -51,7 +51,7 @@ drawing_expected_tuple = (
(
'bmp'
,
'BMP - Windows Bitmap'
),
(
'emf'
,
'EMF - Enhanced Metafile'
),
(
'eps'
,
'EPS - Encapsulated PostScript'
),
(
'fodg'
,
'
OpenDocument Drawing (Flat XML)
'
),
(
'fodg'
,
'
Flat XML ODF Drawing
'
),
(
'gif'
,
'GIF - Graphics Interchange Format'
),
(
'html'
,
'HTML Document (Draw)'
),
(
'jpg'
,
'JPEG - Joint Photographic Experts Group'
),
...
...
@@ -77,14 +77,14 @@ web_expected_tuple = (
(
'pdf'
,
'PDF - Portable Document Format'
),
(
'sxw'
,
'OpenOffice.org 1.0 Text Document (Writer/Web)'
),
(
'txt'
,
'Text (Writer/Web)'
),
(
'txt'
,
'Text
Encoded
(Writer/Web)'
),
(
'txt'
,
'Text
- Choose Encoding
(Writer/Web)'
),
)
presentation_expected_tuple
=
(
(
'bmp'
,
'BMP - Windows Bitmap'
),
(
'emf'
,
'EMF - Enhanced Metafile'
),
(
'eps'
,
'EPS - Encapsulated PostScript'
),
(
'fodp'
,
'
OpenDocument Presentation (Flat XML)
'
),
(
'fodp'
,
'
Flat XML ODF Presentation
'
),
(
'gif'
,
'GIF - Graphics Interchange Format'
),
(
'html'
,
'HTML Document (Impress)'
),
(
'jpg'
,
'JPEG - Joint Photographic Experts Group'
),
...
...
@@ -113,8 +113,8 @@ presentation_expected_tuple = (
spreadsheet_expected_tuple
=
(
(
'csv'
,
'Text CSV'
),
(
'fods'
,
'Flat XML ODF Spreadsheet'
),
(
'html'
,
'HTML Document (Calc)'
),
(
'fods'
,
'OpenDocument Spreadsheet (Flat XML)'
),
(
'ods'
,
'ODF Spreadsheet'
),
(
'pdf'
,
'PDF - Portable Document Format'
),
(
'slk'
,
'SYLK'
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment