Commit graph

22476 commits

Author SHA1 Message Date
Gökay Şatır
147275ddbd Core side handles the right click with mouse down event.
It internally handles the mouseup. So we don't send it again.

Without this change, context menus can't behave normal. Because mouse pointer is set to somewhere else with the mouse up event.

Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I719565b1ce192045250f9217e971725d8cc1003b
2024-01-03 18:15:35 +03:00
Szymon Kłos
8c6e2ecbdc Improve logged message: setclientpart syntax error
Don't show error to the user as it is not critical
but put in the logs more meaningful message so we can debbug
later.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I7b27a19ac7af845de74d7a4fb65682dfe03c042d
2024-01-03 16:02:59 +01:00
Szymon Kłos
eef78a5c5a Improve logged message: cache miss
so it doesn't sound that serious like previous message
and is less generic and more easy to find in the code

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I3eb746af8aef39b566d3213ab2935372219e8d98
2024-01-03 16:02:59 +01:00
Hubert Figuière
738505c4de framed.doc: Added postmessage for Get_User_State
This was introduced in https://github.com/CollaboraOnline/online/pull/7514

Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I98b9b5b04742541904afa2361ac961498a54c29d
2024-01-03 15:55:37 +01:00
Michael Meeks
7b20e351ae spdx: improve machine and human readability of headers.
Change-Id: I474287bd87d07b9e4a63f0afdfccb40d73e40e1b
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2024-01-03 14:42:02 +00:00
codewithvk
9179f0d2f3 Mobile: Insert comment layout is too narrow and doesn't occupy full height
Change-Id: Ibb6beff5659f5240ff2b49897e8a491f08933691
Signed-off-by: codewithvk <vivek.javiya@collabora.com>
2024-01-03 15:01:05 +01:00
genofire
189f1866e2 fix(helm): improve alerts
Change-Id: Ib25de5189cd9942f95603cbc19e7635a4d7ffbad
Signed-off-by: genofire <geno+dev@fireorbit.de>
2024-01-03 15:14:03 +05:30
Michael Meeks
dbc4227fa3 debug menu: initialize state on enabling debug.
Maintaining the state is cheap & easy compared with rendering it,
so toggle rendering - but maintain state in debug mode as now.

Change-Id: I06b29c8a2a8652a63e9ca1e4b7dc31bfe7cafc1e
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2024-01-02 16:32:14 +00:00
Michael Meeks
63d43baee1 traceevent: remove redundant code.
Change-Id: Ib4bf216d191220979d99b78efbd6d84838d42ed4
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2024-01-02 16:32:14 +00:00
Ashod Nakashian
7a327c337b wsd: force autoSave on always_save_on_exit
This forces autoSave when always_save_on_exit
is true. This is needed so we can guarantee
that we don't have modification and that
we upload if there has every been one.
The latter case is checked in
DocumentBroker::needToUploadToStorage(),
which is called from
DocumentBroker::checkAndUploadToStorage().

A new test reproduces the issue and defends
the fix.

Change-Id: I0b2105a57cfd7049ba7b1f63e62a700fdc3744c2
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-02 08:17:01 -05:00
Michael Meeks
4b12e22e68 traceevent: re-factor and cleanup trace event emission.
Share a single emission function. Events are re-parsed and
emitted and adjusted in ClientSession; JSON escape event names.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: If489d516bf20d5ec34cfe61f7e4fb09cf2e14bf2
2024-01-02 12:05:01 +00:00
Szymon Kłos
e8f77a6b06 Don't pass invalid hosts for lok_allow #7885
Fixes #7885

Be more flexible and allow to run service with configured
hosts which doesn't work with lok_allow (invalid regular
expression for std::regex which is used in core).

This change instead adds error report in the logs, without
it it was crashing when any host was not compatible.
For example when using domain like:
"*.example.com" which should be ".*\.example\.com"

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Id664df95899bda866b9179a3941280626a2c0299
2024-01-02 11:57:32 +01:00
codewithvk
6d0b8e7bb1 Make 'File > Repair' date and time human-readable
Signed-off-by: codewithvk <vivek.javiya@collabora.com>
Change-Id: Ib8b745fd10aca2eea2e829ad42cf1d91f7ff2129
2024-01-02 11:55:49 +01:00
Ashod Nakashian
29cfaa7682 wsd: quarantine: absolute-path and better logging
The quarantine path should be an absolute path.

Unfortunately, because we had relative=true in
the path config, we couldn't detect empty configs.
This is because with relative=true the getter
would create a path based on the current directory
and the config value, which would default to
"quarantine" when empty.
This would result in /opt/cool/quarantine or
/usr/bin/quarantine when in fact the path is
really empty.

