Commit graph

13751 commits

Author SHA1 Message Date
Tamás Zolnai
4f9169bf8c cypress: remove content of cypress folder before test run.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Ic4e637903df6768c42fcd404563455e19fa86cda
2021-01-04 16:30:40 +01:00
Michael Meeks
317dffb817 Optimize copy of jails to hard-linking with new capability.
In some cases we cannot do a fast bind-mount of the files we want
in our jail since we don't have cap_sys_admin for loolmount inside
eg. docker.

Thus we need to fallback to hard-linking, however various security
systems namespace parts of our tree, such that link() fails with
EXDEV even across the (apparently) same file-system.

As such we need to assemble a copy of what we want to hard-link
close to our jails. However, this needs to be owned by root / the
system to avoid having writable files shared between jails. Hence
we need cap_chown in addition to cap_fowner, to get ownership right
and then hard-link.

Change-Id: Iba0ef46ddbc1c03f3dc7177bc1ec1755624135db
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2021-01-04 15:05:36 +00:00
Andras Timar
1202dae8cc updated .gitignore for docker
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I1daf5f4819c7085a8ee9213e7f938360d72525b2
2021-01-04 15:47:22 +01:00
Miklos Vajna
ee37bd9c05 test: avoid garbage at the end of the message in getErrorCode()
'bytes' can be smaller than the size of the buffer, so go with that size
instead.

Change-Id: I025b56379ee449fe33710b660d845fa2dd0865ee
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
2021-01-04 15:46:39 +01:00
Henry Castro
7f70197723 kit: enable input process when early dialog show
Before loading the document and if it has an embedded
macros, it will show the "Macro Security Warning"
message dialog.

If the input process is not enabled, the result will be
a virtual deadlock, so it should filter some messages at least.

Change-Id: I565569a0227ac0e7ce2feae2cf3ccdf21ce4b1d4
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-01-04 09:33:55 -04:00
Henry Castro
0fb1d7ccb5 jsdialog: move onJSDialog to Socket class
When the "Macro Security Warning" message is received,
there are no instances of the document layer yet,
because the server does not have an instance for Model/View/Conroller.

Change-Id: I1ac36fb1553d8bd3ed48b86e75bf32d1b12d1d86
Signed-off-by: Henry Castro <hcastro@collabora.com>
2021-01-04 09:33:28 -04:00
Miklos Vajna
3c0e7707bd admin fuzzer: fix build
This went wrong in commit 693a2e19e3 (wsd:
SocketPoll::poll accepts chrono duration, 2020-12-14).

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I04780d7a5ef8ba54530df7727f2fe4df59995fb9
2021-01-04 11:45:01 +01:00
Dennis Francis
a26ea89541 zoom-animation:Make overlay/marker layers invisible
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I5abccfc0021daf4912aed726ef0ef1b35d05c0a6
2021-01-04 13:09:04 +05:30
Dennis Francis
4ad8a8d9d5 zoom-animation:Draw the last frame with final-zoom
...which is rounded to the allowed set of zooms hence reduce the view
jump after map's zoom is set. There is still a jump depending on the
position of the pinch center on the screen. This is because on setting
the zoom in Map, it repositions the center such that pinch center is now
the center of the screen.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I2a79240373f333b96574b7fe5c2b18de7dec612e
2021-01-04 13:09:04 +05:30
Dennis Francis
009c317da6 Offscreen-canvas painting for _paintSimple too...
so that zoom animation works for writer and impress as well.  In case of
impress/writer the core-pixel coordinates can be negative, so make
"extendedPane" be 3 tiles biggger in all directions in such a case.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: Iab836ea963c117ec26a7648e5ff37c0b625b3b4d
2021-01-04 13:09:04 +05:30
Dennis Francis
599ec7ad37 fix offset computation and usage
The incorrect offset is present since
db887df4aba500062827bad484ba3aacfe262339

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I3089a00cf297762b5280e841680590f65d2c73a4
2021-01-04 13:09:04 +05:30
Dennis Francis
6fec3c791c getPixelBoundsCore() does not return css pixels
This also fixes slowness in Calc's swipe/pan animation because of
oversized main canvas and offscreen canvases.

Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: If451f49fd99fb11207a2f4862daa37d9f3f02477
2021-01-04 13:09:04 +05:30
george k
ae65637eb5 Translated using Weblate (Greek)
Currently translated at 95.0% (346 of 364 strings)

