diff --git a/dangerzone/conversion/doc_to_pixels.py b/dangerzone/conversion/doc_to_pixels.py index 2151500..ac64be8 100644 --- a/dangerzone/conversion/doc_to_pixels.py +++ b/dangerzone/conversion/doc_to_pixels.py @@ -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", diff --git a/dangerzone/gui/main_window.py b/dangerzone/gui/main_window.py index a4b1786..2ea34ff 100644 --- a/dangerzone/gui/main_window.py +++ b/dangerzone/gui/main_window.py @@ -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 diff --git a/install/pyinstaller/pyinstaller.spec b/install/pyinstaller/pyinstaller.spec index f8d2380..6234910 100644 --- a/install/pyinstaller/pyinstaller.spec +++ b/install/pyinstaller/pyinstaller.spec @@ -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",