Commit graph

17546 commits

Author SHA1 Message Date
Ashod Nakashian
26b6cd4463 wsd: improved removeSession
Since we track active sessions in removeSession,
it's possible that the last session is not active.
In that case, we should set the unload flag while
saving. If we've removed it, we should mark to
destroy. And finally, we should only assert
that mark to destroy is set with active session,
not when we are left with disconnected ones.

Change-Id: I275aeafe67875fa75e0fad5438928f2f77b79a9a
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-02-08 20:46:01 -05:00
Ashod Nakashian
d9a3a42137 wsd: wait for the modified flag before giving up
By waiting at most 2 seconds, we improve the chances
of getting the ModifiedStatus=false before we termiante
the document. This minimizes the noise of warning
of potentially lost data on exit and similarly reduces
the test failures, which test for clear termination.

Change-Id: I284693d1cdd91b1224581fdc29e6e5438ab4c0b2
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-02-08 20:46:01 -05:00
Pranam Lashkari
35b3b87704 Fixed broken freeBSD CI
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I39630d59f432ddd0712063ded0629ab0f4953839
2022-02-08 20:39:55 +03:00
Ashod Nakashian
9702cce25f wsd: preserve the original modified time as string
We no store the origina modified time of the document
as we receive from the storage server in string
form and send it back as-is. This avoids any
potential issues with the roundtrip of conversion
to and from a timestamp.

Change-Id: I524bea8f36c3ce62dcd00c4fe6a1e7e083287ed1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-02-08 08:05:39 -05:00
Rash419
4f0c84f70d cypress: removed explicit wait from row_column_operation_spec.js tests
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ib3a869cd65c80a6dffa2992284cbf46aa3fc30bf
2022-02-08 15:00:41 +05:30
Gökay Şatır
3002449b59 Set formula bar length.
Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I6acbba5a6ebe930935a5425a3f5c52ed99992f91
2022-02-08 11:29:04 +03:00
Andreas Kainz
7a186cca18 Sidebar: Add missing padding to Table style
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Signed-off-by: andreas kainz <kainz.a@gmail.com>
Change-Id: Iee62a80513d62b7577e62381ec1634455ab8079a
2022-02-07 21:41:00 +01:00
Andreas Kainz
017cc0f74a Sidebar fix Style and Character dropdown dialog width
Signed-off-by: andreas kainz <kainz.a@gmail.com>
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I6df2656c215d85fe31907fa73e063b45ef8522f5
2022-02-07 21:41:00 +01:00
Tor Lillqvist
6e47989d67 Make some shortcuts on Mac clients match expectations better
The expected shortcuts are documented in
https://support.apple.com/en-us/HT201236 . This patch handles a small
subset of those:

Command–Up Arrow: Move the insertion point to the beginning of the
document.

Command–Down Arrow: Move the insertion point to the end of the
document.

Command–Left Arrow: Move the insertion point to the beginning of the
current line.

Command–Right Arrow: Move the insertion point to the end of the
current line.

Option–Left Arrow: Move the insertion point to the beginning of the
previous word.

Option–Right Arrow: This should move the insertion point to the end of
the next word. But I don't think LO has such a shortcut so we move to
the beginning of the next word instead.

Signed-off-by: Tor Lillqvist <tml@collabora.com>
Change-Id: I6b0d36b0842388f0d49adf9b75fa9480df79c805
2022-02-07 21:11:16 +02:00
Mert Tumer
924e22635a new mobile-back button cypress modifications
Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: I3e67bdc84d190edf2819b88dfe7d7630c7b89aba
2022-02-07 18:18:29 +03:00
Mert Tumer
ad1d046803 mobile: show go back btn before docload
on ios case, there is no device back button available
so it is impossible to go back before the document load

Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: Ifce5e4777b8dd014cbdc527fb65f0d0be21f2cd2
2022-02-07 18:18:29 +03:00
Pedro Pinto Silva
03558ae701 GitHub: Add Easy Project Template
So it's easy to create ideas for GSoC projects

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I465f7b8876a4f43262fae52cf88ceacd89248517
2022-02-07 12:37:19 +01:00
Szymon Kłos
e64ff372fc Image operations: update existing preview in new arrives
There was a bug:
1. insert very big image
2. rotate and quickly after that rotate again but hold
   mouse click so you will still see the preview
