Commit graph

24181 commits

Author SHA1 Message Date
Miklos Vajna
37062207bf cool#9219 clipboard: only accept downloaded data in own format
Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: If11229b713174a6c3d1a9794281858d6a8f64294
2024-06-11 14:45:50 +01:00
Skyler
405272ceef fix(mobileWizard): Always start at the top
Previously, when entering or exiting mobile wizard sublevels you would
start scrolled down to the place you were before. For example, if you
scrolled down a few items on the main context menu of an image in order
to reach "arrange", you would always end up right at the bottom of the
"arrange" menu.

By always scrolling up to the top, we can prevent you from ever having
content hidden above you.

Signed-off-by: Skyler <skyler.grey@collabora.com>
Change-Id: I02365ecef859fb6f199d14a12a49937d5a30b8e7
2024-06-11 09:23:26 +00:00
Skyler Grey
edc0244414 fix(calc): Prevent following view jumps
Previously we were mixing up lat/lng, which made calc jump to unexpected
places when the person we're following's cursor is offscreen.

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: I4db4c93118fbc3ffd04c7152652ccd2b26209b5d
2024-06-10 21:06:00 +02:00
Andras Timar
abf67f009f Adapt cypress test to string changes in co-24.04
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ibf706971dee4119a0bb3b4c897e6a51a712add83
2024-06-10 20:38:13 +02:00
Andras Timar
835a5f8e0d Updated UNO command translations (co-24.04)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ib61acdf7ecacd90969e812a2ba64469bd44a7c61
2024-06-10 20:38:13 +02:00
Andras Timar
4f0b165b2c Updated UNO commands (core co-24.04)
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I6ef81f7ad66502df2a5b8512489687a4427d5f48
2024-06-10 20:38:13 +02:00
Andras Timar
3647cf9a3c .uno:BackColor is deprecated
See https://cgit.freedesktop.org/libreoffice/core/commit/?h=distro/collabora/co-24.04&id=be3d34b5d6b97c3eb12ab3f84ce2da2ef965a928

Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I0e33d6b9e3e38ccbfcb95f6703cf0395d4280842
2024-06-10 20:38:13 +02:00
Skyler Grey
e80362311d fix(contextMenus): move above UI elements
On small window sizes, a context menu may be forced to open in such a
way that it goes over the same region as the notebookbar or spreadsheet
tabs.

In that case, the context menu should be above the other element, or
some of the context menu options could be unreachable.

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: Id269e3fb9bc2251677a0792d83fc51bd56b9cb21
2024-06-10 15:25:44 +02:00
Miklos Vajna
010bab3b77 cool#9219 clipboard: only download clipboard-looking URLs
The net.service_root setting means we can't require that this is at the
start, but at least we should not accept any random URLs there.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I2f492564066206d17d66d966e77e6abaf8104d1a
2024-06-10 10:36:51 +01:00
Miklos Vajna
fa1a4771b1 cool#9219 clipboard: fix Android build
Seeing that e.g. StorageBase::getHttpSession() does the same.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I3c453713af9b454a00719ce31ebfc4e09a3f7699
2024-06-10 10:36:51 +01:00
Miklos Vajna
cb8374a987 cool#9219 clipboard: use async HTTP in setclipboard
This is meant to help when the HTTP response arrives slowly and other
users want to interact with the document in the meantime.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I4f9c0a1493e7b3582691bbdca2889e19422b7458
2024-06-10 10:36:51 +01:00
Miklos Vajna
e1f4e8cb79 cool#9219 clipboard: replace URL with a JSON for setclipboard
This allows dispatching the paste or paste special UNO commands on the
server, after the clipboard download finished. In turn that allows
changing the clipboard download to be async in a next commit.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I2120ed0cf4ae506fb5f43adb4319b4c76bca9e18
2024-06-10 10:36:51 +01:00
Miklos Vajna
213aca81fb cool#9219 clipboard: support URLs in the payload of the setclipboard command
Copying the full clipboard (including ODF) from a remote server into the
JS client failed with:

Refused to connect to '...' because it violates the following Content Security Policy directive: "connect-src ..."

If this happens, still send the original URL to the server, so it can
download the full clipboard, which gives better result for pasting,
compared to going via HTML only.

Not done in this commit: 1) the JS still tries to get the clipboard
itself, we download on the server only on failure and 2) the server does
a blocking HTTP download, which may not be wanted.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I9ed8c8050f9dbe71dc8fcd36c9d8fa6e8bba44f6
2024-06-10 10:36:51 +01:00
SC
c3956f3044 Translated using Weblate (Portuguese)
Currently translated at 100.0% (478 of 478 strings)

