Commit graph

23900 commits

Author SHA1 Message Date
Caolán McNamara
cf01a0687b cid#365236 Dereference null return value
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I325404441747611985266bf51c53bf14423491fc
2024-05-07 15:59:55 +02:00
Hubert Figuière
22e789a420 impress: restrict presentation in readonly mode
When export is disabled or watermarks are enabled, presentation in readonly mode
is disabled.
This is checked in the frontend by the WOPI property `DisablePresentation`
that is synthesized in the wsd. Also check when calling the presentation
command.
WOPIFileInfo::getWatermarkText() is stubbed on mobile.

Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I4f7aff9f670f7523dfcf396f6009a272df9d5af8
2024-05-07 13:21:04 +01:00
Michael Meeks
72bbc375be Add more comment warnings around security critical code.
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I1ca4a54d076a8f95850f329168c941806bc56b16
2024-05-07 13:11:30 +01:00
Michael Meeks
9d67fe24d2 comments: remove obsolete thread related comments.
Change-Id: I9d31e2614c7ea6edf47b92f25edd60748dd17493
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2024-05-07 13:11:30 +01:00
Michael Meeks
bd524201d3 bgsave: use document name progress bar instead for saving.
Avoid the popup overlay and associated annoyance.

Also use a progress bar for loading in the normal overlay.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: Icafdcc958d92f42cba44e3b213d6a0202566251a
2024-05-06 20:28:08 +01:00
Michael Meeks
90f387cdc5 bgsave: change statusindicator protocol message to 'progress' + JSON.
We need to get more helpful structure into this message, and add a
type=bg flag to handle background progress messages.

Add unit test for merging progress: setvalue commands.

Simplify ProtocolHandler sendTextMessage with a std::string wrapper.

Android code needs manual testing.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I54ce807e2fc5de80118905e68557a95e637fbd18
2024-05-06 20:28:08 +01:00
Pedro Pinto Silva
28cd22e792 Mobile: Formulabar: inherit more from desktop, remove negative value
- Inherit padding from #formulabar desktop, a single dimension instead
of placing different margins/padding across mobile
- Fix alignments
- Use css vars for buttons sizes

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I21110e43115576a212d29b1a55268fbeed6d52af
2024-05-06 15:39:59 +01:00
Pedro Pinto Silva
d526ee1031 Formulabar input, cell address input, AutoSum: Fix sizes discrepancies
- Remove individual sizes
- Rely on the same single size digit that comes from the parent
  container
- AutomSum button should not inherit buttons height
- Fix jumping buttons: Cancelformula (close btn) should be placed
  exactly where equal ("=") was before

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I6c5a40709051ace3313195f4491798429eb5f6a0
2024-05-06 15:39:59 +01:00
Pedro Pinto Silva
7a83489abe Formulabar: Fix address input field not being targeted (css)
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ifdd449bcedb5049eae281b9b5e882b410290a7ee
2024-05-06 15:39:59 +01:00
Pedro Pinto Silva
30d3313342 Formulabar: Fix buttons jumping position
Before this commit the buttons would jump position between default
button group and cell edit mode button group (when acceptformula and
cancelformula buttons appear)

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I5411f145a9f4f4d2dd10a4278105447a52755815
2024-05-06 15:39:59 +01:00
Pedro Pinto Silva
23db285fa4 Formula bar: Fix alignment, avoid individual margin for each button
Better to rely on grid gap or somesuch

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I50e59d1b3464687a0bba76bf54a0ed2412dc3758
2024-05-06 15:39:59 +01:00
Pedro Pinto Silva
9e87e8ca70 Refactor: CSS: avoid generic formulabar rules
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Idfc850615026dcf06bb1f27c4adbe8f33b6f9bee
2024-05-06 15:39:59 +01:00
Szymon Kłos
05ed084481 Show run presentation icon in Impress slide sorter toolbar
This fixes regression from commit ae5e33b30c
remove-w2ui: convert presentation toolbar to JSDialogs

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I2f7c34369f1d2683be481fb466656b972de50cd4
2024-05-06 14:16:41 +02:00
Szymon Kłos
58e5208027 Fix buttons visibility in formulabar on cancelformula
Make code more deterministic by removing old hacks with
timeout and cursor detection from:
- 6037d52
- b62320c

