Commit graph

133 commits

Author SHA1 Message Date
Tor Lillqvist
4e2ad4d2bc tdf#124918: Allow empty lines in the template list file 2019-04-26 12:04:01 +03:00
Tor Lillqvist
05e4cf90f9 Remove leftovers of loading.html from iOS app project, too
Change-Id: Iecbbbc8ea42c0e26e6dde3f38a57482ad60135d5
2019-04-25 17:25:15 +03:00
Tor Lillqvist
824834dfa8 Turn on Unipoll for the iOS app, too
Change-Id: Ib0b7ac53b7c936e75446004c4581ace415b1dd5c
2019-04-24 13:24:53 +03:00
Tor Lillqvist
60581962af Add branding to the iOS app
A configure argument, --with-iosapp-branding, should point to a
directory containing a branding.css file and possibly other files that
branding.css references, to be bundled and used by the iOS app. The
directory structure ends upp in the app bundle as Branding. The
generated loleaflet.html for the iOS app references
Branding/branding.css unconditionally.
2019-04-22 17:23:20 +03:00
Tor Lillqvist
4cfd2e8744 Bin three unnecessary translatable strings that don't occur anywhere
They for some reason appear when one adds a Settings Bundle to the
project using Xcode, but are not needed, as far as I see

(I already removed a fourth when I added the Finnish localisation.)
2019-04-12 23:06:29 +03:00
Tor Lillqvist
bf676c8643 Add a string for translation from the collabora-online-4 branch
... even if it doesn't occur here in master, as the on-disk tile cache is gone.

Change-Id: I1ab5d5edde0386ca4c6c452b1cf4292c30a7e3df
2019-04-12 22:46:33 +03:00
Tor Lillqvist
095c4de38b Experiment with adding localisation of the Settings.bundle
Add a sample Finnish localisation. The localised Root.strings files
are supposed to come from some Pootle-based workflow eventually.

Apparently there is some new and improved way to do localisation in
Xcode 10, "Base localisation", but our project file was created in an
earlier Xcode version and I couldn't figure out how to do it the new
way for Settings.bundle, so I manually added the fi.lproj directory.

I changed the English Root.strings file to be in UTF-8 instead of
UTF-16 (and it still works). (The Finnish one is UTF-8, too.) I added
the strings to be translated from Root.plist into it. That is the file
that should be used as a base for Pootle work, no need to extract
strings from the Root.plist, I think.

Change-Id: I80f1c3199ee14678bb1438e218eb9c2475cd66f8
2019-04-12 21:26:37 +03:00
Jan Holesovsky
ea659b3d99 Use the app name more generally, not only on iOS.
Preparation for using it on Android too.

Change-Id: Iee7778b2625a02a98daff5df87c39f4ab1d18144
Reviewed-on: https://gerrit.libreoffice.org/70651
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2019-04-12 13:44:40 +02:00
Tor Lillqvist
e2f48faf14 tdf#123742: Fix lifecycle issues for the "Office" object
Because of the use of std::shared_ptr in lokit_main(), the (singleton)
lok::Office (or LibLibreOffice_Impl) object gets destroyed when
lokit_main() exits. We shouldn't keep our own copy of a raw pointer to
it around. Just call lok_init_2() to get the pointer where we need it.
We don't need to call lok_init_2() already in -[AppDelegate
application:didFinishLaunchingWithOptions:].
2019-03-28 17:28:26 +02:00
Tor Lillqvist
3264f39d48 Add all fonts from instdir/share/fonts
Change-Id: I02765079e34cd9cbc96aea9cf2b72f432473ad0a
2019-03-25 19:17:21 +02:00
Tor Lillqvist
cbbb2496ca Truncate the JS expression for logging
Change-Id: Ia287f5e26a80bdf0547128b8b2c9c9aff2ef89cd
2019-03-22 16:37:32 +02:00
Tor Lillqvist
ea43fb337a Add source files from sfx2/source/appl for convenience 2019-03-22 16:22:05 +02:00
Tor Lillqvist
25c8ed7897 For iOS, generate the data: URLs for the PNG tiles already in the Online code
(What we cache is also the textual data: URLs even if we store them
using .png file names.)

