[Libreoffice-commits] .: android/experiments

Tor Lillqvist tml at kemper.freedesktop.org
Thu Apr 5 03:46:37 PDT 2012


 android/experiments/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 45d1ebeca54c22d35777c57cdbb6b3a9dad55632
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Thu Apr 5 12:13:20 2012 +0300

    Open the document read-only

diff --git a/android/experiments/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java b/android/experiments/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
index 93ed87e..1be2395 100644
--- a/android/experiments/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
+++ b/android/experiments/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
@@ -102,16 +102,20 @@ public class DocumentLoader
 
             // Loading the wanted document
             com.sun.star.beans.PropertyValue propertyValues[] =
-                new com.sun.star.beans.PropertyValue[1];
+                new com.sun.star.beans.PropertyValue[2];
             propertyValues[0] = new com.sun.star.beans.PropertyValue();
             propertyValues[0].Name = "Hidden";
             propertyValues[0].Value = new Boolean(true);
+            propertyValues[1] = new com.sun.star.beans.PropertyValue();
+            propertyValues[1].Name = "ReadOnly";
+            propertyValues[1].Value = new Boolean(true);
 
             String sUrl = "file://" + input;
 
             Object oDoc =
                 xCompLoader.loadComponentFromURL
                 (sUrl, "_blank", 0, propertyValues);
+            Log.i(TAG, "oDoc is " + (oDoc!=null ? oDoc.toString() : "null"));
         }
         catch (Exception e) {
             e.printStackTrace(System.err);


More information about the Libreoffice-commits mailing list