Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boris Kocherov
cloudooo
Commits
4aae0f75
Commit
4aae0f75
authored
Feb 22, 2016
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update for LibreOffice 5.1.0.3.
parent
f05f03ae
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
22 deletions
+22
-22
cloudooo/handler/ooo/mimemapper.py
cloudooo/handler/ooo/mimemapper.py
+4
-4
cloudooo/handler/ooo/tests/testOooMimemapper.py
cloudooo/handler/ooo/tests/testOooMimemapper.py
+5
-3
cloudooo/handler/ooo/tests/testOooServer.py
cloudooo/handler/ooo/tests/testOooServer.py
+13
-15
No files found.
cloudooo/handler/ooo/mimemapper.py
View file @
4aae0f75
...
...
@@ -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
...
...
cloudooo/handler/ooo/tests/testOooMimemapper.py
View file @
4aae0f75
...
...
@@ -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'
),
)
...
...
cloudooo/handler/ooo/tests/testOooServer.py
View file @
4aae0f75
...
...
@@ -480,25 +480,23 @@ 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'
]],
image_list
)
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'
]],
image_list
)
self
.
assertEquals
([[
'10000000000000C80000009CBF079A6E41EE290C.jpg'
,
''
],
[
'10000201000000C80000004EF26C99A54A61B987.png'
,
'TioLive Logo'
],
[
'10000201000000C80000004EF26C99A54A61B987.png'
,
''
],
[
'2000031600004233000013702113A0E70B910778.wmf'
,
'Python Logo'
],
[
'10000201000000C80000004EF26C99A54A61B987.png'
,
'Again TioLive Logo'
]],
image_list
)
def
testGetImageFromOdt
(
self
):
"""Test if getImage can get a image from odt file after zip"""
...
...
@@ -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
=
'10000000000000C80000009C
76245A92
.jpg'
image_id
=
'10000000000000C80000009C
BF079A6E41EE290C
.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
)
...
...
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