From 7ea10ee4d0ecd76333443168a38414ebdc0059a9 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 19 Jan 2022 08:04:00 +0100 Subject: [PATCH] Added OpenOffice file extensions --- .../eu/faircode/email/EntityAttachment.java | 25 ++++++++++++++++--- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/EntityAttachment.java b/app/src/main/java/eu/faircode/email/EntityAttachment.java index 2cead32826..58bc8d07ee 100644 --- a/app/src/main/java/eu/faircode/email/EntityAttachment.java +++ b/app/src/main/java/eu/faircode/email/EntityAttachment.java @@ -171,11 +171,18 @@ public class EntityAttachment { if ("csv".equals(extension)) return "text/csv"; + if ("gpx".equals(extension)) + return "application/gpx+xml"; + + // Adobe + if ("dxf".equals(extension)) return "application/dxf"; - if ("gpx".equals(extension)) - return "application/gpx+xml"; + if ("pdf".equals(extension)) + return "application/pdf"; + + // Microsoft if ("doc".equals(extension)) return "application/msword"; @@ -195,8 +202,18 @@ public class EntityAttachment { if ("pptx".equals(extension)) return "application/vnd.openxmlformats-officedocument.presentationml.presentation"; - if ("pdf".equals(extension)) - return "application/pdf"; + // OpenOffice + + if ("odt".equals(extension)) + return "application/vnd.oasis.opendocument.text"; + + if ("ods".equals(extension)) + return "application/vnd.oasis.opendocument.spreadsheet"; + + if ("odp".equals(extension)) + return "application/vnd.oasis.opendocument.presentation"; + + // Other if ("zip".equals(extension) || "application/x-zip-compressed".equals(type))