Commit graph

20169 commits

Author SHA1 Message Date
Patrick Luby
17f739ca77 Fix issue #5887 by assuming that documents are writable on iOS
The iOS app saves directly to local disk so, other than for
"view file extension" document types or other cases that
I am missing, we can assume the document is writable until
a write failure occurs.

Signed-off-by: Patrick Luby <patrick.luby@collabora.com>
Change-Id: Iacb1589eded18f0cb21a5dd8e4d91d295ae697fe
2023-03-15 09:29:56 +01:00
Andras Timar
48a1101970 add common/LangUtil.hpp to distribution
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ic7ad5f7a75cab91d7f34d1455737a8838564c502
2023-03-14 23:37:19 +01:00
Patrick Luby
54ad0f173b Another fix for issue #5843
Limit escaping of non-ASCII text and splitting on the first newline to
only certain message types on iOS.

Also, fix mangled UTF-8 text on iOS in jsdialogs when using languages
like Greek and Japanese by only setting the image bytes for only the
same set of message types.

Signed-off-by: Patrick Luby <patrick.luby@collabora.com>
Change-Id: I9cd088509ba9724108da3c9457cd3d098b45723f
2023-03-14 21:55:12 +01:00
Andras Timar
98ae6ac269 disable fragile TileCacheTests::testTileProcessed()
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I791b24b59a22f87006a334332e7b8661615ac21d
2023-03-14 21:17:13 +01:00
Ashod Nakashian
f91a7dd772 wsd: reduce minimum time between requests
Previously we waited at least as long as
it took to process the last request before
issuing a new one. This can be unnecessarily
long, especially when unloading. Now we half
that time.

We should consider a more sophisticated logic,
especially during unloading, where it's best
to upload quickly.

Change-Id: Id903b8a064bd8431578221dc9386ab08d46dd2dd
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-03-14 20:40:40 +01:00
Ashod Nakashian
a941de6fb7 wsd: mark last upload request time
This corrects the reported upload duration
at the end of uploading.

Change-Id: I9d3af4d3dce5aff0c3526ba009fc0b27150bc070
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-03-14 20:40:40 +01:00
Ashod Nakashian
9caa1f9a18 wsd: pass by reference where possible
Change-Id: Ib5501d6b766b982f34b226a20128c89f0ae7d84e
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-03-14 20:40:40 +01:00
Ashod Nakashian
e6180f31f3 wsd: remove single-use getWriteableSessionId
Change-Id: I66a77be784aaef61472cd02cb49168813d75548c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-03-14 20:40:40 +01:00
Ashod Nakashian
43515fcbbf wsd: correct config default-value name for rotateOnOpen
'rotationOnOpen' -> 'rotateOnOpen'.

Change-Id: I204e1f1208cbc8089a10472fc52b4c2e83e3eaf5
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-03-14 20:40:40 +01:00
Ashod Nakashian
b5de21a0ad wsd: simplify passing mobileAppDocId to getNewChild
It seems more complex to have #ifdef guarded logic
around a function call to pass or not pass an argument
when we that same argument is already defaulted in
that function.

If the difference between the two paths is primarily
the argument, then we can always pass it, making sure
that in the case that defaulting would have been used
that we pass the same default value. This is now done
with assertions.

Change-Id: I333eb3f42cb51dfab8584ae8c5aa52ee45c5a9a1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-03-14 20:40:40 +01:00
Gökay Şatır
3f4ac24bb2 Remove vex from documentconflict message.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Idd09bb8c376e50c64db4f145f907b7a3e17436d0
2023-03-14 20:51:52 +03:00
Gökay Şatır
08d74ee23e Remove vex from signing.js also remove unusued code.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Idd297ded47cec0ca32c25d3b75242e21826b32ee
2023-03-14 20:14:10 +03:00
Ashod Nakashian
a532178697 wsd: better logging in autoSaveAndStop
Change-Id: Ied4e5dda4f9dfa7f5175601207dd6a2bbf136ff0
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-03-14 15:46:48 +01:00
Ashod Nakashian
197315da3b wsd: correct log of time since last save response
Change-Id: If93768da07904ea683f91a0964780ca6832b52a6
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-03-14 15:46:48 +01:00
Ashod Nakashian
af62f75afe wsd: only warn of live sessions on unload
We could still have session instances in the
_sessions container in DocBroker by the time
we destroy it, what counts is that they aren't
live at that point.

We could still have sessions because we may
be waiting for the kit to confirm disconnection.
But if that was the last session, the kit will
instead exit and that would trigger the
destruction as the PrisonerRequestDispatcher
will have to clean up the DocBroker instance,
hence destroying us.

Change-Id: I8ce103d38edc355d09da046e1b875f0e62768adc
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-03-14 15:46:48 +01:00
Ashod Nakashian
58566083d5 wsd: do not warn of unassociated Kit after unloading
After unloading a document, the ChildProcess instance
may be destroyed by the time that we process the
internal prisoner connection. In that case, we
can't find the ChildProcess so we assume it was
a premature death and issue a warning.

