Commit graph

21507 commits

Author SHA1 Message Date
Szymon Kłos
da75488a46 jsdialog: handle vertical tabcontrol
vertical tabcontrol has "vertical: true" property

for now just handle it as normal tab control,
it doesn't use tabpages but regular grids for
tab contents

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ie374f8c68cbbf1e3076ca884ab54568ee204f04c
2023-08-21 15:19:23 +02:00
Darshan-upadhyay1110
7ef605badd Switch tab using keyboard shortcut
LO is offering this using `CTRL`+`PageUp` or 'PageDown`.
- but there are some browser restriction related to security purpose some of the event we can not prevent.
- for an example CTRL + PageUp will not be prevented using JS in browser ( as per browser security rules )
- so i have tried to add this shortcut using Ctrl + Alt
- we can cycle through all sheets.

Adding this small enhancement  as part of this `HackWeek` :)
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I4e76a0cc382fbe97f16037c8f9d78174e8663491
2023-08-21 14:44:37 +02:00
Skyler Grey
de7d4335ff Fix failed starts when core is at a relative path
- Previously giving --with-lo-path as a relative path caused collabora
  online to crash with "component context fails to supply singleton"
  errors
- This patch uses readlink on the with-lo-path option, expanding it into
  its full canonical path
- I could probably have gotten away with realpath, but for consistency
  with --with-lokit-path I decided to use readlink -f

Change-Id: I16aacddbda9749451578fb7aded6c3c4e145ee26
Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
2023-08-21 13:48:21 +02:00
Maks Wolkowinski
31ae779d82 feat: Add tooltip to hide menu button (compact view)
Signed-off-by: Maks Wolkowinski <m.wolkowinski@beebuzziness.com>
Change-Id: I05011bf9ffec99af8558c7af06dce5e350511f7c
2023-08-21 10:45:13 +02:00
Rash419
8310af30f0 fix: empty mobile wizard when opened for the first time
- it was only affecting wizard with tabs

Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I6172a3a1a498982927e63676c4743be8f2ff9d80
2023-08-19 10:14:40 +02:00
Pedro Silva
9ac61152e1 Fix Rename document button works only on tabbed view #7109
We forgot to dispatch it

Signed-off-by: Pedro Silva <pedro.silva@collabora.com>
Change-Id: If1ae87ee8029d469d092680437023d389efcdec7
2023-08-19 07:55:10 +02:00
Rash419
c9e7591add clusteroverview: send routeToken with auth message
Signed-off-by: Rash419 <rashesh.padia@collabora.com>
Change-Id: I6412d68ef0c86d7a618eaf0ad252c16dee565d77
2023-08-18 23:27:04 +05:30
Gökay Şatır
6137636083 Add other missing classes.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I5fb6148e872776a3d6c3adc9f5c1421cf57ea2e8
2023-08-18 15:08:53 +03:00
Pedro Silva
d45b307e3f Notebookbar definitions: add missing class for dark mode toggle
Signed-off-by: Pedro Silva <pedro.silva@collabora.com>
Change-Id: Ie720f4dc762623bff0682162385fda7d591ebe0c
2023-08-18 15:08:53 +03:00
Pedro Silva
1404686fde Notebookbar definitions: add missing class for show resolved comments
Signed-off-by: Pedro Silva <pedro.silva@collabora.com>
Change-Id: I1de88564a4bd588544801f66518b964afa253a18
2023-08-18 15:08:53 +03:00
Pedro Silva
a1e916812f Notebookbar definitions: add missing class for collapse tabs
Signed-off-by: Pedro Silva <pedro.silva@collabora.com>
Change-Id: Ib9ca5fb61908cd2e5d621158478ab29aaff4b1c0
2023-08-18 15:08:53 +03:00
Gökay Şatır
edafed2413 Add missing class names to notebookbar definitions.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I15fb9fdba0d019a865c1edf42f1ab7b2197b4136
2023-08-18 15:08:53 +03:00
Gökay Şatır
1fd4c05111 Add "class" property to JSDialogs items.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I130b28ff40f9adf6bf05e2aed433e8ecc92acb1d
2023-08-18 15:08:53 +03:00
Darshan-upadhyay1110
c3aaae077f Add missing dark mode toggle in mobile view
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: I89100d703444e8bfe2a8960d00c62a1e1ea88a84
2023-08-17 19:08:22 +05:30
Pedro Pinto Silva
3103ab5c66 Add missing rename document icon
Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Change-Id: I219161ffc505c5093f3f8226960f7a7d35455d7e
2023-08-17 15:13:41 +02:00
Aron Budea
a1a6817e4d unocommands.py: Treat JS/TS files as UTF-8
Otherwise eg. non-ASCII shortcuts appearing in files can cause
failures like this.

