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
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
cloudooo
Commits
f8b73412
Commit
f8b73412
authored
May 20, 2024
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ooo: update mime mapper and tests for LibreOffice 24.2.
parent
25361606
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
43 additions
and
27 deletions
+43
-27
cloudooo/handler/ooo/mimemapper.py
cloudooo/handler/ooo/mimemapper.py
+1
-1
cloudooo/handler/ooo/tests/testOooHandler.py
cloudooo/handler/ooo/tests/testOooHandler.py
+35
-21
cloudooo/handler/ooo/tests/testOooMimemapper.py
cloudooo/handler/ooo/tests/testOooMimemapper.py
+4
-3
cloudooo/handler/ooo/tests/testOooServer.py
cloudooo/handler/ooo/tests/testOooServer.py
+1
-1
cloudooo/manager.py
cloudooo/manager.py
+1
-1
cloudooo/mime.types
cloudooo/mime.types
+1
-0
No files found.
cloudooo/handler/ooo/mimemapper.py
View file @
f8b73412
...
...
@@ -94,7 +94,7 @@ class MimeMapper:
'Microsoft PowerPoint 2007-2013 XML'
:
'ms.pptx'
,
'Microsoft Word 2007 XML'
:
'ms.docx'
,
'Microsoft Word 2007-2013 XML'
:
'ms.docx'
,
'Word 2007
–365
'
:
'ms.docx'
,
'Word 2007'
:
'ms.docx'
,
'Microsoft Word 6.0'
:
'6.doc'
,
'Microsoft Word 95'
:
'95.doc'
,
'TIFF - Tagged Image File Format'
:
'tiff'
,
...
...
cloudooo/handler/ooo/tests/testOooHandler.py
View file @
f8b73412
This diff is collapsed.
Click to expand it.
cloudooo/handler/ooo/tests/testOooMimemapper.py
View file @
f8b73412
...
...
@@ -36,12 +36,12 @@ from cloudooo.handler.ooo.mimemapper import MimeMapper
# extension/document_type, the returned mime types are different for text
text_expected_tuple
=
(
(
'doc'
,
'Word 97–2003'
),
(
'docx'
,
'
Office Open XML Text (Transitional)
'
),
(
'docx'
,
'
Word 2010–365 Document
'
),
(
'epub'
,
'EPUB Document'
),
(
'fodt'
,
'Flat XML ODF Text Document'
),
(
'html'
,
'HTML Document (Writer)'
),
(
'jpg'
,
'JPEG - Joint Photographic Experts Group'
),
(
'ms.docx'
,
'Word 2007
–365
'
),
(
'ms.docx'
,
'Word 2007'
),
(
'odt'
,
'ODF Text Document'
),
(
'pdf'
,
'PDF - Portable Document Format'
),
(
'png'
,
'PNG - Portable Network Graphics'
),
...
...
@@ -50,13 +50,14 @@ text_expected_tuple = (
(
'webp'
,
'WEBP - WebP Image'
),
)
extra_text_expected_tuple
=
(
(
'docm'
,
'Word 2007
–365
VBA'
),
(
'docm'
,
'Word 2007 VBA'
),
)
global_expected_tuple
=
(
)
drawing_expected_tuple
=
(
(
'apng'
,
'APNG - Animated Portable Network Graphics'
),
(
'bmp'
,
'BMP - Windows Bitmap'
),
(
'emf'
,
'EMF - Enhanced Metafile'
),
(
'emz'
,
'EMZ - Compressed Enhanced Metafile'
),
...
...
cloudooo/handler/ooo/tests/testOooServer.py
View file @
f8b73412
...
...
@@ -52,7 +52,7 @@ class TestAllowedExtensions(TestCase):
text_allowed_list
=
self
.
proxy
.
getAllowedExtensionList
(
text_request
)
# XXX slightly different allowed formats with document_type !?
_text_expected_tuple
=
text_expected_tuple
+
(
(
'docm'
,
'Word 2007
–365
VBA'
),
(
'docm'
,
'Word 2007 VBA'
),
)
self
.
assertEqual
(
sorted
([
tuple
(
x
)
for
x
in
text_allowed_list
]),
...
...
cloudooo/manager.py
View file @
f8b73412
...
...
@@ -84,7 +84,7 @@ def BBB_guess_extension(mimetype, title=None):
"Microsoft PowerPoint 2007-2013 XML"
:
".ms.pptx"
,
"Microsoft PowerPoint 2007-2013 XML AutoPlay"
:
".ms.ppsx"
,
"Microsoft Word 2007-2013 XML"
:
".ms.docx"
,
"Word 2007
–365
"
:
".ms.docx"
,
"Word 2007"
:
".ms.docx"
,
}.
get
(
title
,
None
)
or
{
# mediatype : extension
"application/msword"
:
".doc"
,
...
...
cloudooo/mime.types
View file @
f8b73412
...
...
@@ -636,6 +636,7 @@ image/vnd.fujixerox.edmics-mmr
image/vnd.fujixerox.edmics-rlc
image/vnd.microsoft.icon ico
image/vnd.mix
image/vnd.mozilla.apng apng
image/vnd.net-fpx
image/vnd.svf
image/vnd.wap.wbmp wbmp
...
...
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