This avoids the current back-and-forth-encoding: First we
base64-encode the complete binary "tile:" message (one text line
followed by a newline and the binary PNG) to pass to WebKit, then in
the JavaScript snippet passed to WebKit we decode the base64 and turn
it into an ArrayBuffer, and then we unpack the ArrayBuffer and encode
the PNG part to use as a data: URL.
2019-03-22 16:21:51 +02:00
Tor Lillqvist
eaa4a7838a Add references to source files from svl/source/items for debugging goodness 2019-03-20 15:21:14 +02:00
Tor Lillqvist
8dce313642 tdf#122543: Ignore duplicate calls to loadFromContents on same Document 2019-03-20 15:20:52 +02:00
Tor Lillqvist
949ca42221 The iOS app now works again
(Except that the tunnelled dialogs don't show up, but they don't show
up in a browser connected to a normal Online 'make run' either at the
moment.)

Change-Id: Ic054b415d5d78572338e20da711a4285584ba330
2019-03-15 09:48:51 +02:00
Tor Lillqvist
f60618f0ba Add important note
Change-Id: I9f4a6c8f01c72ec40a38f44a7ac23d22a46d2d83
2019-03-08 13:24:54 +02:00
Tor Lillqvist
8d52cf2c9f Fix iOS build in Xcode: Add header search path for boost
(But note that the iOS app is now completely broken at run-time,
nothing sane shows up.)

Change-Id: I685580bbc0113a075d2cebc54c7af8a3bbca6bd6
2019-03-06 11:03:01 +02:00
Tor Lillqvist
3b2612c20d Add sal/rtl/bootstrap.cxx for breakpointing convenience
Change-Id: I915b714aec4212cff563832772111b804af2bbd3
2019-03-01 16:26:42 +02:00
Tor Lillqvist
5c5a9f5221 Add zcodec.cxx from tools
Change-Id: I6666f08b0bddab02277595190a7127d6f0c3f6f0
2019-02-28 11:22:03 +02:00
Tor Lillqvist
18ca7ee008 Remove superfluous empty line at end of file
Change-Id: Ibdb25392622a12cedc1923c2d88ffe6b6e4f798c
2019-02-26 17:52:58 +02:00
Tor Lillqvist
62ffd2c835 tdf#122584: Implement printing in the iOS app
I don't have an AirPrint printer so I couldn't verify that it actually
prints, but the system print dialog is displayed and shows a preview
correctly, so I am fairly sure it works.

Change-Id: I5e8a704386cd5053b8689dc63f26e545df323193
2019-02-26 17:45:39 +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
73ad6c300a Bin some boilerplate comments
Change-Id: Ida0a8279f081d5b9c5d963d7d721e4c7c01f3a9e
2019-02-25 09:14:14 +02:00
Tor Lillqvist
ce53efd880 Keep the iOS app bundle version in a file in the build folder, not in git
When you want to build a new version for distribution, bump the
build number in the BUNDLE-VERSION file.

Change-Id: I1e7e55528aef6d3526ce14d070ae96abc5931f38
2019-02-25 09:14:14 +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
Jan Holesovsky
4f5e262344 Revert "android: Various fixes to make the sending from the core to JS..."
Lets leave this optimization for later, this is incomplete, and does not
fix the problem which it was originally supposed to address.

This reverts commit bce922e8fd.

Change-Id: I5d2ee19058261c7612d36014181f509604c8acde
2019-02-20 00:38:16 +01:00
Jan Holesovsky
bce922e8fd android: Various fixes to make the sending from the core to JS working.
Change-Id: Idc22ccbae1effac9e2db5293703a768e033fd7e9
2019-02-19 10:56:58 +01:00
Michael Meeks
b46f027101 iOS: add some alternative brew / pip instructions for local building.
Change-Id: Icefeb848537cefc618170d730d3c0b32e3898de6
2019-02-18 16:44:51 +01:00
Tor Lillqvist
3a43b1a02b Bump CFBundleVersion
Yeah, a bit silly to have to do git commit for these bumps. I should
change things so that CFBundleVersion is taken from some local file in
the build tree, not from a file in git.

