Commit graph

18324 commits

Author SHA1 Message Date
Ashod Nakashian
6259be6fbe wsd: better logging of unix socket binding
No need to complain when bind() didn't fail.

And assert when/if we are going to overflow.

Change-Id: I66f5ff1963c0afc6652afb5a7d017e197d945736
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-06-07 09:09:00 +01:00
Ashod Nakashian
5bdd977410 wsd: simplify socket read logging
Change-Id: I083b86d6c8e6e2b3dc7b14836409281792d7b0bf
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-06-07 09:09:00 +01:00
Ashod Nakashian
3b9cc13b7a wsd: improved socket logging
More consistent logging of the socket FD.

Change-Id: Iee24ad4eb067969abfc06f78a768563351d264c7
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-06-07 09:09:00 +01:00
Ashod Nakashian
f43adb76ae wsd: make socket FD log prefix implicit and cleanup logs
Change-Id: I873d19b8d4149b85f2116d363301afea1aa0b2fd
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-06-07 09:09:00 +01:00
Rash419
f890e2102d browser: contentcontrol: improve picture contentcontrol to work when there is no integration
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ia53b4332d0e62166cb8f6e9d31f1abdb81bf4594
2022-06-07 08:55:30 +02:00
Rash419
9d06f8d5cc cypress: re-enable impress/table_operation_spec.js
modify the test to use 2x2 table when testing 'insert column before/after' tests
no idea why we don't get svg when there is 3x2 table

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Id927fede691c4483206fa2b65c450f11cc980581
2022-06-06 15:48:08 +03:00
Michael Meeks
55a47214d1 stress: account for the size of each message.
Change-Id: Ie94add7197672106a2c0684405a1b15c307470e4
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-06-06 09:58:15 +01:00
Ashod Nakashian
98ae362e91 wsd: handle socket closed on read better
A corner case where read doesn't return 0
on a closed socket can result in a stuck
state where we attempt to read when we
do get ECONNRESET (which we didn't check
on reads).

This makes the interface of readIncomingData
the same as writeOutgoingData by returning
the actual return value of the read syscall.

So now we handle both return 0 as well as
error codes returned on failed calls.

The logic hasn't changed, just that now
we handle errors better and similar to the
write case.

Change-Id: I0b38a63da4e6c92a482948478d5d8d446e0b8b58
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-06-03 20:16:59 -04:00
Pranam Lashkari
0b73614cfb ignore if comment is selected while pasting
if comment is selected but is not in editing,
proceed to normal pasting in document

problem:
while pasting content multiple times with comment,
previously pasted comment stays selected and can't further normally

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ia594c725f4fe7108d6aea1591d88b2c306202be3
2022-06-02 18:20:47 +03:00
Luboš Luňák
f84e758ebc use the more efficient getSelectionTypeAndText()
Otherwise calling getSelectionType() first and then getTextSelection()
creates the XTransferable2 twice, and then possibly converts it
to the text format twice, which may be expensive.

Also some cypress tests use selectEntireSheet() and then check
the clipboard contents, which with the switch to 16k columns in Calc
may be slow enough in debug builds when done twice to time out
the test, and this helps a bit there.

Signed-off-by: Luboš Luňák <l.lunak@centrum.cz>
Change-Id: If166f67c216281d32dbb1d3e10b51177b42a9668
2022-06-02 15:44:19 +02:00
Andras Timar
154a177979 Update l10n files for Weblate
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I65062d5ba390acaea87a8cc98771acb23e6bd1fd
2022-06-02 12:18:22 +02:00
Sveinn í Felli
e20a6d80a5 Translated using Weblate (Icelandic)
Currently translated at 100.0% (447 of 447 strings)

Co-authored-by: Sveinn í Felli <sv1@fellsnet.is>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/is/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ia54d9fa6d2fe499f1ac64fecfa12c73109cb5831
2022-06-02 12:13:11 +02:00
SC
5899ca7f1a Translated using Weblate (Portuguese)
Currently translated at 100.0% (447 of 447 strings)