result: before patch preview was disappearing
        after patch preview is updated

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ieb343a371816fe14e4c65f862abf1e55bf36de1b
2022-02-04 17:23:13 +01:00
Szymon Kłos
c1a08b4027 Image operations: avoid error when cannot get map
Uncaught TypeError: Cannot read properties of null (reading 'getMaxZoom')
    at NewClass._transformPoints (Path.Transform.js:577:18)
    at NewClass._transformGeometries (Path.Transform.js:513:9)
    at NewClass._apply (Path.Transform.js:419:8)
    at NewClass._onRotateEnd (Path.Transform.js:1145:8)
    at NewClass.fire (Events.js:152:22)
    at NewClass._propagateEvent (Events.js:215:27)
    at NewClass.fire (Events.js:158:9)
    at NewClass._fireDOMEvent (Map.js:1719:10)
    at NewClass._handleDOMEvent (Map.js:1689:8)
    at HTMLDivElement.handler (DomEvent.js:51:14)

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ic6f0c808c744636f7b8b4b6a683307b74824d2fa
2022-02-04 17:23:13 +01:00
Ashod Nakashian
5757c17b6b wsd: clang-tidy fixes
Also, reduce public function surface-area.

Change-Id: Ia922e19c49a731a83bbd3d1dc645355926ddba3c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-02-04 10:26:49 -05:00
Ashod Nakashian
00cc176af3 wsd: improved DocBroker logging
Change-Id: I2432bcdf06c9fa6335a872aa7354e1f3ddd761f4
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-02-04 10:26:49 -05:00
Ashod Nakashian
7757989795 wsd: save -> upload
Probably the last remaining incorrectly labelled
helper that checks for in-progress uploads, but
had retained the old and misleading label of 'save'.

Change-Id: I693275b1559f3dae4e9e3ab2408d997f56ff86e3
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-02-04 10:26:49 -05:00
Ashod Nakashian
4b8d08bdd6 wsd: test: reduce UnitWOPISlow document size
Change-Id: Idf872404048918844704aa95f33fde299e64c409
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-02-04 10:26:49 -05:00
Ashod Nakashian
2444e28059 wsd: reduce noisy logs
This reduces some logs from debug to trace,
especially in Socket where the amount of
activity is high, but the logs in question
don't add value in debug level.

Also supressed an error when superfluous.

This makes debug-level logs much more readable
and relevant to the main events.

Change-Id: Ie2698b56f320d15a09060cf2877477d9da0e1582
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-02-04 10:26:49 -05:00
Ashod Nakashian
08461715cd wsd: test: stabilize UnitWOPILock
Transitioning the state must happen before
fiting the events that require the new state.

This was a source of random failures.

Also, improved other aspects and added
more assertions and logs.

Change-Id: I55d5a7d5f13eeedaff7f309402baaae37b0134d6
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-02-04 10:26:49 -05:00
Ashod Nakashian
f4aa05cbf9 test: modernize http response in tests and simplify
And improve some test logs.

Change-Id: Ia65de99b5682abe55f677c6afca40289087f45e5
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-02-04 10:26:49 -05:00
Ashod Nakashian
acbfc41afd wsd: remove unused resetUnloadRequested
Change-Id: Icb9ef1c02a9b8d31add5b305c3c1d09d3e251337
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-02-04 10:26:49 -05:00
Ashod Nakashian
381d84ea8d wsd: getSteadyClockAsString now includes millis
Change-Id: I1c1e15c5271cd2d9346eaf3a29d11693020e419b
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-02-04 10:26:49 -05:00
Ashod Nakashian
05dc8a0f84 test: improved state-machine helpers
Change-Id: I10c561ae4cf5e4471f1f9eafc9ffbb77badc7284
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2022-02-04 10:26:49 -05:00
andreas kainz
8c5461937c NB View Tab group commands according to LibO
First Group app specific commands
Second Group Zoom commands
Third Group visibility toggle

Signed-off-by: andreas kainz <kainz.a@gmail.com>
Change-Id: I822d1ea8ef3460bea9869235b039749dad028c17
2022-02-04 09:33:46 +01:00
Pranam Lashkari
d4c7aaa4c4 fixed master slide previews not being updated
after switching to master view previews would remain unchanged
this patch will invalidate tiles for all the previews

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ie7320d625bd95fe80fc76a459b576d6148b39276
2022-02-04 01:16:13 +05:30
andreas kainz
5cdf727b75 Variable names for the color-palette
there are 4 type of color sections:
1. text
2. background
3. border
4. primary