Translated using Weblate (Portuguese)

Currently translated at 100.0% (600 of 600 strings)

Co-authored-by: SC <lalocas@protonmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/help/pt/
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/pt/
Translation: Collabora Online/Help
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: If34227a255cbea9ad9a13bd34255d2200f370139
2024-06-10 09:30:24 +02:00
Matthaiks
1cada9cece Translated using Weblate (Polish)
Currently translated at 100.0% (600 of 600 strings)

Co-authored-by: Matthaiks <kitynska@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/pl/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I481d58a751d5ec4e6f37a875fb5dd6f9af655512
2024-06-10 09:30:24 +02:00
Andras Timar
f8d3258c53 Translated using Weblate (Hungarian)
Currently translated at 100.0% (600 of 600 strings)

Co-authored-by: Andras Timar <andras.timar@collabora.com>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/hu/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I3ecb3de4f396ea98c7d0f63eb839a75f05b5618d
2024-06-10 09:30:24 +02:00
gallegonovato
06dd63ed24 Translated using Weblate (Spanish)
Currently translated at 100.0% (600 of 600 strings)

Co-authored-by: gallegonovato <fran-carro@hotmail.es>
Translate-URL: https://hosted.weblate.org/projects/collabora-online/ui/es/
Translation: Collabora Online/UI
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Iac01f6de5a9812f3895e59c38f15c5c5e796af97
2024-06-10 09:30:24 +02:00
Pranam Lashkari
3590d06b6f annotation: avoid comment conflict dialog for self comment removal
problem:
when an auto added comment was cancelled it displayed comment conflict dialog

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I2dcfd4d28015b41d9d88a0822506d918851223c3
2024-06-10 05:39:28 +03:00
Pranam Lashkari
3a45eee598 annotation: added comment removal warning dialog for conflict
problem:
if comment is removed by another user while its being edited,
that can not be overwritten like in the case of modification

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I4106f8d735207179a8938448982afbfcd4723929
2024-06-10 05:39:28 +03:00
Pranam Lashkari
ccdf5a379f annotation: display dialog for conflicting comment modification
Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: Ie45aa11a0df506fdb8c9d0d78b186323ee3a4242
2024-06-10 05:39:28 +03:00
Pranam Lashkari
80aae586a2 annotation: show dialog to user when comment list changes
inform user before updating comment list if user is editing comment

We also take care of importing latest update of comment in onACKComment,
because when we show dialog comments are always autosaved. So any subsequesnt
operations (i.e: save or cancle etc) will always trigger onACKComment.
problem:
if user was editing any comment and entire comment list was reimported
(ie: if another user enables show tracked changes) then comments will
not load correctly and will be invisible until doc is reloaded.

Signed-off-by: Pranam Lashkari <lpranam@collabora.com>
Change-Id: I55274633fac0da49989141873f87f29936d1515f
2024-06-10 05:39:28 +03:00
Caolán McNamara
136e4c5dd0 Don't show audit snackbar if all entries are all 'ok' state
I see this on a local nextcloud where the audit dialog only has one entry
which is "ok".

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I55f12125cbc0ca4c88c9220ed114d455e84639e0
2024-06-07 18:46:01 +02:00
Skyler Grey
90a9c3c32a fix(prefs): Add compatibility with existing names
I figured out a way to stop compatibility breakages being so annoying
with the prefs refactor without needing to keep a prefs dictionary
around forever.  If, on starting the application, we set new preference
names to old preference values we can choose when to break
compatibility.

This will allow us to do so later on, i.e. a significant time after the
rename, when many users will have had their preferences migrated and the
version with the old preference names is no longer supported.

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: I5f4101fb95b5f3b2caaf9ebaf353eb591024dd97
2024-06-07 09:02:34 +00:00
Skyler Grey
f9c3447061 fix(prefs): Use strings for ui_defaults values
Previously we converted some ui_defaults values to booleans.
Unfortunately, when we save similar preferences to LocalStorage, we can
only save them as strings. To make sure code doesn't get booleans when
it's expecting everything to be a string, let's only send strings back
in our ui_defaults json

A nice followup to this might be to continue standardizing ui_defaults
transformation code on the server side so that its use is minimal (e.g.
uiMode, uiTheme variables), however an overhaul of server-side
ui_defaults was deemed to risky for now

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: I35ce175bf38da40361efd6f246264d0733e975e9
2024-06-07 09:02:34 +00:00
Skyler Grey
f93a9ee086 fix: Use global.savedUIState instead of ui_default
savedUIState isn't a normal UI_default, so it doesn't show up in the
ui_defaults list, and we can't fetch it with our prefs helper. Instead,
we should use the property on window

