Commit graph

13396 commits

Author SHA1 Message Date
Tor Lillqvist
353b7e93c1 Fix various problems in handling of non-BMP code points
Our existing function getValueAsCodePoints() returns an array of
integers that are Unicode code points, as its name says. (Code points
can be larger than 65535, especially for emojis and interesting
scripts). It does not return an array of UTF-16 code units (which are
always less than 65536).

Still, the code used the JavaScript function String.fromCharCode() on
the elements of the returned array. That function expects UTF-16 code
units, and it simply truncates the argument to 16 bits. This obviously
leads to very wrong results.

There is a function String.fromCodePoint() that would work, but it
isn't present in MSIE so we can't use it. Instead, introduce a new
function codePointsToString() that works properly, producing surrogate
pairs as necessary.

Additionally, the code in getValueAsCodePoints() that combines a
surrogate pair to a code point used 0x100000 instead of 0x10000. Had
this code been tested at all, one wonders.

Also, add some more debug output to the affected functions, bypassed
with if (false).

Fixes https://github.com/CollaboraOnline/online/issues/733

Change-Id: Id50d05ac95285edc93f1e3f5a2538a0732186476
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2020-11-27 11:34:37 +02:00
Tor Lillqvist
702519549e Attempt to fix the "Copy Hyperlink Location" for desktop and Android browsers
This undoes the plumbing change in
0752631deac1e427294ebec932be6624df220452 for desktop and non-iOS mobile browsers.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I3452f18ec005a44c06ec7e4d17ede111c7c7e4c0
2020-11-27 11:33:23 +02:00
Miklos Vajna
a4becf39ab g backport: fix a temp file leak
And make the pull request query a bit more generic, so this can be
reused for other repos as well.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ic231367bcf50f86b41430b48f752bb05d4e8d25f
2020-11-27 10:16:13 +01:00
Miklos Vajna
947781ddd6 g backport: add a subcommand to easily backport all commits of a PR
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ie48782075d7ebed245577ae1c0db63bc557fa57a
2020-11-26 17:13:07 +01:00
Pedro Silva
e6a54cf5cb Toolbar-down: menu: display scroll only when necessary
- do not use horizontal scroll

Signed-off-by: Pedro Silva <pedro.silva@collabora.com>
Change-Id: I1ed11035188c93f7539eb2c031c5d180d6587977
2020-11-26 17:10:02 +01:00
Pedro Silva
56e2b1dc28 Sidebar: avoid using two sidebars by fixing bottom position
- set a fixed bottom position only when on calc (due to tabs)

Signed-off-by: Pedro Silva <pedro.silva@collabora.com>
Change-Id: I9f98cdc65e83c06da814fe7b89b43ebbe6760f40
2020-11-26 16:12:51 +01:00
Henry Castro
b6cdaa9284 loleaflet: update the document container when the size changes
Always call resize update when sidebar modifies the document
the size values, this will cause internal events to update the
document bounds, zoom, etc.

Change-Id: If8efce4b08b96e6156a87f69fe6188cf9d75f5d5
Signed-off-by: Henry Castro <hcastro@collabora.com>
2020-11-26 10:13:30 -04:00
Pranam Lashkari
af01832b82 leaflet: correct grammatical error
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Iad1cb19b68399e33cb852ceef4f5639ff2b52cab
2020-11-26 19:25:19 +05:30
Pranam Lashkari
4f01c11dad leaflet: provide easy way to rearrange calc sheet
new options added:
move sheet left
move sheet right
move/copy dialog (desktop online)

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Idd4857b9b36b09d549909330bd75dd385daeaaf3
2020-11-26 19:23:54 +05:30
Tamás Zolnai
94c7c23f31 cypress: don't use togglemergecells as an indicator here.
It's state is inconsitent and so it fails randomly.

Change-Id: Icd84d618fc87e64228918ad2e6e1ac602eac0e05
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-26 14:48:24 +01:00
Henry Castro
bff84f8b7c loleaflet: fix "offsetWidth" property value of the sidebar panel
Unfortunately when show/hide sidebar the "offsetWidth" property
works only if the element is visible otherwise it returns parent
empty size.

To fix add temporary a visibility property, then obtain the sidebar
"offsetWidth" property and update document container size.