By tracking whether or not a PrisonerRequestDispatcher
had an associated DocBroker, we can supress warnings.

Change-Id: I8bab882283f27f7d5f724e878aae19837445a2fe
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-03-14 15:46:48 +01:00
Ashod Nakashian
cc8769855b wsd: better logging of WOPI::PutFile
Change-Id: I9a422e87cc34ad162b710931d7c329ed85d9edd2
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-03-14 15:46:48 +01:00
Ashod Nakashian
b3d5f9f9a3 wsd: logging improvements
Change-Id: Ia9959206f2748adf48dc199d2508b1c6ad38fbe9
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-03-14 15:46:48 +01:00
Ashod Nakashian
9596d5a0ab wsd: http: set http::Request log context
Change-Id: Ic8b9c1e7526ebf2f7c69f47f1bd98fdb9fc471ce
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-03-14 15:46:48 +01:00
Gökay Şatır
ccdb1cdd8d Remove vex from main.js.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Ia15f57817a892753b3579eee8f38366f36f44672
2023-03-14 17:40:12 +03:00
Rash419
e93a193ae0 Revert "Remove unnecessary .waits from image tests"
- image test consistently fails without waits in CI

This reverts commit b529c96a48.

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I66bd85c8fe1ce28ccab8d644a98265145d3de64b
2023-03-14 17:31:57 +05:30
Andras Timar
ec7e460739 GitPod: use core assets of version 23.05
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ie9c945211404d11e9fa9c368e113d4e30f53cc4b
2023-03-14 12:04:51 +01:00
Andras Timar
86797465e3 CodeQL C++: use core assets of version 23.05
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I309a36812f931cd51a0b755cee21b8b9d9d87765
2023-03-14 12:04:32 +01:00
Andras Timar
1baf6565d7 Cirrus CI: use core assets of version 23.05
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I0b1fa6bab026c6329d263f28b50259313f86db37
2023-03-14 12:01:38 +01:00
FedericoHeichou
985f284c89 Fix isLocal failing check with IPv4
Signed-off-by: FedericoHeichou <34757141+FedericoHeichou@users.noreply.github.com>
Change-Id: If6fa382102252908dac1fb80199bb332ce400aeb
2023-03-14 10:48:20 +01:00
Gökay Şatır
33fc77c412 Remove vex from password dialog.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Ibd7364e44d14eaca025037c37d85cb621a2ebec5
2023-03-14 10:35:10 +01:00
Gökay Şatır
c17671b541 Remove vex dialog from saved-as warning.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Id41c98806bc4763797c9986a60ef39301581da06
2023-03-14 10:32:45 +01:00
Szymon Kłos
824afb669c jsdialog: mobile tab handler in separate file
and don't hide tabs

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ic78c8c17e1543ff4dc1a0874d13e05f5a7a7426b
2023-03-14 10:31:26 +01:00
Szymon Kłos
243bb8f3f0 cypress: adjust file description to new typing
we send value on every key press now, but core still
sends updates back, after we update core to not notify
us with the same value it can be reverted

this prevents us from having incorrect text when typing long
sentences and receiving updates with delay

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: If87c3f1c83018920dfaa8f3c31f567b25df27c61
2023-03-14 10:31:26 +01:00
Szymon Kłos
3bb07cdd52 jsdialog: set text for textview after every key press
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I0a00b453d903a1b13ae69c7efc37e0e7d2e81913
2023-03-14 10:31:26 +01:00
Szymon Kłos
58e686deb9 jsdialog: send selection for text view
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I3d87a676a1c47ea8fc99ba523ccf960a6cbde90f
2023-03-14 10:31:26 +01:00
Szymon Kłos
1665d6e7bc Move formulabar edit field to separate file
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ia4d5f1c8547cf329c5f624ad09ac9049bdda62f7
2023-03-14 10:31:26 +01:00
Szymon Kłos
d06f539943 jsdialog: don't warn when unselect all is called
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I1671203ba490fb83aa65baeba86f109325750cdf
2023-03-14 10:31:26 +01:00
Gökay Şatır
1ba537d8bf Remove vex from _switchToEditMode function in permission.js.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I444ea61eb6cf6c92858833a30be92ee9a6a36509
2023-03-14 10:30:37 +01:00
Andras Timar
489a323742 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (525 of 525 strings)

Translated using Weblate (Italian)

Currently translated at 100.0% (525 of 525 strings)

Translated using Weblate (French)

Currently translated at 100.0% (525 of 525 strings)

Translated using Weblate (Italian)

Currently translated at 96.9% (509 of 525 strings)

Co-authored-by: Andras Timar <andras.timar@collabora.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/fr/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/it/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/pt_BR/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ic8131fcba722e09e8b2a73df39de25b54b88ae59
2023-03-14 09:04:33 +01:00
Ayhan Yalçınsoy
b43a7fdfc6 Translated using Weblate (Turkish)
Currently translated at 100.0% (525 of 525 strings)