As a followup, it may be nice to make savedUIState be treated like a
normal ui_default, but I think that an overhaul of server-side
ui_default stuff is too risky for now

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: Ia66570c4694608a5caf7feba60208f34ca3c8ad3
2024-06-07 09:02:34 +00:00
Gökay Şatır
772339446c Skip a failing test for now.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I5f662c186bbb87c58e5b3e56861628612f1ed012
2024-06-06 21:22:17 +03:00
Gökay Şatır
441642c9da Don't check text selection handlers on desktop. They're hidden on desktop.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I826c7c2af914f1480b55b1dd394eb57307a41997
2024-06-06 21:22:17 +03:00
Gökay Şatır
20500adc26 Fix null pointer issue.
Signed-off-by: Gökay Şatır <gokaysatir@collabora.com>
Change-Id: I7afe7c83c96f94584372db9d709e91563ece8b51
2024-06-06 21:22:17 +03:00
Skyler Grey
c19c9718e6 fix: Correct typo in function name
Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: I57f6f19fd9e4e4f7e547714859166cabbb7da61f
2024-06-06 09:48:18 +00:00
Skyler Grey
411a325106 fix(ScrollSection): Standardize on isRTL
In If4261a3e32375f6127241b846b97a3b4ac29eb0b, I introduced isRTL, which
can be set at construction of a ScrollSection. Unfortunately, some
places in ScrollSection still used isCalcRTL which could theorectically
be out-of-sync with isRTL, causing inconsistency in different parts of
ScrollSection code. This commit standardizes on only using isRTL.

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: Ieaaa373c4db6d48e57e9cfe730d1b4bdffa20a8a
Refs: If4261a3e32375f6127241b846b97a3b4ac29eb0b
2024-06-06 09:48:18 +00:00
Skyler Grey
fc99b2b5ef fix(RTL): Unflip horizontal scrollbar
This is a fix for a regression which I introduced in
If4261a3e32375f6127241b846b97a3b4ac29eb0b.

Before this fix we were flipping the direction of scrolling on RTL mode
twice, once in onMouseMove and once in scrollHorizontalWithOffset. This
had the effect of cancelling to not flip the scroll at all. Oops.

The scrollHorizontalWithOffset isRTL distinction is still important to
keep for panning, so I'll remove the other one.

Refs: If4261a3e32375f6127241b846b97a3b4ac29eb0b
Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: Ie8aa49196ebf2bb04ccbba46e7c0668a9860191b
2024-06-06 09:48:18 +00:00
Skyler Grey
f419700762 fix(mobile): show RTL scrollbar on the proper side
Mobile (not tablet) mode has a different sort of scrollbar to desktop
mode. Like the desktop scrollbar, it should render on the other side if
we are in RTL mode.

Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: I2bcedbe79e572cc59a60648262ff77a48673e555
2024-06-06 09:48:18 +00:00
Szymon Kłos
587504a662 jsdialog: use early initialized map
Fix for using uninitialized app.map, when calling cool.html
without parameters:

Uncaught TypeError: Cannot read properties of null (reading 'fire')
    at JSDialogMessageRouter.processMessage (Util.MessageRouter.ts:95:12)
    at NewClass._onJSDialog (Socket.js:1540:26)
    at NewClass._onMessage (Socket.js:1292:9)
    at NewClass.showModal (Control.UIManager.js:1139:14)
    at NewClass.showInfoModal (Control.UIManager.js:1250:8)
    at main.js:79:16
    at main.js:137:2

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I9307e1117e63f9386374d403d3a24e459e0a0b9a
2024-06-06 10:57:11 +02:00
Miklos Vajna
621ec809b3 cool#9219 kit: fix setclipboard command with HTML payload
Have two COOL servers, copy on one instance, paste an on other instance,
nothing happens on Ctrl-V.

It appears the JS code in Clipboard.js
_dataTransferDownloadAndPasteAsync() gets the correct HTML, but when it
tries to contact the "copy" server for the underlying full clipboard,
some security policy prevents the JS code from doing that. Which means
1) perhaps we should do that HTTP fetch on the server, not in JS and 2)
the fallback code should at least work via normal HTML.

Fix 2) by extending ChildSession::setClipboard() to recognize if the
data has the typical HTML header, and only start the usual parsing in
case the data we got is not bare HTML.

The 1) still needs fixing.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: I55a102c2a39d21ac898f82041760a220e46784cb
2024-06-06 09:34:07 +01:00
Skyler Grey
51ca018010 fix: allow changing compact to tabbed mode
This is a fix for a regression from
I4cc9cc885aa8cd0b40646629cd73bef236963a94

