Commit graph

18033 commits

Author SHA1 Message Date
Ashod Nakashian
59a59f6de5 browser: make: remove duplicate .ts files from makefile
Change-Id: Iff5c26df9757f9dec18a4fcd3da464475f40e6a4
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-20 08:34:59 -04:00
Ashod Nakashian
2bf6f419a3 make: fail the build when the whitebox unittests fail
Change-Id: I2e4b483740eac67efffa96449347cc1453798b87
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-20 08:34:59 -04:00
Ashod Nakashian
b7b7801d8a wsd: remove identical simulateSocketError override
Since both implementations are identical, there
really is no benefit to having two version.

Change-Id: I4a5288243291c0d5706df8e8870b918fab425317
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-20 08:34:59 -04:00
Ashod Nakashian
92c6428e4b wsd: minor log improvements
Change-Id: Iea317ac1a04163d9eb45b8ac2b6d1c4f9f77009c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-20 08:34:59 -04:00
Ashod Nakashian
b4e8975fbe wsd: minor cleanup of send-frame members
Change-Id: Ic2268780ea815611bf978c0c779ef737facc73fb
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-20 08:34:59 -04:00
Ashod Nakashian
16617bee2d wsd: fallback only when COOLStatusCode is missing
Since the json parser logs an error when the
entry isn't found, parsing both LOOLStatusCode
and COOLStatusCode almost guarantees at least
one ERR log entry. We should only fallback
when COOLStatusCode isn't found and avoid
erroring when we got what we wanted.

Change-Id: Icace964820c250f4ceba98281e57cb7c29fbd118
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-20 08:34:59 -04:00
Ashod Nakashian
4c1a168757 wsd: remove argument default-value
Single-use default argument.

Change-Id: I1085465c0dbdf6cbda934277feca61781b67f45c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-20 08:34:59 -04:00
Ashod Nakashian
96adaa15d1 wsd: kill coolwsd_fuzzer
coolwsd_fuzzer predates actual fuzzing
with libfuzzer and is currently unsused.

Change-Id: Id095b165943ba14dbf525ddc607ad329f5d952d4
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-20 07:12:03 -04:00
Ashod Nakashian
6bc2d70dcb configure: choose the correct sanitizer library when fuzzing
We use -fsanitize=fuzzer-no-link when fuzzing is enabled,
but we fail to consider if other sanitizers are enabled.
It is usually the case that asan and ubsan are enabled
when fuzzing.

The fuzzing check is now done before the sanitizers
and the result is combined.

C++17 check is now improved and so are a few messages.

Change-Id: I44e36d19d77a47c21245b5fe9e690d860f91e84c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-20 07:12:03 -04:00
Ashod Nakashian
827d9518c0 wsd: make: build the fuzzer binaries only configured with fuzzing
This reduces the build time significantly while also
minimizing the disk-space requirements for builds.

When configured with --enable-fuzzers the fuzzing
target binaries are built.

Change-Id: Ia8560d876f548d04ac085503e55a3a5dca90f590
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-20 07:12:03 -04:00
Dennis Francis
e6f973e3e4 mocha-tests: fix build for CPointSet.test.ts
Signed-off-by: Dennis Francis <dennis.francis@collabora.com>
Change-Id: I8853995544c56c9a3bd522bacbf572bc1084cb17
2022-04-20 10:56:31 +05:30
Tor Lillqvist
dafe863c3a Make the TranslateId things compile against co-22.05
The ifdef conditions seems a bit over-complicated but as long as it
compiles it is good enough for me. I don't remember the details from
my earlier work on this.

Also move the inclusion of svtools/strings.hrc after the inclusion of
L10n.h so that TranslateId gets defined before it is used.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I9a1873dc3676c15c7fb4cde84c0e14bf56653443
2022-04-19 18:15:15 +03:00
Pedro Pinto Silva
f81d6e8853 GitPod: Update core assets url to 22.05
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I8c60a39588503011b526419c358d3b93f6f237ce
2022-04-19 15:32:43 +02:00
Pedro Pinto Silva
58ec3c55e6 Fix missing sparklines icon on notebookbar, format tab
Add iconAlias and avoid duplicating svg

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I4a14da88c9e97e5541d224c2d1f29a99df19a7f9
2022-04-19 15:14:56 +02:00
andreas kainz
0679f1a707 add insertsparkline colibre icon
Signed-off-by: andreas kainz <kainz.a@gmail.com>
Change-Id: I8389680b3a0da4101e966295451ca37b73358e4e
2022-04-19 12:49:49 +02:00
Tomaž Vajngerl
41cec73d00 add sparkline action to the menubar and notebookbar
Just a to make the sparkline actions accessible from the menu
and notebookbar.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: I80a483397184a8a9c0eb28048b3636ec91b95081
2022-04-19 12:46:51 +02:00
andreas kainz
bee7afdee4 Update welcome screen for smaler sizes and mobile
devices-mobiles.css
- rules for mobile wasn't needed
  everywthing is in welcome.css

