Commit graph

22944 commits

Author SHA1 Message Date
Michael Meeks
7031c3b0ce cool#8328 - config header fixup.
config.h should be included as the 1st line in each source file.
It should not be included in headers.

config_version.h which changes on every commit should not be
included widely - so remove it from the HttpRequest heeader to
save tinderbox's ccache.

Fetch version info from helper methods rather than in-lining via
defines, to better encapsulate.

Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Change-Id: If449a36f1ac61940f04d70d5f4180db389d9b4c4
2024-02-21 09:35:25 +00:00
Marco Cecchetti
d93fe44882 calc: cut/paste for a cell content doesn't work in Firefox >= 121
Limit the workaround for "no copy event is emitted by hitting CTRL+C/X
with no selection" to Firefox version from 117 to 120.

Signed-off-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Change-Id: I00d3addc0330862bf07eebb8d030d1156fc6e321
2024-02-21 10:29:32 +01:00
codewithvk
277237911f Fix: Multiple Encoding During Document Renaming
On the client side, when setting up the socket, we encode  beforehand, so there's no need to encode it again.

Signed-off-by: codewithvk <vivek.javiya@collabora.com>
Change-Id: I09e59c6fdda4c93de5dd36fca5023ac88926c4d4
2024-02-21 09:38:23 +01:00
Szymon Kłos
599896176d Avoid exception on view list update
Fixes and gives more details for debugging in case of:

INCOMING: viewinfo: [{"id":3,"userid":"admin","username":"admin","userextrainfo":{"avatar":"http://.../avatar/admin/64","is_admin":true},"readonly":"0","color":0}] cool.html:323:37
Exception TypeError: this.map._viewInfo[this.map._docLayer._viewId] is undefined emitting event [object Object] onUpdateViews@http://.....:9980/browser/08e0fd2e1b/src/control/Control.UIManager.js:823:31

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I915f4d6e235426d1ae1d12c64629a6e250c16766
2024-02-21 09:21:36 +01:00
Darshan-upadhyay1110
804f299b81 Handle sperator case for tree Widget
- separator should treated as UI not any object value
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: Ie6182dda40b7fd3c0d1ea87c5df78a46239677ed
2024-02-20 09:30:52 +01:00
Rashesh Padia
824988663f js: couldn't pass json when saving fails when migration
- when saving the json sent to client was wrong

Signed-off-by: Rashesh Padia <rashesh.padia@collabora.com>
Change-Id: Ib5735dcf81db4257256a909fa7dface184f1c53d
2024-02-20 00:50:50 +05:30
Rashesh Padia
edeea651a8 indirection: fix: 'Cluster is scaling..' popup when reconnecting
Signed-off-by: Rashesh Padia <rashesh.padia@collabora.com>
Change-Id: I5fc4017e647403822fbb0ceefd00b8aa7cfde531
2024-02-20 00:50:50 +05:30
codewithvk
0431c58465 disable file renaming in readonly mode
Signed-off-by: codewithvk <vivek.javiya@collabora.com>
Change-Id: I11b07d8352a0e29a4756db489f570cee55c9d03e
2024-02-19 17:02:48 +01:00
Pranam Lashkari
ee7715353f zotero: fix long title taking all the space in dialog
problem:
when titles are long they go beyond dialog area and are not scrollable,
this hides the date and author details which can not be scrolled either

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Iae8a5affb870faff0639ac9083e118cec40debd0
2024-02-19 19:56:42 +05:30
Miklos Vajna
8d931d8ea4 cool#8292 browser, clipboard: fix navigator.clipboard error handling
If the notebookbar's paste or paste special button is pressed and
Chrome's clipboard permisson popup is rejected, then nothing happened,
while Firefox case was showing a more helpful popup, explaining the
problem.

This has two sides: error handling should be better and also the error
should not happen in the first place. The error can also happen when the
<iframe> is not set up correctly, but that's to be handled on the
nextcloud side.

When there *is* an error, improve error handling by restoring the
codepath that matches Firefox:

- extract the rest of the code after invoking the async clipboard read
  in _execCopyCutPaste() to a new _afterCopyCutPaste()

- paste case: invoke _afterCopyCutPaste() when the paste fails

- paste special case: only pretend we're in paste special mode if the
  success fallback is called

  - if the failure callback is called, then invoke
    _openPasteSpecialPopup()

