Commit graph

1577 commits

Author SHA1 Message Date
Mike Kaganski
571ef16df8 Implement fake oldvalue/modulus/exponent and X-WOPI-ProofOld
... since these are required in proof-key element as per [MS-WOPI].

Change-Id: Ie770271ee911e3f7822375c00a83c6a32cd5f2fc
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88743
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-07-28 14:46:02 +02:00
Tomaž Vajngerl
ca00470722 allow saving a PDF, add "view_comment" state
This adds a "view_comment" in addition to "view" and "edit" state
into discovery.xml. In case it is enabled, the filters let the
comment commands through to core.

In addition add "Save Comment" menu action to allow saving the
comments, which is enabled when in "read-only" with "view_comment"
mode.

Change-Id: I3ab3dbee93ee2167ae96adea7025fc0b385f8201
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/99473
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-07-27 16:40:12 +02:00
Tomaž Vajngerl
241f134473 Enable comments inserting and deleting when in read-only mode
Change-Id: I5aa3be061a6ef65bbf5d4cb879c4dde97ed31dd5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/99017
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-07-20 22:47:00 +02:00
Mike Kaganski
a1fafe27f4 Allow user to try to lock the document for edit
Use mobile-edit-button for that is permitted.

Change-Id: I4d4c3f21d574abae033bacc69def96aaf6b51567
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98786
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-07-20 15:49:09 +02:00
Mike Kaganski
e9c4c0286a Handle failed locking as (temporarily) read-only session
E.g., opening a checked-out document in SharePoint

Change-Id: Ifd5225d8450d7f2f5ba9661f158551c5c16f9b09
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97596
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-07-20 15:47:33 +02:00
Tor Lillqvist
03697b3bb5 The socket inbuffer is not nul terminated
We can't just call strtoul() to parse the number at the end of the
buffer. The buffer might be followed by other digits in memory. In
that case we would get a completely wrong mobileAppDocId which will
lead to a crash or assertion failure.

Change-Id: I71c96323faa2b069009e5eda7a7153148b78094a
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98914
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-07-16 22:56:47 +02:00
Pranam Lashkari
22359767d6 tdf#129296 leaflet: Password protected document load failing
Do not send faileddocloading error if it is because of password.

When the document is password protected, we send to the client
both passwordrequired and faileddocloading.
These two are handled differently. While the first prompts the
user for password input, the second internally flags fatal error
and shows an error message that the document may be corrupted etc.
The end result is that the document is not loaded and displayed
when the user submits a correct password. To reset the fatal
error one has to reload, which is unhelpful when we need to
provide a password.

This patch makes sure that we only send one error message to
the client. If a password is required, it already implies that
the document didn't load, and that with the proper password we
should try again.
Similarly for when the password given is wrong. However, if
loading fails and it isn't a password-related failure,
faileddocloading error is returned and in this case the client
handles it as a final error (that requires reloading to retry).

Change-Id: I383418fd40b6e0749b20af0ef8dc40f391a05559
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98676
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2020-07-16 19:31:31 +02:00
Miklos Vajna
7b38cf9fce wsd: fix log order in DocumentBroker::sendRequestedTiles()
First log then modify the container.

Change-Id: Ia2bae55562ec6e158c5622cfd25197b6e65584a5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98872
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-07-16 15:45:05 +02:00
Mike Kaganski
2752141867 Restructure ClientSession::_handleInput to check tokens once
This allows to avoid redundancy, and makes it explicit which token
is handled where.

Change-Id: Ibc7ed7617f7f511cb8346e2e82281c3a3fdac9a7
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98821
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-07-15 14:53:16 +02:00
Tor Lillqvist
d7453ac243 Attempt to fix Android build: endLoadResult() can't be inside #if MOBILEAPP
Also helps the iOS build, but there is another recent change that
broke it more.

Change-Id: If750bfa3e89ee07d97a91996223012e309b0b712
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98811
Tested-by: Tor Lillqvist <tml@collabora.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-07-15 12:59:31 +02:00
Samuel Mehrbrodt
ce91fa4201 Report back load result to integrator
Integrator currently gets no message when loading the document
from WOPI host fails.

Similiar to Action_Save_Resp, introduce Action_Load_Resp with
the result of the load action.