Co-authored-by: SC <lalocas@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/pt/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: If188b31aeebc99c8d8294ca1670aeb79efe0507c
2022-06-02 12:13:11 +02:00
Adolfo Jayme Barrientos
17751ffe32 Translated using Weblate (Spanish)
Currently translated at 100.0% (447 of 447 strings)

Translated using Weblate (Catalan)

Currently translated at 99.7% (446 of 447 strings)

Translated using Weblate (Asturian)

Currently translated at 49.6% (222 of 447 strings)

Co-authored-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/ast/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/ca/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/es/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I2b2ca372ee7d4ed3d1ee05077ebad9ecc465a540
2022-06-02 12:13:11 +02:00
Ayhan Yalçınsoy
aa44c3184c Translated using Weblate (Turkish)
Currently translated at 100.0% (447 of 447 strings)

Co-authored-by: Ayhan Yalçınsoy <ayhanyalcinsoy@pisilinux.org>
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: Iaf5c8a2f8753fce9909ed19b15b3df28f8b85cb6
2022-06-02 12:13:11 +02:00
Ihor Hordiichuk
1b0e6d4928 Translated using Weblate (Ukrainian)
Currently translated at 100.0% (447 of 447 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: I1f5c56965a3d2f065992ca847e1bc684bfade274
2022-06-02 12:13:11 +02:00
Martin Srebotnjak
3bfdfc8db1 Translated using Weblate (Slovenian)
Currently translated at 100.0% (447 of 447 strings)

Co-authored-by: Martin Srebotnjak <miles@filmsi.net>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/sl/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Id906e228ed763edbec424c84a3af1161563ef26c
2022-06-02 12:13:11 +02:00
Matthaiks
6a9515cda6 Translated using Weblate (Polish)
Currently translated at 100.0% (447 of 447 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: If5c7a9df0d5f26de6777fdb12cc628ccfd8993d0
2022-06-02 12:13:11 +02:00
Andras Timar
daac68e4c3 Translated using Weblate (Hungarian)
Currently translated at 100.0% (447 of 447 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: I525abc85aebbc5987e07391dd3b590c6c7b86cd9
2022-06-02 12:13:11 +02:00
Yaron Shahrabani
93b1668628 Translated using Weblate (Hebrew)
Currently translated at 100.0% (447 of 447 strings)

Translated using Weblate (Hebrew)

Currently translated at 99.7% (446 of 447 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: Ib31ef778fdf841f6c5d98c2b3112b052dcf053d2
2022-06-02 12:13:11 +02:00
Nathan
fb365b82dd Translated using Weblate (French)
Currently translated at 100.0% (447 of 447 strings)

Co-authored-by: Nathan <bonnemainsnathan@gmail.com>
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: I40dacb31ae6a84045cd808e91ce78eb8823b656f
2022-06-02 12:13:11 +02:00
Szymon Kłos
1351f142a2 welcome: temporarily use only local welcome dialog
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Iade402db7fcb8ee7d58dc539ae99f49be20d697d
2022-06-02 12:11:03 +02:00
andreas kainz
334160bb51 calc formularbar use var colors for input elements for dark mode
Signed-off-by: andreas kainz <kainz.a@gmail.com>
Change-Id: I0bee881aafb52d86641243f3e614ffd60427d198
2022-06-02 10:49:02 +01:00
Gökay Şatır
9e5b8cc943 testing the cherry-pick bot.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: Id7a0acaa3aefdcde4a0cf65ccbbf133ac9510a67
2022-06-02 11:01:52 +03:00
Miklos Vajna
a17894dbd7 fuzzers: avoid setcap
fuzzers use the code as a library, so we don't produce binaries like
coolwsd in such a config, leading to:

	Failed to set capabilities on file `coolforkit' (No such file or directory)

when building from scratch.

Just disable setcap in the fuzzers case, it's fine to not have these
binaries.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I178ec7d8fa4d582e5d7289764a6ce2227c049205
2022-06-01 16:27:46 +02:00
Rash419
08969b843e browser: contentcontrol: added picture type
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I8ba68253954c9b2052a864c61923d376220861f0
2022-06-01 15:33:47 +03:00
Rash419
0e12c85fc9 browser: contentcontrol: added dropdown type
- added a new menu button 'form' in classic and tab button in notebookbar for content control

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ibe06667de39199fd2541fa70ced3ff879274366d
2022-06-01 15:33:47 +03:00
Szymon Kłos
1761e703f9 jsdialog: use correct codes for shortcuts CTRL + char
we should do the same for other modifiers: shift, alt

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I75933194aee82589c787c8c31cc47b66e96e2066
2022-06-01 14:14:32 +03:00
Michael Meeks
3e32d3d4d2 perf: better identical run copying while un-pre-multiplying.
Change-Id: I8958e9a072026e8c06c820dc1ab74b44bf12d87b
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-31 19:06:28 +01:00
Michael Meeks
ec6431b088 deltas: 64bit copy & CRC for twice the construction speed.
Change-Id: I568abed80c1e571e7a65370b7b4b1049f52ab0b4
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-31 19:06:28 +01:00
Michael Meeks
647d2fd708 deltas: allocate a single chunk of pixels, instead of lots of rows.
Avoid std::vector and its peculiarities, also store the crc so
that we get the perf. win from it.

Change-Id: If39ab01b5b987d707d1712076ae9a5beb32b36c2
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-31 19:06:28 +01:00
Michael Meeks
f2df5d5ff0 deltas: re-factor deltaToDataDelta into DeltaData constructor.
cleanup accessor too.

Change-Id: I7db28780cc3394bc74f9967a1e2c2bbe0e01089c
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-31 19:06:28 +01:00
Pranam Lashkari
e5651d0e1c annotation: unselect comment when cell cursor moves
problem solved:
some times when cell cursor is moved using keyboard,
comments were not unselected,
which caused problems when copying cell which contains comment.
i.e: comments were pasted inside the cell as plain text

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I318c850c25956d210ef9acfa631a689a4d1a71c6
2022-05-31 16:04:59 +02:00
Miklos Vajna
4433e03492 client session fuzzer: try harder to empty SocketPoll::_newCallbacks on shutdown
The DocumentBroker dtor adds a callback:

	#0  SocketPoll::addCallback(std::function<void ()> const&) (this=0x377dce0 <Admin::instance()::admin>, fn=...) at ./net/Socket.hpp:773
	#1  0x0000000000947db5 in Admin::rmDoc (this=<optimized out>, docKey=...) at wsd/Admin.cpp:544
	#2  0x0000000000bb8192 in DocumentBroker::~DocumentBroker (this=0x61900000e690) at wsd/DocumentBroker.cpp:579

So even if the fuzzer called Admin::instance().poll() on shutdown, there
was one more callback inserted to the list later, leading to OOM in the
long run.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I0832d839b098407fa9e8aadb6f84388a85d62323
2022-05-31 15:10:51 +02:00
Michael Meeks
9ebffaa172 fuzz: cleanup constructors.
Change-Id: Ib70ad1ea7a8badd479cf3a254d5561b54088efaa
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-31 15:10:51 +02:00
Pedro Pinto da Silva
278d9cd8ec Form tab: Add missing icons for control actions
copied from core

Signed-off-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Change-Id: Ic22f4dd885094a268c755e1ebb60c157d775bf06
2022-05-31 10:49:27 +01:00
Michael Meeks
e71e78a479 perf: deflate optimize for speed not size for full tiles.
We have many fewer full tiles to compress - so we can
trade a bit of space for some speed. Really should use zstd.

Change-Id: I7c310608173c924f175154bf6f7abb43d5e6f08d
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-30 12:32:14 +01:00
Michael Meeks
39de4fcc8a perf: collect unusual logging code-paths somewhere else.
Change-Id: Ifa121bdcd054544a53934e41d7ea42a67bbc8a66
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-30 12:32:14 +01:00
Szymon Kłos
7ddd308a50 jsdialog: treeview keyboard support
- handle tab key
- handle enter key for entry selection
- change jquery into plain JS

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ia2f8d2d9c8c2dc52c75339c4f72734a5a3e770b7
2022-05-30 12:46:46 +02:00
Szymon Kłos
8174860cfa jsdialog: handle tab key in jsdialog popup fixes #4716
This added begin and end mark to the popup so we can detect
we are leaving the popup and we should close.

This prevents us from blocking the whole UI by focusing
map and typing before popup was closed.

Also close popup when server confirmed it should be closed.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I1a290e27dd7a14eca2cd3bb8368fee27255f51a8
2022-05-30 12:46:46 +02:00
Michael Meeks
7eb357544d Proxy: send explicit charset=utf-8
https: //github.com/nextcloud/richdocuments/issues/2196
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I4fce74290e8bf8a6681922a2165772933443703e
2022-05-30 11:32:27 +02:00
Pedro Pinto da Silva
85522f65e0 Formulabar: Make expander look like it's attached to input
Before the expander button was detached from input this in turn was:
- Making it hard to understand what that button will do
- Affecting the overall look and feel of the formulabar (different border-radius etc)

Signed-off-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Change-Id: Id17742aae8b09acd3bdcbffd05fe17181492322d
2022-05-30 10:27:35 +01:00
Pedro Pinto da Silva
4a62ae6e06 Formulabar: Fix unotoolbutton juggling
Add expand toggle class to parent and use it to align unotoolbuttons

Before, there was no way to know if the input was expanded or not by just looking at container
or any parent. thus, no way to fix alignments per MultiLine status

Signed-off-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Change-Id: Idddefc32812a3aab29ddb72c4d09bacd43b03287
2022-05-30 10:27:35 +01:00
Pedro Pinto da Silva
a892412d42 Formulabar: don't force img parent to be a certain size
some unotoolbutton was being set with the same same size as it's img child
 - There is not need to do this only for :not(.has-dropdown)
 - Make sure img has correct size, let parent element to adapt, no need to
 single out this case

Signed-off-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Change-Id: I1c3734a81cb01a0d15604a2b88148a0f883a59d1
2022-05-30 10:27:35 +01:00
Dekota Nelson
ac587371af Removed unused CSS related to old formulabar. Signed-off-by: Dekota Nelson nelson.dekota@gmail.com
Signed-off-by: Dekota Nelson <nelson.dekota@gmail.com>
Change-Id: I8de68b8c09410026716860ba7a097ce76dc6ae3d
2022-05-30 09:47:28 +01:00
Pedro Pinto da Silva
c3130ecc96 Formulabar: fix sc_input_window height (when collapsed)
Formula input window (textarea) had different height from address input
- Set it at the same height as seen in toolbar.css:211

Signed-off-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Change-Id: Id0fc3dfb0335183050eedc00036b85dbafe2d0b4
2022-05-30 08:21:53 +01:00
Pedro Pinto da Silva
d2f28a03be Fix formulabar width, use flex property
Avoid using percentages when we can already use the grow property
(it avoids different results across browsers)

Signed-off-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Change-Id: I262cfdf5d72313296620e3e522bfa97ab2b00ca5
2022-05-30 08:21:53 +01:00
Michael Meeks
30e6f08147 perf: merge deltas and keyframes into the same storage.
Simplifies and accelerates the code.

Change-Id: I56b661e566efd75e3ed46918a481c26ddd5ca4c4
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-27 22:01:24 +01:00
Michael Meeks
2f2b8fb2b1 TileData: write unit tests.
Change-Id: I6ce29952800cf43d95c5572201269839b5426eac
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2022-05-27 22:01:24 +01:00
Henry Castro
e91168fc9c welcome: modify to listen view list changes
In order to get the list users and identify if it
is a guest user to not show the welcome dialog.

Change-Id: I439f46dcfd3ea5b307059952f98f49a387158e24
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-05-27 15:36:48 +03:00