and for each section there are
1. without extension for default color usage
2. -dark suffix for selected
3. -darker suffix for hover
4. -lighter for non available

with this setting the developer can choose
easy the section and the -suffix.

In addition there is primary color
which bring color the the apps and should depend
on the app so
- writer = LibO brand color blue,
- calc = LibO brand color green,
- ...

Signed-off-by: andreas kainz <kainz.a@gmail.com>
Change-Id: I668b5505abd5d70345221bc79d921071c4a49cd7
2022-02-03 11:00:40 +01:00
andreas kainz
bf6178be91 Sidebar add padding to td and cell elements
In the past there was a padding which was removed
now padding was added again.

Signed-off-by: andreas kainz <kainz.a@gmail.com>
Change-Id: I52f11aa3e36e331e47bee345212d103f2ebf1b65
2022-02-03 10:55:18 +01:00
Szymon Kłos
fd75b3b366 Do not request unnecessary image on selection
Avoid doubled PNG generation when graphic is selected.
We only need 'rendershapeselection' request to get preview.
'gettextselection' will only setup '_selectionContent' in
the Clipboard code but it will be never used as
`_getHtmlForClipboard` will ignore it for complex selection
with graphic.

Change-Id: Ic185aa3cb222ea97cf4c69fc65b5db350e568e42
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
2022-02-03 10:36:35 +01:00
Mert Tumer
69ba14f358 sidebar: Don't show sidebar on pdf regardless of the permisson
To be safe, we can ignore the idea of this.map.isPermissionReadOnly()
control would always return true for PDF views and add
additional check for app.file.fileBasedView which is always
true and readonly true for PDF view

Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: I8f0a4401087c735508534404ee987bb35c3bb0fd
2022-02-03 11:24:41 +03:00
Pedro Pinto Silva
c66f4d5de6 Status bar: search: fix padding and height
- Remove extra left padding of input field parent
- Increase input field's height

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ic2b862cf2e6ad3bdc03504d5550b4deddd15d59b
2022-02-02 15:44:12 +01:00
Pedro Pinto Silva
c51feec5a2 Status bar: search: move inline styles to CSS file
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I3165ed4ce504845a0dd9e3876b03260766d63a75
2022-02-02 15:44:12 +01:00
Henry Castro
7b8ee90ceb browser: ensure no welcome dialog is shown if
the servers are down.

Change-Id: Ie06a833af3be1063690c1a854bcbaa0b30fe6e08
Signed-off-by: Henry Castro <hcastro@collabora.com>
2022-02-02 15:30:24 +01:00
Pedro Pinto Silva
7e47d5f578 Notebookbar: Calc, Impress, Draw: add view tab
and move everything related to view application to that tab

Without this change items related with document layout and
interface view were mixed together within the same "layout" tab. This
makes it harder to scan and find the desired action.
	- Split Document layout commands and interface commands by creating a
	new tab.

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I9d9d7fe88ceae8bc057946e20628132ee63577a0
2022-02-02 14:48:54 +01:00
Pedro Pinto Silva
1a1a68b962 Notebookbar: Remove start presentation from shortcutsBar
similar to what has been done with fullscreen command:
8db1fc9bc8

The current is noW present within the notebookbar tabs

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I30822df1a84d62f7c000a3a39df95e84640ffebc
2022-02-02 14:48:54 +01:00
Mert Tumer
4c2ee39fb2 fix typo on accessing map and uiManager
Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Change-Id: Ieeed3599ffa51450a5bca4157144dc225df2f470
2022-02-02 14:48:31 +01:00
Pedro Pinto Silva
29874bd159 Notebookbar: Set ruler toggle to react to visibility
- Make sure a trigger is fired no matter the UI mode
	- Handle it (do anything) just from withing the NB widget
	(get proper css classes)

Note: similar to what we did with statusbar in:
e384c561798e7616f10e763788e92acec6caff9c

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I6c8a38f2e426f20cc5b7a06241f7a92fa4d938e4
2022-02-02 09:39:06 +01:00
Pedro Pinto Silva
fc810d1495 Notebookbar: Writer: move interface actions to view tab
Without this change items related with document layout and
interface view were mixed together within the same "layout" tab. This
makes it harder to scan and find the desired action.
	- Split Document layout commands and interface commands by creating a
	new tab.

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I625bb48a6c135d390f595511ddc8639ea5bdd2a8
2022-02-02 09:38:31 +01:00
Pedro Pinto Silva
8db1fc9bc8 Notebookbar: Remove full-screen from shortcutsBar
Fullscreen is not present within the notebookbar tabs and since it's a
not so frequent user interaction is better to remove it from the other
places

