Allow opening docm files

This commit is contained in:
Micah Lee 2020-03-03 19:23:46 +05:30
parent 469680565b
commit 8845ac6440
No known key found for this signature in database
GPG key ID: 403C2657CD994F73
4 changed files with 4 additions and 3 deletions

View file

@ -35,7 +35,7 @@ class DocSelectionWidget(QtWidgets.QWidget):
filename = QtWidgets.QFileDialog.getOpenFileName(
self,
"Open document",
filter="Documents (*.pdf *.docx *.doc *.xlsx *.xls *.pptx *.ppt *.odt *.odg *.odp *.ops *.jpg *.jpeg *.gif *.png *.tif *.tiff)",
filter="Documents (*.pdf *.docx *.doc *.docm *.xlsx *.xls *.pptx *.ppt *.odt *.odg *.odp *.ops *.jpg *.jpeg *.gif *.png *.tif *.tiff)",
)
if filename[0] != "":
filename = filename[0]

View file

@ -7,4 +7,4 @@ Terminal=false
Type=Application
Icon=media.firstlook.dangerzone
Categories=Office;Utility;OCR;Security
MimeType=application/pdf;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/msword;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.presentationml.presentation;application/vnd.ms-powerpoint;application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.graphics;application/vnd.oasis.opendocument.presentation;application/vnd.oasis.opendocument.spreadsheet;image/jpeg;image/gif;image/png;image/tiff;image/x-tiff
MimeType=application/pdf;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/msword;application/vnd.ms-word.document.macroEnabled.12;application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.ms-excel;application/vnd.openxmlformats-officedocument.presentationml.presentation;application/vnd.ms-powerpoint;application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.graphics;application/vnd.oasis.opendocument.presentation;application/vnd.oasis.opendocument.spreadsheet;image/jpeg;image/gif;image/png;image/tiff;image/x-tiff

View file

@ -79,11 +79,12 @@ if p == "Darwin":
"CFBundleTypeRole": "Viewer",
},
{
"CFBundleTypeExtensions": ["docx", "doc"],
"CFBundleTypeExtensions": ["docx", "doc", "docm"],
"CFBundleTypeIconFile": "../macos/document.icns",
"CFBundleTypeMIMETypes": [
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"application/msword",
"application/vnd.ms-word.document.macroEnabled.12",
],
"CFBundleTypeName": "Microsoft Word Document",
"CFBundleTypeRole": "Viewer",

BIN
test_docs/sample.docm Normal file

Binary file not shown.