Commit graph

16161 commits

Author SHA1 Message Date
Ashod Nakashian
0805eaf1bc loleaflet: Process the reconnection in _onSocketClose in a timeout.
We need to make sure that the message slurping processes the events
first, because there could have been a message like "close: idle" from
the server.

Without the timeout, we'd immediately reconnect, because the
"close: idle" was not processed yet by the message slurping.

Co-author: Jan Holesovsky <kendy@collabora.com>
Change-Id: Id3e27164fb00de69f661ba7580075b36100a03c1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
(cherry picked from commit e4d65426ee816d5b49f11b4ea5e7c49e464015a3)
2021-09-26 17:02:01 -04:00
Ashod Nakashian
c4fb58df61 wsd: allow new views while unloading
Unloading duration depends on the time to save
and upload the document, during which a new view
might be opened. We now allow aborting the unloading
and resume reusing the document as-is.

Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
(cherry picked from commit 8f299eb2cdfe0ef869a8c90fbc602a93ba2fcb73)

Change-Id: I7bc485177929c0d1c9ef12b02672db493ac402c9
2021-09-26 17:02:01 -04:00
Ashod Nakashian
f6ff3caa8c leaflet: explanatory message when loading fails while unloading
Also, back-off the automatic load retrying exponentially.

It was 1s wait for 10 retries, now it's
.5, 2, 4.5, 8, 12.5, 18, 24.5, 32, 40.5 seconds, which
is more reasonable.

Change-Id: I7693b73327c5e09d7e90fd0cd0340fb9c14c3926
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
(cherry picked from commit f207df5f04f45060157dcc7e944f1e3bd53fcb8a)
2021-09-26 17:02:01 -04:00
Andras Timar
30ef4a62d5 fix Lintian errors: binary-or-shlib-defines-rpath
E: loolwsd: binary-or-shlib-defines-rpath usr/bin/loolconvert /snap/loolwsd/current/usr/lib
E: loolwsd: binary-or-shlib-defines-rpath usr/bin/loolconvert /opt/poco/lib

These RPATHs are not needed when we statically link poco, as we do with production
packages.

Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I5050fe1f1925937388793d443020fdc6a14ec97d
2021-09-25 19:04:59 +02:00
Pedro Pinto Silva
fa08386379 Notebookbar: Set menu button without hardcoded px
Also avoid using flex (so smartmenu
to show and hide can still work)

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I002b0fc9c5cc0a20f8fa4f0d72757c4b6ffd9697
2021-09-24 11:25:58 +02:00
Pedro Pinto Silva
7c39eaaec2 Notebookbar: shortcutsbar: switch to flex for icon parents
And make sure to set h and v alignment

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I4d4efd179674200688b8b97bb19331a78bd1c393
2021-09-24 10:50:41 +02:00
Pedro Pinto Silva
b694edce3f Notebookbar: Adjust icons to follow the same color as its neighbors
undo and redo to be more consistent within the shortcutsbar

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ic6323d87f9d9b9887b101579aa37af50283dd2f2
2021-09-24 10:50:41 +02:00
Pedro Pinto Silva
7db8cf5724 Notebookbar: Set menu button with an icon instead of building it from spans
This allows for:
- Better alignments
- Consistent use of hue across all icons from within shortcutsbar
- Consistent style

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ie659f91786c0e90813c5a234a0cb6f484313ab92
2021-09-24 10:50:41 +02:00
Pedro Pinto Silva
acfa7f241f Notebookbar: Introduce modified status for the save icon
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: If7108796d46b96b82b4626a11cca5246979d11fa
2021-09-24 10:50:41 +02:00
Pedro Pinto Silva
9b7ae6e367 Notebookbar: unotoolbutton hover: remove duplicated rules and
do not use floating point number for pixels (in the hopes of
avoiding changing too much the parent dimensions) instead,
use box-shadow.

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I64e567ad015c842cd42905587eecb6f4e793c753
2021-09-24 10:50:41 +02:00
Pedro Pinto Silva
a407d0e0c8 Mobile: actionbar items: Fix misalignment and css
- Not all elements were uniformly spaced out
- CSS was not targeting properly all elements
- Remove the need to add manually every element by id
every time we add a new one (or change it)

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I6de930e351822c3477c26c8e6569c41975cee142
2021-09-24 09:33:53 +02:00
Andras Timar
dad92dee25 remove EULA from source code
... in order to avoid confusion. Binaries that Collabora compile, and
distribute are under a EULA. Source code is not.

Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I34c7e089a100b43e6b9c69ee566736a9ae0cb93c
2021-09-23 18:35:52 +02:00
Tor Lillqvist
6f6f756256 Add explanatory comment for the CFBundleShortVersionString
Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I41e1ab374868b9f598c054914e29a1a751de1475
2021-09-23 16:07:21 +03:00
Szymon Kłos
8568f36371 sidebar: don't show empty on init
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Iab30702bcb2aad8d7eaf1cf6e97f9c536cb4931f
2021-09-23 12:37:08 +02:00
Szymon Kłos
1ecc4e16a1 comments: don't open again on second selection
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I8c19264ea4564f0a9b67841a5adea392bb8a46ba
2021-09-23 11:08:17 +02:00
Pedro Pinto Silva
0586405ed6 Comments: collapsed annotations: Fix position
Display active annotation and do not overlap the remaining avatars

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ie21d9b0f6abab8f5e19a2f2695f52f52750bf094
2021-09-23 11:08:17 +02:00
Pedro Pinto Silva
3c72cd0b53 Comments (collapsed): Fix cropped tooltips (more options menu)
Make sure tooltips appear aligned to the right inside of its
container