Bug was that on desktop when we were in formula edit mode
and we clicked cancel button - it was not showing again
the regular buttons but instead it was showing the
accept/cancel buttons.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I1a51920e99f4902c1dbb62b0eab6e4f2edc932ce
2024-05-05 21:22:55 +02:00
Szymon Kłos
57e14eb6ce cypress: fix assertion in jsdialog test
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I07964dda90a89c2560df6e5d7e8c3b6f38551164
2024-05-05 20:04:55 +02:00
Szymon Kłos
c817690f8d jsdialog: hide unused linkbutton
this is shown after commit cf0a6f4
jsdialog: add "linkbutton" as an independent widget

it wasn't there before

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ibdf8a9eb7f226740c11e8a34c16c7be4177576e6
2024-05-05 20:04:55 +02:00
Caolán McNamara
a6b3961c50 add a test for joining doc and disconnecting
a normal case, where user#2 joins the document successfully and then
their connection closes; where the remaining client gets the
notification that there is only one client in the session.

an abnormal case, failing test currently disabled, where user#2 joins
the document, "load url" is launched, but the connection is immediately
dropped; the other client gets a notification that a user has joined to
make it a 2 user session, but no notification that the user has dropped.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I8271fb3d4def917acdff0fae6a3a52b5d02ef7af
2024-05-03 20:14:11 +02:00
Michael Meeks
8b558a2372 Default to four pre-spawned children.
They should be cheap memory wise, and save quite a bit of latency.

Keep 1 for debug mode - to make attaching to the right process easier.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: I230be6ae61874f36b47ffc93d888d455bea3a7d8
2024-05-02 17:28:38 +01:00
Darshan-upadhyay1110
e88d9340a0 Fix toolbar up section after w2ui rework
To make consistent all toolbar element height with prev version where we were using w2Ui lib
- i have added height to table-row element same as we had in prev version
- remove fix height for toolbar-up which is not needed now
- this fix height will effect the bg-color in toolbar-up section

Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I7b307a6a72968ed81fe2eb8663c430f11e3b3ced
2024-05-02 13:55:25 +01:00
Pedro Pinto Silva
caa132c386 Fix calc-mobile top toolbar and formula bar which are broken
Pedro :
This changes from flex to grid (so we can have multiple columns and 2 rows)

Darshan:
    - adding one more div and wrap all child of toolbar-wrapper execpt 'formulabr' will work here
    - i have tested the css grid approch it is breaking the mobile UI in Calc
    - here i have changed a bit in html and twiked css which covers all cases

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ia50fda95e2bef57d707bb4be1dd34e2ec083bfc5
2024-05-02 13:55:25 +01:00
Pedro Pinto Silva
f003bb3b8a Mobile: Hamburger and back btn: Fix height after table to div
With "Change table layout to CSS base table structure" and "Adjust
table elements for mobile view." changes we now have more divs instead
of table elements but with that the hamburger menu is now mislaigned
   - Fix height
   - To do: ideally we would make both hamburger menu and the button
   at its side rendered with the exact same structure which is not the
   case. And ultimately remove height and just have it flex stretch etc

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Id9365df82f1caff132dde41760a06689ec1145d1
2024-05-02 13:55:25 +01:00
Pedro Pinto Silva
82f2e01175 Mobile: remove legacy hamburger (opened state) rules (css refactor)
No need to specifically set width and height for .menuwizard-opened
state. Best to set only one time those dimensions and just inherit
from #toolbar-hamburger no matter the additional css class

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I51eafc6c9b05b843d800b40a990aefd912e463f8
2024-05-02 13:55:25 +01:00
Darshan-upadhyay1110
872ac5ad29 Adjust table elements for mobile view.
- we changed table structure of `toolbar-wrapper` with `div`
- so we also need to consider mobile view
- made some neccessary changes for mobileview because of structure change in cool.html.m4 ('toolbar-wrapper')
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I91cd2c3ffbb0d625a78852398f6773136e9a7f6b
2024-05-02 13:55:25 +01:00
Darshan-upadhyay1110
dd3df946e1 Change table layout to CSS base table structure
- For the editor in the home view, a layout table is used, and it includes the use of IDs. This can
potentially lead to issues with the interpretation of content by assistive technologies
- Layout tables are
meant to structure the layout of a page and should not contain structural markup like th , caption ,
summary , headers , or id.

