Commit graph

22488 commits

Author SHA1 Message Date
Andras Timar
fc63b1218c Bump version to 23.05.7 for iOS app
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I2e10552fdcfa0c73fbc6593fe11ec5425e042ab4
2024-01-04 20:32:06 +01:00
Neil Guertin
fc6fe42ab7 Add automated user debug tools
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: Ib6cb1080780f75dc0ea75930c757567e90c46bd8
2024-01-04 10:54:26 -05:00
Ashod Nakashian
b1f0834ac4 wsd: do not upload unmodified document
When always_save_on_exit=true we should
still not upload the document when it
isn't modified.

In this case, because we now always
save the document (forced) when
always_save_on_exit=true, and because
saving always generates a new file on
disk, with a new timestamp, we couldn't
detect that there are no modifications.

We now still force save, but ask Core
to skip it if the document is unmodified.

This is safe since we now always issue
the save, but rely on Core to do the
right thing. When the document is saved,
we do the normal upload as in that case
we know we have a new version of the
document, which must be uploaded.

Worth noting that the closedocument
command doesn't trigger the same path.
To reproduce the issue, we need a new
test that disconnects, instead of the
graceful closedocument command.

Change-Id: Iaa4e0363ed2eca124f2d1943393e65c0c187aa18
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-04 05:29:32 -05:00
Ashod Nakashian
7f2f946aec wsd: logging and cosmetics
Change-Id: I777db7d1879e84f341f11a90fce7abf8241f5ced
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-01-04 05:29:32 -05:00
Michael Meeks
b5d6ed1ea6 remove unused code.
Change-Id: Ib6ee8fa4b99c2adef4268283b8e622c305fc8f1a
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2024-01-04 09:26:55 +01:00
Michael Meeks
b3a2d55194 remove unused code.
Change-Id: I328cf6783deae0a9be3aab10634b8d76e7efe965
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2024-01-04 09:26:55 +01:00
Patrick Luby
8a9f8f0127 Reenable debugging from Safari
The new WKWebView.inspectable property must be set to YES in order
for Safari to connect to a debug version of the iOS app whether the
app is running on an iOS device or on macOS.

Signed-off-by: Patrick Luby <guibomacdev@gmail.com>
Change-Id: I873a25a149e3ec967ab0775ba8105ecce26f07ac
2024-01-04 09:24:02 +01:00
Andras Timar
00278bc5a9 Set window.savedUIState to false in Android app, too
Similarly to the iOS case seen in #7908 the %SAVED_STATE_UI%
does not get replaced. In mobile apps there is no fileserver
that can replace these variables.

Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Icb7f9d7550b0990cc0ad1d65253773b49ff97795
2024-01-04 09:13:33 +01:00
Andras Timar
bd649e2d40 Enable grouped 'download as' for mobile apps to save space on notebookbar
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib2388139e0214c9f244796546a362b56cca986ed
2024-01-04 09:13:33 +01:00
genofire
b3530563c9 fix(helm): improve alerts many viewer on document with metadata
Signed-off-by: genofire <geno+dev@fireorbit.de>
Change-Id: Ie85e76ae7813ae44d2e4748feac5b8962562abcb
2024-01-04 13:15:10 +05:30
Szymon Kłos
de1de28fdd jsdialog: simplify dropdown closing
This is partial revert of "jsdialog: use open/close instead of toggle for dropdowns"
commit 0833ec6489.

Which introduced "state" variable which was desynchronised with core in
some cases. Now directly call desired close command in closePopover.

This fixes bug:
1. Click on the sidebar's Paragraph's "Ordered list" dropdown arrow;
2. Click on any kind of the list (so that the current paragraph gets the chosen list style);
3. Click on the drop-down arrow again, expecting the drop-down to open.
Result: you need to click two times to open menu again

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ief49d4aff45bc58a6c02fcdcd8cb2b3f1ec6e691
2024-01-03 22:11:18 +01:00
Michael Meeks
b10b9276b8 Use /proc/self/smaps_rollup for improved perf #7927
Using the aggregated file saves a hundred+ system-calls per
pid we're getting data for, and presumably also lots of time.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I41c40982ebbec44aba72a1d15dabf24a8986f59e
2024-01-03 20:20:02 +00:00
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