Commit graph

171 commits

Author SHA1 Message Date
Tor Lillqvist
3edc4d2201 Move the setupKitEnvironment() function into a file of its own
A small re-factoring to help planned re-plumbing of the iOS app.

Change-Id: I21f09216a7c5adf965179765a75f5a0d521cd7f3
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97771
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-07-03 08:40:49 +02:00
Tor Lillqvist
4a4c5eb7a8 Update the first step
Won't bother with renaming the Objective-C classes I think, just to
keep changes minimal.

Change-Id: I683479fc32275a5ee2a1bc9c28275bc887c42474
2020-07-02 15:40:00 +03:00
Tor Lillqvist
38ea7a44b7 Add musings about a "second generation" of the iOS app 2020-07-01 15:48:44 +03:00
Tor Lillqvist
6971cf578d Add Authorization.cpp and hpp
Surely no point in using that code for the iOS app, though. Hopefullly
eventually some clean way to bypass it wil emerge. Note that this is
just one step towards making the iOS app even build again.

Change-Id: Ia5a8e31fc6195394f02cbf43f2b5291bcfbb398d
2020-07-01 13:02:54 +03:00
Tor Lillqvist
99c96aa263 Add USER_INTERFACE_MODE here, too
Change-Id: Ib029847ba70f709abbb5e2d9d8361b50289523dd
2020-07-01 12:49:20 +03:00
Szymon Kłos
11965d083e notebookbar: early init
- read settings from loolwsd.xml
- in case of notebookbar activated send :notebookbar parameter
- for mobile apps I left empty parameter in setupKitEnvironment calls

Change-Id: I5813589564b37eecc1e77c5d0eb737eca5f92f04
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97233
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-06-30 08:15:25 +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
Tor Lillqvist
9c517608be Bump the internal iOS app version to 4.2.6
Build 4.2.5 (57) was released (as 4.2.4).

Change-Id: I76a49b7851c2d8fa68f623c08ae211d2ac549d26
2020-06-23 16:46:13 +03:00
Tor Lillqvist
2bd05d68f7 tdf#133278: Don't overwrite the copy of the document that we are editing
When exporting a copy, let core write the copy to a temp subdirectory
before invoking UIDocumentPickerViewController to select where to
store it permanently.

Change-Id: I3d2292414a3c824515ba6d98ad09b296e543cea9
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95295
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-06-01 17:08:38 +02:00
Tor Lillqvist
48a5397ff4 Run the 'npm install' at configure time only on Linux
I don't want to make it necessary to have npm on macOS (in the case of
building the iOS app, otherwise Online is Linux-only). I still want to
use the method where the JS bits are built on a Linux machine and
loleaflet/dist is copied over to the Mac where you build the iOS app.

Remove the apparently never seriously used instructions for the other
way from ios/README. If somebody actually *uses* that way for real,
for a longer time, then please reinstate them, and modify
configure.ac, etc.

Change-Id: I22a8ca4746907bb11aad11d7c995b0de2fdbc157
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94815
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-05-26 09:02:14 +02:00
Tor Lillqvist
56afddaba0 Add RequestDetails.cpp and hpp
Change-Id: I084ce2e731073ab69a806d5053c27987b2a8244c
2020-05-15 23:34:01 +03:00
Tor Lillqvist
ee99423387 Add an "export options" plist for providing .ipa archives
Change-Id: If8309bf2548290ef9e4edd15eea2287253ffde17
2020-05-15 14:00:56 +03:00
Tor Lillqvist
459cdc9c73 Add source files from framework/source/services
Change-Id: Ic1d905dfbb65d42da577a3d536742ad7c3893db3
2020-05-07 13:44:42 +03:00
Tor Lillqvist
fe9edb5e8b Bin leftover unused variable
Change-Id: I21eaec0f070698db119d396f4b24c6d3b785c1f3
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93107
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-04-28 22:13:16 +02:00
Tor Lillqvist
edf217e1e4 Re-order to be in same order (alphabetical) as Xcode writes
Change-Id: I2e0999a11206f2f212534941a81abaab6dcc87df
2020-04-27 13:13:01 +03:00
Tor Lillqvist
b068e556de Make the Info.plist.in more like what Xcode writes
If you edit the Info.plist in Xcode, it is written with TABs and
eight-column indentation steps. Make the Info.plist.in the same to
make it easier to compare what changes in case you do some intentional
change in Xcode first.