Change-Id: I8e1c821518a4c155340edcfc8f2313098edff8b0
Signed-off-by: Henry Castro <hcastro@collabora.com>
2020-11-26 08:41:45 -04:00
Rash419
725cbe6457 admin: added vex-dialog in admin panel when WSD shutdowns
Signed-off-by: Rash419 <rasheshpadia419@gmail.com>
Change-Id: I16f9a2a55b7b17fe10ae14266c7db574bd2751ac
2020-11-26 17:21:45 +05:30
Szymon Kłos
4c5bf4f116 jsdialog: implement grid control for dialogs
Change-Id: Iaa2724a468edaa2837fc3d9c26e4fba6b55a30df
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2020-11-26 12:15:43 +01:00
Szymon Kłos
5fb19bf156 jsdialog: move build JSDialogBuilder -> MobileWizardBuilder
Change-Id: Ib1e6d9163b2806c020ff6a85f426d41a95831965
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2020-11-26 12:15:43 +01:00
Szymon Kłos
b71ebc0011 jsdialog: make MobileWizardBuilder a separate thing
We need JSDialogBuilder to be a common class for other builders.
MobileWizardBuilder will handle mobile specific cases only.

Change-Id: Icff024fe70d0e5386c92bdd106b6db2e74a584b5
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2020-11-26 12:15:43 +01:00
Szymon Kłos
e07423213e jsdialog: accept direct boolean values
Change-Id: I87c83a22497a385793c63eed283e037aa632c424
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2020-11-26 11:33:39 +01:00
Tamás Zolnai
33c3e062f1 cypress: fix-up some writer tests.
It's not consistent, that we have a cursor
after stepping into editing mode.

Change-Id: I316c2399776535aaa12a40edb4686a9b02c16c4a
Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2020-11-25 18:04:49 +01:00
Andras Timar
95a7020155 remove untranslated welcome files
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ia947b2509a65d98535bd7c15894f6a7151b61207
2020-11-25 16:58:09 +01:00
Yunusemre Şentürk
e20e65d91a Android: Change target SDK version 28 -> 29
Signed-off-by: Yunusemre Şentürk <yunusemre@collabora.com>
Change-Id: Iad612e973ffb4a8851c6d0e657ff124a32b42828
2020-11-25 07:27:30 +01:00
Andras Timar
19f9492883 loolwsd-systemplate-setup requires cpio
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I427b834336019d11186ede1dc70ede777dc80e11
2020-11-25 07:26:44 +01:00
Pranam Lashkari
fcbc35eb7a leaflet: use crosshair cursor for autofill marker in calc
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ib6980d284d5f1b22337320271106cad0bd0744d2
2020-11-24 16:18:27 +01:00
Pranam Lashkari
47e142e278 leaflet: fixed menu entries being overlapped by menubar
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I38f8b6db97ca91901657b1738a87b4e40c2083a4
2020-11-24 15:24:51 +01:00
Thais Vieira
29588ee18b impress/cypress: add tests for highlight color.
Signed-off-by: Thais Vieira <thais.vieira@collabora.com>
Change-Id: I074c397ad6fe68a0841dc71c8465b760ac644eb7
2020-11-24 14:20:13 +01:00
Szymon Kłos
992a0bc8f3 autofilter: use last position if new not set
Change-Id: Ic564ab88f46d521227cb375b0c8d394a3ed77d5d
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2020-11-24 13:01:16 +01:00
Szymon Kłos
f60acb87b8 autofilter: support submenu for custom sort
Change-Id: I824c209d645c215db7435c0925dcb0e340c47fa3
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2020-11-24 13:01:16 +01:00
Szymon Kłos
63e3ea0de4 jsdialog: make dialog draggable
Change-Id: I8c59f021a9039844ff6c6a534dd0c5c205e75f4c
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2020-11-24 13:01:16 +01:00
Szymon Kłos
681247f8ab jsdialog: handle dialog close using titlebar button
Change-Id: I66fd092ed6bad688671a0205e866dc82d6968415
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2020-11-24 13:01:16 +01:00
Szymon Kłos
db9390d2d9 jsdialog: drag and drop support for treeview
Change-Id: I077037986b4c527254b85ab7169e088042f197d7
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2020-11-24 13:01:16 +01:00
Szymon Kłos
0a92464615 jsdialog: implement frame widget for desktop
Change-Id: Ib42b33f0c44585f756bf141c09293348fcaa786d
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2020-11-24 13:01:16 +01:00
Szymon Kłos
b6ef56e822 jsdialog: implemented expander widget
Change-Id: Ic790195a28b47d1ac8aca6082a0d133d3e548992
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2020-11-24 13:01:16 +01:00
Szymon Kłos
a6d8a19830 jsdialog: build also empty treelistbox
Change-Id: I1d00e057a29c2374f83af6cb6edfcfd93a5e701f
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2020-11-24 13:01:16 +01:00
Szymon Kłos
4fa83a4761 jsdialog: create container for desktop dialogs
Change-Id: I68bc6f5afeccdf2642e117d59ac17fe5e83e5824
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2020-11-24 13:01:16 +01:00
Szymon Kłos
2bd82fe0a6 autofilter: position according to calc input bar
Change-Id: I0bbfd2a925982c6759be95f9322e30776ceecd74
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2020-11-24 13:01:16 +01:00
Szymon Kłos
984d8ac954 jsdialog: use placeholder for edit fields
Change-Id: I7b38aadada3942e046969325a903ca283477d476
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2020-11-24 13:01:16 +01:00
Szymon Kłos
0cace5161f jsdialog: implement treeview widget
Change-Id: I8eaebf2090dc1da1849ef6e64712ef9f23c2a6b0
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2020-11-24 13:01:16 +01:00
Szymon Kłos
7b82f9a9b4 jsdialog: handle autofilter dropdown
Change-Id: Ib47185359526f030a80aa9f7d7f9ef6e2ab93b34
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2020-11-24 13:01:16 +01:00
Michael Meeks
5fb3a7d8bd Remove obsolete locking and conditions around MessageQueue
Should no longer be needed since the unipoll transition.