With this, the "has async clipboard, but the permission request
rejected" and the "don't have async clipboard" codepath matches.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I727f00a1cf94dd1837e15e60410e1798de5daecc
2024-02-19 12:18:20 +00:00
Szymon Kłos
2085009757 calc: calculate correct position when scrolling to comment
In calc all comments are hidden and only shown when
mouse hovers the cell to which the comment is attached.
Anchor was always a wrong value so when we were at
some more distant position - it always jumped to random
place on hover.

This is regression from:
commit 6550e713c4
annotation: calc scroll vertical to make selected comment visible
which was followup for:
commit 2bf93e34c3
annotation: writer scroll to make selected comment visible

We need to compare the same type of positions. Now all the
values will be in core pixels and methods have comment which
indicates that.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I8e86a31087ff491ace92f407b166788cea73b25a
2024-02-19 12:02:11 +01:00
Hubert Figuière
203f7b462c globals: Make sure coolParams.get() return an empty string instead of null
This fixes a regression where `framed.doc.html` wouldn't load.

Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I57b4a617755be4615ec6ec734f6e084d57eaebce
2024-02-19 10:29:36 +01:00
Pranam Lashkari
de85b2dada zotero: fix missing field data in the dialog
problem:
in some types of items fields may be named differently,
leading to fields not being found and empty dialog entries.

currently only itemType 'case' was culprit but in future there maybe some other types too

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I24b58dc474a555b3f26c34bb4ae0b144c06abc57
2024-02-19 09:58:58 +01:00
Pranam Lashkari
ed62a19701 cypress: add tests for tracked comments operation
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: If1a2bbe7d9d3ec7fa821db91aea1f7b3ed6f2c1e
2024-02-18 09:45:46 +05:30
Caolán McNamara
f2c07343c5 getComputedStyle is very slow, but we don't need it for LTR comments
but it gets computed anyway, move it so its only called if actually
needed

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I187540df6def6b4f92199e273665e04ed493035a
2024-02-16 20:55:10 +00:00
Michael Meeks
e7e909bf3d Don't complain about non-async dialogs on load & save.
Change-Id: I2e846ea99e8d062088c80be166c4fc73bb3f004d
Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
2024-02-16 20:31:53 +00:00
Hubert Figuière
65a33fde17 calc: Added protect sheet command in the notebook bar
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I845bd0dd4d8da4955c88e932c2701931b46e155f
2024-02-16 19:55:32 +00:00
Gökay Şatır
c69e14a5dd Remove unused file.
This was added for IE11 compatibility.

Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: I4be5d3199c1354e2e36ac31734c3ed4ffb46cd54
2024-02-16 15:13:33 +01:00
Gökay Şatır
852fba249a add a comment for a potential unused file.
Signed-off-by: Gökay Şatır <gokaysatir@gmail.com>
Change-Id: Iee185c006f158b49d43834e756b40f236cc94b16
2024-02-15 11:58:53 +03:00
Hubert Figuière
8b9c241347 calc: Hide rename and delete in the menu if the sheet is protected
This is consistent with LibreOffice: you can't delete nor rename
a protected sheet. It did nothing already.

Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I81e91f0cddf8b0cf6004f1668cb996b7cd0ba8e4
2024-02-14 14:05:56 +00:00
Hubert Figuière
cbf452b03d calc: Receive the sheet protected status
This set the CSS class 'spreadsheet-tab-protected' on the sheet tab.