Change-Id: I99d68490aa7f084e8cfb34896c3398486bc6f8a2
2019-02-18 12:27:11 +02:00
Tor Lillqvist
8f71365f0f Remove unnecessary leftovers after Michael's removal of the on-disk tile cache
Change-Id: I435679b48f90d2580bb9c5c86a26c9a1d43c5b59
Reviewed-on: https://gerrit.libreoffice.org/67885
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-02-15 21:36:16 +01:00
Tor Lillqvist
d81fe29ad0 We don't need discovery.xml in the iOS app any longer either
Change-Id: Id592b58f091607cf2e8c5e951a95aa3a563e8def
2019-02-13 20:00:04 +02:00
Tor Lillqvist
938553b5f9 Put MOBILEAPP in the pre-canned config.h for iOS, too
Change-Id: Ic6a5f6cdf7b3102c8e926040311093a5a727ac3b
2019-02-12 14:39:16 +02:00
Tor Lillqvist
f5a93b98cc Bump CFBundleVersion
Change-Id: Iec25e7bbcec101209822c413eb8728b93ce9bfd4
2019-02-04 14:56:27 +02:00
Tor Lillqvist
a8de971a59 Fix a couple of typos
Change-Id: Icfaca47c14ad1c76ed45d2ccb362f5f7405c4ca4
2019-01-25 12:02:52 +02:00
Michael Meeks
3be0fd9621 Xcode advice.
Change-Id: Ic323bb2c640cc811250fb2d28e88d50b3d663a0d
2019-01-24 14:21:52 +00:00
Tor Lillqvist
f2a2fd15ff Bump CFBundleVersion
Change-Id: Ia5f21b74c16ed40ae8c1b5fd3f4413f0c9152c92
2019-01-08 00:53:38 +02:00
Tor Lillqvist
60a6547085 Add some more core source files for easier breakpointing
Change-Id: I1b958c0fa9ec23aef963c0fc72e9991efe5e51b5
2019-01-07 12:26:19 +02:00
Tor Lillqvist
ee2a08095f Add some source files from vcl/source/filter
Change-Id: Id6065ebc4ec40eeeb9f75db619df139d147b3f6f
2019-01-07 12:26:19 +02:00
Tor Lillqvist
3ec92f137e Be less fragile in case of missing resources when downloading templates
It is not enough ot look at the NSError* parameter. Need to check the
HTTP status code, too.

Change-Id: I8db146c77626d4080ef6606999d27e6bb845876c
2018-12-19 13:38:43 +02:00
Tor Lillqvist
9deb186102 Bump CFBundleVersion
Change-Id: I98233b5423e66ebca43426d5cc51af957e31d7b5
2018-12-19 00:13:07 +02:00
Tor Lillqvist
b0b2c01a6c Don't crash if there is no WKJavaScriptExceptionMessage
Change-Id: I90b99ba13e06c511334bc085d43d85126808f42f
2018-12-18 20:39:18 +02:00
Tor Lillqvist
c909bcd83c Need offapi headers, too, when building against a 6.0 branch or core
Change-Id: I4bce152cd286f66aaed1f8354a21c76a27e771b0
2018-12-18 20:03:52 +02:00
Tor Lillqvist
61bd04fefb Add a way to have templates specific to a customer deployment
Add two settings: One setting "Template list URL" is a string that
should either be empty (the typical case for a random user of the
app), or contain a https: URL. If this setting is empty, only the
templates bundled in the app are provided.

If the "Template list URL" is non-empty, it should be a https: URL
pointing to a text file (or dynamically generated text resource). That
file is downloaded and read when the app starts. Each line in the file
should either be a comment (starting with a hash '#'), or a https: URL
pointing to a template document, that is of type .ott, .ots, or .otp.
That document is downloaded if it hasn't been downloaded already, or
if its time stamp is newer than that of the already downloaded copy.
Also a thumbnail image for the template, formed by appending ".png" to
its URL, is downloaded, if available.