Solution:
- replace `td` and 'table' tag with `div`
- make some changes on css to be consistent with our prev design
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I136cd8d51b2e5035c6ef4292f759f49519e5bd61
2024-05-02 13:55:25 +01:00
Henry Castro
273e9c15a8 browser: preview: simplifiy _resize function
The _onScroll request the visible previews.

..

Change-Id: Ib5370f1790b489edb4626a22bf6c5bb1cd8d0f17
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-05-02 08:15:53 -04:00
Henry Castro
8da4031073 browser: preview: update 'createPreview' function
It only initialize the initial preview width and height,
the _onScroll function will request the visible previews.

Change-Id: I7e04ea93f85a9270d09b241dc14391be214080a4
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-05-02 08:15:53 -04:00
Henry Castro
3efeae0484 browser: preview: remove unused console logging
Change-Id: Iebe938767ec1c162fe1119f32ba1f7847f6226d5
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-05-02 08:15:53 -04:00
Caolán McNamara
1425b36104 merge background saves together in profile
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I016133f31f34b859dcb21b794406c7e6a1559aa9
2024-05-02 14:02:56 +02:00
Caolán McNamara
e9f81f8008 add sample watchdog script
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I9d3b9b2a405d87bee6c8f242f8c71179abb44005
2024-05-02 11:07:36 +02:00
Tomaž Vajngerl
cf0a6f4a2f jsdialog: add "linkbutton" as an independent widget
This depends on the core change, which separates the linkbutton
widget from fixedtext widget as it is already an independent widget
in "weld" and used in accessibility checker. Adds "clicked" event
that is triggered when the text is clicked and send to the core.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: I4a999f3e57aaa7950482c55defa3012346351cb1
2024-05-02 10:38:21 +02:00
Tomaž Vajngerl
eed0dadff3 Adds a11y checker sidebar
Enables the accessibility checker sidebar, changes the icons from
the old name to the new name (as it depends on the UNO name) and
adds the UNO command to enable the sidebar.

Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: If9aeb375ec87ef27d4dead5f3148bc40f01db976
2024-05-02 10:38:21 +02:00
Darshan-upadhyay1110
a7a541ad14 initializ UI after server reconnection
- Non-edit mode does not intialized after server reconnection
- this patch will fix initializedUI after reconnection
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I43405067287dd3f7f134fc9dcabfdcae183724ce
2024-05-02 09:57:46 +02:00
Neil Guertin
ced7998b1b Fix mobile/writer/table_properties_spec.js
Wait for table select to fix copy/paste issue

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I5d564c062f5c8f5616997cd49222d39f47baa260
2024-05-02 08:48:19 +02:00
Caolán McNamara
6d00ed64d6 _sessionUserInfo tracks disconnected sessions
as well as current ones.

i.e.

/// User Info container used to store user information
/// till the end of process lifecycle - including
/// after any child session goes away

so add some info in the log to flag which ones are still connected and
which ones are not.

https: //github.com/CollaboraOnline/online/issues/8943
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I5350c04d1a7bb8095464881fba97e5910f71ffb3
2024-05-01 17:51:02 +02:00
Rashesh Padia
fcc34f061a fix: can't reconnect and get to edit mode after full server shutdown
- regresssion from 464358ca70