Requires LOKit change https://gerrit.libreoffice.org/c/core/+/163325

Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: If199b36ba593c5e603d017346969360b6191fe5b
2024-02-14 14:05:56 +00:00
Szymon Kłos
b4c0556a15 jsdialog: add JSDialog.SynchronizeDisabledState helper
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I32bd297d961561e3de8d01e43c2c994b70eabd99
2024-02-14 13:16:58 +01:00
Szymon Kłos
2bd25b15df cypress: test disabled state updates
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ib0c123e82360edcdf6c4bad533b40b3d5cc04bc2
2024-02-14 13:16:58 +01:00
Szymon Kłos
8f3b620a44 jsdialog: css: improve disabled widgets
Don't show grey border for labels and similar widgets...
Now we have "disabled" property on the root container of
every widget. We should style disabled state based on that.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I9e49783e8905a4c36b0010fa19d5feb869151e77
2024-02-14 13:16:58 +01:00
Szymon Kłos
21a469d215 jsdialog: checkbox disabled state
Update checkbox state on jsdialog action.
To allow click handler use it's current state not
initial data.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I95796771a1347c78a9c5e1983e3b0af61a236bb2
2024-02-14 13:16:58 +01:00
Szymon Kłos
e05881b15d jsdialog: added Util.StateChange
- move listener watching disabled state to separate file
- use also for listboxes, comboboxes, spinfields
- handle state in menubutton

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I841413f17abd6398a7e82496c3f20bdc52ab9514
2024-02-14 13:16:58 +01:00
Henry Castro
6c32bd6276 browser: impress: override invalidate preview tiles
Invalidate tile preview when canonical view id
changes.

Change-Id: I62d2e20946ec863ceb71014bb0216675316a658b
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-02-14 11:48:17 +00:00
Andras Timar
6d13157a83 Update l10n files for Weblate
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I3fbb566a9b5284eead5ea46914e3dcd9c6712125
2024-02-14 12:45:09 +01:00
Joan Montané
70ecd173f5 Translated using Weblate (Catalan)
Currently translated at 90.0% (516 of 573 strings)

Co-authored-by: Joan Montané <jmontane@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/ca/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ic2705706c574b1676baaedfefcbc7d077a70965f
2024-02-14 12:41:26 +01:00
Владимир
889bf18ec4 Translated using Weblate (Russian)
Currently translated at 97.0% (556 of 573 strings)

Co-authored-by: Владимир <plazotronik@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/ru/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I535ee4dac1c6dc8f7724fcf6acef18bec05ecf9f
2024-02-14 12:41:26 +01:00
Henry Castro
f6a0c366db fix fail unit test "builddir != srcdir"
Change-Id: I7a5b96da9e892c1948cbbc52c57344a2b67daab6
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-02-14 09:12:12 +00:00
Henry Castro
72b35d7d02 browser: fix scroll the currently selected tab
1) Load a document with a large number of tabs
2) The last tab was selected

Change-Id: I0326bf2e374dddd7e075ea5806e5aefe5f598611
Signed-off-by: Henry Castro <hcastro@collabora.com>
2024-02-13 19:31:22 +00:00
Szymon Kłos
a82d1feafe jsdialog: handle disable action on mobile
- unify desktop and mobile toolbox code
- toolbox should apply disabled state on child nodes
- this is needed to handle disable action, previously
  we received JSON for complete widget

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I018d7505a383ec45c9260f3629daaa9771579995
2024-02-13 13:46:22 +00:00
Neil Guertin
e0c5c85718 Reenable logging socket messages before debug mode
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I2452d4c7e3e3152533b676fb2db81ef95d96fb54
2024-02-13 09:43:04 +01:00
Hubert Figuière
474ff7612b calc: Add protect sheet command to Tools menu
Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: I1511419858e361ad7a7653b2939e8d516c2d7e59
2024-02-12 21:26:52 +00:00
Caolán McNamara
377c826894 disable getting the host printer queue
and default printer. In typical deployment these should be effectively
no no-op, so mostly aligns debugging env with deployment env so whatever
printer happens to be installed locally has no effect.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I09651d9af2de9817d4d278d25937c9ce0dc87352
2024-02-12 20:39:02 +00:00
Pranam Lashkari
74bfa7398a annotation: added comment layout status enum for better readability
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Id24c3f1fb0b612b3ba6a0e3a65b527ad53c5b941
2024-02-13 00:31:57 +05:30
Pranam Lashkari
5b3cfbab26 annotation: refresh comments on accept/reject all tracked changes
problem:
tracked comments deletion was not reflected with accept/reject all changes

implementation explaination:
we have different implementation for accept and reject all changes,
due to fact when we reject the changes those elements already exists in DOM,
we can mark them as rejected and modify them.
while on the other hand with accepting change DOM elements need to rearranged.

i.e: if comments are deleted while being tracked, and we accept that changes,
comment needs to be removed from DOM and if we rejected that change we just need to remove CSS class.