note: changing overflow property on the element
.lokdialog.ui-dialog-content does not solve it properly without
sacrificing the vertical scrollbar (even when targeting
x y separately)

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Iae6212993332aac374e87f49e0a1ef2db4005593
2021-09-23 11:08:17 +02:00
Pedro Pinto Silva
dbcbf0d5c1 Comments: Style popup and make sure annotations are not cards
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ic5b5484ea793f301fa76f5c4bdfadbb2812d090c
2021-09-23 11:08:17 +02:00
Pedro Pinto Silva
bb8520167a Comments: Style reply count bubble
- Change color depending on the doc type or default to one of
our grays (css var)
- Adjust reply count bubble position so it's more up right
- Change shadows depending on its state (open vs closed)

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ief0d3e2b0f10d4c0b04993bb648e3e5642d1131e
2021-09-23 11:08:17 +02:00
Pedro Pinto Silva
661abe8b84 Comments: Identify container as part of collapsed group
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I5db5c97977eb0b432fbdfd0824764e025cc3c5a1
2021-09-23 11:08:17 +02:00
Szymon Kłos
400f7ec916 comments: use vex insertion dialog when collapsed and fix cypress
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I134f3de1d16621e849fd414c634da717d3f8dc17
2021-09-23 11:08:17 +02:00
Szymon Kłos
0c44da74d3 comments: fix cypress
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I78e1855488f9c048c8f47357aeb29ab067c510b4
2021-09-23 11:08:17 +02:00
Szymon Kłos
25263297b8 comments: position MobileWizardPopup under annotation marker
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ic74fc6ece926647444941a483f097d54e09bf866
2021-09-23 11:08:17 +02:00
Szymon Kłos
af0f4d48d3 comments: fix collapsed comments in impress
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I2f10fa45b52fd1890d6ebf91a622713ee22b51cf
2021-09-23 11:08:17 +02:00
Szymon Kłos
1e5403a347 comments: add reply count indicator
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I421b43675726b28bb911ea417e9726964d281828
2021-09-23 11:08:17 +02:00
Szymon Kłos
c6abdc1d35 comments: update MobileWizardPopup when modified comments
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ie9f87048d53b4a35e07b0b3fe65f6ad7678c994d
2021-09-23 11:08:17 +02:00
Szymon Kłos
fb0ebd41b4 comments: show icon next to MobileWizardPopup
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I59470f02e2848d813c2ff7a3f6f1c5ac86f398c7
2021-09-23 11:08:17 +02:00
Szymon Kłos
f17c8f67c6 comments: in collapsed mode show thread only
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I4ac78c37cd91d06560cd8f3f31f9ad6bb5ff3830
2021-09-23 11:08:17 +02:00
Szymon Kłos
af2523e6a8 comments: don't duplicate reply comment on mobile/tablet
Avoid adding draft reply to the commentList in comments list section.
This will prevent us from having draft and acctual comment in the list.
Only wait for a new comment ack from the server after replied.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I11cc7be90487ebe66d732d970a3e6612bf9a932d
2021-09-23 11:08:17 +02:00
Szymon Kłos
37de456782 comments: in collapsed mode show only root comments
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I31c1596b22891269cc298dd10fa6f47858ffc411
2021-09-23 11:08:17 +02:00
Szymon Kłos
bf5375beb0 Introduce MobileWizardPopup and use for comments
New container which builds the same structure as mobile-wizard.
It will be used in case of smaller screens on desktop and tablets.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I4631750963bb7daec2659b7af021a4b7bc55f033
2021-09-23 11:08:17 +02:00
Szymon Kłos
68b208ee14 comments: create new nodes in mobilewizard
Don't move original annotation nodes in DOM tree.
Instead create new copy od comment widget to use
in mobile-wizard.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I53683055657a68e4729860341f84adc7fa582d92
2021-09-23 11:08:17 +02:00
Szymon Kłos
91d6b87502 comments: collapse to icon when limited space
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Iea57c5e4cfe0c3f6b427eacd3dc21db0d5256a10
2021-09-23 11:08:17 +02:00
Szymon Kłos
ed7bb6be76 canvas: add minSize and collapse/expand functionality
It is possible to provide minimal size requirement for section.
When there is less space for a given section other sections
will be collapsed if canCollapse property is set.