Signed-off-by: Rashesh Padia <rashesh.padia@collabora.com>
Change-Id: If2b20c7960e3c242064fc04425b4f893612f6362
2024-05-01 16:23:02 +02:00
Caolán McNamara
2546252d31 disable watchdog during Document::updateMemoryDirty
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I5358ec0df536c4b3c302011869b42db3491ce73e
2024-04-30 17:55:13 +02:00
Caolán McNamara
c2f4f8031d disable watchdog while loading and saving
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ic1757f1cafcaed7feb3ce0cbc21fe8e03c5d4bd4
2024-04-30 17:55:13 +02:00
Caolán McNamara
038e278b03 bump watchdog pings from 20ms to 50ms
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ib1add9a1e392e96ad9f92feffd518b92aeb6a81c
2024-04-30 17:55:13 +02:00
Pranam Lashkari
1f66dcf831 calc: fixed js console error
problem:
when try to edit any cell for the first time,
there was console error due to undefined variable

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I8a29ad6e0e6243cc55175be0173eceb80bfea877
2024-04-30 15:36:18 +01:00
Aron Budea
27f1de8e87 Bump version to 24.04.1.4
Signed-off-by: Aron Budea <aron.budea@collabora.com>
Change-Id: I39c8de7125edc3de3696487b7519dbd2b0717c26
2024-04-30 16:35:25 +02:00
Darshan-upadhyay1110
b6122e0f37 Change get by ID value in all cypress_test
-  according to previous change(commit) we need to adjust ID in cypress test files

Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: Ic5510392b101ff7c7daa28719a60963c7bb2c743
2024-04-30 14:54:21 +02:00
Darshan-upadhyay1110
e45e31949d Remove '-input' string because we append that in _editControl & correct all getElementById which uses the Input element
- Because we have appended '-input' to add ui-edit-control in jsDialog builder filer
    - now we do not need any id/string which have '-input' at very end of that element

    - for some cases we need correct GetElement by ID in js files

Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: Id9b4f53e8deaa2f26c6abc93dc80504895107bd0
2024-04-30 14:54:21 +02:00
Darshan-upadhyay1110
dd445ad4d1 Wrap input[type='edit'] with a parent div
- To unify editControl, added additional "parent" for edit's input
- this will be consistent with other input type controls
- and will help to establish link between lable and input[type='edit']
- changed parameter from input to it's input container which will help to pass correct ID to Core

Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: If5ab78bdf3d3ad61438898f5e4cacc19bd2ecb63
2024-04-30 14:54:21 +02:00
Szymon Kłos
ec63d9c032 css: fix button-box alignment
in 24.04 more elements are grid now, it seems to be a
regression in button box:
1. enable macro execution in coolwsd.xml
2. open spreadsheet with macro
Result: you see the dialog with buttons in 2 rows
Expected: all buttons are in the same row

it seems to be missing grid placement for left and right sections

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ic1a3479114e4f832e852b9bdf3d39d2669ae69bb
2024-04-29 21:54:14 +01:00
Julius Härtl
b0b73d2794 fix(browser): Emit proper UI_PickLink post message
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Change-Id: I635780723b98887e6c35a397940cc2517a6a9025
2024-04-29 19:13:35 +02:00
Pranam Lashkari
ae27e8291c macro: open document without macros enabled
problem:
when user selected disable macro in the opening dialog
document used to close and return to integrator
but now cancel button in csv import dialog is hidden,
so no need to distinguish there and we can continue to load without macros
In addition we still close the file if user clicks "X" button on title bar

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ie0c7d77954e099cb3c8a72c400c688b3ae1343c7
2024-04-29 18:59:12 +02:00
Skyler Grey
1895938524 calc: zoom: Stop leaving blank areas with freezes
Previously when there was a frozen pane we calculated an incorrect
size on the unfrozen pane, leading to slight blank edges when you were
mid-zoom-out.

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: Id26f6ba815429addd0cdf3af37f5c54363a08b2b
2024-04-29 18:35:43 +02:00
Skyler Grey
bb9be7abb8 Make freeze shadow appear/disappear mid-pinch-zoom
Previously when panning with zoom, the freeze shadow would stay in its
initial state (either hidden or shown) whether or not it should actually
be shown at the current position.

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: Ic0d05c1204b1e15abbb6d8ad34235206fdc7740c
2024-04-29 18:35:43 +02:00
Skyler Grey
227bf6de6b Make freeze shadow move with a pinch-zoom
Previously the freeze shadow would stay where it was, creating a hard
edge and confusion about where was frozen. With this change, the freeze
shadow moves with the zoom.

This change needs a followup to show/hide the shadow when we reach/move
away from the document edge.

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: I8bec41be6ce5eff3c1bfd3ac0234b6d53833614b
2024-04-29 18:35:43 +02:00
Pedro Pinto Silva
f50d5a1303 Custom properties dialog: fix grid and misalignments
- Fix alignment between rows by:
  - Setting some of the columns' width
  - Removing margin from all buttons & set width. Add column gap
- Fix vertical alignment
- Fix header alignment (Name, Type, Value) so it aligns to the content
- Make "Add property" occupy full width (ideally this button would be
  part of the inner grid "last row" but for now this is already an
  improvement)
- Remove lengthly css targets and the use of nth-child

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I85d9bdbcc365c735757ee086f6e4912d694a011c
2024-04-29 15:21:06 +01:00