summaryrefslogtreecommitdiff
path: root/android
diff options
context:
space:
mode:
authorTor Lillqvist <tlillqvist@suse.com>2012-04-05 12:13:20 +0300
committerTor Lillqvist <tlillqvist@suse.com>2012-04-05 13:45:11 +0300
commit45d1ebeca54c22d35777c57cdbb6b3a9dad55632 (patch)
tree016d058613c3307a29bd6108b55fe4d1b9362f78 /android
parent5913506b2193e93ca2767ab7365ab2e76ed7848f (diff)
Open the document read-only
Diffstat (limited to 'android')
-rw-r--r--android/experiments/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java6
1 files changed, 5 insertions, 1 deletions
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 93ed87e26cfd..1be23957f6b1 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);