Co-authored-by: george k <norhorn@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/el/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I20b604f8781f1491ad255bcf6f5f3e54a62d4895
2021-01-04 08:37:11 +01:00
Ihor Hordiichuk
75d7865eed Translated using Weblate (Ukrainian)
Currently translated at 76.2% (318 of 417 strings)

Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/help/uk/
Translation: Collabora Online/Help
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I6d27a91b1e8974986ce9daf0f44bb4142f7d4ac4
2021-01-04 08:37:11 +01:00
Yaron Shahrabani
7955b481b1 Translated using Weblate (Hebrew)
Currently translated at 100.0% (364 of 364 strings)

Co-authored-by: Yaron Shahrabani <sh.yaron@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/he/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I1d51d1bef6994540c51f3ec3e93e353763652384
2021-01-04 08:37:11 +01:00
Milo Ivir
152eda55a0 Translated using Weblate (Croatian)
Currently translated at 100.0% (364 of 364 strings)

Co-authored-by: Milo Ivir <mail@milotype.de>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/hr/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I651691408e0b159c8445a867ee7b13060ca940e2
2021-01-04 08:37:11 +01:00
Andras Timar
8fb8af419f Translated using Weblate (Dutch)
Currently translated at 100.0% (364 of 364 strings)

Translated using Weblate (French)

Currently translated at 100.0% (364 of 364 strings)

Translated using Weblate (German)

Currently translated at 100.0% (364 of 364 strings)

Co-authored-by: Andras Timar <andras.timar@collabora.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/de/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/fr/
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: Ieacae070522d77e4e43a7ee0f8cd8c8db9ad098e
2021-01-04 08:37:11 +01:00
Matthaiks
efa33a5201 Translated using Weblate (Polish)
Currently translated at 100.0% (364 of 364 strings)

Co-authored-by: Matthaiks <kitynska@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/pl/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ia749956e5457ab87f23269896e45669d16a9ce4f
2021-01-04 08:37:11 +01:00
Martin Srebotnjak
8de7cbaf45 Translated using Weblate (Slovenian)
Currently translated at 100.0% (5 of 5 strings)

Co-authored-by: Martin Srebotnjak <miles@filmsi.net>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/code-welcome-text/sl/
Translation: Collabora Online/CODE welcome text
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib1483e725bcd3af23367dee5c6bebc9a760c1740
2021-01-04 08:37:11 +01:00
日陰のコスモス
5c19461847 Translated using Weblate (Japanese)
Currently translated at 43.9% (47 of 107 strings)

Translated using Weblate (Japanese)

Currently translated at 52.7% (220 of 417 strings)

Translated using Weblate (Japanese)

Currently translated at 63.1% (230 of 364 strings)

Translated using Weblate (Japanese)

Currently translated at 60.9% (222 of 364 strings)

Translated using Weblate (Japanese)

Currently translated at 28.0% (30 of 107 strings)

