summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-12-17 18:23:11 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-12-17 18:26:34 +0100
commit3b490bda1e2cec48eff4a9c54291ecc12e70336a (patch)
treea3632a3830e4439181570ba72d4d157867b6d9c5
parent87928d31b1ce6a75b4e72beaa218971de74ad890 (diff)
android doc browser: sync file type list with the intent filter
Change-Id: I81746860198864bb5917a6c1e898b742b65d77e1
-rw-r--r--android/experimental/LOAndroid3/AndroidManifest.xml.in3
-rw-r--r--android/experimental/LOAndroid3/src/java/org/libreoffice/ui/FileUtilities.java67
2 files changed, 49 insertions, 21 deletions
diff --git a/android/experimental/LOAndroid3/AndroidManifest.xml.in b/android/experimental/LOAndroid3/AndroidManifest.xml.in
index 0c659d8c7e6a..6b339e704475 100644
--- a/android/experimental/LOAndroid3/AndroidManifest.xml.in
+++ b/android/experimental/LOAndroid3/AndroidManifest.xml.in
@@ -28,6 +28,8 @@
<action android:name="android.intent.action.PICK" />
<category android:name="android.intent.category.DEFAULT" />
+ <!-- Please keep this in sync with FileUtilities.java. -->
+
<!-- ODF -->
<data android:mimeType="application/vnd.oasis.opendocument.text" />
<data android:mimeType="application/vnd.oasis.opendocument.graphics" />
@@ -68,7 +70,6 @@
<!-- OTHER -->
<!-- Calc. <data android:mimeType="text/csv"/>-->
- <!-- Calc. <data android:mimeType="text/spreadsheet"/> -->
<data android:mimeType="application/vnd.ms-works" />
<data android:mimeType="application/vnd.apple.keynote" />
<data android:mimeType="application/x-abiword" />
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/FileUtilities.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/FileUtilities.java
index bb3a365d7edf..baff93359536 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/FileUtilities.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/FileUtilities.java
@@ -40,33 +40,60 @@ public class FileUtilities {
private static final Map<String,Integer> mExtnMap = new HashMap<String,Integer>();
static {
- mExtnMap.put(".odt", DOC);
- mExtnMap.put(".sxw", DOC);
+ // Please keep this in sync with AndroidManifest.xml
+
+ // ODF
+ mExtnMap.put(".odt", DOC);
+ mExtnMap.put(".odg", DRAWING);
+ mExtnMap.put(".odp", IMPRESS);
+ // mExtnMap.put(".ods", CALC);
+ mExtnMap.put(".fodt", DOC);
+ mExtnMap.put(".fodg", DRAWING);
+ mExtnMap.put(".fodp", IMPRESS);
+ // mExtnMap.put(".fods", CALC);
+
+ // ODF templates
+ mExtnMap.put(".ott", DOC);
+ mExtnMap.put(".otg", DRAWING);
+ mExtnMap.put(".otp", IMPRESS);
+ // mExtnMap.put(".ots", CALC);
+
+ // MS
mExtnMap.put(".rtf", DOC);
mExtnMap.put(".doc", DOC);
- mExtnMap.put(".docx", DOC);
- mExtnMap.put(".html", DOC);
- mExtnMap.put(".txt", DOC);
- mExtnMap.put(".wpd", DOC);
- mExtnMap.put(".wps", DOC);
- mExtnMap.put(".lwp", DOC);
+ mExtnMap.put(".vsd", DRAWING);
+ mExtnMap.put(".vsdx", DRAWING);
+ mExtnMap.put(".pub", DRAWING);
+ mExtnMap.put(".ppt", IMPRESS);
+ // mExtnMap.put(".pps", IMPRESS);
+ // mExtnMap.put(".xls", CALC);
- mExtnMap.put(".ods", CALC);
- mExtnMap.put(".sxc", CALC);
- mExtnMap.put(".xls", CALC);
- mExtnMap.put(".xlsx", CALC);
+ // MS templates
+ mExtnMap.put(".dot", DOC);
+ mExtnMap.put(".pot", IMPRESS);
+ // mExtnMap.put(".xlt", CALC);
- mExtnMap.put(".odp", IMPRESS);
- mExtnMap.put(".sxi", IMPRESS);
- mExtnMap.put(".ppt", IMPRESS);
+ // OOXML
+ mExtnMap.put(".docx", DOC);
mExtnMap.put(".pptx", IMPRESS);
+ // mExtnMap.put(".ppsx", IMPRESS);
+ // mExtnMap.put(".xlsx", CALC);
+
+ // OOXML templates
+ mExtnMap.put(".dotx", DOC);
+ mExtnMap.put(".potx", IMPRESS);
+ // mExtnMap.put(".xltx", CALC);
- mExtnMap.put(".odd", DRAWING);
- mExtnMap.put(".sxd", DRAWING);
+ // Other
+ //mExtnMap.put(".csv", CALC);
+ mExtnMap.put(".wps", DOC);
+ mExtnMap.put(".key", IMPRESS);
+ mExtnMap.put(".abw", DOC);
+ mExtnMap.put(".pmd", DRAWING);
+ mExtnMap.put(".emf", DRAWING);
+ mExtnMap.put(".svm", DRAWING);
+ mExtnMap.put(".wmf", DRAWING);
mExtnMap.put(".svg", DRAWING);
- mExtnMap.put(".vsd", DRAWING);
- mExtnMap.put(".wpg", DRAWING);
- // FIXME: we need to expand this ...
}
private static final String getExtension(String filename)