Change-Id: Ie534cad7da0cfa54099175a86bc28dd16c738890
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2020-11-24 12:32:45 +01:00
Pedro Silva
5f1b5b518b Toolbar-down: zoom select flip arrow when opened
Signed-off-by: Pedro Silva <pedro.silva@collabora.com>
Change-Id: Iac717395eb7012815b2bd9b5448ad40ced76d471
2020-11-24 12:13:19 +01:00
Pedro Silva
9adb5095c7 Toolbar-down: fix Selectors inconsistencies, make arrows react (flip)
Signed-off-by: Pedro Silva <pedro.silva@collabora.com>
Change-Id: Ie42c11a4a63d4e9f467b65ee71a9178f695d4479
2020-11-24 11:21:23 +01:00
Ashod Nakashian
d4857b603b wsd: cleanup temp incoming directories after use
The temporary directories created for convert-to
and insertfile are used only once and should be
cleaned up to avoid clutter.

We also de-poco the temp directory creation as
it doesn't add value and do a bit of cleanup.

Change-Id: Ie1fd5b4749788ff4407f2cc886d405258f65f97a
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-11-23 21:29:34 -05:00
Ashod Nakashian
fad4222a2a wsd: move convert-to docs into the jail
We now download the convert-to files into the
child-root/tmp directory and then move it into
the jail that will convert it. This way ownership
and cleanup become contained within our child-root
and jail subsystems. This reduces the chances of
leaking convert-to files and simplifies the design.

In addition, we avoid an extra file copy and improve
the security of the convert-to API.

Change-Id: I450c24d0d0dc0da447c8072b0701c3b48d07c81b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-11-23 21:29:34 -05:00
Thais Vieira
51649f3699 impress/cypress-test: added test for font color.
Signed-off-by: Thais Vieira <thais.vieira@collabora.com>
Change-Id: Iea532287eec0f55ba09d45298f2f904753088ba6
2020-11-23 15:44:16 +01:00
Andras Timar
75947daccc docker: RHEL8: Install cpio (missing dependency needed by loolwsd-systemplate-setup)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I0224e3bcabf84fb44e5ec9937bd0e765f5a64324
2020-11-23 15:22:28 +01:00
Szymon Kłos
476038d4ea Make notebookbar tabs pannable on tablets
Change-Id: I319c4bc613adcf7d00a8c51e51cfa55ede25c7ec
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2020-11-23 14:42:29 +01:00
Szymon Kłos
8bacb93ed6 Reload annotations after idle/reconnect
Change-Id: If124eced58e012720f26030dd27b8f432a9b9081
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2020-11-23 14:42:29 +01:00
Szymon Kłos
30904ec859 clipboard: use input fields if active
Change-Id: Ic6c84681d79af936c3f2e9d0ca983ecbb100e6fb
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2020-11-23 14:42:29 +01:00
Szymon Kłos
dedcde3217 Prevent flickering on annotation switch use
When scroll down button was used the view was jumping
on every use what caused flickering.

Change-Id: I16de0e9d01c9d025977edc6affc16de4bd098b49
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2020-11-23 14:42:29 +01:00
Szymon Kłos
86c16392b8 Accept changes tracking entries in context menu
Change-Id: Ic7700f32ab93e0150ad2242dd178a767c9e1d109
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2020-11-23 14:42:29 +01:00
Szymon Kłos
c6515621a9 notebookbar: add conditional formatting submenu
Change-Id: Ife366608c5605f96995e95a12352e4e70d4b04bb
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2020-11-23 14:42:29 +01:00
Ashod Nakashian
f60753a951 wsd: misc cleanup
Change-Id: Ief6cbc40ef2f7d98b0b76477109332676dab45b2
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-11-22 22:26:36 -05:00