This commit has only whitespace changes.

Change-Id: I0878eac5e19f666426ab67dd8e3c425027036756
2020-04-27 13:12:55 +03:00
Andras Timar
33000dfded typo fixes in comments and code
Change-Id: I6f31e050aab701e31064e1abc9429dce0a50c279
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92953
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-04-26 23:19:52 +02:00
Muhammet Kara
f507302993 Welcome: Add config for enabling the dismiss button
Change-Id: Ia2fbf066493d91a2b10866e66d11332b5cfc10fa
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92593
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2020-04-20 20:35:08 +02:00
Tor Lillqvist
4bc181e6c6 Use '#define FOO 0' instead of '#undef FOO' for stuff that is checked with #if
Change-Id: I8141022fc5cb622eeb63e5b28a99f0cd0a7affc4
2020-04-17 17:21:13 +03:00
Tor Lillqvist
53ef0936c1 Add ENABLE_WELCOME_MESSAGE
Change-Id: I54900694bd729419bd9c81ae2e7866b6597c3109
2020-04-17 17:21:13 +03:00
Tor Lillqvist
909734e261 Implement the "download as" functionality properly in the iOS app
We need to catch the downloadas message already in
-[DocumentViewController
userContentController:didReceiveScriptMessage:] and use an
UIDocumentPickerViewController to let the user choose where to
download (or export) the document. The iOS-specific code in
ChildSession::downloadAs() can go away.

Change-Id: I626b9986ec6156f7e83bda02b04e65f7819f8017
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92112
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-04-13 15:35:13 +02:00
Tor Lillqvist
34c27a6b9b Bump the internal iOS app version number to 4.2.4
Change-Id: I087b2ab81f4b3c8b3b85e9419743e5ce72dd398c
2020-04-13 11:00:46 +03:00
Tor Lillqvist
0930286e2d Fix problems after my 293f4913d2
It is enough to call the -[UIDocument
saveToURL:forSaveOperation:completionHandler:] only in
DocumentBroker::sendUnoSave(). And on the other hand, in
-[DocumentViewController bye] we can't want for the
LOOLWSD::lokit_main_mutex as the main queue is needed for parts of
what the saveToURL does.

Also, use a separate copy of the document as the file that is actually
edited by LO core. This matches what the Android app does. I think it
is useful to do this in order to avoid some hangs that I noticed. They
probably were caused by both LO core and the system frameworks
occasionally accessing the same document file at the same time.

Change-Id: Idb65be23a7cb6ad1288fbbd23c7471e0fb8d52f4
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91851
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-04-08 00:01:30 +02:00
Jan Holesovsky
61ad718671 Revert "Force portrait for the moment also for iPhone in the iOS app"
Landscape is supposedly working fine now.

This reverts commit d474f06040.

Change-Id: I28e6d521ee0c4906e07b99b8cc6c24761b20f2b3
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91849
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-04-07 21:04:08 +02:00
Tor Lillqvist
c05f7a4ad0 Argh, had forgotten to commit the s/Document/CODocument/ in the project file
Change-Id: I795d78cddbfbca2d9df17a662ec4800c40b68ace
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91742
Tested-by: Tor Lillqvist <tml@collabora.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-04-06 12:54:28 +02:00
Tor Lillqvist
312caf918b Add comment
Change-Id: I452b1d6fc150d014a5d55df71e9dae96288e67de
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91740
Tested-by: Tor Lillqvist <tml@collabora.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-04-06 12:49:18 +02:00
Tor Lillqvist
05a29a19d5 Fix typo in comment and elaborate
Change-Id: I2e5560a27d8471188ebb159efd29192a10295547
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91739
Tested-by: Tor Lillqvist <tml@collabora.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-04-06 12:48:01 +02:00
Tor Lillqvist
95de5a74cc Rename our Objective-C Document class to CODocument
There are already several classes called Document on the C++ side.
Let's reduce confusion a bit. (Also, we might need to use the
Objective-C Document class from some of the Online C++ code (which is
actually compiled as Objective-C++).)