As an exaple: tile section should have minimum 800 px
and we collapse comments section if needed.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ie6f1a929834cf7275ca2e61d97be4292df01fa89
2021-09-23 11:08:17 +02:00
Andreas-Kainz
f4ec050090 Icon fix for closedocmobile it was to height at mobile insert menu
Signed-off-by: Andreas-Kainz <kainz.a@gmail.com>
Change-Id: I77491fe09090617123dd6db39b654511993befc7
2021-09-23 07:54:23 +02:00
Andreas-Kainz
ab67196956 Mobile Writer Graphic Context
Add Graphic commands when context is Graphic

Signed-off-by: Andreas-Kainz <kainz.a@gmail.com>
Change-Id: I9e8f66ec87d027666faa942b3ea4f83bb95a5205
2021-09-23 07:53:51 +02:00
Stavros kois
8a8af507fb Also add missing parameters
Signed-off-by: Stavros kois <s.kois@outlook.com>
Change-Id: I27f130dfbba25c2a357600c6cb0cd6903df4f3bf
2021-09-22 23:02:04 +02:00
Szymon Kłos
a5affc89db mobile: reset IgnorePanning on touch end
When we move marker we set IgnorePanning to true.
Unfortunately onUp handler is not called as Map.TouchGesture
overrides that event - so release variable there too.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I0e5a6bb05f54b12351a9deb770a052d7a0f89187
2021-09-22 20:31:35 +02:00
Szymon Kłos
e276e0f52c mobile: don't trigger keyboard hiding when panning
On mobile when keyboard is shown and user starts panning
keyboard shouldn't be hidden - it caused view to flicker
and keyboard was shown after short time again

Instead we want to keep keyboar with the same state as
before panning.