Change-Id: I3b0f9ee691a1c5d58e9f833d511435a0b25a465f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98299
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2020-07-15 09:48:43 +02:00
Tor Lillqvist
e633dd7c5a Make TileCache::_dontCache const
Change-Id: Ic932a836fc47de4b707d0468bafba65eaf5bf86a
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98774
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-07-14 19:02:37 +02:00
Michael Meeks
6ca6a7649e Forkit: add dump_forkit_state and re-factor state checks to simplify.
Change-Id: Ic65bbd0894f26f69e1b55c769ac47013f9aaf163
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98746
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-07-14 17:28:32 +02:00
Ashod Nakashian
aba09e165b wsd: improved TileCache
* Excised TileCacheDesc to improve performance and simplify code.
* clang-tidy suggestions and auto-rewrite fixes.
* Const-correctness.
* Inlined and improved a couple of trivial functions (that are called
often).
* Reduced some logs from INF to DBG as they are only meaningful to devs.

Change-Id: I1c4eb8c63da49aa061afbf3eb68cae23d4d5e7f3
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98661
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-07-14 15:35:20 +02:00
Tomaž Vajngerl
08d81615e7 add .uno:EditAnnotation as exception when in read-only mode
Change-Id: Ic6cd15973a96d20895a1e0dc47fc33692b09ec92
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98589
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2020-07-12 19:11:06 +02:00
Samuel Mehrbrodt
20eaab2720 Log number of active sessions
Change-Id: Id161f09bc637e5dcf5ea0beaf11e360de7aa1fa2
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98298
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2020-07-09 10:25:36 +02:00
Dennis Francis
d1b3f4c6af wsd/kit: use splitx/splity in clientvisiblearea message...
to filter tile-invalidation messages, so that the client gets
invalidations/new tiles for all split panes.

Change-Id: Ifacc452ed6bb43dfd36ff16386fb4a547ec8302b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98362
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2020-07-08 17:18:33 +02:00
Tor Lillqvist
c0706831b8 Add comment describing what was not a good idea after all for the iOS app
Change-Id: I43c760fa521f6a5860f2ed5dfef816ba5faaf463
2020-07-08 17:35:40 +03:00
Tor Lillqvist
0a2033d688 Bin pointless virtual function that only calls the base class function
Pointless since my own 7f25109f72, so
yeah, I should have noticed then.

Change-Id: Ic34584134ef840b33b874952e0bba8d14d3fde2f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/98374
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-07-08 16:30:13 +02:00
Samuel Mehrbrodt
e71e37bcec Improve reporting save results
Change-Id: I3f2f96f4b8f196e6e9268bed24695f739f679124
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97699
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2020-07-07 15:06:25 +02:00
Dennis Francis
a22392d827 supress clang -Wparentheses-equality for WIF*() spurious case
Change-Id: I213ba6085aa1b662d5a6283cf9d84742bce288e1
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97971
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
2020-07-05 10:09:40 +02:00
Tor Lillqvist
d0672cd2b9 Slight refactoring to make planned re-plumbing of iOS app easier
Change-Id: I274cf167c6593de6f073301f7071f2173b40cbab
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97760
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-07-03 08:41:02 +02:00
Ashod Nakashian
3cee55872b wsd: minor cleanup
* Use const where possible.
* Remove dead-code (clang-tidy error).
* Don't use hungarian notation.
* Avoid single-use variables (if redundant).
* Declare variables closest to use-site.
* Avoid unecessary temporaries.
* Avoid explicit true/false when the statement is boolean already.

Change-Id: I154dc2a7d4bcbd39f73f42e12a101a7e4eb0fd33
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96378
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Muhammet Kara <muhammet.kara@collabora.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-07-02 21:47:08 +02:00
Mike Kaganski
35f8788e1c Only lock documents in editing sessions
Change-Id: I97753541a944bb299b04c032790d6af7a9ee0f63
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97609
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-07-02 14:21:30 +02:00
Jan Holesovsky
b39017c08c android: Remove unneeded dependency + add some comments.
Change-Id: Idbc271a398f6f0c037d478bda5ee0b149ca4f24f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97730
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-07-02 11:08:19 +02:00
Ashod Nakashian
4082a462da wsd: admin: don't poll rapidly when cleanup is disabled
When per_document.cleanup is disabled, the time
between the last cleanup (which never happened)
grows indefinitely, which results in minimal
polling time intervals. This wastes valuable
cpu cycles unnecessarily.