note: keeping the presentation mode present in the impress since it's
different command and it's not present in the NB at the moment

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I7f59387c32d71fddae0fb4001b0b098e71a1545b
2022-02-01 15:49:26 +01:00
Pedro Pinto Silva
1cfd136196 Notebookbar: Remove full-screen from hamburger menu
Fullscreen is not present within the notebookbar tabs and since it's a
not so frequent user interaction is better to remove it from the other
places

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I9f1d95ab30a8168471fe78a4590268f9338bcf81
2022-02-01 15:49:26 +01:00
Pedro Pinto Silva
4b25653860 Notebookbar: Set statusbar toggle's status on loading
Make sure the toggle also reacts not only to the user interaction¹ but
also at the startup time

1 Which is already done with:
- e384c561798e7616f10e763788e92acec6caff9c
 - from PR: https://github.com/CollaboraOnline/online/pull/4088/

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I29e401eede4fc11c821da91b66430ba99d1ec1aa
2022-02-01 13:36:55 +01:00
Pedro Pinto Silva
01cb40cffe Notebookbar: Set statusbar toggle to react to visibility
- Make sure a trigger is fired no matter the UI mode
	- Handle it (do anything) just from withing the NB widget
	(get proper css classes)

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ifdf18dc34a3b7d09e8224695ee0e72908b2166d8
2022-02-01 10:10:42 +01:00
Pedro Pinto Silva
50438f8238 Notebookbar: Calc: Add statusbar toggle to layout tab
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I4ee46b81ad6577f79075b0f4c8ab76e84bc6b786
2022-02-01 10:10:42 +01:00
Pedro Pinto Silva
33aadfbcb7 Notebookbar: Fix statusbar and ruler labels
They are toggles and not just on switchers

ref: 71831e2733

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: If3b1af0097723ba0caf66804dbb4e4e219f79abc
2022-02-01 10:10:42 +01:00
Andreas_K
1554b05a20 Classic Toolbar Menubar no juming up at hover menu element
If you hover at the classic toolbar at the menubar,
a border was shown and the string jump at 1px size.

Signed-off-by: Andreas_K <andreas_k@abwesend.de>
Change-Id: I5d03a380c2bfa34bd169bb12295d535875e54a5f
2022-01-31 13:32:36 +01:00
andreas kainz
535278f51f NB add SelectAll command to Layout tab
In the layout tab there are the object related stuff like
align and front/back. So I add there SelectAll command.

Signed-off-by: andreas kainz <kainz.a@gmail.com>
Change-Id: I4cdd9fbb0351cede9cd78dd1edd50e0612d895f0
2022-01-28 17:04:34 +01:00
Andreas_K
ff2d2fea31 last-mod string removed underline and add hover accent color
if you hover over the last-mod string the color switch from
var(--color-text-lighter) to var(--color-text-accent).

In addition the text-decoration: underline was removed
cause it use text-lighter the focus shouldn't be there
with an underline.

Signed-off-by: Andreas_K <andreas_k@abwesend.de>
Change-Id: I750981730b6daa8605f8d70ebd3df4029f990e36
2022-01-28 11:41:37 +01:00
Alexandru Vlăduţu
65f8476818 browser: add optional function to process the URLs (internal and user
generated)

Signed-off-by: Alexandru Vlăduţu <alexandru.vladutu@1and1.ro>
Change-Id: If83611cc17d00dd049093de0a35caa7739f10400
2022-01-28 11:40:40 +01:00
andreas kainz
55f0155b03 Update Firstrecord and Lastrecord icon
2px thick lines same as other icons in the statusbar

Signed-off-by: andreas kainz <kainz.a@gmail.com>
Change-Id: I08d493038047be16af4c8f4a12cdb22684decf11
2022-01-28 11:39:37 +01:00
Pedro Pinto Silva
6d3d2935d7 Rename: outdated loleflet strings
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ibfb5de3dc5d4c5a57f4d50bf0a9bbc45df2ecadb
2022-01-27 16:15:51 +01:00