This implementation takes care of cases when comments are being deleted, other cases of addition or
modification works usually

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I0964fbd220f450cb144a115e8203250467e7edae
2024-02-13 00:31:57 +05:30
Caolán McNamara
71a427c465 cid#344351 COPY_INSTEAD_OF_MOVE
and

cid#336280 COPY_INSTEAD_OF_MOVE
cid#318848 COPY_INSTEAD_OF_MOVE
cid#318964 COPY_INSTEAD_OF_MOVE
cid#344354 COPY_INSTEAD_OF_MOVE

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I60a904be4b5edf61cfd5b2efab81e5c1a089b661
2024-02-12 11:12:33 +01:00
Neil Guertin
794d24b046 Add header to debug menu
Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I5875a5e221c732b8130c44c79d6e18866e4dd2af
2024-02-10 19:12:54 +01:00
Hubert Figuière
dece121bf2 calc: Enable sheet protection
Require LOKit change Ib8e8209225d027472c1f2eef57839df5784acf30
https://gerrit.libreoffice.org/c/core/+/163205

Signed-off-by: Hubert Figuière <hub@collabora.com>
Change-Id: Ie54b355ad794a0e34fabbd8e56b4a17a936686f7
2024-02-10 09:41:01 +00:00
Neil Guertin
f76333da3b Debug overlayData improvements
Rename overlayData to _overlayData
Tools clear their data on remove

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: If0f17c4d18b683247a15f1b880dd7c0e373809fc
2024-02-09 17:48:00 -05:00
Neil Guertin
0686e6a2cf Add Tile Data debug tool
Merge tile update data tracked in several places into one tool

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: Iabf63ca30795d8791894e575fc631ccc9f676183
2024-02-09 17:48:00 -05:00
Neil Guertin
4ca1ebb852 Fix ping measurement from tile invalidations tool
Rename variables and functions
Move server ping to separate tool
Fix keypress detection for timing

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I15efed25ccacac19e6e96fdff767d332e8cc5fcd
2024-02-09 17:48:00 -05:00
Neil Guertin
c9252e1574 Minor debug improvements
Rename and reduce scope of variable associated with
tile invalidations debug tool

Signed-off-by: Neil Guertin <neil.guertin@collabora.com>
Change-Id: I3e22d69e9c5867d1194a42520b35231e20b1ca01
2024-02-09 17:48:00 -05:00
Martin Srebotnjak
c8fc81e9a0 Translated using Weblate (Slovenian)
Currently translated at 100.0% (573 of 573 strings)

Co-authored-by: Martin Srebotnjak <miles@filmsi.net>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/sl/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I910a4d881a9c8bb8cd573e15fe63dae730ec6595
2024-02-09 20:37:31 +01:00
Rhoslyn Prys
b0a8987713 Translated using Weblate (Welsh)
Currently translated at 100.0% (573 of 573 strings)

Translated using Weblate (Welsh)

Currently translated at 100.0% (22 of 22 strings)

Translated using Weblate (Welsh)

Currently translated at 99.3% (569 of 573 strings)

Translated using Weblate (Welsh)

Currently translated at 59.0% (13 of 22 strings)

Translated using Weblate (Welsh)

Currently translated at 100.0% (110 of 110 strings)

Co-authored-by: Rhoslyn Prys <rprys@posteo.net>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/android-app/cy/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/android-lib/cy/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/cy/
Translation: Collabora Online/Android app
Translation: Collabora Online/Android lib
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I1fd5c876897b291e9ec7ff035f480edde9188c3d
2024-02-09 20:37:31 +01:00
Ashod Nakashian
7bba9b5b7d wsd: refactor findOrCreateDocBroker
This separates error-reporting to the client
through the WebSocket from the actual logic
of finding or creating a DocBroker.

This should be useful in creating a DocBroker
without having the client's WebSocket.

Change-Id: I66fc8ac09264fcbdb79ddf62867b8551a72929d6
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-02-09 15:50:50 +00:00
Ashod Nakashian
055b3535a0 wsd: optional timeout to getHttpSession helper
Change-Id: Ic7bfc332a7ce43884219fd04abe6d82b8c66007c
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-02-09 15:50:50 +00:00
Ashod Nakashian
92e52e663c wsd: support sendMessage with string literals
Change-Id: I1caaf408c424c1cb11fec6aaf9d894dac7f99f93
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2024-02-09 15:50:50 +00:00