Commit graph

105 commits

Author SHA1 Message Date
Tor Lillqvist
d1087aec26 Prevent the user from zooming the WebView
Does not fix tdf#125383, though. The WebView still can become zoomed
by manipulating a tunnelled dialog as described in the bug report's
comments.

Change-Id: I9af8d826c58e2065e54b42bc35f74436b0d34a90
2019-06-11 17:33:48 +03:00
Tor Lillqvist
f94a00ddc9 No need for the emptyTileCache-related setting string here either now
The disk tile cache is now gone also in the collabora-online-4 branch,
so no need to keep the string here in master just to be translated.

Change-Id: Ibd496bee738f64152a5ca7a9634e439289b0cd80
2019-06-10 13:14:12 +03:00
Tor Lillqvist
13e99e83c3 Improve wording for NSCameraUsageDescription
Change-Id: If8fb70b2c87e6abc00cc706cb81c561e28edc254
2019-06-03 17:19:57 +03:00
Tor Lillqvist
c2c7d098e5 Typo
Change-Id: Ic5b149f7d3f51c0095ffa975d477df0ed0f183d7
2019-06-03 17:19:52 +03:00
Tor Lillqvist
75347f27e7 Add NSPhotoLibraryUsageDescription, too
Change-Id: Ib46c36a18e84c2b88bed7aef3ec8235b32eb5332
2019-06-03 17:19:46 +03:00
Tor Lillqvist
dc1f9a9955 Use a more specific NSCameraUsageDescription
Change-Id: Idc780a3b5dacf0bed5b8c49f758f3fc5696d7338
2019-06-03 17:19:40 +03:00
Tomaž Vajngerl
508a659232 Update ios/README
- instructions how to build POCO
    - fixes the changes made since

Change-Id: I157d23ce914b8afb06ccf6e6c33f8aa12661d1bb
2019-06-03 15:04:53 +09:00
Tor Lillqvist
a9dabea550 Add Visio Document, extensions vdx, vsd, vsdm, and vsdx
Together with two one-line changes to core, Visio files now open
(read-only) in the app.

Change-Id: I7dde2f7a8d1960c8fb9154c23e489ccc00a17b2d
2019-05-31 12:52:44 +03:00
Tor Lillqvist
ae88fc1052 tdf#124930: Look for settings also in the managed configuration thing
Could not test whether it works, but it is not complicated, so
hopefully yes. Followed the examples from
https://developer.apple.com/videos/play/wwdc2013/301/ and
https://developer.apple.com/library/archive/samplecode/sc2279/Introduction/Intro.html .

The Mobile.plist file is a sample only.

Note that here in the master branch there is no on-disk tile cache, so
no setting for emptying that or not.

Change-Id: I0b8cf8d35930cdf60808d14361378f050cf41037
2019-05-30 11:45:02 +03:00
Tor Lillqvist
2474166351 Add core source files from vcl/ios
Change-Id: I1ca8d3fbf7a63b1965abd6799642854e03c4952d
2019-05-30 11:41:38 +03:00
Tor Lillqvist
199c6e2918 Revert "Get rid of use of GNU libtool" and its follow-up
The change causes problems for people on various sad distros. Oh well,
whatever.

This reverts commit bd00d9fd05.
This reverts commit 054a9cdb04.

Change-Id: Ie439e4c655d02b6f34bdd1a9c1c5b6db6048b653
2019-05-27 10:25:51 +03:00
Tor Lillqvist
bd00d9fd05 Get rid of use of GNU libtool
It is is complicated enough to build the iOS app. Requiring GNU
libtool brings with it the risk of polluting the command environment
as there already is a completely different command in macOS with the
same name, /usr/bin/libtool. And as GNU libtool was used only to build
the unit tests for the "normal" server-based Online that are built and
run only on Linux anyway, we don't really need any of the
"portability" that GNU libtool brings.

Without GNU libtool, we compile all the $(wsd_sources) (see
test/Makefile.am) that the unit-* tests use into a single object file,
WsdSources.o. (Because they need to be compiled as PIC we can't use
the already compiled object files for the Online server programs.)
This required some additional minor changes to a few source files.

Change-Id: I20a2c523170376fa4c1a0d9d8d6b693a9779376f
Reviewed-on: https://gerrit.libreoffice.org/72840
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2019-05-24 09:50:16 +02:00
Tor Lillqvist
058b68fc3e tdf#122281: Prevent the WebView from scrolling
It is presumably possible to do it in the JavaScript, too, and then
the same problem would go away for normal Online viewed in Mobile
Safari, too. But I couldn't figure out how. Googling turned up various
advice that suggested using '-webkit-overflow-scrolling: auto;' for
the body of the page but it didn't seem to help. (I tried adding that
to the style attribute of the body element in loleaflet.html.m4.)

Change-Id: Iac3487a73eca218130583dde9decdb89c316c1fc
2019-05-20 16:25:52 +03:00
Tor Lillqvist
a31c7c851c Add some more core source files from sfx2/source/view
Change-Id: I3e7183ecea24ee0282cbd6fa6ad7d457fa5a781c
2019-05-20 16:25:52 +03:00
Tor Lillqvist
8ffd192856 Add also DocumentBroker.hpp for breakpointing convenience
Change-Id: I16e81ea16ad332b72f5af0df91c0249b5a2984f1
2019-05-16 14:59:41 +03:00
Tor Lillqvist
d9e5a47058 Introduce new flag to speed up shutdown of the Online plumbing in the iOS app
Spent hours on trying to cleverly use the existing TerminationFlag
(with minor modifications to the code that checks it, and some
additional code to set and reset it), but could not get it to work.
This is simpler, but sure, using a global variable is ugly of course.
At least the new MobileTerminationFlag is very specific in semantics
and only used in the mobile apps.

Change-Id: I0775fdfa7880750ca12c6fd7ec41d3d3ceb2f0ad
2019-05-16 11:44:41 +03:00
Tor Lillqvist
32c1dd0a5d Add more core source files for breakpointing convenience 2019-05-16 11:39:32 +03:00
Tor Lillqvist
420bedaadc Edit ios/README
Point out that in my way, you will (sadly) need GNU libtool for the
running of the autogen.sh script, even if not actually at all
otherwise.

(We should really try to get rid of the need for libtool. A minor
amount of hacking to loleaflet/Makefile.am should be enough.)
2019-05-16 02:17:54 +03:00
Tor Lillqvist
f21665f2ac tdf#124981: Fix a few object leaks
The pointer to the DocumentViewController object in the Document class
can be a weak property. This avoids a circular reference.

When the DocumentViewController is being dismissed, remove the script
message handlers and remove the view from its superview. Also, set the
webView property to nil.
2019-04-26 18:04:10 +03:00
Tor Lillqvist
bf520d5fa5 Log the timestamp of the template file at its site and of its cached version 2019-04-26 12:04:28 +03:00
Tor Lillqvist
db9208d364 tdf#124918: Don't crash on invalid URLs in the template list file 2019-04-26 12:04:20 +03:00
Tor Lillqvist
d550944053 tdf#124918: More logging in template download error situations 2019-04-26 12:04:09 +03:00
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