Commit Graph

71 Commits

Author SHA1 Message Date
6f04b04dfd android: organise imports
Change-Id: Ie8178e34698ba686e899ddd8e4f8775081fc9d83
2015-02-23 10:10:25 +01:00
1f20a47d0e android: forgot to update javadoc of JNI wrapper
Change-Id: I2964c030f420638672da5390e11179aee28043e5
2015-02-23 10:10:22 +01:00
bfe3a47e1e lok::Office::postKeyEvent: allow different char and key code
editeng is not happy with non-zero char code for css::awt::Key::ESCAPE.

Change-Id: If26923df7defb8a47766e9109835a8569067e578
2015-02-23 10:10:22 +01:00
1eb2de90be android: add support for text selection to JNI
Change-Id: Ifa307eb6a8cb031bdd88b9fadae42c8a0811772b
2015-02-16 09:20:50 +01:00
4b70710420 lok::Document::postMouseEvent(): allow double-click
Change-Id: Idaddd28d906e7508d4d2c5aab916b06fbe021beb
2015-02-09 08:12:10 +01:00
a8f0257871 android: Add callback types to Document
Change-Id: I93d117d42b6ccf48b58f9c8d64be0266ff36c6f3
2015-02-09 08:09:26 +01:00
dbde7f6ab8 android: add postMouseEvent to LOKit JNI interface
Change-Id: I652a0c365c4a1413226cdd4dc7910e65ac2a5285
2015-01-26 10:27:44 +01:00
a5e2c361f0 android: guard buffer allocation and return null if alloc. fails
Change-Id: I684c7af245cc755b94f69e175c652d161e0f643a
2015-01-16 13:18:31 +01:00
1b75735c5f android: remove logging null in DirectBufferAllocator
Change-Id: Iad6b90782f4f750eeab420653ed6701fbba9a777
2015-01-16 13:18:27 +01:00
08d711171b android: comments for new interfaces and methods
Change-Id: I742e232b3a9994f82423bc4bdfa1a5b656f8af87
2015-01-16 13:18:26 +01:00
723b6a07e4 jni: add postKeyEvent to Office and redirect the call to LOK
Change-Id: I922ce1f735df236d2bdad33820ed98f18fc85963
2015-01-12 11:06:46 +01:00
e905d3b3e9 android: interface for processing of LOK messages
Added a message callback interface to Document where the provided
implementation processes the messages from LOK (for now
only the regions that were invalidated)

Change-Id: Ic7fcb0250f87f6c4c28925bf809c4cf3f353d2bb
2015-01-12 11:06:41 +01:00
3b77cd3bbd android: Add support for callbacks from LO to JNI and Java LOK
This adds support to retrieve callbacks from LibreOffice (like
for example that a part of document has been invalidated) to
LibreOfficeKit JNI and Java wrappers.

Change-Id: Ib70187194d002c72b64d58032aab216adc591565
2015-01-12 11:06:40 +01:00
6123d6a9fb android: Add initializeForRendering to LOK
Change-Id: Ibf4721bf4358ef215efde09ef688b2551604bfa2
2015-01-07 00:02:47 +09:00
8ecf956d79 Remove the ThumbnailGenerator class
The only use of it is commented out. ThumbnailGenerator used the UNO-based
XToolkitExperimental stuff that I want to get rid of. If/when we want
thumbnails, we should use the existing thumbnails from document formats that
have them, or generate them using LOKit.

Also remove stuff from the Bootstrap class that was only used by
ThumbnailGenerator.

Conflicts:
	android/experimental/LOAndroid3/src/java/org/libreoffice/ui/LibreOfficeUIActivity.java
Reviewed on:
	https://gerrit.libreoffice.org/13503

Change-Id: Ia3a1a7f372a814359c5b496cdb17c35246e34817
2014-12-17 10:53:29 +01:00
83cd0040fa android: remove unneeded logging and comment tile rendering timing
Change-Id: Ia44efb54cbb0a91ea61cef9e7f250b5105c7ff51
2014-12-11 23:10:42 +01:00
515a8cf400 android: use ByteBuffer to send or store pointers in JNI bindings
Using direct ByteBuffer is much nicer option to store or send
pointers between C(++) code and Java via JNI as it handles endiness
and pointer size for us. Using "long" type can have unexpected
results in 32-bit architectures (mostly Android). This was causing
grief especially when Android introduced support for 64-bit
architectures starting with SDK 19.

