Commit graph

162 commits

Author SHA1 Message Date
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
Tor Lillqvist
9d6c174462 tdf#128577: Close an already open document when asked to open a new one
Add a "singleton" class method to DocumentViewController to return the
(as for now) singleton DocumentViewController.

Change-Id: I0b8a8def558cfe7f9469b6062a86311dfa63f549
Reviewed-on: https://gerrit.libreoffice.org/82007
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
(cherry picked from commit 2807f907d947549a17c5bae586b85d412d552a09)
Reviewed-on: https://gerrit.libreoffice.org/82021
2019-11-04 15:25:54 +01:00
Tor Lillqvist
ed4558001f Set CFBundleShortVersionString to 4.2
Change-Id: I9115a9dc571c1b27e6b80181ec38732cb91ec799
Reviewed-on: https://gerrit.libreoffice.org/82019
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2019-11-04 15:24:41 +01:00
Tor Lillqvist
0c9bc2159b Add LSSupportsOpeningDocumentsInPlace
Probably a good idea, although doesn't seem to have much effect? At
least not on tdf#128577.

Change-Id: I7b66a2e9ba44bd4cef583c0861883edfae11eb1d
Reviewed-on: https://gerrit.libreoffice.org/82006
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
(cherry picked from commit 2990203dff05f977dfdc77b493deca051b54ca79)
Reviewed-on: https://gerrit.libreoffice.org/82020
2019-11-04 15:24:22 +01:00
Tor Lillqvist
1fac53764e Bump iOS Deployment Target to 12.2
Change-Id: Ie4df6293f80bc7568ac76244e9eb4e05cc712d76
(cherry picked from commit 9953f25f55544b0e2b878fb86f40521f7f54d49b)
2019-11-01 13:00:13 +02:00
Andras Timar
2efdb2016a Remove Lotus WordPro support
... because lotuswordpro filter is not present in MPLv2-only core builds

Change-Id: I100e886273f8b7fd38887576c2d29fad4c69b2e7
Reviewed-on: https://gerrit.libreoffice.org/79683
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
(cherry picked from commit d7813989913e95cefc8484d6d2af965ed5752588)
2019-10-25 14:39:29 +03: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
1cf3bec303 tdf#123741: Call LibreOfficeKit::setLanguageTag() also when loading a template
Sadly I have no understanding why not doing that caused such a
mysterious end result. But I am glad I thought of trying this simple
thing before spending any more time trying to understand what is going
on.

Change-Id: I129f8fffa32fa087e21c444f9657394de0e255a1
2019-10-10 19:35:30 +03:00
Tor Lillqvist
39ddc5242d tdf#126974: When we are about to be killed, just exit bluntly
Letting the system call exit() will cause destructors of global C++
objects to be called, and doing that at an arbitrary point in time
will cause a crash. So just call std::_Exit() in the AppDelegate's
applicationWillTerminate: method.

Change-Id: I15d7a761db931a6b7aed588bb407fa0d3b4a9465
(cherry picked from commit 4c2cb838ff5fa2485ec74db11e239883a53f7ff9)
2019-10-09 14:30:20 +03:00