Now, the config has relative=false and
there is no default. In addition, we
warn if the path is no absolute.

Change-Id: I1b3eb5e76866a12d214b47e6556942715a210e54
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-02 10:57:20 +01:00
Ashod Nakashian
fb067faae4 wsd: quarantine: isQuarantineEnabled -> isEnabled and log it
As this is a member of the Quarantine class,
there is no need to have "Quarantine" in the
name. This was a hang-up from the time when
it was a static.

Now we can log the enabled-state.

Change-Id: Iab1cec4d90671cda175c1d320e4f3318dd7b89a1
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-02 10:57:20 +01:00
Darshan-upadhyay1110
798bb55143 Add more cypress test in Autofilter (Calc)
Below cases are covered in current patch
- `Filter by Color` in autofilter should have radio buttons.
- Changes should be applied whene we select any option from `filter by color` submenu.
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I1a757e09be81df934b46d48f71e8be28fc48c984
2024-01-02 10:16:49 +01:00
Ashod Nakashian
21513603b4 config: correct the description of always_save_on_exit
Change-Id: I8a15ef06e5a6c8a9f246cb9520f277357d6fc43f
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-02 09:56:46 +01:00
Darshan-upadhyay1110
365689f804 Refresh tollbar only if editbar and actionbar object exists
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: Ie6eeb45f31b855443288829105df7a7a4cadd76d
2024-01-02 14:25:01 +05:30
Darshan-upadhyay1110
7fbf58cb35 Do not supress ChnageTheme event in readonly mode for any document
- allowed `ChangeTheme` event in readonly mode
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: Ic64bc61011a9e053c105e5c7540dddd4eb530681
2024-01-02 14:25:01 +05:30
Patrick Luby
bb6fea0bea Set window.savedUIState to false in iOS app
When building the iOS app, the %SAVED_UI_STATE% does not get
replaced with a quoted string during the build and the resulting
unquoted string causes document loading to stop.

Also, eliminate warnings when running in Xcode by adding missing
CFBundleTypeRole entries in the iOS app's Info.plist.

Signed-off-by: Patrick Luby <guibomacdev@gmail.com>
Change-Id: Ie398955241a078be45af28e54c49387ff673870b
2024-01-01 09:59:40 +01:00
Ashod Nakashian
373c04fe4e wsd: admin: use the cgroup limit as available memory
This applies the cgroup memory limit, if set,
such that if it is lower than the configured
memproportion percentage, we do not exceed it.
Otherwise, we risk running out of our cgroup
limit and by then it is too late to do anything
but die due to OOM.

This also moves the logging of the cgroup memory
stats from COOLWSD into Admin, to avoid duplicate
logging.

Also updated the description of memproportion
config entry to account for the cgroup logic.

Change-Id: I870ae61c1260eb2b3275bd2fa1a4c48ff30957a2
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-12-30 10:36:44 +00:00
Ashod Nakashian
a44e9411a8 wsd: admin: minor clean-up of memory-tracking members
Change-Id: If06545a097cd13318870f0e6f675367985035a12
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-12-30 10:36:44 +00:00
Neil Guertin
30480c53db Debug menu improvements
Split tools into categories,
Make Tile Overlay toggleable,
Adjust which tools start enabled,
Comment out non-functional tools,
Adjust some names

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: Ic973671a3c323f10d7f95918459ffc91a2f5c35d
2023-12-28 13:26:19 -05:00
Gökay Şatır
9fdbe7eec8 Don't send mouseup for right mouse button.
Core side seems to handle the mouseup event automatically for the right mouse button.
When we send another mouseup event, selected text can get unselected and context menu can't find a selected text.

Issue is:
* In Impress, select a text in a textbox and right click.
* Context menu cut operations doesn't work.

Cause:
* We send the right mouseup twice, the second event unselects the text and sets the cursor position to somewhere else.

Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Idae749da42443ccdd7ef2fc795b042536fae0db6
2023-12-28 17:25:07 +03:00
Gökay Şatır
39bebfacbe Save the cursor rectangle and visibility variable into app.file variable.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I9c0529984cd01a14565b882b68baae4f74e245e0
2023-12-28 17:25:07 +03:00
codewithvk
5fa0d9b69a Android: Insert Cells Menu Misaligned Radio Buttons
Signed-off-by: codewithvk <vivek.javiya@collabora.com>
Change-Id: Ie6bdb2423f92b5959a2233ee0dccc6f8e2e5dc35
2023-12-28 15:23:25 +03:00
Neil Guertin
80a2f4cca6 Replace cy.cGet with cy.getFrame in document load
And other changes to reduce logs by about
20 lines per test (15% of total)

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: Ia6a1c96752816c5cd9fb11368cf921bdce9936ff
2023-12-28 14:58:06 +03:00
Rash419
d4918c7998 improve error message on invalid WOPI host
- before this patch when socket connection failed, we used to show the
  same error for socket connection failure and send the
  'Action_Load_Resp' with same errorMsg