Any previously downloaded templates that aren't mentioned in the list
file are removed.

The intent is that in some managed mass deployment environment, the
mobile device management software would set up this setting, so that
the end-user devices would see the same templates.

Obviously, this URL does not have to point to a static file on a web
server, but could point to some dynamically generated resource on a
web server, that enumerates the templates available on the server and
returns their URLs as a text document.

Another setting is "Empty tile cache next time". This is a toggle. If
toggled on, the next time a document is opened in the app, the tile
cache is emptied (and the toggle is reset off). This is mostly for
potential problem solving, and might be removd later.

Various refactoring to support the new functionality.

Change-Id: Ie2ebf032acb9e43bb1c6f7ae4d0c449ae66eaa05
2018-12-17 22:56:14 +02:00
Tor Lillqvist
600c3a8969 Add a dummy VEREIGN_URL here, too
Change-Id: I01f22ec18a2e56286520bb1f14fcd02bd43352cb
2018-12-13 16:17:12 +02:00
Tor Lillqvist
f3f1b1e228 Adapt to LibreOfficeKitClass no longer having the translateGet() method
This is a somewhat temporary quick solution. It bluntly uses the same
code here that I had added for a while as the implementation of
translateGet() for LibreOfficeKitClass in LO core.

Ideally we should have a script here in online to pick the needed
translation from the translations submodule of core and keep them
around even if a translation happens to evaporate from
core/translations. The same idea as in the scripts/unocommands.py, but
I did not yet start modifying or copying that.

Change-Id: I455ad6044e321ef59873d60f8e5f3e7032f2447e
2018-12-13 16:14:42 +02:00
Tor Lillqvist
4d038dc3e4 Bin commented-out #import
Change-Id: I2dc64b95b99d62816be78b3fdf302280714a26f4
2018-12-13 16:14:02 +02:00
Tor Lillqvist
8f1ed48145 Use the new LibreOfficeKit API to localise the template category headers
Change-Id: Icc91138cbe5de290103a746c8797e647259d5009
2018-12-10 22:41:55 +02:00
Tor Lillqvist
c65f3e43a1 Fetch the locale already in the AppDelegate's didFinishLaunchingWithOptions
It will be needed by code that runs before the Document object is
created.

Change-Id: I5c4646e08c670b88b6d3a4d38450cc80e11ec402
2018-12-10 22:41:55 +02:00
Tor Lillqvist
2768d8b9fd Bump CFBundleVersion
Change-Id: I0278c745924787fdf5f258bb7d334fa6eef14fc0
2018-12-07 15:28:11 +02:00
Tor Lillqvist
deb92ad3ba Finally figured out how to get 200x200 cells in the template collection
Change-Id: Idd977ccf52b2dd0e0aaae08f54f6d902791bcc6d
2018-12-07 11:20:15 +02:00
Tor Lillqvist
da45975a5a Make the template collection view look much better
Now it finally looks like I want, but oh boy was that a pain. I am not
sure at all I understand what I am doing in Xcode's Interface Builder.

I tried hard at first to use the cell size 200x220 for the cell size
of the UICollectionView, consisting of a 200x200 UIImageView and a
200x20 UILabel below. But that did not seem to work, it still used a
(default?) size of 150x150. Weird. Anyway, let's commit this state now
that seems to work.

Change-Id: I4021133619fbf62cd633392d93f19c2bbc81311a
2018-12-07 00:09:13 +02:00
Tor Lillqvist
8b106eb312 Look for thumbnails of the templates and show them in the template browser
Add such thumbnails. Rename the presentation templates to not have
colons in their name, as that seems to be problematic for macOS and/or
iOS, sigh. (Shadows of pre-OS X MacOS, where the coln was the path
component separator, not the slash.)

Hack on the storyboard scene for the template browser. More work is
needed there; the thumbnails aren't scaled down for some reason. I
need to make sure the aspect ratio is maintained, too. Maybe to get it
to look like I want I need to do some coding and not just tweak the
storyboard in the Xcode UI designer, sigh.