Change-Id: I34347ba0161c067b14bb125c3410eefd89bbca31
2020-04-04 00:07:35 +03:00
Jan Holesovsky
9978752258 mobile detection: Create a separate device-*.css for the phone/tablet/desktop.
The problem is that the @media-based detection often disagrees with the
JS-based detection which then leads to many problems - most notably that
part of the UI behaves as if it was a tablet, and the other part as if
was a mobile phone, leading to a terrible user experience.

This commit changes it so that there is only one way how to detect if
we are on mobile phone, tablet or desktop: using the JavaScript, and we
will load the appropriate css accordingly.

Only one @media-based rule is converted as an example, the rest will
follow.

Change-Id: Id7bfb58ca12264904b3329db1542ae6b54893f11
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91416
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-03-31 20:31:49 +02:00
Tor Lillqvist
4dd95f833d Propagate core and online git hashes to the Settings for the iOS app
The git hashes now show up in the Settings app, without having to run
the Collabora Office app, open a document, and check the About dialog.

The core git hash is taken from the core build directory's
instdir/program/setuprc.

Also, drop the fairly pointless lone Finnish localisation of the
Settings strings.

Change-Id: I56631f8facde017ed99038209c55f516386eab99
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/91073
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-03-26 00:26:58 +01:00
Miklos Vajna
6890d2fdaa ios: fix opening hyperlinks
This was added in commit 2174206de1 (android:
Don't hang after returning from a hyperlink., 2020-02-14), but the new command
was only handled on Android. Handle HYPERLINK on iOS, too.

Change-Id: I8c942c1a64c8a52462a749989e312d0d9899a841
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/90917
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-03-23 17:33:45 +01:00
Tor Lillqvist
16fbe5441d Bump the internal iOS app version number to 4.2.3
Change-Id: I083ed1dd96aba75da1fc6d6d47c8cbd7b1d62a24
2020-03-23 12:55:14 +02:00
Tor Lillqvist
d474f06040 Force portrait for the moment also for iPhone in the iOS app
Change-Id: I1def28e7969cea753e7fc36094fe6514c17d61af
2020-03-20 16:03:19 +02:00
Andras Timar
a66083de9b Try to delete language information from templates...
... in order to have languages agnostic templates.
fo:language="en" fo:language="US" was removed from styles.xml

Change-Id: I680809d33cb902fc447ea5393d7f8dad3d83cbfc
2020-03-14 22:29:17 +01:00
Tor Lillqvist
2004a0198d Bump the internal iOS app version number to 4.2.2
Otherwise, when one validates (or uploads) a new build, even just for
TestFlight purposes, one gets an error in Xcode: "The value for key
CFBundleShortVersionString [4.2.1] in the Info.plist file must contain
a higher version than that of the previously approved version
[4.2.1]."

(cherry picked from commit 585cf6be86c6535a9cf6b2ab45e9e606788433d2)

Change-Id: I2ea1342980384a8eb81312734747be5e686da347
2020-03-11 14:08:36 +02:00
Tor Lillqvist
c6573a08d2 Add StringVector.{cpp,hpp}
Change-Id: I568d4136824fe0b4fcdd0f4bccd15a7c15a5248b
2020-03-10 14:17:31 +02:00
Tor Lillqvist
3de577d2c2 Use the loolkitconfig-mobile.xcu on iOS, too
We can't rename a file in the Xcode project, so copy it to
ios/Mobile/loolkitconfig.xcu in the configure script, and use from
there.

Change-Id: I1e50235c06f528dd24d0d968aaccc994418b57d8
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89466
Tested-by: Tor Lillqvist <tml@collabora.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-02-25 21:40:03 +01:00
Andras Timar
fdc05239af Remove hardcoded tab name Sheet1 from iOS spreadsheet template
Change-Id: I0916e968b33395cf682bf4ddc313c959526e7adf
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89171
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-02-21 11:34:21 +01:00
Tor Lillqvist
624b42d58a Hackaround for on-screen keyboard problem
We want to be able to force the on-screen keyboard to be displayed
(when there is no external hardware keyboard) from our JavaScript.

Change-Id: I0678d84ca941a03316ffb68cfd9c3e93a6ea7e57
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89023
Tested-by: Tor Lillqvist <tml@collabora.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-02-19 15:17:56 +01:00
Michael Meeks
6bdf561049 Share the Kit environment setup code.
Particularly configuration layers so we can tweak mobile config
easily.

Add core source files from configmgr for breakpointing convenience in
the iOS project. Add loolkitconfig.xcu to the iOS app bundle. Use
${BRAND_BASE_DIR} instead of a compile-time LOOLWSD_CONFIGDIR literal
on iOS (because there is no compile-time constant path to the app
bundle). No "registry" directory directly in the app bundle any longer
on iOS, a corresponding change in core.git moved that stuff to be
under "share", like on other platforms.

Change-Id: I6672efc0505abf27297c4758118a20992b10ceb3
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88765
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-02-17 14:49:06 +01:00
Tor Lillqvist
58205c9818 Bump version to 4.2.1
As a build of 4.2 has been approved for release in the App Store, we must bump
this before any new build can be uploaded, even just for TestFlight.

Change-Id: I60de542eaf6d10776ad287c8c9c5d36e0feed70c
2020-02-13 16:14:59 +02:00
Tor Lillqvist
0e797eeb3f Add some more core source files for breakpointing convenience
Change-Id: I829534011e037aac1297a41cdb0e6bf008e1b28b
2020-02-07 09:57:53 +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
56d310636d tdf#129380: Don't show the "shortcut bar" if a hardware keyboard is used
Change-Id: If1138185e52b7240ff6190ddf3f7af01d2a47115
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87769
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2020-01-31 15:52:27 +01:00
Tor Lillqvist
cad472f796 Add some more core source files for breakpointing convenience
Change-Id: Ia0f08bca84d98f45484162017bd3019876ab8604
2020-01-27 10:52:29 +02:00
Tor Lillqvist
d39a9f84d5 Add sources in sd/source/ui/slidesorter/view for breakpointing convenience
Change-Id: I1f8919f86b64dd6a9f6befec90b13956b2b845d3
2020-01-22 13:39:55 +02:00
Tor Lillqvist
7254183877 Add some source files from sd for easier breakpointing
Change-Id: I2797b8fb8fbeebe73b6536a27733ad5fe2123d50
2020-01-14 13:21:04 +02:00
Tor Lillqvist
948069632d Add source files from svx/source/tbxctrls and svtools/source/config
... to iOS project, for breakpointing convenience.

Change-Id: I3652afe8b833dbe3ec5aff006ef58424626a15a8
2019-12-21 03:37:41 +02:00
Tor Lillqvist
26860d8f35 Add public.content to the UTTypeConformsTo arrays of the exported UTIs
The Nextcloud app looks for that.

Change-Id: I91d26f7dced0b0ca35275db7ebabf322e50e734d
(cherry picked from commit 481f498dfb31ad364c4dfae179c1a2baef8118ab)
2019-11-21 10:24:17 +02:00
Tor Lillqvist
6aca28d0f1 Add some more source files to the Xcode project for debugging convenience
(It is, sadly, apparently possible to set breakpoints in advance
(before the code has reached that file) only in files that are listed
in the project.)

Also drop the nonexistent "filter" directory in Resources. (It is
config/filter.)

Change-Id: I96ec9dd8dc4591db9d640b01fb07e807565670cb
2019-11-07 08:45:05 +02:00