welcome.css
- screen behind welcome dialog use --color-overlay
  as at every dialog
- no fixed width and height
  max-width and max-height was the old width/height
  width and height are now 95%
  dialog window was center justify
- content width is 96%
  when smaler than 500px padding was added to <p>
- fig get top an bottom margin
  so now all fig's have the same height
- hyperlinks use --color-primary
  and not underline
Signed-off-by: andreas kainz <kainz.a@gmail.com>

Change-Id: If921bc2abc3977930f7d60256d8011d8986a22c9
2022-04-19 11:41:44 +02:00
Mert Tumer
4d55ec5f30 fix firefox zooms in whole page on mobile
textarea focus makes firefox zoom in without
specifying viewport scale properties

Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: Iea5c0e61af14dc8f05319570f84681ca2b76aed1
2022-04-19 12:00:16 +03:00
Yaron Shahrabani
61f9641033 Translated using Weblate (Hebrew)
Currently translated at 69.5% (318 of 457 strings)

Co-authored-by: Yaron Shahrabani <sh.yaron@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/help/he/
Translation: Collabora Online/Help
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ide851c064556dde71620e0fc3189b64be33df2b8
2022-04-19 09:47:42 +02:00
Rizal Muttaqin
10de7b079e Translated using Weblate (Indonesian)
Currently translated at 99.5% (439 of 441 strings)

Co-authored-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/id/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I9a980debd9a220047f2896d18bd7539f7e2e2e3f
2022-04-19 09:47:42 +02:00
Alexander Gabilondo
6681525e6a Translated using Weblate (Basque)
Currently translated at 94.7% (418 of 441 strings)

Co-authored-by: Alexander Gabilondo <alexgabi@openmailbox.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: I9dea7801ccd953f461359a4eaba8db25208fe261
2022-04-19 09:47:42 +02:00
Sargon-Isa
dd14f2478b Translated using Weblate (German)
Currently translated at 100.0% (441 of 441 strings)

Co-authored-by: Sargon-Isa <Sargon_isa@hotmail.de>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/de/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Icd4dc20b250db8dde4cb2b4af082d9ede9a53800
2022-04-19 09:47:42 +02:00
Егор Ермаков
ff85c086e0 Translated using Weblate (Russian)
Currently translated at 100.0% (441 of 441 strings)

Co-authored-by: Егор Ермаков <eg.ermakov2016@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/ru/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I5044b3f04d2869ee12ad6d056ddeae7fa7d79b6c
2022-04-19 09:47:41 +02:00
Mert Tumer
22b5ccaa32 feedback dialog gets beyond the screen when keyboard is open
Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: I7360ee28d1bd4c5be7412344591029b7e18fbd9e
2022-04-18 17:34:09 +03:00
Mert Tumer
258eb91978 mobile: Dont react screen size change and cursor updates on feedback
Screen size changes reacts keyboard states also updates the cursor
overlay. We are already avoiding this for mobile wizard, we need to
do the same for feedback iframe popup

Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: Ic701847a1e81f672f9244f09e59b6fb8b5bc12d0
2022-04-18 17:34:09 +03:00
andreas kainz
e06d44f5f3 Notebookbar dropdown arrow is visible at hover
Signed-off-by: andreas kainz <kainz.a@gmail.com>
Change-Id: Idc294d215d7191f28ed6e4090ab5734d44e6bfe7
2022-04-18 11:56:03 +02:00
Mert Tumer
4d5cd2b54b cypress: modify writer/annotation_spec test
now we dont need to click on the collapsed comment
because now after insert comment they will be selected
already.

Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: Ica69e5a092f29896c1d872deb384d31b867dddc6
2022-04-18 10:22:31 +03:00
Mert Tumer
e696ea776e writer: scrollto selected annotation if it is not in the screen
comments can get beyond the screen in a long list of comments
when selected and we need to manually scroll to up to see
the actual position of the selected comment. we must auto
scroll to that position instead.

Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: If92e15839c0ff68cddf6558dccc8b6d113095d93
2022-04-18 10:22:31 +03:00
Mert Tumer
d84265bcf6 select freshly added comments if the author is the same
Among Long and crowded list, comments can get lost when they are added
unless we select it. When they are selected they are highlighted
on the same level of the annotated text.

Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: Id804dd26ce929f1db8f4b5ba05d5937c433e0018
2022-04-18 10:22:31 +03:00
Andras Timar
7bff2221a6 Do not display update infobar when the current version is higher (e.g. development version)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Id17c28535fe0d47518189da25582d540bd597b81
2022-04-15 17:51:53 +03:00
Gökay Şatır
4e42a34b96 Attempt to fix:
error: call of overloaded ‘basic_string(const Poco::Dynamic::Var&)’ is ambiguous

Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Ibaa77e94a8e12f1dbc38e40b14ce8184dafcd7bd
2022-04-15 17:32:41 +03:00
Tor Lillqvist
f98900c73c Add a remote font download feature
The coolwsd.xml file can now contain a URI of a JSON file on some
server that contains URIs of fonts. These fonts are downloaded to the
coolwsd server. Just like the remote configuration thing, the URIs are
checked once a minute and the JSON or the fonts mentioned in it are
re-downloaded if their contents has changed.