Change-Id: I959d051352c2f033c8563188155af5281961c7d8
2018-12-06 16:38:50 +02:00
Tor Lillqvist
4c8d0f2e25 Revert "Work in progress: Add .ott"
Using a template has been implemented to work in a way more
appropriate for the platform.

There is little reason to allow direct opening of a template in the
iOS app as long as it don't have any way to save it as an actual
document, based on the template, after editing, (with a different file
name) anyway.

This reverts commit f01a73fa92.

Change-Id: Iff4b2f299c6e6eda27c00e40a49374899af41cf0
2018-12-05 23:41:49 +02:00
Tor Lillqvist
1f0b0b6a0d Bin leftover dummy NSLog() call
Change-Id: I0597be90ff211dfb7f5fd2f321bfb36c9ec01308
2018-12-05 22:13:26 +02:00
Tor Lillqvist
296e0eb803 More work on template selection for a new document
It took quite some time for me to understand how to do it. Not sure if
this is The Right Way, but at least it now works better.

The trick was to store the importHandler block as a property of the
TemplateCollectionViewController and call it when the right template
has been selected.

There is no need to call the importHandler already in the
documentBrowser:didRequestDocumentCreationWithHandler: instance method
and it would not be possible anyway as there apparently is no way to
have the presentViewController:animated:completion: method work in a
truly modal way, so that it would not return until the selection has
been done.

Change-Id: Ia229500c181844fcd99f1f099b2e6744c22b5266
2018-12-05 22:02:59 +02:00
Tor Lillqvist
a3b44f2b8b Work in progress on document creation using templates in the iOS app
When the "Create Document" button in the document browser is pressed,
we scan a set of ODF templates in the Templates subfolder of the app
bundle, and we display that list as a collection view. (So far that
view is not interactive, i.e. once it is displayed, you are stuck
there.)

Eventually, when the user chooses one of the templates, we will open
that and immediately, before the user has done any edits, do a Save As
of it as a real (not template) document in the app's document folder.
What name to use for it is unclear yet. Further saves will thus don't
need any dialog to choose the document name.

More work will be needed on i18n of the template support. Should we
have localised templates? At least localised template names. Etc.

Change-Id: I5675779a5b16bc4c70a943109aa0dd53cf4bd903
2018-12-04 22:12:39 +02:00
Tor Lillqvist
14cd0f4e2b Add source files from desktoi/source/lib for breakpointing convenience
Change-Id: I36408e7adcd30b1094c41b23254919df43e6542c
2018-12-04 00:58:53 +02:00
Tor Lillqvist
f01a73fa92 Work in progress: Add .ott
Still need to figure out how to ask the user where to save the
documemnt and under what name when closing it.

Or actually, should ask right away, as iOS apps are supposed to be
crash-proof, there shouldn't be any need for any separate "save" or
"close" operation by the user, right?

Change-Id: I6d6b9933f5e21f7793837c7ed65049b82853a183
2018-12-04 00:58:53 +02:00
Tor Lillqvist
191a471e2d Add source files from cppuhelper for breakpointing convenience
Change-Id: I2b61c4b870f944760171a85818f7ecd7883c3e19
2018-12-04 00:58:53 +02:00
Tor Lillqvist
e4ddfa313c Bump CFBundleVersion
Change-Id: Idee621d0fa41dd5a65157267da35e245405c125c
2018-11-29 21:13:21 +02:00
Tor Lillqvist
e7ef0c29f9 Fix a problem when taking a photo to insert in a document in the iOS app
It turns out that the view of the DocumentViewController object is
removed from the view hierarchy when the camera is displayed, and
re-added after you choose to use the taken photo. Thus the
viewWillAppear: method is called again at that stage. The Document
object is stil quite intact, though. We should not call the Document
object's openWithCompletionHandler: method again, as that will cause
horrible brokenness.