Co-authored-by: 日陰のコスモス <baffclan@yahoo.co.jp>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/android-app/ja/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/help/ja/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/ja/
Translation: Collabora Online/Android app
Translation: Collabora Online/Help
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I573cace9c336d81204614c1789b08ef1688c42c1
2021-01-04 08:37:11 +01:00
Pranam Lashkari
2a56af7958 leaflet: use new view comments icon in topbar
this icon was added to writer but was missing in impress and calc

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I032f5430cd96cc66501aa813df2dd06f6aa4d7a6
2021-01-03 22:12:26 +05:30
Pranam Lashkari
4bf0302a78 cypress: fixed test and enabled missing test for annotation
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I8c1b4e6a679f31b9ebfa814b67f18b25eab3d2be
2021-01-01 16:10:59 +01:00
Pranam Lashkari
9e2b9f8972 cypress: modified annotation tests to work with comment wizard
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I25ff9c590aa12d1787d8966cc4f68151ed8d505f
2021-01-01 13:18:10 +01:00
Pranam Lashkari
1859e66543 leaflet: avoid creating child comment when possible in wizard
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ibd9b04c1f275adb8e2fd0429e1bef3adb1916e0b
2021-01-01 08:35:43 +05:30
Tamás Zolnai
c29ed235ba cypress: improve moveCursor() helper method.
View also jumps with cursor movement, so we can't be
sure that the vertical/horizontal pozition actually
increase / decrease. Better to test only that the position
was changed.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I2358348c3f6d4f2278eff4e2db4a8409bc86b25a
2020-12-31 18:53:26 +01:00
Tamás Zolnai
dd22bde4d9 cypress: php-proxy: this workaround is not needed anymore.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I2d74a30aa177051a0faf4c8f946779c2389a8d34
2020-12-31 18:53:26 +01:00
Pranam Lashkari
65ceaa0a55 leaflet: moved undo handler for text in TextInput.js
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ifa368ac45e32183c1c0e242be44131afd995d0ce
2020-12-31 16:58:01 +05:30
Pranam Lashkari
47a548a8a5 leaflet: add mousewheel handler only in desktop
this caused problem in mobile while adding comments

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I8923fdec4b09a6d7c8c8bc6f248d1ca671fd252c
2020-12-31 12:47:45 +05:30
Tamás Zolnai
ae7e93144f update cypress: 5.6.0 -> 6.1.0.
Test code needs an update because .should('not.be.visible')
does not pass on non existing elements anymore.

Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: If8a89d2996d154d287672dacb3668ec5399d99f2
2020-12-30 19:49:42 +01:00
Tamás Zolnai
63ee524010 cypress: disable welcome dialog via loolwsd config.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I15c060e5eac1993116828dfaefe8916030fe2b63
2020-12-30 19:49:42 +01:00
Pranam Lashkari
dd6ee044e7 leaflet: don't create container for frame in mobile wizard
problem:
creating an additional container for frames causes problem in wizard
while trying to go level up because changing level depends upon
finding the sibling of the current not and making them visible or invisible
having extra container breaks this relation

in addition not creating an additional container does not affect anything visually

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I5f6342febcf444c71eef964da5585e5f73ae367e
2020-12-30 15:07:26 +01:00
Andreas-Kainz
81a5d029e0 NB shortcuts-bar vertical alignment update
Signed-off-by: Andreas-Kainz <andreas_k@abwesend.de>
Change-Id: Ia93ff33742d16417a2a325ffcf649b2ca3499e23
2020-12-29 17:39:54 +01:00
Ashod Nakashian
01138d7ae0 wsd: save errno before invoking any other functions
Most C and Posix API clobber errno. By failing to save
it immediately after invoking an API we risk simply
reporting the result of an arbitrary subsequent API call.

This adds LOG_SYS_ERRNO to take errno explicitly.
This is necessary because sometimes logging is not done
immediately after calling the function for which we
want to report errno. Similarly, log macros that log
errno need to save errno before calling any functions.
This is necessary as the argements might contain calls
that clobber errno.

This also converts some LOG_SYS entries to LOG_ERR
because there can be no relevant errno in that context
(f.e. in a catch clause).

A couple of LOG_ macros have been folded into others,
reducing redundancy.

Finally, both of these log macros append errno to the
log message, so there is little point in ending the
messages with a period.

