Commit Graph

24115 Commits (master)

Author SHA1 Message Date
Neil Guertin c54683f349 Fix failing test mobile/writer/table_properties_spec.js
Was failing in moveCursor after slowdown introduced by
https://git.libreoffice.org/core/+/ca31493a
Rewrote test to use the same select helper as all the other
tests in the file

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I5197a095d47e727526636b232df1f3be45e5bb52
2024-05-08 10:58:17 +02:00
Caolán McNamara 9b68218ffa _canonicalIdInitialized is a member of CanvasTileLayer not TilesPreFetcher
a problem since:

commit 04ac02b033
Date:   Sun Sep 3 17:37:49 2023 +0300

    Do not request tiles until we are sure a canonical id is set

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: If285a53c51b17a812a7387150f99f0f43486b9e3
2024-05-08 10:50:00 +02:00
Neil Guertin ec83c14f3d Fix failing test desktop/writer/top_toolbar_spec.js
Follow up of be235b1386

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: Idab5a5bac4ac15aa0e13a2d660271a305fad945a
2024-05-08 08:06:51 +02:00
Caolán McNamara 3e937ef83f check for _docLayer existence before deref of _docLayer
order is since:

commit 06e4722cc9
Date:   Fri Aug 7 18:37:11 2020 +0530

    loleaflet: rewrite tile-prefetcher for L.CanvasTileLayer...

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I69b7dd8974d2333cecbc38f94d4851bb0c5f44fc
2024-05-08 07:43:16 +02:00
Neil Guertin be235b1386 Fix failing test desktop/writer/top_toolbar_spec.js
Remove scrolling to get to toolbar buttons
Add test specifically for scrolling

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I885d3ec33c8d570dfad45893c5d267b7fe8cc0b9
2024-05-07 16:00:44 -04:00
Henry Castro 913f684e30 browser: preview: simplify 'isPreviewVisible'
.

Change-Id: Iee73f2eb77d1fc20aa266f66fda314770bc666d0
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-05-07 14:09:54 -04:00
Henry Castro 94b25bce1f browser: preview: fix time out resize event
Change-Id: I5e3b49909fdbd46134aee359e8aa015f4672892d
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-05-07 14:09:54 -04:00
Rashesh Padia 7572af7486 fix: don't wait for migrate msg if indirection server closes the connection because deployment gets deleted
- if deployment gets deleted than there is no where to migrate the
documents in such cases indirection will close the monitor connection
but we need to set the _migrateMsgReceived flag so that docBroker don't
wait for the message and continue to cleanup the document

Signed-off-by: Rashesh Padia <rashesh.padia@collabora.com>
Change-Id: Ia2732740927ea16e368f91bea7421576a3cf2beb
2024-05-07 20:26:46 +05:30
Rashesh Padia c1f0fcf946 indirection_server: migrate document on shutdown
- when COOLWSD get SIGTERM admin sends a "shutdown_received" message to
indirection server
- indirection server sends back migration messages for each document to
migrate it other available COOL server
- there is timeout associated with migration message if COOLWSD doesn't
get message we move on and close the document
- added a new option in coolwsd.xml to change the migration timeout
default is 180s

Signed-off-by: Rashesh Padia <rashesh.padia@collabora.com>
Change-Id: Id7d5eea94d1b03ea5905ca67a9dd8f6ca15952f3
2024-05-07 20:26:46 +05:30
Rashesh Padia 438985ab31 admin: fix gaps between cards when server/card gets removed
Signed-off-by: Rashesh Padia <rashesh.padia@collabora.com>
Change-Id: If72d27b0b32a00e0105dce08292afa4c792d6cb5
2024-05-07 20:26:15 +05:30
Caolán McNamara b440a86f73 get coolwsd log on failure
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I88545054c4a79dd0152d13699f80e7f1b235d267
2024-05-07 15:12:55 +01:00
Caolán McNamara ca2ca25d07 try rm -f coolwsd instead of rm coolwsd
Making check in .
make[1]: Entering directory '/home/collabora/jenkins/workspace/github_online_master_debug_vs_co-24.04'
fatal: ref HEAD is not a symbolic ref
Cleaning up...
/bin/sh: ./coolwsd: No such file or directory
rm: cannot remove './coolwsd': No such file or directory
make[1]: *** [Makefile:7155: /home/collabora/jenkins/workspace/github_online_master_debug_vs_co-24.04/jails] Error 1
make[1]: *** Waiting for unfinished jobs....

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I31748354bb55f26a8a5b8475a4daa74b3ba5d729
2024-05-07 15:12:55 +01:00
Caolán McNamara 8a6b40200f cid#365219 silence Explicit null dereferenced
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I534f49e2ebe34e4518e7456ba200af9d76535832
2024-05-07 15:59:55 +02:00
Caolán McNamara 1385b0d086 cid#365222 COPY_INSTEAD_OF_MOVE
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Idf287528f5e17670bef3a7524e8cefc91ae23ffc
2024-05-07 15:59:55 +02:00
Caolán McNamara ec8cc5aea8 cid#365225 COPY_INSTEAD_OF_MOVE
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I9c7e1b105d6cb10ef312b7a824de8cc922a83929
2024-05-07 15:59:55 +02:00
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