mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-05-04 20:51:49 +02:00
Add hwp hwpx support
hwp/hwpx has several custom MIME types - hwp application/x-hwp, application/haansofthwp, application/vnd.hancom.hwp - hwpx application/haansofthwpx, application/vnd.hancom.hwpx
This commit is contained in:
parent
7a75d780e4
commit
2cb8c16261
3 changed files with 32 additions and 1 deletions
|
@ -77,6 +77,23 @@ class DocumentToPixels(DangerzoneConverter):
|
|||
"application/vnd.oasis.opendocument.text-template": {
|
||||
"type": "libreoffice",
|
||||
},
|
||||
# .hwp
|
||||
"application/vnd.hancom.hwp": {
|
||||
"type": "libreoffice",
|
||||
},
|
||||
"application/haansofthwp": {
|
||||
"type": "libreoffice",
|
||||
},
|
||||
"application/x-hwp": {
|
||||
"type": "libreoffice",
|
||||
},
|
||||
# .hwpx
|
||||
"application/vnd.hancom.hwpx": {
|
||||
"type": "libreoffice",
|
||||
},
|
||||
"application/haansofthwpx": {
|
||||
"type": "libreoffice",
|
||||
},
|
||||
# At least .odt, .docx, .odg, .odp, .ods, and .pptx
|
||||
"application/zip": {
|
||||
"type": "libreoffice",
|
||||
|
|
|
@ -358,7 +358,7 @@ class DocSelectionWidget(QtWidgets.QWidget):
|
|||
(filenames, _) = QtWidgets.QFileDialog.getOpenFileNames(
|
||||
self,
|
||||
"Open documents",
|
||||
filter="Documents (*.pdf *.docx *.doc *.docm *.xlsx *.xls *.pptx *.ppt *.odt *.odg *.odp *.ods *.jpg *.jpeg *.gif *.png *.tif *.tiff)",
|
||||
filter="Documents (*.pdf *.docx *.doc *.docm *.xlsx *.xls *.pptx *.ppt *.odt *.odg *.odp *.ods *.hwp *.hwpx *.jpg *.jpeg *.gif *.png *.tif *.tiff)",
|
||||
)
|
||||
if filenames == []:
|
||||
# no files selected
|
||||
|
|
|
@ -143,6 +143,20 @@ if p == "Darwin":
|
|||
"CFBundleTypeName": "ODF Graphics Document",
|
||||
"CFBundleTypeRole": "Viewer",
|
||||
},
|
||||
{
|
||||
"CFBundleTypeExtensions": ["hwp", "hwpx"],
|
||||
"CFBundleTypeIconFile": "../macos/document.icns",
|
||||
"CFBundleTypeMIMETypes": [
|
||||
"application/vnd.hancom.hwp",
|
||||
"application/haansofthwp",
|
||||
"application/x-hwp",
|
||||
"application/vnd.hancom.hwpx",
|
||||
"application/haansofthwpx",
|
||||
"application/vnd.hancom.hwp",
|
||||
],
|
||||
"CFBundleTypeName": "Hancom Office Document",
|
||||
"CFBundleTypeRole": "Viewer",
|
||||
},
|
||||
{
|
||||
"CFBundleTypeExtensions": ["jpg", "jpeg"],
|
||||
"CFBundleTypeIconFile": "../macos/document.icns",
|
||||
|
|
Loading…
Reference in a new issue