Change-Id: Iecc656f67115fec78b65cad4e7c17a17623ecf43
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-12-29 11:40:17 +00:00
Szymon Kłos
d4c8378782 Revert "NB update: calc file tab: bottom align labels"
This reverts commit 6cceee7e43.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I641487f7325f1e8ce439db479bccc072682ae3de
2020-12-29 11:33:33 +01:00
Szymon Kłos
1aa90ad787 Revert "NB: Update writer and impress file tab according to calc #1080"
This reverts commit d9cadd1259.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I91e1420e28030e6e30177c290de8afdcaee9355e
2020-12-29 11:33:33 +01:00
Pranam Lashkari
e7718ebc7b leaflet: prevent entering non numeric value in spin field
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I78403b489f8057b3131e1ccc1cbeef74377bedc4
2020-12-29 11:15:22 +01:00
Pranam Lashkari
ea3d78c9bf leaflet: avoid keyboard suggestions after undo/redo
problem:
undoing something on mobile does not trigger any input method
this causes problem in mobile working with suggestions
i.e: type "than" and then select "thank" from suggestion
now undo and then again select "thanks" from suggestions
final output is "thans"
this happens because undo doesn't change the textArea value
and no other way to maintain the history
So better to clean the textarea so no suggestions appear

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Idfdfd8acfa6d738bf695a473610d399b123e7019
2020-12-29 10:50:54 +01:00
Tamás Zolnai
09fbbf43b0 cypress: extract clean-up code into a function.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: I572b164f89023cd66fca2d392b830417eb6a9d74
2020-12-29 10:42:51 +01:00
Tamás Zolnai
5ebbe451e0 cypress: simplify run_iteratively.sh script.
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Change-Id: Ibdecf2a70d83a4ef4b021657b3238951d7bbd3b2
2020-12-29 10:42:51 +01:00
Szymon Kłos
26ea341b7d notebookbar: hide non-async dialogs in graphic tab
Change-Id: Idb3dda5152c2baf7e967dccbbd442675c7d6a5e9
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2020-12-29 10:09:31 +01:00
Henry Castro
8a768e6554 test: makefile: fix build builddir!=srcdir
fatal error: test/lokassert.hpp: No such file or dire
ctory
   17 | #include <test/lokassert.hpp>

Change-Id: I935cc4e0afd6862469d27b3d2620dfa83e38ef69
Signed-off-by: Henry Castro <hcastro@collabora.com>
2020-12-28 15:07:35 -04:00
Ashod Nakashian
0072a4080e wsd: test: log timeout better
Change-Id: I3643a2bad8611d1f6402615435295717eb2e93c1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-12-28 12:04:53 -04:00
Ashod Nakashian
2edbf1c5e1 wsd: test: check if a WS Close Frame message exists
The text message in the WS Close Frame is optional.
Here we actually copy the remaining data after parsing
the status code, not assuming it exists or that the
status code was exactly 2 bytes (although in a well-
behaving WS implementation it always will be 2 bytes).

Also, no good reason to wait a full second between
socket reads in getErrorCode. However a small sleep
seems sensible to avoid logging "got 0 bytes" or so.

Change-Id: I162dfb0dd3ebf615a3e8e237006883388b9ff494
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-12-28 12:04:53 -04:00
Ashod Nakashian
d2e29d592a wsd: test: httpcrashtest drain using the getErrorCode helper
Reading the messages using a different helper means
we may miss (=consume without checking) the close frame.

Change-Id: I93a529723ba8d2b516319d54496c56c7e6d7da27
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-12-28 12:04:53 -04:00
Ashod Nakashian
96c9e03b88 wsd: test: catch and fail WSD tests when exceptions are thrown
Change-Id: Ifaabb6387d86c5a80e00cd5de34093520a1e9d66
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-12-28 12:04:53 -04:00
Ashod Nakashian
39e69e8168 wsd: test: improved UnitWOPIDocumentConflict
This adds proper phases instead of arbitrary
sleeping and similar workarounds. Also,
each phase documents what it expects, so
debugging failures are now self-explanatory.

Change-Id: Id51f4c285c5cf98aceba3415f0ffe14bd7605acc
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-12-28 12:04:53 -04:00
Ashod Nakashian
b3366cfef0 wsd: test: better logging in WopiTestServer
Change-Id: I8e33172d5c474c1d56e0af214f7a6281510d0836
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-12-28 12:04:53 -04:00
Ashod Nakashian
7972ded44f wsd: test: log test assertions
Change-Id: Ibf9274b1812f70f54ccd4e7be991b08a11f36c86
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-12-28 12:04:53 -04:00
Ashod Nakashian
64251966d5 wsd: test: use LOG_TST in new-style tests
Change-Id: I0d4558d44bc6cb92ba820ae8471d7ed2528277fc
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-12-28 12:04:53 -04:00
Ashod Nakashian
3b4add03ef wsd: test: store the current test name in UnitBase
Change-Id: Iaf521f6a99dcd6e6465769aed7f3757332e04f7d
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-12-28 12:04:53 -04:00