Compact/tabbed mode was saved on a per-app basis, but read on a global
basis. This meant that the read preference was never changed, causing it
to be impossible to switch out of compact mode once you had entered it.

The fix is to change back to the previous behavior of saving and reading
on a global basis

Refs: CollaboraOnline/Online#9181
Signed-off-by: Skyler Grey <skyler.grey@collabora.com>
Change-Id: Ie9d72d6b7e10e209f10acf662535c866e06a98de
2024-06-06 09:05:04 +01:00
Caolán McNamara
0368a33faa Fix JSON syntax error for some Hebrew strings
same fix as:

commit 4ab2810fa5
Author: Tor Lillqvist <tml@collabora.com>
Date:   Tue Apr 5 16:20:35 2022 +0300

    Fix JSON syntax error for some Hebrew strings

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: Ic25bffa209cb7875756f3474547585ae7e69e4ba
2024-06-06 08:45:40 +02:00
Andras Timar
bd576fdc2a Updated translations from LO core
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I2d4ef21b465a7fad2f2bc0487da63b71ed9ad6f4
2024-06-06 08:43:52 +02:00
Andras Timar
a61ff2bfab Update l10n files for Weblate
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I5e2d0f5b89c757f9fedab1b9cf0512d00e4ff3f9
2024-06-06 08:35:05 +02:00
Darshan-upadhyay1110
f15b4677b8 Print slides with notes
- Added option to print slides with inserted notes in it.
- It is consistent in both view -> Tabbed and Compact view
Signed-off-by: Darshan-upadhyay1110 <darshan.upadhyay@collabora.com>
Change-Id: If47a2384cda633eab4a754c07e690f0a9b0eb4a0
2024-06-05 20:37:33 +05:30
Andras Timar
909104356b rpm: follow-up on wsd/README->wsd/README.md change
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: Ia3f71a5f5fa0ffb9800b3a311c53bd06188c0aa0
2024-06-05 16:57:51 +02:00
Szymon Kłos
f5bfde5e40 Audit dialog: make audit per DocumentBroker
This will allow to avoid parallel access from many
sources. If one instance is used by different integrations
- we will warn only affected users.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ic397566c8e8e699dbfe5fd60b305040f735b44bc
2024-06-05 15:42:42 +01:00
Szymon Kłos
5ce52d172e Audit dialog: initialize after docLayer is ready
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I99e5bf9b07effd8c84c3f716e98700874c0804c1
2024-06-05 15:42:42 +01:00
Szymon Kłos
6b94f9a5f2 Server audit: generate correct JSON
append "," when needed

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ic5147ec34ea47521e18687e0ed408bf902962768
2024-06-05 15:42:42 +01:00
Szymon Kłos
f12e9f5ba6 Audit dialog: show all checks
Always show entries for things we check with status: red/green circle.
Initialize values on server start. If any user will not have is_audit
then we will mark that and later admin will see warning.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I0eb434b4d1ed9e4ec4eb9c463d0aa4516e0926d5
2024-06-05 15:42:42 +01:00
Szymon Kłos
0353e0e2dc Audit dialog: don't show annoying snackbar for all users
so it will not be annoying

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Idefa59b855160035a08da7dce936e83c1475995d
2024-06-05 15:42:42 +01:00
Szymon Kłos
79fc6c28f1 Audit dialog: create ServerAuditUtil in wsd
and get real state of missing is_admin property

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I988ac357d2eca27e0bdf55d144f33caf780be5f4
2024-06-05 15:42:42 +01:00
Szymon Kłos
a41f4e83bf Audit dialog: make it bigger
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ic64ca75b2bca8b783729285f6ffa43b78f94cc0b
2024-06-05 15:42:42 +01:00
Szymon Kłos
58c4d86f0e Audit dialog: add SDK link support
Treeview can now show links, not only text

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I49f53f598355f398841947adaefb475cfa6ba7d1
2024-06-05 15:42:42 +01:00
Szymon Kłos
1a0d289e13 Added API to send server audit information
we use { code: string, status: string } entries to describe a
problem

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I21dacc0fa7b2c48f08ea2923e73da58fe33f976e
2024-06-05 15:42:42 +01:00
Szymon Kłos
f0dd43191d Added server audit dialog
This is dialog shown only for the admin users, or if is_admin
property is missing in the userPrivateInfo then - all users.

Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: Ife8355816b1afe6765ef5edc6fe2d3db5e043532
2024-06-05 15:42:42 +01:00