- now we show/send different message for unauthorized and loading
  failure

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I71b1b7f8e2eca93790d068583370787825911a41
2023-12-28 16:50:04 +05:30
Szymon Kłos
a4add51e93 calc: avoid jumping on large cell selection
If we had very long or tall cell - maybe bigger than a screen
on every selection we tried to show it on the screen what
caused view to jump. If cell is bigger and partially visible
left view at the same position to avoid "jumping".

Steps to reproduce:
1. merge many cells - longer than one screen width
2. scroll in the middle of merged cell
3. select the cell
Result: jump to the begining
Expected: no jump if it is paritally visible

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I04da5cd346f175728222888a039a796b271e00d1
2023-12-27 20:09:27 -05:00
Szymon Kłos
74d78d287a Calc: don't stop dragging the selection on quick move
This fixes view jumps in the Calc when some user tried
to drag a selection but did it very quickly so it was
interrupted by the _mouseOverTimeout callback.

Timer was introduced in commit 72c407e0ed
loleaflet: support mouse cursor calback

But we noticed the issue recently. I remember that dragging
the selection was not working some time ago, it is
possible that it was fixed and because of that we experience
this bug.

What it does is that it stops dragging mode in half-done state
so then other views sometimes use the leftover data.
To be 100% fixed it should be also protected on the core side.

Steps to reproduce:
1. Open calc in 2 sessions
2. A selects some range of cells (for example 3x3)
3. A clicks inside selected range and holding the mouse
   button does rapid move to drag the selection (move
   the content of cells) - it has to be done very quickly
   < 100 ms after initial click
   It is done properly when you see on the screen selected
   range and cell selection, but the two are not overlapping
4. User B goes somewhere far in the sheet and:
   - changes font size
   - or selectes some rows, deletes them, then opens right-click
     "row height" dialog, press ok
Result: User B jumps to the selection of user A
Expected: no jump

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ia35377771df6b04584eebb76c25290482b7a4b93
2023-12-27 20:08:03 -05:00
Neil Guertin
6dcfc85f4f Refactor debug menu
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I6e2520035d54b9de2b4cf8e015741aaae517fee1
2023-12-27 16:45:54 +00:00
Ashod Nakashian
c4470a9687 wsd: do not remove quarantine files explicitly
Let clearOldQuarantineVersions() remove quarantined
files only when necessary and per the config settings.

Change-Id: Ie1fb18c02d61a710546e9b5962ab8b7973c2066e
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-12-27 06:10:17 -05:00
Neil Guertin
f4c855792f Use new custom command cy.getFrameWindow()
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I4f54b35f01b41bfb47a1d5d359de5cdab4cb9640
2023-12-27 10:06:05 +03:00
Gökay Şatır
924f13f106 Changes for handling readonly mode click events:
* These changes are made primarily for reading the hyperlink data from the document in readonly mode.
* Added readonlyclick event.
* Added readonlyhyperlinkclicked event.
* And the handlers for these.

When user clicks on document in readonly mode, a readonlyclick event is sent to the server.
Childsession checks if there is a hyperlink at the clicked location.
If so, the information of the hyperlink is sent to the client.

Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I9c104a1ec770491725337b9bbb1e2d1c2851321b
2023-12-27 09:24:28 +03:00
Pranam Lashkari
fbf22535a0 annotation: remove redundant condition
it did not make sense to check for selection if we are unselecting before selecting

