Commit Graph

12 Commits (0002fdfd6c21655bcba3fb69b291af4d3801ad79)

Author SHA1 Message Date
Andras Timar 0002fdfd6c fix license headers
Change-Id: I8623770b32d278a45357dc7f757fabfadd2b4af7
2020-10-01 11:56:43 +02:00
Tor Lillqvist 7f25109f72 tdf#128502: Chunk of work to enable "multi-tasking" in the iOS app
Seems to not cause any serious regressions in the iOS app or in "make
run", but of course I am not able to run a comprehensive check of all
functionality.

Change-Id: I44a0e8d60bdbc0a885db88475961575c5e95ce88
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93037
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-06-26 13:09:51 +02:00
Jan Holesovsky ad32888d7c mobile: Unify the mutex usage that protects the main lokit thread.
Effectively both approaches were doing the same thing, let's unify to
the iOS way to minimize the platform-specific code.

Change-Id: I11290410a536c26db054ffcb87e3b64cc2a11c07
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/84589
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-02-06 09:44:26 +01:00
Tor Lillqvist fdb91bf15e tdf#123733: Keep the WebKit view until the lokit_main thread has finished
Otherwise, if you close a document before it has been rendered
completely, the plumbing of threads and FakeSocket connections gets
confused and opening the next document hangs or runs into an assertion
failure. This typically happened for large presentations where
rendering the slide previews takes significant time.

Change-Id: I0f586bec021c4c045a129b3f179ddb3942915c58
Reviewed-on: https://gerrit.libreoffice.org/80882
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2019-10-16 13:20:38 +02:00
Tor Lillqvist 07986199ad Just call lok_init_2() and LibreOfficeKit::setLanguageTag() once on iOS
... when the app starts.

Change-Id: Icac4a9e1074fb6c5f3c9b5282e20a4513717a323
Reviewed-on: https://gerrit.libreoffice.org/80881
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2019-10-16 13:16:42 +02:00
Tor Lillqvist 76058ac270 Fix crash in iOS app: Just use a raw pointer as the lok_document hack
The lok_document pointer will only be used when it is valid anyway.
Fixes a crash when you open a second document after closing the first.

Change-Id: I362db282e4eccf419b56bf790ea58181594ab0fe
2019-02-26 14:07:59 +02:00
Tor Lillqvist 4dc340972c tdf#122582: Add slideshow functionality
Requires a couple of corresponding commits in core to its filter
subdirectory.

Change-Id: I3e6353752dd93e021fb6058fff5096f1d648d17e
2019-02-22 21:01:54 +02:00
Tor Lillqvist 6567f50abf Bin leftover declaration of now non-existent function
Change-Id: I62af01bd68657fbce60e4df9df5d3b4a4701d5e0
2019-02-22 21:01:54 +02:00
Tor Lillqvist ab54f21a54 Adapt to change in core: paintTile() now takes a buffer pointer also on iOS
Makes the code here a little bit simpler.
2018-10-10 16:31:38 +03:00
Tor Lillqvist f3786f5cb7 Pass correct argument on iOS as pBuffer to lok::Document::paintTile()
On iOS it shouldn't actually be pointer to a pixel char buffer, but a
craphics context reference. (This is how it has been since the
experimental TiledLibreOffice app, maybe five years ago? Sadly it
wasn't documented in the LibreOfficeKit include file. But it is how
LibreOfficeLight used the API, too.)

In TiledLibreOffice we rendered tiles directly into the CALayer of the
view. In this Online-based app we of course do render tiles into pixel
char buffers, just like in real Online, but we need to create bitmap
graphics contexts for them and pass that to paintTile().

Now I get white tiles, not totally zero-filled ones. But still no
document contents rendered.

I don't yet want to change the pBuffer parameter to actually be a
buffer pointer on iOS, too, like on other platforms. Also, changing it
will mean the LibreOfficeLight app would need changing, too, and I
don't feel like doing that. But ideally, sure, that should be done.
2018-09-21 10:29:56 +03:00
Tor Lillqvist 95eb849217 Still more iOS app and related Online C++ code hacking
Re-think the plumbing between the different parts of the C++ Online
code. Do try to have it work more like in real Online on all but the
lowest socket level. Except that we don't have multiple processes, but
threads inside the same process. And instead of using actual system
sockets for WebSocket traffic between the threads, we use our own
FakeSocket things, with no WebSocket framing of messages.

Reduce the amount of #ifdef MOBILEAPP a bit also by compiling in the
UnitFoo things. Hardcode that so that no unit testing is ever
attempted, though. We don't try to dlopen any library.

Corresponding changes in the app Objective-C code. Plus fixes and
functionality improvements.

Now it gets so far that the JavaScript code thinks it has the document
tiles presented, and doesn't crash. But it hangs occasionally. And all
tiles show up blank.

Anyway, progress.

Change-Id: I769497c9a46ddb74984bc7af36d132b7b43895d4
2018-09-19 11:31:18 +03:00
Tor Lillqvist b59d160a08 Intermediate commit of work in progress on an iOS app
The app is unimaginatively called "Mobile" for now.

Runs but crashes pretty quickly after loading the document by the LO
core. Will need some heavy changes to get a ClientSession object
created in there, too, to handle the (emulated) WebSocket messages
from the JavaScript. It would then handle some of these messages
itself, and forwards some to the ChildSession, which in this case is
in the same process. Now the messsages from the JavaScript go to a
ChildSession, which is wrong. As the assertion says, "Tile traffic
should go through the DocumentBroker-LoKit WS"
2018-09-12 18:32:05 +03:00