Change-Id: Ie92d0f913b668e1724e846d70d1820445d9cb086
2014-12-04 23:04:27 +01:00
333a894ba8 android: cleanup LibreOfficeKit initialization in Java
Change-Id: I7688968e92ae4b3d6fef19c4544ae91bdcd8b1b9
2014-12-04 23:04:27 +01:00
4924ae7046 android: improve error messages in DirectBufferAllocator
Change-Id: Iefab77e543606cfad937a79743fb3b9a68a0f2a2
2014-12-04 23:04:26 +01:00
a703b3651b android: add destroy and exit as a separate JNI call
Change-Id: Ia8516da556b3736f34b366e2eb89ad8bbd7bafc1
2014-12-04 23:04:26 +01:00
a813044708 android: VM based implementation of DirectBufferAllocator
DirectBufferAllocator is responsible to allocate buffer. We used
Fennec JNI based allocation (and freeing) because of overallocation
bug in some Android versions. With this the VM based allocator
implementation is added and used by default because of bugs that
happen in newer Android versions (specifically when ART is used
as the Android VM).

Change-Id: I07eb364fd1647b3a09d1568d4fef82398a02dfeb
2014-12-04 23:04:26 +01:00
885a578b2c LOK Android: don't initialise until TMPDIR is set.
As part of LOK initialisation we now start soffice_main, this
requires TMPDIR access, and will fail if we haven't set TMPDIR
(as by default it attemps to access /tmp which is not allowed on
Android).

Change-Id: I63bd7bce9b52c898c60fda6eea33ee919349a109
2014-12-04 12:23:03 +01:00
520a4fdfe4 android: better default part name (document type dependent)
Change-Id: I7ea1f1f5c249a4df250bde049cc52b4f392e4d38
2014-10-04 17:42:10 +02:00
688ff90d32 android: force initialize LibreOfficeKit, clean-up
Change-Id: I0c7b7d10b34c0f71bf8500696fdbc0ed38303f0e
2014-09-24 20:43:03 +02:00
b85c779595 android: use JNI direct memory allocator from Fennec
Change-Id: I95a9ab54222150a1f9cde30df820f3cd6915f641
2014-09-24 20:43:01 +02:00
18c052d6d6 LOKit: add "destroy" and "saveAs" to android JNI
Change-Id: I08542b736e49cb9262323e9fe6188b1976d47935
2014-09-22 22:40:07 +02:00
81f1c25927 LOKit android: add support for setPartMode and getPartName
Change-Id: Idd8bd4d4b148e88c7badd06fefb7cfcfc24ec9ea
2014-08-10 23:00:43 +02:00
b7742fd8b8 Add getPart(s) to lokandroid too.
I.e. make lokandroid match
4d15212ef8de89a71387c00bdeb7d9a41409e467
2014-07-13 08:06:58 +02:00
a3ccf3eab5 lok JNI: no "handle" in funcs & don't wrap some native funcs
Change-Id: If783fecd80a0de05e94c76e23572b567d151bb06
2014-07-03 10:51:56 +02:00
c5777b4edd android lok: fix paintTile JNI method
Change-Id: Ife12b8bc49d722ae614b7de253bb2061bea5bb7f
2014-07-02 11:14:17 +02:00
b046b687f9 lok bootstrap: nicer function names, clean-up
+ prevent lokandroid JNI functions to be removed from the library
+ basic use of lok Office / Document in LibreOfficeMainActivity

Change-Id: I7bfe53738cf821b2270ab3e024cc506a7cff42f0
2014-07-01 09:12:21 +02:00
ca61fdcac9 libreofficekit JNI for Android
Change-Id: Ia905c20fb4ee9b126d65fd3c8e3c1f54649abe1a
2014-07-01 09:12:14 +02:00
c72d300ba0 android: Make the extract_files() part of setup / init.
We need to have the files extracted before we attempt to initialize
LibreOfficeKit (call libreofficekit_hook), otherwise the .rdb's are not there.

Change-Id: Ib49db7e945a709d18a063eb488a27df18fef542b
2014-06-30 14:48:03 +02:00
db89e5ff81 android: Make use of LibreOfficeKit.
Now the LibreOfficeKit is used to actually attempt to bootstrap LibreOffice;
at the moment fails to do that.

Change-Id: I91220dbff783213bf7702e7213a5646859db4581
2014-06-30 14:48:03 +02:00
74ab9835f9 android: Introduce LibreOfficeKit.java to bootstrap using LibreOfficeKit.
Change-Id: I5e1758c15684b06ab6809f62f4da6d5f50c071a9
2014-06-30 14:48:03 +02:00
62badf3828 Move to MPLv2 license headers, with ESC decision and author's permission. 2013-04-22 09:37:38 +01:00
07c1b61933 Small refactoring of the Android "desktop app" code, no functional change
Move the native methods out to a separate AppSupport class so that they aren't
in our "experimenal" Desktop app's namespace. Don't hardcode the name of that
class in the native code, but have the app register the class to which the
damage callbacks should be done.