When cleanup is disabled, there is no need to
calculate the next cleanup time. The maximum
is reasonable (although it should really be
infinity).

Change-Id: I71d065441c4c2ff96fe31e6a45a5ecfdd2f85d49
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97471
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-07-02 02:33:25 +02:00
Samuel Mehrbrodt
9f8fdb7bd7 tdf#131123 Report back real save result
665b1629de was not correct, as it reported back
the save result of the internal save (which usually succeeds).
Instead we want to know the save result of the remote storage (WOPI/Webdav).
So report that back instead.

Change-Id: Iaaa42b8c817a19c2c77935a6f81c1951fdf2216c
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97637
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2020-07-01 17:57:53 +02:00
Tor Lillqvist
9e8ddfc0c1 Don't call JailUtil::cleanupJails() on MOBILEAPP
Change-Id: I7a01ff9afaccb6e3f4b399a12d828c8d44bcb4c2
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97612
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-07-01 16:43:56 +02:00
Jan Holesovsky
22e2f50f55 android: Make the documents open again.
The files stopped opening after
5c9988f2e3, but just avoiding the new
Jails stuff seems enough to fix it.

Change-Id: I4c3be058dd24e9500f64c240571f0e76a17ac8b8
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97608
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-07-01 16:43:09 +02:00
Michael Meeks
d4fa74916c Unconditionally display & log version on start & in dumpState.
Hopefully makes our logs generally much more useful.

Change-Id: I6e7a96792e322fc40eb7dda1aa16a2a4ada07df6
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97615
Tested-by: Jenkins
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-07-01 15:15:19 +02:00
Mike Kaganski
6de63613fb Improve logging failed lock request using X-WOPI-LockFailureReason
Change-Id: Ia521422d033861cd002e7eb2123ccc18e9cd0071
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97555
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-07-01 08:09:34 +02:00
Ashod Nakashian
e93f7039c1 wsd: anonymize the filename only when anonymization is enabled
Change-Id: I0649788d38492b66aeb9cc4716dcbd23cd76cb4e
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97190
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-07-01 07:42:46 +02:00
Ashod Nakashian
a77208ddfb wsd: prefer emplace_back where possible
emplace_back avoids copy-construction when
the argument is a temporary instance created
at call-site.

Change-Id: I127fddd308d710af9ea65a86db1b03347e9c3d87
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96829
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-07-01 07:40:54 +02:00
Ashod Nakashian
02da27a436 wsd: improve readability
Change-Id: I2f85ebff783ebb799324b0aa95f5d0d023c19231
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96381
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-07-01 07:40:10 +02:00
Ashod Nakashian
e68be80496 wsd: add http-headers unit-test
This is to defend the sneaking of extra http-headers
in the access_header URI param that was recently fixed.

Change-Id: Ic28cf58854847ac278bed8043f398b107f7992b3
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96862
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-07-01 07:37:10 +02:00
Ashod Nakashian
77aa816180 wsd: log the response from WOPI CheckFileInfo separately
Change-Id: I8af28a7332903e6ed36dfba6bbd6bfbb5ebbd4db
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96828
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-07-01 07:35:53 +02:00
Ashod Nakashian
5cf0273c7f wsd: parse the URI params of the URI and DocumentURI
Change-Id: Iefc8c10ff85270aa95f255cef29b3427a0efcfe6
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96826
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-07-01 07:35:00 +02:00
Ashod Nakashian
fa96934861 wsd: Authorization parsing and creation improvements
Authorization class now handles the parsing and creation
of its instances, which makes it centralized.

We also avoid repeatedly constructing Authorization objects
in ClientSession and instead do it once at construction
and cache it.

A bunch of new unit-tests added.

Change-Id: I9b5939be51a5957214d07ed8f1096efd179686c6
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96825
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-07-01 07:33:57 +02:00
Ashod Nakashian
9a427524d1 wsd: support --cleanup in loolwsd
Leaving behind jails with bind-mount
entries makes build-workspace removal
complicated, and jenkins builds start failing.

The cleanup stage is integrated in Makefiles
and should be transparent.

In the event that manual cleanup is necessary,
'loolwsd --cleanup' can be invoked.

