Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
409f117e
Kaydet (Commit)
409f117e
authored
Nis 18, 2012
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Enable loading of several documents, and do that then
üst
2bf32c53
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
19 deletions
+28
-19
Makefile
android/experimental/DocumentLoader/Makefile
+6
-2
DocumentLoader.java
.../src/org/libreoffice/android/examples/DocumentLoader.java
+22
-17
No files found.
android/experimental/DocumentLoader/Makefile
Dosyayı görüntüle @
409f117e
...
...
@@ -155,7 +155,11 @@ copy-stuff:
for
F
in
xml/services
xml/ure/services;
do
\
sed -e 's!uri="vnd.sun.star.expand
:
$$LO_LIB_DIR/!uri="file://$(APP_DATA_PATH)/lib/!g' <$(OUTDIR)/$$F.rdb >assets/$$F.rdb;
\
done
cp
$(SRC_ROOT)
/odk/examples/java/DocumentHandling/test/test1.odt assets
cp
$(SRC_ROOT)
/odk/examples/java/DocumentHandling/test/test1.odt
\
$(SRC_ROOT)
/sc/qa/unit/data/xls/border.xls
\
$(SRC_ROOT)
/sw/qa/core/data/odt/test.odt
\
$(SRC_ROOT)
/sw/qa/core/data/doc/testVba.doc
\
assets
cp
$(WORKDIR)
/ComponentTarget/i18npool/util/i18npool.component assets/ComponentTarget/i18npool/util
#
mkdir
-p
assets/ure/share/misc
assets/share/registry/res
assets/share/config/soffice.cfg
...
...
@@ -259,7 +263,7 @@ uninstall:
$(ANDROID_SDK_HOME)
/platform-tools/adb uninstall
$(APP_PACKAGE)
run
:
adb shell am start
-n
org.libreoffice.android.examples/.DocumentLoader
-e
input /assets/test1.odt
adb shell am start
-n
org.libreoffice.android.examples/.DocumentLoader
-e
input /assets/test1.odt
:/assets/border.xls:/assets/test.odt:/assets/testVba.doc
clean
:
$(ANT)
clean
...
...
android/experimental/DocumentLoader/src/org/libreoffice/android/examples/DocumentLoader.java
Dosyayı görüntüle @
409f117e
...
...
@@ -77,7 +77,7 @@ public class DocumentLoader
if
(
input
==
null
)
input
=
"/assets/test1.odt"
;
// We need to fake up a
b
n argv, and the argv[0] even needs to
// We need to fake up an argv, and the argv[0] even needs to
// point to some file name that we can pretend is the "program".
// setCommandArgs() will prefix argv[0] with the app's data
// directory.
...
...
@@ -102,22 +102,27 @@ public class DocumentLoader
Log
.
i
(
TAG
,
"xCompLoader is"
+
(
xCompLoader
!=
null
?
" not"
:
""
)
+
" null"
);
// Loading the wanted document
com
.
sun
.
star
.
beans
.
PropertyValue
propertyValues
[]
=
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"
));
// Load the wanted document(s)
String
[]
inputs
=
input
.
split
(
":"
);
for
(
int
i
=
0
;
i
<
inputs
.
length
;
i
++)
{
com
.
sun
.
star
.
beans
.
PropertyValue
propertyValues
[]
=
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://"
+
inputs
[
i
];
Log
.
i
(
TAG
,
"Attempting to load "
+
sUrl
);
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
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment