summaryrefslogtreecommitdiff
path: root/libmat2/office.py
diff options
context:
space:
mode:
authorjvoisin2019-04-27 04:05:36 -0700
committerjvoisin2019-04-27 04:05:36 -0700
commit82cc822a1dc7090f7a6af977ed6d4b7b945d038a (patch)
tree8ab4dd83c074395f18e4b53730fd4a62edbffa02 /libmat2/office.py
parent20ed5eb7d665ac9cb8b33929b4898c0a837fdb66 (diff)
Add tar archive support
Diffstat (limited to 'libmat2/office.py')
-rw-r--r--libmat2/office.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/libmat2/office.py b/libmat2/office.py
index 2c9cbff..b769991 100644
--- a/libmat2/office.py
+++ b/libmat2/office.py
@@ -6,7 +6,7 @@ from typing import Dict, Set, Pattern, Tuple, Any
6 6
7import xml.etree.ElementTree as ET # type: ignore 7import xml.etree.ElementTree as ET # type: ignore
8 8
9from .archive import ArchiveBasedAbstractParser 9from .archive import ZipParser
10 10
11# pylint: disable=line-too-long 11# pylint: disable=line-too-long
12 12
@@ -43,7 +43,7 @@ def _sort_xml_attributes(full_path: str) -> bool:
43 return True 43 return True
44 44
45 45
46class MSOfficeParser(ArchiveBasedAbstractParser): 46class MSOfficeParser(ZipParser):
47 mimetypes = { 47 mimetypes = {
48 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', 48 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
49 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 49 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
@@ -312,7 +312,7 @@ class MSOfficeParser(ArchiveBasedAbstractParser):
312 return {file_path: 'harmful content', } 312 return {file_path: 'harmful content', }
313 313
314 314
315class LibreOfficeParser(ArchiveBasedAbstractParser): 315class LibreOfficeParser(ZipParser):
316 mimetypes = { 316 mimetypes = {
317 'application/vnd.oasis.opendocument.text', 317 'application/vnd.oasis.opendocument.text',
318 'application/vnd.oasis.opendocument.spreadsheet', 318 'application/vnd.oasis.opendocument.spreadsheet',