Change-Id: Ib79bd8f292b01a19866278c4d95a2e816dcd9235
2018-11-29 19:21:49 +02:00
Tor Lillqvist
d46854680c Also ios/config.h is generated at configure time
Change-Id: I285cadfe037f054a331d4513bf999f10c1ef1ed9
2018-11-29 11:01:50 +02:00
Tor Lillqvist
b4e3110d7b Truncate for logging at a bit higher limit
Change-Id: I352ef6476a9cde767b4076ad9a2ab8cf3c9bdf2b
2018-11-29 01:07:03 +02:00
Tor Lillqvist
efb883b21c Truncate received message string for logging if necessary
Change-Id: Id71968227236993e4d181370e68523f2bf6118a7
2018-11-29 01:07:03 +02:00
Tor Lillqvist
d361c00937 Append an ellipsis if the JS string was truncated for logging
Change-Id: I0bc2efff31e5c8d448e07e2457588fc638fb7a8f
2018-11-29 01:02:28 +02:00
Tor Lillqvist
3ad5ca0167 Bump CFBundleVersion
Change-Id: I0f7aada06d3161abb012292d54d326128411e233
2018-11-28 19:07:04 +02:00
Tor Lillqvist
3c046b0548 Add --with-iosapp-fonts option to bundle some 3rd-party fonts in the app
Propagate the font files found in that folder to Info.plist and to the
app bundle.

Change-Id: I2c38b0d7d21dbdf3b7ffd3b4ae98e47b9ad74758
2018-11-27 17:06:22 +02:00
Tor Lillqvist
4f37dcaa81 Include the Liberation fonts
Change-Id: I016e158c650a8ae57b7e0b17a763f997d5532abc
2018-11-27 15:33:29 +02:00
Tor Lillqvist
a2e1f383b9 Implement document saving properly to make saving to NextCloud work
Even if the LO core code, as called by the Online code, already has
saved the document back to the file from which it was loaded, in order
for a file provider extension like NextCloud to notice that, it is
essential to call saveToURL:forSaveOperation:completionHandler:. The
contentsForType:error: method can just return a NSFileWrapper for the
same, already saved, file, though.

Change-Id: Ic063c8603ca38930083866d973e500336cad517e
2018-11-27 13:55:39 +02:00
Tor Lillqvist
8dee781542 Use the right version name and git hash for the iOS app
Propagate the information to the otherwise pre-canned iOS version of
config.h, too.

Change-Id: Ia459a20b529e2ea02b4e00894521a085a8806d57
2018-11-27 01:05:04 +02:00
Tor Lillqvist
fe3832f3c6 Use --with-iosapp-name to set the name displayed in the Help>About dialog
Change-Id: I04b0e7c152ee69b038ec30549c203a54eecf4780
2018-11-27 00:35:57 +02:00
Tor Lillqvist
b0673178b8 Bump CFBundleVersion
Change-Id: Ie2e9349c99bd9f6f3e87191469c6ee39f3fb92ca
2018-11-26 19:47:32 +02:00
Tor Lillqvist
24e09f4edd Bump CFBundleVersion
Change-Id: I0ca058c14a78074eafaf585373694f36164146e0
2018-11-26 19:07:33 +02:00
Tor Lillqvist
a9f6d57222 Correct a few leftover mentions of "Mobile/Mobile" to "ios/Mobile"
Change-Id: Ie2e44bda495f3a08fc91c8d9fe40f9d1d9607283
2018-11-23 11:26:57 +02:00
Tor Lillqvist
a6eadf4e81 Move the iOS app to the ios folder
Change-Id: I46e0722b027e93f90b5cd6a74cd7dc46f6c8cea2
2018-11-22 16:50:57 +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
51035056d6 LibreOfficeKit wants the tile pixmap bytes to be in BGRA order in memory
To get that with CoreGraphics on iOS we need to use also
kCGImageByteOrder32Little in the CGBitmapContextCreate() call,
otherwise the bytes will be in ARGB order in memory.

Also, yes, we do need to turn the coordinate system upside-down from
the top left corner.
2018-10-05 19:01:19 +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
Tor Lillqvist
3131dc9d10 Add manually created config.h for iOS 2018-08-29 20:34:34 +03:00