Change-Id: Ia4b99b0c66e56dfa2d50e79b0ba98f714cf32886
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97470
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-07-01 06:14:39 +02:00
Ashod Nakashian
5c9988f2e3 wsd: faster jail setup via bind-mount
loolmount now works and supports mounting and
unmounting, plus numerous improvements,
refactoring, logging, etc..  When enabled,
binding improves the jail setup time by anywhere
from 2x to orders of magnitude (in docker, f.e.).

A new config entry mount_jail_tree controls
whether mounting is used or the old method of
linking/copying of jail contents. It is set to
true by default and falls back to linking/copying.
A test mount is done when the setting is enabled,
and if mounting fails, it's disabled to avoid noise.

Temporarily disabled for unit-tests until we can
cleanup lingering mounts after Jenkins aborts our
build job. In a future patch we will have mount/jail
cleanup as part of make.

The network/system files in /etc that need frequent
refreshing are now updated in systemplate to make
their most recent version available in the jails.
These files can change during the course of loolwsd
lifetime, and are unlikely to be updated in
systemplate after installation at all. We link to
them in the systemplate/etc directory, and if that
fails, we copy them before forking each kit
instance to have the latest.

This reworks the approach used to bind-mount the
jails and the templates such that the total is
now down to only three mounts: systemplate, lo, tmp.

As now systemplate and lotemplate are shared, they
must be mounted as readonly, this means that user/
must now be moved into tmp/user/ which is writable.

The mount-points must be recursive, because we mount
lo/ within the mount-point of systemplate (which is
the root of the jail). But because we (re)bind
recursively, and because both systemplate and
lotemplate are mounted for each jails, we need to
make them unbindable, so they wouldn't multiply the
mount-points for each jails (an explosive growth!)
Contrarywise, we don't want the mount-points to
be shared, because we don't expect to add/remove
mounts after a jail is created.

The random temp directory is now created and set
correctly, plus many logging and other improvements.

Change-Id: Iae3fda5e876cf47d2cae6669a87b5b826a8748df
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92829
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-07-01 05:42:43 +02:00
Mike Kaganski
64950bcc4e IIS requires content-length for POST requests
Without the content-length, LOCK requests result in 411 response with
the message: "The request must be chunked or have a content length".

Ref: https://forums.iis.net/t/1119456.aspx

Change-Id: Ieceb2bcf478c5f6baf97ee6b89d37622da168df5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97524
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-06-30 15:58:42 +02:00
Jan Holesovsky
2c4e4f2e6e android: This assert is iOS-only, ifdef it out.
Change-Id: I2a0dab7069721175983fa426f30422f5fd00e6b8
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97474
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-06-30 10:54:29 +02:00
Szymon Kłos
3141bf7775 notebookbar: Introduce switch in loolwsd.xml
Change-Id: I94546a899fde1cecc2c35dc527e41e8a36061750
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93050
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2020-06-30 08:16:25 +02: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
Mike Kaganski
ec1bc58070 Don't show last modification indicator when data is unavailable
E.g., SharePoint 2013 and 2016 don't support LastModifiedTime field
in CheckFileInfo [1].

[1] https://docs.microsoft.com/en-us/openspecs/office_protocols/ms-wopi/e2e91eab-4c6d-4f00-9c3f-3a1962135626#Appendix_A_30

Change-Id: Icdcf9f82758b4bd34be25f553e9d756ab76b8bfa
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97221
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-06-26 14:42:34 +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
9077962bfe The locale dance is unnecessary on iOS
The code does not work on iOS as locales apparently are differently
named than on Linux.

Besides, we have been able to open files with arbitrary non-ASCII
names, like 000🇹🇩🇲🇶🍉🥨111.odt, just fine for some time already.

Change-Id: I3f4a342721a7ad22786b8bdb1cd9829087539178
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97020
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-06-24 13:16:05 +02:00
Tor Lillqvist
a541dc5bcb No need for this 'if (false)'
Change-Id: I552ee8873d398b428aa2c54d7d762c13144b8b75
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96931
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-06-23 13:26:37 +02:00
Damian
f160ccf80d tdf#134041: reset engine before next digest computation
Change-Id: I68ef078f6f885bebaf29b37d5fd704a9c70c826a
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96899
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-06-23 12:32:19 +02:00
Ashod Nakashian
fa749d0a35 wsd: std::move rather than copy
Change-Id: Ie5e3f711d4cda686408624f849f3f7d7dfb549b8
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96380
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2020-06-23 06:43:38 +02:00