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
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 = (
(
'pdf'
,
'PDF - Portable Document Format'
),
# ('png', 'PNG - Portable Network Graphic'),
(
'rtf'
,
'Rich Text'
),
(
'sxw'
,
'OpenOffice.org 1.0 Text Document'
),
(
'txt'
,
'Text Encoded'
),
)
...
...
@@ -65,7 +64,6 @@ drawing_expected_tuple = (
(
'ras'
,
'RAS - Sun Raster Image'
),
(
'svg'
,
'SVG - Scalable Vector Graphics'
),
(
'svm'
,
'SVM - StarView Metafile'
),
(
'sxd'
,
'OpenOffice.org 1.0 Drawing'
),
(
'tif'
,
'TIFF - Tagged Image File Format'
),
(
'wmf'
,
'WMF - Windows Metafile'
),
(
'xpm'
,
'XPM - X PixMap'
),
...
...
@@ -105,20 +103,17 @@ presentation_expected_tuple = (
(
'ras'
,
'RAS - Sun Raster Image'
),
(
'svg'
,
'SVG - Scalable Vector Graphics'
),
(
'svm'
,
'SVM - StarView Metafile'
),
(
'sxd'
,
'OpenOffice.org 1.0 Drawing (Impress)'
),
(
'sxi'
,
'OpenOffice.org 1.0 Presentation'
),
(
'tif'
,
'TIFF - Tagged Image File Format'
),
(
'wmf'
,
'WMF - Windows Metafile'
),
(
'xpm'
,
'XPM - X PixMap'
),
)
spreadsheet_expected_
list
=
(
spreadsheet_expected_
tuple
=
(
(
'csv'
,
'Text CSV'
),
(
'html'
,
'HTML Document (Calc)'
),
(
'ods'
,
'ODF Spreadsheet'
),
(
'pdf'
,
'PDF - Portable Document Format'
),
(
'slk'
,
'SYLK'
),
(
'sxc'
,
'OpenOffice.org 1.0 Spreadsheet'
),
(
'xls'
,
'Microsoft Excel 97/2000/XP/2003'
),
(
'ms.xlsx'
,
'Microsoft Excel 2007/2010/2013 XML'
),
(
'xlsx'
,
'Office Open XML Spreadsheet'
),
...
...
@@ -131,7 +126,6 @@ math_expected_tuple = (
(
'smf'
,
'StarMath 3.0'
),
(
'smf'
,
'StarMath 4.0'
),
(
'smf'
,
'StarMath 5.0'
),
(
'sxm'
,
'OpenOffice.org 1.0 Formula'
),
)
chart_expected_tuple
=
(
...
...
@@ -218,7 +212,7 @@ class TestMimeMapper(HandlerTestCase):
pdf_got_list
=
list
(
self
.
mimemapper
.
getAllowedExtensionList
(
'pdf'
))
pdf_expected_list
=
list
(
set
(
presentation_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
:
self
.
assertTrue
(
arg
in
pdf_expected_list
,
"%s not in %s"
%
(
arg
,
pdf_expected_list
))
...
...
@@ -273,11 +267,11 @@ class TestMimeMapper(HandlerTestCase):
def
testGetAllAllowedExtensionListForSpreadsheet
(
self
):
"""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'
)
for
arg
in
got_list
:
self
.
assertTrue
(
arg
in
spreadsheet_expected_
list
,
"%s not in %s"
%
(
arg
,
spreadsheet_expected_
list
))
self
.
assertTrue
(
arg
in
spreadsheet_expected_
tuple
,
"%s not in %s"
%
(
arg
,
spreadsheet_expected_
tuple
))
def
testGetAllAllowedExtensionListForChart
(
self
):
"""Passing document_type equal to 'chart', the return must be equal
...
...
@@ -293,9 +287,6 @@ class TestMimeMapper(HandlerTestCase):
filtername
=
self
.
mimemapper
.
getFilterName
(
"xls"
,
'com.sun.star.sheet.SpreadsheetDocument'
)
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"
,
'com.sun.star.text.TextDocument'
)
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