If a font has been removed from the JSON file then the corresponding
downloaded could be removed, too. But there is no way to remove it
from core without restarting the whole COOL server, so we don't
bother.

We need to put the font in such a place so that its pathname is the
same both in the ForKit process (outside any chroot jail) and in a Kit
process (inside its own jail(), because even if it is in the ForKit
process that we call the LO core vcl API to load a "temporary" font,
code elsewhere in LO core re-opens the font file later, naturally
using the same pathname, when it is needed (see
FreetypeFontFile::Map() in vcl/unx/generic/glyphs/freetype_glyphcache.cxx).

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: If78058ddff5ed05c7a82d7ea465a7a414fd0d861
2022-04-15 17:32:41 +03:00
Gökay Şatır
df17064597 Add a comment for window.app definition into global.js file.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I111eda6182235a307b40a297466a1fb4a74ad5bf
2022-04-15 16:37:51 +03:00
Gökay Şatır
7c6c16f46b Added validation feature for window.app object.
This provides possibilities of more reliable testing and debugging.
See the comments in "docstate.js" file.

Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I28ba2098cbe7e206f363fb2b0acbf5c5c2bf155d
2022-04-15 16:37:51 +03:00
Gökay Şatır
4f4c11a886 Moved window.app variable into its own file.
"socket" and "console" variables are used at initialization, so they are left in global.js file.

Debugging of window.app object's variables is now easier.

Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Ic2811ff45ce845cb32d15018eaa2fa9e140202d7
2022-04-15 16:37:51 +03:00
Rash419
9679c36432 jsdialog: in debug build added button in about dialog to open WidgetTestDialog
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ib525515f27640114f5d8bc83314b63f006893d37
2022-04-15 15:18:31 +02:00
Ihor Hordiichuk
2869e34439 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (441 of 441 strings)

Co-authored-by: Ihor Hordiichuk <igor_ck@outlook.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/uk/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I6769f19d1f5256869595da96bd764e45f1b27ec6
2022-04-14 23:26:49 +02:00
Oğuz Ersen
38840435a8 Translated using Weblate (Turkish)
Currently translated at 100.0% (441 of 441 strings)

Co-authored-by: Oğuz Ersen <oguz@ersen.moe>
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: Iab66268cfa79bce4dad967549288e25146a4d12e
2022-04-14 23:26:48 +02:00
Matthaiks
8aa249a1d4 Translated using Weblate (Polish)
Currently translated at 100.0% (441 of 441 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: Ibd1c4a963a7fabe6a51a5c0d907dbdaaf6627304
2022-04-14 23:26:48 +02:00
Andras Timar
2174ca693e Translated using Weblate (Hungarian)
Currently translated at 100.0% (441 of 441 strings)

Co-authored-by: Andras Timar <andras.timar@collabora.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/hu/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I723e2b0147f855f775fe463ecc7aeb1df03f54e3
2022-04-14 23:26:48 +02:00
Yaron Shahrabani
d6a11409a7 Translated using Weblate (Hebrew)
Currently translated at 100.0% (441 of 441 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: I512f9082d2263a414e821ab468aea15fd8759e94
2022-04-14 23:26:48 +02:00
William Gathoye
05629fd0ef Translated using Weblate (French)
Currently translated at 100.0% (441 of 441 strings)

Co-authored-by: William Gathoye <william+weblate@gathoye.be>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/fr/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I653287f3520c6d96a24c60871244873bde2e6bf7
2022-04-14 23:26:48 +02:00
Pedro Pinto Silva
5b0f95ace2 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (442 of 442 strings)

Translated using Weblate (Portuguese)

Currently translated at 100.0% (441 of 441 strings)

Translated using Weblate (Czech)

Currently translated at 100.0% (441 of 441 strings)

Translated using Weblate (Portuguese (Brazil))

Currently translated at 98.4% (432 of 439 strings)

Co-authored-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Co-authored-by: Pedro Silva <pedro.silva@collabora.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/cs/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/pt/
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: I72dfd49276dee8427404b63a1ae488df47e783aa
2022-04-14 23:26:48 +02:00
Andras Timar
8bb96008b4 Update l10n files for Weblate
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I3a4ec94762bbc4490bb73ea2395492b4d6c85990
2022-04-14 16:45:10 +02:00
Pedro Pinto Silva
4e5c3c68b2 Translated using Weblate (Portuguese (Brazil))
Currently translated at 97.0% (426 of 439 strings)

Co-authored-by: Pedro Silva <pedro.silva@collabora.com>
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: I1f1009230400718669e3078e2da21072247e43b1
2022-04-14 16:42:16 +02:00
Yaron Shahrabani
29ba8a4b53 Translated using Weblate (Hebrew)
Currently translated at 100.0% (439 of 439 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: I0e71e744567ad8dda23eb70a2963474145a85b22
2022-04-14 16:42:16 +02:00
Pedro Pinto Silva
4d8ac478f9 Improve group_download_as: Rename dropdown menu
Remove the `as` from `Download as` because in here we have a dropdown,
it is already clear that the component is not an action in itself but a
dropdown to trigger more actions. If this was not a dropdown but
instead a toolitem that triggers a dialog, such as `Save as`, then it
would make sense to include `as`, but that is not the case

Related issue:
https://github.com/CollaboraOnline/online/issues/4564

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I65de9570800756e026d20534a84d52c29d4f8bd1
2022-04-14 15:22:37 +02:00
Pedro Pinto Silva
1f18df450c Improve group_download_as: replace icon
As discussed in https://github.com/CollaboraOnline/online/issues/4564
the current lc_downloadas2.svg is quite different form the surrounding
icons
- Remove and use new download icon more similar to colibre theme

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I5808af8a50c1f8025b38502ba5fcd2db3f98c9d5
2022-04-14 15:22:37 +02:00
Ashod Nakashian
f6ca40b4fd wsd: do not close the socket while have data to read
The last burst of data arrives with POLLHUP.
If during the read we hit any errors, including
EAGAIN, for whatever reason, we may lose the
data if we don't attempt reading again later.

The only way to guarantee that we do not have
any more data to read, when we get POLLHUP,
is to poll until we either get no POLLIN or
read returns 0 indicating the socket is closed,

Oddly, read(2) sometimes returns 0 without
POLLHUP ever being set, and sometimes we
do get POLLHUP while POLLIN still set. This
implies that poll and read aren't consistent
in how they detect and report the close
condition. Luckily, with this patch we can
handle all cases without any complications.

This was caught through simulateSocketError,
which when it injects EAGAIN on the very
last read, when the socket is closed, causes
error as the response is partially or
completely lost (because we never read it).

The behavioral change should only be
observable with EnableExperimental.

Change-Id: I77260f98d5dd5050c5f9b202b9effd501191336b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-14 10:48:45 +01:00
Ashod Nakashian
622e0ddcb4 wsd: add and use isWritable helper in session
The new helper corrects inconsistencies in
detecting writable sessions and improves
readability.

A writable session is one that is either
not read-only or can change comments
(in PDFs, which are otherwise read-only
documents).

Also fixes a bug in reusing the last editor
session to save. The condition should've
been !isReadOnly(), since sessions used
for saving cannot be read-only. Indeed,
the last editor couldn't possibly have
been read-only by definition.

Change-Id: I9860be287057050eca692568d43f77371964f80b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-04-14 10:48:45 +01:00