problem:
when already selected comment try to modify,
it will not rearrange replies in the thread this caused
overlapping of the comments and bad user experience

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I276c34301b45951a7051018770e21b4970603861
2023-12-26 13:00:24 +03:00
Pranam Lashkari
4ee246a336 typescript: use defined types for CommentSection properties
use strict datatypes for the properties where possible,
also allow to add new properties dynamically

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ia2eb850f61031f91b0e37339475e1ca4e768dad1
2023-12-25 16:45:08 +05:30
Pranam Lashkari
1bd26addd1 annotation: if comment is not initialised its not in editing mode
this caused problem when new doc is loading and we are settings up comments,
but they are not initialised and marked as being in editing.
i.e: this will cause problem with showing reply count(in collapsed view) initially

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ia688ca0bfc37dd925bd74dc5826d43fdb37c81db
2023-12-25 13:35:50 +05:30
Neil Guertin
5979eb9a1f Add cy.getFrame() custom command
The intent is to eventually replace cy.cGet and some other helper
functions with getFrame, which is cleaner and has better logging on both
pass and fail.

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I911a5552d69634495a9036d020754351665419cf
2023-12-25 10:51:37 +03:00
Caolán McNamara
24a401c967 the std::ceil inputs are already ints
So std::ceil isn't doing anything useful since:

commit dce6c18fb4
Date:   Thu Aug 30 17:40:42 2018 +0200

    Calculate tiles-on-fly limit a bit more precisely

Leave this case unchanged.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I6d11c9b912facc26ad775fc916012b529ed5b0fa
2023-12-22 14:29:44 +00:00
Caolán McNamara
b1ff60ace3 missing tiles in multi-pane spreadsheets
here std::ceil is operating on the result of an int divided by an int
so the input is already an effectively floor-ed int result of the
division so the ceil doesn't do anything

so we end up filtering out some of the invalidates for tiles in frozen
panes.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ibfb25fdfdfb84735ca9410f8250d2e5b9fa1070e
2023-12-22 14:29:44 +00:00
Darshan-upadhyay1110
434fffa5bb Fix text in font and style dropdown types dark in Dark mode
- in Compact/Classic mode typing text are dark in darkmode

To reproduce:

- change to dark mode and select Compact mode
- type in input field of Font or in Font size
- without this patch color will be dark in dark mode
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I4510001cfdf26acf8419eb0aa4ee3611b0a51b09
2023-12-22 16:12:28 +03:00
Neil Guertin
f86ab6ae9a Remove inadvertent it.only to re-enable tests
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: Ia9f2a35f0e334c97565edc4334df943723a958d7
2023-12-22 12:56:02 +03:00
Andras Timar
05fa3f35d0 Update l10n files for Weblate
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I1cfac01456a62a09068397d6ff6ff6506acf31ae
2023-12-21 21:05:09 +01:00
Rob Pearson
050adfdbaf Translated using Weblate (English (South Africa))
Currently translated at 100.0% (539 of 539 strings)

Translated using Weblate (English (New Zealand))

Currently translated at 100.0% (539 of 539 strings)

Translated using Weblate (English (United Kingdom))

Currently translated at 100.0% (539 of 539 strings)

Translated using Weblate (English (Australia))

Currently translated at 100.0% (539 of 539 strings)

Co-authored-by: Rob Pearson <rob.dunedin@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/en_AU/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/en_GB/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/en_NZ/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/en_ZA/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Id596babd7d044968f14ea47136600f8c273ccbb5
2023-12-21 20:51:19 +01:00
Pranam Lashkari
31ece2a8fc cypress: enable all slide operation tests
test got disabled in e81b53a

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ie40dc67d7f45dac702d69d7222c2bc32a4c89dd0
2023-12-21 23:35:26 +05:30
Szymon Kłos
78a4ed13ff calc: don't make app inactive on drag and drop
When Pivot table dialog was used and we drag and drop
elements from list to other list in Firefox - then
we sent userinactive message because we lost focus of
a window. Don't do that.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I03f1b8a72e4f318034569d4fffe496f32c5a8a51
2023-12-21 14:16:13 +01:00
Neil Guertin
fa87fb803e Better logging for cy.cGet()
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I587415c7601fd6bb10f3aa6e708109fd7ccd3b81
2023-12-21 08:10:34 -05:00
Andras Timar
7c440409e3 Update Helm Chart with new release 23.05.6.4
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I0d0f553a11e1a78d4160cdd0fd8c5ae1c959399a
2023-12-21 00:44:23 +01:00
Szymon Kłos
2190cbdc20 Remove protocol when adding to lok_allow
We automatically add allowed wopi hosts to lok_allow.
But we expect to have plain host names, we need to remove
protocol if it is present.

Example:
wopi - group - host: https://.*\.mydomain.com
we need to add: .*\.mydomain.com to lok_allow list.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I80bf3b7c25c0df15e422cd8369eceaddbb588e26
2023-12-20 19:58:43 +00:00
Szymon Kłos
6961f16539 Add warning for blocked external image insertion
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I8d7456b0cef68a086aae854c9828d83a29f1b3b6
2023-12-20 15:55:12 +01:00