Co-authored-by: PhD. Ayhan YALÇINSOY <ayhanyalcinsoy@pisilinux.org>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/tr/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I2a229ba7e216752858c6f2b25cfa9b16bc11b31a
2023-03-14 08:28:00 +01:00
Sebastiaan Veld
d4556acde4 Translated using Weblate (Dutch)
Currently translated at 100.0% (525 of 525 strings)

Co-authored-by: Sebastiaan Veld <sebastiaan.veld@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/nl/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I6b68d8f60bfb84f8215fbf40969a52e7cb0ac35e
2023-03-14 08:28:00 +01:00
Alex Gabilondo
b6e2891044 Translated using Weblate (Basque)
Currently translated at 99.6% (523 of 525 strings)

Co-authored-by: Alex Gabilondo <alexgabi@disroot.org>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/eu/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I713bf5df8e70011e02010a268c0d0532900fc7f2
2023-03-14 08:28:00 +01:00
Rob Pearson
d625a1fec4 Translated using Weblate (English (South Africa))
Currently translated at 100.0% (525 of 525 strings)

Translated using Weblate (English (New Zealand))

Currently translated at 100.0% (525 of 525 strings)

Translated using Weblate (English (Australia))

Currently translated at 100.0% (525 of 525 strings)

Co-authored-by: Rob Pearson <rob.dunedin@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/en_AU/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/en_NZ/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/en_ZA/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ic7ba5fe496b85f3c8b167f90c0e53fc2b27a0420
2023-03-14 08:28:00 +01:00
NickWingate
b6652a3f29 Force viewport to be correct size for image tests
Signed-off-by: NickWingate <nick.wingate@collabora.com>
Change-Id: I01d3b7ddaa0a48b59b43466ffdd2e5bb54ccc7c8
2023-03-14 11:25:43 +05:30
NickWingate
b529c96a48 Remove unnecessary .waits from image tests
Change-Id: I6ad9b0f256d7613a784684569966dbcf36ec6e2a
Signed-off-by: NickWingate <nick.wingate@collabora.com>
2023-03-14 11:25:43 +05:30
Jaume Pujantell
002cf9e436 Stop erasing the whole tmp directory after a download
Signed-off-by: Jaume Pujantell <jaume.pujantell@collabora.com>
Change-Id: I805e27df25d3134eb12926f28b6f9ff09b4ed230
2023-03-13 16:18:08 +01:00
Tor Lillqvist
43a8ed3f1c Rename variables to match meaning and add a few comments
It is misleading to use the word "pixel" in a variable name when the
variable specifies a size in twips.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Idc59c3dafd63a9ae73601f9c367b37c495e1593a
2023-03-13 12:33:49 +01:00
Tor Lillqvist
12c22706f9 We aparently want thumbnails to be of size 1200x630 pixels
Tweak the "zoom" variabe to be 1 so that with this thumbnail size, for
a typical document we get more of it into the thumbnail.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I419afccbf57eae23062ab4c849dd41293f068f00
2023-03-13 12:33:49 +01:00
Ashod Nakashian
98a0f5d97a wsd: do not disconnect the last session if saving
Previously we only waited if a new auto-save has
been issued at the point of disconnecting the
last session. However, we could have a save in
progress, particularly when it's a slow one,
and we should equally wait for it before
disconnecting the last session.

Failing to do so will exit the kit right after
finishing the save and will rob us of the
ability to upload the just-saved version.

Change-Id: I678689a95211fa8b80bcd3e8d4537de7de5d6632
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-03-13 08:19:33 +00:00
Rash419
f335d08e09 fix: renaming doesnot work when indirection_endpoint is enabled
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ic79a0436f87d4ab4697597d15fd60fa148050270
2023-03-13 08:07:16 +01:00
Rash419
58d66fca59 admin: notify routing_rmdoc to subscribers when all views expires
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I360b90d2b93ce9e8508f16822a2654e111ba2407
2023-03-13 08:07:16 +01:00
Michael Meeks
d5e95c80ec quarantine: cleanup.
Also handle OOB values of config setting.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Ia0d4e2e0475bfd6d487006847ea0622b573569b7
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-03-11 17:42:30 -05:00
Michael Meeks
eb43a27396 locking: avoid spamming warnings in some circumstances.
If we have no write-able sessions, we can't lock the document -
fair enough to complain, but not every ~300ms - so defer another
lock period in this case.

Change-Id: I7beb974b3c17fd6ac01a32d8fe50261a54340665
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2023-03-11 17:42:30 -05:00
Gökay Şatır
7ad8a38a48 Remove vex from confirmation dialogues.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I240e6771ab1f57118cfa263fda1566349a38f8ac
2023-03-11 10:03:07 +03:00