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
0
Merge Requests
0
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
Roque
cloudooo
Commits
becca1e7
Commit
becca1e7
authored
Aug 07, 2014
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify for LibreOffice 4.3.
XXX still some tests related to get metadata fail.
parent
b5cd79de
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
10 deletions
+16
-10
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
-4
No files found.
cloudooo/handler/ooo/mimemapper.py
View file @
becca1e7
...
...
@@ -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 @
becca1e7
...
...
@@ -34,13 +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'
,
'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
=
(
...
...
@@ -50,6 +51,7 @@ drawing_expected_tuple = (
(
'bmp'
,
'BMP - Windows Bitmap'
),
(
'emf'
,
'EMF - Enhanced Metafile'
),
(
'eps'
,
'EPS - Encapsulated PostScript'
),
(
'fodg'
,
'Flat XML ODF Drawing'
),
(
'gif'
,
'GIF - Graphics Interchange Format'
),
(
'html'
,
'HTML Document (Draw)'
),
(
'jpg'
,
'JPEG - Joint Photographic Experts Group'
),
...
...
@@ -75,13 +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'
,
'Flat XML ODF Presentation'
),
(
'gif'
,
'GIF - Graphics Interchange Format'
),
(
'html'
,
'HTML Document (Impress)'
),
(
'jpg'
,
'JPEG - Joint Photographic Experts Group'
),
...
...
@@ -110,6 +113,7 @@ presentation_expected_tuple = (
spreadsheet_expected_tuple
=
(
(
'csv'
,
'Text CSV'
),
(
'fods'
,
'Flat XML ODF Spreadsheet'
),
(
'html'
,
'HTML Document (Calc)'
),
(
'ods'
,
'ODF Spreadsheet'
),
(
'pdf'
,
'PDF - Portable Document Format'
),
...
...
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