[Libreoffice-commits] core.git: Branch 'feature/tiled-editing' - android/experimental

Miklos Vajna vmiklos at collabora.co.uk
Mon Jan 19 07:09:23 PST 2015


 android/experimental/LOAndroid3/res/values/arrays.xml                                  |    2 -
 android/experimental/LOAndroid3/src/java/org/libreoffice/ui/FileUtilities.java         |   20 +++++-----
 android/experimental/LOAndroid3/src/java/org/libreoffice/ui/GridItemAdapter.java       |    4 +-
 android/experimental/LOAndroid3/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java |    4 +-
 android/experimental/LOAndroid3/src/java/org/libreoffice/ui/ListItemAdapter.java       |    4 +-
 5 files changed, 17 insertions(+), 17 deletions(-)

New commits:
commit c5c5317f64c09e7b8cdf335f6ab1dd79da0471b7
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Jan 19 16:08:44 2015 +0100

    android: adapt doc browser to updated manifest that accepts Calc documents
    
    Change-Id: I5398e225631097b31aa4f8418ffa40a6db323a42

diff --git a/android/experimental/LOAndroid3/res/values/arrays.xml b/android/experimental/LOAndroid3/res/values/arrays.xml
index 2263b47..28849af 100644
--- a/android/experimental/LOAndroid3/res/values/arrays.xml
+++ b/android/experimental/LOAndroid3/res/values/arrays.xml
@@ -35,7 +35,7 @@
     <string-array name="file_view_modes">
         <item >EVERYTHING</item>
         <item >DOCUMENTS</item>
-        <!-- <item>SPREADSHEETS</item> -->
+        <item>SPREADSHEETS</item>
         <item >PRESENTATIONS</item>
         <item>DRAWINGS</item>
     </string-array>
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 3c67947..f658d92 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/FileUtilities.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/FileUtilities.java
@@ -24,9 +24,9 @@ public class FileUtilities {
 
     // These have to be in sync with the file_view_modes resource.
     static final int DOC = 0;
-    // static final int CALC = 1;
-    static final int IMPRESS = 1;
-    static final int DRAWING = 2;
+    static final int CALC = 1;
+    static final int IMPRESS = 2;
+    static final int DRAWING = 3;
 
     static final int UNKNOWN = 10;
 
@@ -49,7 +49,7 @@ public class FileUtilities {
         mExtnMap.put(".odt", DOC);
         mExtnMap.put(".odg", DRAWING);
         mExtnMap.put(".odp",  IMPRESS);
-        // mExtnMap.put(".ods",  CALC);
+        mExtnMap.put(".ods",  CALC);
         mExtnMap.put(".fodt", DOC);
         mExtnMap.put(".fodg", DRAWING);
         mExtnMap.put(".fodp",  IMPRESS);
@@ -59,7 +59,7 @@ public class FileUtilities {
         mExtnMap.put(".ott", DOC);
         mExtnMap.put(".otg", DRAWING);
         mExtnMap.put(".otp",  IMPRESS);
-        // mExtnMap.put(".ots",  CALC);
+        mExtnMap.put(".ots",  CALC);
 
         // MS
         mExtnMap.put(".rtf",  DOC);
@@ -69,26 +69,26 @@ public class FileUtilities {
         mExtnMap.put(".pub", DRAWING);
         mExtnMap.put(".ppt",  IMPRESS);
         // mExtnMap.put(".pps",  IMPRESS);
-        // mExtnMap.put(".xls",  CALC);
+        mExtnMap.put(".xls",  CALC);
 
         // MS templates
         mExtnMap.put(".dot",  DOC);
         mExtnMap.put(".pot",  IMPRESS);
-        // mExtnMap.put(".xlt",  CALC);
+        mExtnMap.put(".xlt",  CALC);
 
         // OOXML
         mExtnMap.put(".docx", DOC);
         mExtnMap.put(".pptx", IMPRESS);
         // mExtnMap.put(".ppsx", IMPRESS);
-        // mExtnMap.put(".xlsx", CALC);
+        mExtnMap.put(".xlsx", CALC);
 
         // OOXML templates
         mExtnMap.put(".dotx", DOC);
         mExtnMap.put(".potx", IMPRESS);
-        // mExtnMap.put(".xltx", CALC);
+        mExtnMap.put(".xltx", CALC);
 
         // Other
-        //mExtnMap.put(".csv",  CALC);
+        mExtnMap.put(".csv",  CALC);
         mExtnMap.put(".wps",  DOC);
         mExtnMap.put(".key",  IMPRESS);
         mExtnMap.put(".abw",  DOC);
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/GridItemAdapter.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/GridItemAdapter.java
index d0470e7..22f7b9b 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/GridItemAdapter.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/GridItemAdapter.java
@@ -127,9 +127,9 @@ public class GridItemAdapter extends BaseAdapter {
                     }
                     imageView.setImageResource(R.drawable.writer);
                     break;
-                /*case FileUtilities.CALC:
+                case FileUtilities.CALC:
                     imageView.setImageResource(R.drawable.calc);
-                    break;*/
+                    break;
                 case FileUtilities.DRAWING: // FIXME: only for now ...
                 case FileUtilities.IMPRESS:
                     imageView.setImageResource(R.drawable.impress);
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
index 61f8450..4b35ba3 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
@@ -521,9 +521,9 @@ public class LibreOfficeUIActivity extends LOAbout implements ActionBar.OnNaviga
                 case FileUtilities.DOC:
                     imageView.setImageResource(R.drawable.writer);
                     break;
-                /*case FileUtilities.CALC:
+                case FileUtilities.CALC:
                     imageView.setImageResource(R.drawable.calc);
-                    break;*/
+                    break;
                 case FileUtilities.DRAWING:
                     imageView.setImageResource(R.drawable.draw);
                     break;
diff --git a/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/ListItemAdapter.java b/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/ListItemAdapter.java
index 9386bf9..2f91b4f 100644
--- a/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/ListItemAdapter.java
+++ b/android/experimental/LOAndroid3/src/java/org/libreoffice/ui/ListItemAdapter.java
@@ -117,9 +117,9 @@ public class ListItemAdapter implements ListAdapter{
             case FileUtilities.DOC:
                 imageView.setImageResource(R.drawable.writer);
                 break;
-            /*case FileUtilities.CALC:
+            case FileUtilities.CALC:
                 imageView.setImageResource(R.drawable.calc);
-                break;*/
+                break;
             case FileUtilities.DRAWING:
                 imageView.setImageResource(R.drawable.draw);
                 break;


More information about the Libreoffice-commits mailing list