This change also fixes broken comparison between point and number
to detect map height resizing.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ib7b1402f84d88a3a63ffa7e8314d5ec2dc1565ff
2021-09-22 20:31:35 +02:00
Szymon Kłos
78f68fa7ef Cleanup in Unit* subclasses
- we cannot get rid of UnitBase::get() which returns the last
  set Unit class because we use it for example in WebSocketHandler
  where we don't know which kind of test we run

- free memory correctly and reset global variables for subclasses

- setup _type member variable on construction

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ic61b88785bff7de63b11ce2046eecc993c3ddeaf
2021-09-22 20:31:35 +02:00
Szymon Kłos
029d4195ad android fix: use correct instance for Unit classes getter
On android we had issue with not working release builds
(worked when optimization flag -O0 was used for Unit.cpp).

Global which stored instance of UnitBase subtype was returned
after cast to a choosen subtype. Unfortunately in case when
android didn't work UnitWSD was returned in UnitKit::get() !

Thich patch makes us sure we don't cast to not-correct type.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I98e91d8fa82a8e81a8f7cee2fe3109b67c4f64f7
2021-09-22 20:31:35 +02:00
Szymon Kłos
7f910a893f mobile: keep cursor visible when keyboard pops up
example:
1. open spreadsheet, let's say you see 20 rows
2. doubleclick on 19th row to edit cell

before: cursor was under the keyboard
after: cursor is visible in the center of the visible area

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Iff1af781cd6c858ff186697b1567aabf9e67690b
2021-09-22 20:31:35 +02:00
Stavros kois
e29cbb2816 Fix Page... button on Calc for NotebookBar
Signed-off-by: Stavros kois <s.kois@outlook.com>
Change-Id: I7f62745c7b9ea3fca49c124ef9fb76535107160a
2021-09-22 20:13:42 +02:00
Andras Timar
9c13d880ec we may need collaboraofficebasis6.4-math for displaying formulas in documents
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I1443e26d237ddf480970da01790b011fc4e0ebd4
2021-09-22 19:38:25 +02:00
Rash419
41ee4a9997 loleaflet: fix: TypeError: window.onUpdateParts is not a function
cypress: skip tests temporarily

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I3cdd3914e31a2e5b1952e20ec1c2cbbb2668133a
2021-09-22 13:42:44 +05:30
Tor Lillqvist
0243441dba No need to use a separate 'that' variable in the _slurpMessage function
Storing 'this' into a separate variable, typically called 'that,' is
needed only to enable it to be captured in a (callback) function that
you create in the scope of the 'that' variable. No callback or other
function is created inside the _slurpMessage function.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: Iae2c6844a3dfb0ff486ee6762ee129893829f272
2021-09-22 08:59:25 +03:00
Andreas-Kainz
12e9ed689f Mobile Sidebar Layout fixes
From the desktop sidebar there are fixed positions defined
which has to be removed for mobile sidebar layout

Signed-off-by: Andreas-Kainz <kainz.a@gmail.com>
Change-Id: I7bfcb491f4c0d5d63d9f6def3aa3e18bb562d82f
2021-09-21 23:46:52 +02:00
Andreas-Kainz
2f55d9e5bb Mobile BottomToolbar add context-Table commands
All mobile apps have similar context-table commands available after the text commands

Signed-off-by: Andreas-Kainz <kainz.a@gmail.com>
Change-Id: I220cd0c5279d9dfe80f3f1f4b9e109b4dc36c095
2021-09-21 23:46:33 +02:00
Andreas-Kainz
0e238382f5 Mobile TopToolbar hide commands that are not available
Signed-off-by: Andreas-Kainz <kainz.a@gmail.com>
Change-Id: I3ea99b759f33e898dbb04c7eced058087d49861e
Signed-off-by: Andreas-Kainz <kainz.a@gmail.com>
2021-09-21 23:46:17 +02:00
Andras Timar
0b1f5f6def prevent division by zero
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I9f9523336ddcbe24906787cfc3210f3471768ea8
2021-09-20 09:06:12 -04:00