Commit graph

21479 commits

Author SHA1 Message Date
Rash419
c4183d2709 android: fix app crashes after closing the document
- It exits LOActivity when lokit thread finishes using lokit_main_mutex.
  But if we edit document and exit without saving lokit thread gets
  finished but COOLWSD is still running to clean up the docBrokers.
  It takes some time to clean up this docBrokers.
  We need to exit the LOActivity only after COOLWSD is finished
- for that I have added coolwsdRunningMutex again
    - it was removed in ad32888d7c

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Ic9785f5aa55deafbac98efc4013bd3376d0ba62d
2023-08-16 12:44:37 +05:30
Rash419
6a7b98af8a fix: cell border preview in mobile wizard
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I6b6049751d95af7c42d931666beed424fd4a208e
2023-08-16 08:58:39 +02:00
Rash419
639068e3fe impress: remove unused mobile-slide-sorter
- to show previews we use slide-sorter element
  and presentation-controls-wrapper as container

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: Iaed0892779d5016a565d556955305317129edea4
2023-08-16 11:29:54 +05:30
Szymon Kłos
03fa9d9c86 jsdialog: always execute close message from server
Block only close requests from the user clicking on
'X' button. We need to always process close messages
from the server.

Eg. Format -> Theme, click Add:
then close parent dialog using 'x' -> should not work
then close parent using 'cancel' button -> should exit dialog

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I2164f01acf47a67dc1e35b85b37142bc88dfedc4
2023-08-16 07:56:36 +02:00
Szymon Kłos
2eda4740ca Don't show presentation on iOS in small frame
Full screen feature is not available on iPhone,
only on iPad with iOS 12+ (https://caniuse.com/fullscreen).

Instead open svg directly in the browser as a fallback.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I047051e420a0d786ec084817b8fe19c34e086cf6
2023-08-16 07:54:38 +02:00
Szymon Kłos
9a0b34f8fb jsdialog: fix error on insert_button
When button is inserted using postmessage API
it can have no command property. Prevent us from
TypeError here.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I84f1f94befb57d0e18699052c881b90de55a1239
2023-08-16 07:54:02 +02:00
Caolán McNamara
42df0dac71 cid#318842 silence Unchecked return value
and

cid#318906 Unchecked return value

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I9033f43dbbbcae8f5a15980d6f7b844370d54c7f
2023-08-15 15:09:36 +02:00
Caolán McNamara
ce0c11f09f cid#318866 can elide the temporary here
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I8a7bb1b6b8535ecbdae8deddc10f3c010db28897
2023-08-15 15:09:36 +02:00
Caolán McNamara
461fe6a630 cid#318940 Big parameter passed by value
newRequest is always called with a const Request& already so might as
well make this copy inside the function rather than passing a copy
by value and moving it.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ib572637d29590b8b470a42da3293065ed86d7dd0
2023-08-15 15:09:36 +02:00
Caolán McNamara
eaa2b0cf2f cid#318821 COPY_INSTEAD_OF_MOVE
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I91e2fe0bcbf9ebe68917b0326425ac73bfa544fe
2023-08-15 15:09:36 +02:00
Caolán McNamara
5dcf65f5c6 cid#318893 COPY_INSTEAD_OF_MOVE
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ia478c77645c49b8c5d976407fcf6780cace7f211
2023-08-15 15:09:36 +02:00
NickWingate
68135a4682 Rename with file default when given unspecified extension
When renaming file in writer use the original extension
to save the file if the user doesn't provide one

Signed-off-by: NickWingate <nick.wingate@collabora.com>
Change-Id: I6b6293bb7bf8ede38a8fa63995ad553d1e45ee1e
2023-08-15 11:23:04 +02:00
NickWingate
24ac74db4f Add rename document to notebookbar and menubar
Signed-off-by: NickWingate <nick.wingate@collabora.com>
Change-Id: Iec25de88aa3e7089af102dd9f4bda6507308c215
2023-08-15 11:23:04 +02:00
Caolán McNamara
478fd19ccc cid#318850 Unchecked return value
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Iacca79e45e4a7ba299be8705765ffefd3b7feb28
2023-08-15 08:21:44 +02:00
Caolán McNamara
3502e1d006 cid#318903 Dereference after null check
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I37eeff9afc12a27744a7178da58f4c9b71272c12
2023-08-15 08:21:44 +02:00
Caolán McNamara
6062342827 cid#318980 COPY_INSTEAD_OF_MOVE
iss ctor takes a const std::string& and constructs with a copy of str as content

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I2805c869cb034a9b87e6e95cc58419b54a078b63
2023-08-15 08:21:44 +02:00
Miklos Vajna
7d6619be90 wsd, coding style: document double review for security
Document that authentication changes need double amount of care,
compared to other normal functional changes.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ib1820581f7175957f08f5e080d542c7441a3ffa2
2023-08-15 08:20:05 +02:00
Rash419
41bdf1ece8 admin: remove fixed width and height attr from svg
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I39df378a0bcba2199d625dd5bf7a202b15354b0f
2023-08-15 11:11:01 +05:30
Rash419
65f6f46093 admin: use humanizeMem in adminClusterOverview.js
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I323735c989e3a4448f57d896ea635dcdeb6bbe8b
2023-08-15 11:11:01 +05:30
Pedro Pinto Silva
555a07db70 AdminCluster: Use proper card headers for title instead
and round cards

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I632ca5a3053247ce4d12c4e028e0322ee1545124
2023-08-14 21:38:32 +05:30
Ashod Nakashian
efe874f89c wsd: simplify shutdown and termination flagging
With the use of a single flag for both, the
logic is now less ambiguous, as we cannot have
termination flagged without also implying
shutting down.
The assertions are no longer needed.

Now that setting the termination flag
explicitly implies having the shut down flag
as well, the checks are simpler. We only
need to check that the shutdown is not set
to continue running as normal, since having
the termination flag must perfoce mean shut
down is also set, there is no need to check
both.

Change-Id: I99e22f5668385182b0594040a8e3354b55e74642
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-08-14 16:32:50 +02:00
Ashod Nakashian
35dda35f9d wsd: move statics into anonymous namespace
Change-Id: I97b0cd7de96eced1a4023e55171b1e35b52a95c7
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-08-14 16:32:50 +02:00
Gökay Şatır
e660bb8e66 When document layer is not ready and socket message is not delayed, message is lost.
Wait for doclayer to be ready in this case.

Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Ib3e9427a89e8be7d97f7baf92bdcb6295c695ca2
2023-08-14 16:17:19 +03:00
Gökay Şatır
8570a03555 Correct menubutton control id calculation.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Ief7692cbdc479a651d350d7beab2e558e6d27b4b
2023-08-14 14:24:46 +03:00
Gökay Şatır
3d1725ea44 Cypress updates.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Ieefdcae70be0fce920e2e2b3d3b6ba1b179a6857
2023-08-14 14:24:46 +03:00
Gökay Şatır
7d084e40cb Update cypress tests.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I1c60f89d6ab68e4a61861d77383010dd7f22480a
2023-08-14 14:24:46 +03:00
Gökay Şatır
a3d9abcc20 Move all accessibility definitions from notebookbaraccessibilitydefinitions into control.notebookbarwriter.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I8db815859e91a65dc5452a0c3c0307701088514c
2023-08-14 14:24:46 +03:00
Gökay Şatır
7d0f7d7378 writer insert tab keys are added.
Replaced id based checks with uno command ones.
Removed unnecessary function from notebookbaraccessibility. We don't use automatic id assignments any more.

Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I3ad69916dea72d0e7e37430e629d74763c79005c
2023-08-14 14:24:46 +03:00
Gökay Şatır
1a2500c8d3 Merge accessibility definitions with notebookbar definitions.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I752eb0a2f44a892ed2cb7b2fd770c4d3ab997830
2023-08-14 14:24:46 +03:00
Gökay Şatır
939a7a0301 Simplify notebookbarwriter and tab page containers.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: If923c06ffd6b7bca77d25008497c390b8f3dcac8
2023-08-14 14:24:46 +03:00
Gökay Şatır
2cc714705a Remove access key assignments from jsdialogs.
Tabs' access keys are defined by notebookbar accessibility definitions class.

Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Ie04782aa5b747ea9f3b7bd3f84a33bf0554648dd
2023-08-14 14:24:46 +03:00
Gökay Şatır
f8e53bd851 Assign tab ids while defining tabs.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I51dbadb5d168f7b7f762a20a445773c6d53a511e
2023-08-14 14:24:46 +03:00
Caolán McNamara
6682a2a527 cid#318900 Out-of-bounds write
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I18f30bbe7271a93a44ce798e358277add9876454
2023-08-14 12:31:55 +02:00
Caolán McNamara
307818ba1c cid#318834 Missing move assignment operator
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I798c0e6610afca9d0d503514b33e75c35a7ccb33
2023-08-14 12:31:55 +02:00
Caolán McNamara
f7e121e2ea cid#318953 COPY_INSTEAD_OF_MOVE
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I863ce92808f93e98fecb6022324228b5acdba141
2023-08-14 12:31:55 +02:00
Szymon Kłos
4b9cbab33d jsdialog: fix spinfield precision detection
Use string based approach to avoid errors.
Eg. 36.37 was a problematic value when multiplied by 100.
This fixed indent spinfield in sidebar.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Iae25acbf59cedfd20cbcb0677fd87e08d06c3f6d
2023-08-14 12:30:02 +02:00
Szymon Kłos
eee6e49e8a cypress: fix unstable alignment test
sometimes svg generation takes more time it seems

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I0e6ad493cb452a9725235f2c01c6792126b8de9c
2023-08-13 11:35:40 +02:00
Szymon Kłos
697f4a6109 cypress: fix failing table tests
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I6132ec3a794de75caa6d1ba0c94e730cda94ea0b
2023-08-13 11:35:40 +02:00
Szymon Kłos
b85eb1b03f cypress: fix svg text-decoration detection
this was changed in the core:
commit 0a549b2c9595cd076e3b503b67df93bff380885a
svg: export text decoration for text run not paragraph

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I8906ee07c7ff88c9dcdbebe73d2c620e797a8b3a
2023-08-12 10:34:15 +02:00
Shehr Bano
e6a06eae1c FIX #7037: JSDialog: label vs textarea vs input field inconsistent paddings
Signed-off-by: Shehr Bano <shehr.bano@collabora.com>
Change-Id: I53494733c47b35d59133979c456665b4174e393c
2023-08-11 12:15:19 +02:00
Pedro Pinto Silva
16b8bead39 Revert "Add action for detecting code duplicates"
This reverts commit 8ce751a3ca.

- Any PR coming from fork fails
  - User needs to manually go to:
  settings > Actions: General > "Workflow permissions" and allow write permissions
- Right now we have too big of a threshold (26 lines) to be as useful as we would hope

Probably best to remove this action for now and instead use directly
the npm package (https://www.npmjs.com/package/jscpd#usage). Advantages:
  - More control over what is analyzed
  - It can be add as a step in make check
  - User can run it locally using make check; CI can also use that.

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I3c112218a83fd6e56e7fb2f47b24315347a74cdd
2023-08-11 11:45:21 +02:00
Rash419
47f4305050 fix: cursor jump when hyperlink popup clicked in mobileview
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I4c5f1f2923f894156f5f05382b0f54476dea8a56
2023-08-10 17:38:22 +05:30
Caolán McNamara
912dfcd08e autofill onMouseDown doesn't generate working event position for hidpi
so the autofill handle in hidpi didn't work

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I718d9a8d3954a441705849eba174fe6b5b2983c4
2023-08-10 11:41:24 +01:00
Ashod Nakashian
a42adac98f wsd: add the web-server URL to the media-src list
We need to allow loading media sources from
the web-server URL. This seems to be necessary
at least on iOS.

Change-Id: Ic7b23c4f80b975460de9311a67f3c5cb51758d14
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2023-08-10 12:24:08 +02:00
Andras Timar
85ee03f98f CollaboraOnline#6546 enable automatic color in default paragraph style
use the xml token "use-window-font-color" to toggle auto color on.

https: //github.com/CollaboraOnline/online/issues/6546
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib14b144ce6f593114a8130f5816f479d5cd4fe85
2023-08-10 12:22:26 +02:00
Pedro Pinto Silva
c89cccfc7a Welcome: allow scroll bar
Otherwise content is not reachable.

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: Ibef06bd7ee18702674e41e8f942449ef49ffdd62
2023-08-10 11:48:36 +02:00
Marco Cecchetti
96a7cfb25e a11y: provide info about current table and cell to screen reader
When we get in one or more tables screen reader reports row and column
count.
When we get out one or more table screen report reports "out of table"
for each table.
When the fosused cell changes screen reader reports new row/col index.
Screen reader reports cell paragraph content, too.
Added also cypress tests for checking that the table/cell description
string is correct.

Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: I078b29a2f76f91df479f75db76113c80405f7169
2023-08-10 09:29:09 +02:00
Darshan-upadhyay1110
7825f82ce1 Remove open_local_editor button in tablet view
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I18908150ee537bfe7dd36b0b94f8baa11d2739ea
2023-08-10 12:51:40 +05:30
Caolán McNamara
5185b7bedf cid#318934 silence Untrusted loop bound
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Icd7a7d3394dda93045f97481b109498fca3c01c8
2023-08-10 08:47:25 +02:00
Caolán McNamara
d79d86ed91 cid#318844 Dereference before null check
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ie3b4da580b86f4f313825dabb6d73af1508432d9
2023-08-10 08:47:25 +02:00