Possibly the AppSupport and Bootstrap classes should be combined. Later.

Also, the "android" part of the package name is superfluous; it is
Android-specific code, no information gained by having an "android" part in
the package name.

Change-Id: Iddf55c8034ead7693887ace8438deb002c5eea9f
2013-04-19 18:50:36 +03:00
e4bad391fc createWindowFoo is unused
Change-Id: Ia61efc5d5ee65178fd7d868cb57eed9ba3c0519e
2013-02-26 23:48:54 +02:00
388b72742a We are not using NativeActivity, nor do we plan to, IIUC
Partially revert 52a8744afee2cd589813f0377d93f821fce7aedd, i.e. once again
start to remove stuff related only to using NativeActivity... (Because it is
confusing and misleading to keep it around.) Let's do it in small pieces this
time.

Change-Id: Ifdc52eb0ae32c7c510418611cbf01a857a8bc697
2013-02-22 22:30:23 +02:00
52a8744afe Revert "Clean up remains of NativeActivity-based Android app support"
This reverts commit cecc926070ee3d2ad6296fc5e0cfcde8642bb140.

Conflicts:
	sal/android/lo-bootstrap.c
	sal/inc/osl/detail/android-bootstrap.h
2013-02-21 22:54:36 +02:00
cecc926070 Clean up remains of NativeActivity-based Android app support
We haven't been able to build NativeActivity-based apps (like the
android/qa/sc and anroid/qa/desktop thingies) since we switched to
DISABLE_DYNLOADING and a single DSO liblo-native-code.so anyway.

No lo_main() any more. <sal/main.h> should not be included ever when
compiling for Android of iOS now.

Lots of stuff binned from vcl's androidinst.cxx, in the (vain?) hope
that it will reduce the amount of never invoked GUI code that gets
linked in.

Change-Id: I25f584864c40110774c728a23151e089620442d9
2012-11-21 23:03:57 +02:00
ae81246917 We don't need the library search path anymore
As we don't use any dlopen() etc wrappers now with just one single
DSO, we have no use for the library search path either.

Change-Id: Ifaf11c4785a90fe5c7dafb3310bc7933ea31238c
2012-11-21 15:22:27 +02:00
970b53e050 Enable storing some files gzipped in the .apk
We gzip them separately in the Makefile and the gzipped result will be
stored without (further) compression in the .apk.

Use this to store the ttf font files. Shaves off a bit .apk size.

This might seem a bit odd way to do it, why not store these files in
the normal Zip compressed fashion in the .apk? It seems hard to tell
Ant (based on path, not extension) what files to compress and what
not, so we have to keep telling it to not (further) compress any files
at all.

Change-Id: I0d40d8811e6c9df6b28c285845b1db225507f5d4
2012-11-21 15:05:13 +02:00
4b7e701024 Use DISABLE_DYNLOADING on Android
IN this branch these changes are not conditional. Unclear yet whether
this is what we finally will want to use or not. Maybe should make
these changes conditional and do this stuff in master instead?

Change-Id: I379d570a0e00648d295c675fd90eba6594ba3182
2012-10-11 10:07:05 +03:00
e989d16748 dung out no longer needed initUCBHelper methods; thanks to sberg. 2012-09-19 18:41:45 +01:00
c0bc0003ee RTFM for Arrays.copyOfRange()
Change-Id: Ie0d7bd95207aafb269f23974b8e90fa0b50fdb86
2012-09-05 16:12:14 +03:00
f1aca5bf8a Fix infinite loop introduced by accident
Change-Id: I4aee6214123b14f40e01850e1814a4e2d089ec8c
2012-09-04 14:01:39 +03:00
1060cd8459 Perform setup(Activity) just once
Change-Id: Icf77936c4307f816e85cb840d650a4c958a15995
2012-08-13 07:41:20 +03:00
3ea3c6afa2 Use XToolkit2::createScreenCompatibleDeviceUsingBuffer
Render directly to a direct ByteBuffer allocated on the Java side.

Change-Id: I2d66e4146df77e92260918a78ef22cd9b8c95384
2012-06-12 13:50:50 +03:00
8ae077379e Use 32bpp bitmaps on Android (and iOS)
Modify DocumentLoader correspondingly. Take Android bug 32588 into
account.

Ideal would be to extend the XDevice stuff, or something, so that one
could hand it a pre-allocated RGBA buffer into which the
drawing/rendering would go. Then one could get rid of the silly
convert-to-BMP phase, which prefixes the bitmap data with BMP and DIB
headers (and thus, I guess, has to copy and allocate another
copy). Will see.

Change-Id: I4597cd933db8faa8105dc8f19638d712d5d2238a
2012-06-05 17:17:41 +03:00