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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gabriel Monnerat
cloudooo
Commits
d230aa55
Commit
d230aa55
authored
May 23, 2014
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
LibreOffice 4.2.4 no longe has export filters for old OOo formats.
parent
f67af279
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
14 deletions
+5
-14
cloudooo/handler/ooo/tests/testOooMimemapper.py
cloudooo/handler/ooo/tests/testOooMimemapper.py
+5
-14
No files found.
cloudooo/handler/ooo/tests/testOooMimemapper.py
View file @
d230aa55
...
@@ -40,7 +40,6 @@ text_expected_tuple = (
...
@@ -40,7 +40,6 @@ text_expected_tuple = (
(
'pdf'
,
'PDF - Portable Document Format'
),
(
'pdf'
,
'PDF - Portable Document Format'
),
# ('png', 'PNG - Portable Network Graphic'),
# ('png', 'PNG - Portable Network Graphic'),
(
'rtf'
,
'Rich Text'
),
(
'rtf'
,
'Rich Text'
),
(
'sxw'
,
'OpenOffice.org 1.0 Text Document'
),
(
'txt'
,
'Text Encoded'
),
(
'txt'
,
'Text Encoded'
),
)
)
...
@@ -65,7 +64,6 @@ drawing_expected_tuple = (
...
@@ -65,7 +64,6 @@ drawing_expected_tuple = (
(
'ras'
,
'RAS - Sun Raster Image'
),
(
'ras'
,
'RAS - Sun Raster Image'
),
(
'svg'
,
'SVG - Scalable Vector Graphics'
),
(
'svg'
,
'SVG - Scalable Vector Graphics'
),
(
'svm'
,
'SVM - StarView Metafile'
),
(
'svm'
,
'SVM - StarView Metafile'
),
(
'sxd'
,
'OpenOffice.org 1.0 Drawing'
),
(
'tif'
,
'TIFF - Tagged Image File Format'
),
(
'tif'
,
'TIFF - Tagged Image File Format'
),
(
'wmf'
,
'WMF - Windows Metafile'
),
(
'wmf'
,
'WMF - Windows Metafile'
),
(
'xpm'
,
'XPM - X PixMap'
),
(
'xpm'
,
'XPM - X PixMap'
),
...
@@ -105,20 +103,17 @@ presentation_expected_tuple = (
...
@@ -105,20 +103,17 @@ presentation_expected_tuple = (
(
'ras'
,
'RAS - Sun Raster Image'
),
(
'ras'
,
'RAS - Sun Raster Image'
),
(
'svg'
,
'SVG - Scalable Vector Graphics'
),
(
'svg'
,
'SVG - Scalable Vector Graphics'
),
(
'svm'
,
'SVM - StarView Metafile'
),
(
'svm'
,
'SVM - StarView Metafile'
),
(
'sxd'
,
'OpenOffice.org 1.0 Drawing (Impress)'
),
(
'sxi'
,
'OpenOffice.org 1.0 Presentation'
),
(
'tif'
,
'TIFF - Tagged Image File Format'
),
(
'tif'
,
'TIFF - Tagged Image File Format'
),
(
'wmf'
,
'WMF - Windows Metafile'
),
(
'wmf'
,
'WMF - Windows Metafile'
),
(
'xpm'
,
'XPM - X PixMap'
),
(
'xpm'
,
'XPM - X PixMap'
),
)
)
spreadsheet_expected_
list
=
(
spreadsheet_expected_
tuple
=
(
(
'csv'
,
'Text CSV'
),
(
'csv'
,
'Text CSV'
),
(
'html'
,
'HTML Document (Calc)'
),
(
'html'
,
'HTML Document (Calc)'
),
(
'ods'
,
'ODF Spreadsheet'
),
(
'ods'
,
'ODF Spreadsheet'
),
(
'pdf'
,
'PDF - Portable Document Format'
),
(
'pdf'
,
'PDF - Portable Document Format'
),
(
'slk'
,
'SYLK'
),
(
'slk'
,
'SYLK'
),
(
'sxc'
,
'OpenOffice.org 1.0 Spreadsheet'
),
(
'xls'
,
'Microsoft Excel 97/2000/XP/2003'
),
(
'xls'
,
'Microsoft Excel 97/2000/XP/2003'
),
(
'ms.xlsx'
,
'Microsoft Excel 2007/2010/2013 XML'
),
(
'ms.xlsx'
,
'Microsoft Excel 2007/2010/2013 XML'
),
(
'xlsx'
,
'Office Open XML Spreadsheet'
),
(
'xlsx'
,
'Office Open XML Spreadsheet'
),
...
@@ -131,7 +126,6 @@ math_expected_tuple = (
...
@@ -131,7 +126,6 @@ math_expected_tuple = (
(
'smf'
,
'StarMath 3.0'
),
(
'smf'
,
'StarMath 3.0'
),
(
'smf'
,
'StarMath 4.0'
),
(
'smf'
,
'StarMath 4.0'
),
(
'smf'
,
'StarMath 5.0'
),
(
'smf'
,
'StarMath 5.0'
),
(
'sxm'
,
'OpenOffice.org 1.0 Formula'
),
)
)
chart_expected_tuple
=
(
chart_expected_tuple
=
(
...
@@ -218,7 +212,7 @@ class TestMimeMapper(HandlerTestCase):
...
@@ -218,7 +212,7 @@ class TestMimeMapper(HandlerTestCase):
pdf_got_list
=
list
(
self
.
mimemapper
.
getAllowedExtensionList
(
'pdf'
))
pdf_got_list
=
list
(
self
.
mimemapper
.
getAllowedExtensionList
(
'pdf'
))
pdf_expected_list
=
list
(
set
(
presentation_expected_tuple
+
pdf_expected_list
=
list
(
set
(
presentation_expected_tuple
+
drawing_expected_tuple
+
web_expected_tuple
+
global_expected_tuple
+
drawing_expected_tuple
+
web_expected_tuple
+
global_expected_tuple
+
math_expected_tuple
+
text_expected_tuple
+
spreadsheet_expected_
list
))
math_expected_tuple
+
text_expected_tuple
+
spreadsheet_expected_
tuple
))
for
arg
in
pdf_got_list
:
for
arg
in
pdf_got_list
:
self
.
assertTrue
(
arg
in
pdf_expected_list
,
self
.
assertTrue
(
arg
in
pdf_expected_list
,
"%s not in %s"
%
(
arg
,
pdf_expected_list
))
"%s not in %s"
%
(
arg
,
pdf_expected_list
))
...
@@ -273,11 +267,11 @@ class TestMimeMapper(HandlerTestCase):
...
@@ -273,11 +267,11 @@ class TestMimeMapper(HandlerTestCase):
def
testGetAllAllowedExtensionListForSpreadsheet
(
self
):
def
testGetAllAllowedExtensionListForSpreadsheet
(
self
):
"""Passing document_type equal to 'spreadsheet', the return must be equal
"""Passing document_type equal to 'spreadsheet', the return must be equal
to spreadsheet_expected_
list
."""
to spreadsheet_expected_
tuple
."""
got_list
=
self
.
mimemapper
.
getAllowedExtensionList
(
document_type
=
'spreadsheet'
)
got_list
=
self
.
mimemapper
.
getAllowedExtensionList
(
document_type
=
'spreadsheet'
)
for
arg
in
got_list
:
for
arg
in
got_list
:
self
.
assertTrue
(
arg
in
spreadsheet_expected_
list
,
self
.
assertTrue
(
arg
in
spreadsheet_expected_
tuple
,
"%s not in %s"
%
(
arg
,
spreadsheet_expected_
list
))
"%s not in %s"
%
(
arg
,
spreadsheet_expected_
tuple
))
def
testGetAllAllowedExtensionListForChart
(
self
):
def
testGetAllAllowedExtensionListForChart
(
self
):
"""Passing document_type equal to 'chart', the return must be equal
"""Passing document_type equal to 'chart', the return must be equal
...
@@ -293,9 +287,6 @@ class TestMimeMapper(HandlerTestCase):
...
@@ -293,9 +287,6 @@ class TestMimeMapper(HandlerTestCase):
filtername
=
self
.
mimemapper
.
getFilterName
(
"xls"
,
filtername
=
self
.
mimemapper
.
getFilterName
(
"xls"
,
'com.sun.star.sheet.SpreadsheetDocument'
)
'com.sun.star.sheet.SpreadsheetDocument'
)
self
.
assertEquals
(
filtername
,
"MS Excel 97"
)
self
.
assertEquals
(
filtername
,
"MS Excel 97"
)
filtername
=
self
.
mimemapper
.
getFilterName
(
"sxw"
,
'com.sun.star.text.TextDocument'
)
self
.
assertEquals
(
filtername
,
"StarOffice XML (Writer)"
)
filtername
=
self
.
mimemapper
.
getFilterName
(
"pdf"
,
filtername
=
self
.
mimemapper
.
getFilterName
(
"pdf"
,
'com.sun.star.text.TextDocument'
)
'com.sun.star.text.TextDocument'
)
self
.
assertEquals
(
filtername
,
"writer_pdf_Export"
)
self
.
assertEquals
(
filtername
,
"writer_pdf_Export"
)
...
...
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