Traceback (most recent call last):
  File ".../rpmbuild/BUILD/coolwsd-23.05.2.2snapshot/scripts/unocommands.py", line 454, in <module>
    toolbarCommands = extractToolbarCommands(onlineDir)
  File ".../rpmbuild/BUILD/coolwsd-23.05.2.2snapshot/scripts/unocommands.py", line 163, in extractToolbarCommands
    for line in f:
  File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]

Encountered after 1a2500c8d3.

This is not ASCII in browser/src/control/Control.NotebookbarWriter.js:
`'accessibility': { focusBack: true,     combination: 'AI',      de: 'ÖI' }

Signed-off-by: Aron Budea <aron.budea@collabora.com>
Change-Id: I72aac2809530c14b9440f73e5072db17770f438a
2023-08-17 11:55:34 +02:00
Caolán McNamara
89f283c676 cool#7102 fix 2nd presentation under chrome not appearing
On entering full screen the normal browser window goes "idle" on losing
focus. When the full screen presentation exits no "focus" events gets
sent to the normal window so clicking "presentation" again doesn't do
anything as idle inhibits anything getting actually sent to the server.

in:
commit 5f655a7555
Date:   Tue Oct 13 19:26:16 2015 +0300

    loleaflet: print handler tdf#94607

a similar _map.focus() is done after a similar L.DomUtil.remove()

and doing there same here gets this case to work.

https://github.com/CollaboraOnline/online/issues/7102

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Iae44ba949af2a64bf669b9d5f1113c647a354af1
2023-08-17 09:47:11 +01:00
Caolán McNamara
851c232531 cid#318843 COPY_INSTEAD_OF_MOVE
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Icb757fdc094f428a351df5db6afa53da04be51d1
2023-08-16 15:15:59 +02:00
Caolán McNamara
62504735ea cid#318868 silence bogus Double free
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I4ef594a2274a6a2b646ce2a305cdab6263390ef7
2023-08-16 15:15:59 +02:00
Gökay Şatır
a45b4e875f Add accessibility keys for insert and format tabs.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I575520db1c10abd46957912dd21e3a1362dc7ebb
2023-08-16 14:58:31 +03:00
Gökay Şatır
10b58a0a4f Add accessibility definitions to draw UI.
Also simplify definitions.

Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Ieccb431ba66a25a4e35ea4c2cb59c4490b84986d
2023-08-16 14:58:31 +03:00
Gökay Şatır
9fd60f55e0 Update Cypress tests.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I7bc9bca411f8caade56a56e9de16ad31921db16c
2023-08-16 14:30:14 +03:00
Gökay Şatır
b304644be4 Calc - Add remaining tabs' accessibility definitions.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I5dfad5ec68277ec5e45df2885afdea853318eb39
2023-08-16 14:30:14 +03:00
Gökay Şatır
9436512afb Calc File and Home tabs' accessibility definitions.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I3eef334e14b710ab306cea8b7a3e3f11b986e245
2023-08-16 14:30:14 +03:00
Gökay Şatır
33abd9c437 Initialize contentlist with empty array.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I58abed98dffecb5d819e8a75f68dbe9d38a0149d
2023-08-16 14:30:14 +03:00
Gökay Şatır
49354607e0 Re-enable multi-language support on accessibility definitions.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I5d376260d05f72ebd56a8d4313dcbb1845b5041c
2023-08-16 14:30:14 +03:00
Gökay Şatır
34635de5d4 Calc: Add ids to notebookbar definitons & simplify definitons.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I0b4e7b17f6d5e361e2cf493b39459493c0441df1
2023-08-16 14:30:14 +03:00
Szymon Kłos
ac8440fea7 jsdialog: add minimal size for treeview
Without it in calc -> insert -> chart treeview
for chart type selection was invisible / 0px width

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Iaf28c4860adcd00591a638fa10838fe8719bee23
2023-08-16 09:16:51 +02:00
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