[Libreoffice-commits] online.git: loleaflet/src wsd/ClientSession.cpp
Tomaž Vajngerl (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jul 20 20:47:20 UTC 2020
loleaflet/src/control/Toolbar.js | 2 +-
wsd/ClientSession.cpp | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 241f134473dfcc688b3492f71aeab66301ff2fd2
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
AuthorDate: Sun Jul 12 23:10:22 2020 +0200
Commit: Tomaž Vajngerl <quikee at gmail.com>
CommitDate: Mon Jul 20 22:47:00 2020 +0200
Enable comments inserting and deleting when in read-only mode
Change-Id: I5aa3be061a6ef65bbf5d4cb879c4dde97ed31dd5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/99017
Tested-by: Jenkins
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>
diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js
index 8f2fd291b..223a23d54 100644
--- a/loleaflet/src/control/Toolbar.js
+++ b/loleaflet/src/control/Toolbar.js
@@ -158,7 +158,7 @@ L.Map.include({
sendUnoCommand: function (command, json) {
var isAllowedInReadOnly = false;
- var allowedCommands = ['.uno:WordCountDialog', '.uno:EditAnnotation'];
+ var allowedCommands = ['.uno:WordCountDialog', '.uno:EditAnnotation', '.uno:InsertAnnotation', '.uno:DeleteAnnotation'];
for (var i in allowedCommands) {
if (allowedCommands[i] === command) {
isAllowedInReadOnly = true;
diff --git a/wsd/ClientSession.cpp b/wsd/ClientSession.cpp
index c75a14a8d..c52c28406 100644
--- a/wsd/ClientSession.cpp
+++ b/wsd/ClientSession.cpp
@@ -971,7 +971,10 @@ bool ClientSession::filterMessage(const std::string& message) const
}
else if (tokens.equals(0, "uno"))
{
- if (tokens.size() > 1 && (tokens.equals(1, ".uno:ExecuteSearch") || tokens.equals(1, ".uno:EditAnnotation")))
+ if (tokens.size() > 1 && (tokens.equals(1, ".uno:ExecuteSearch")
+ || tokens.equals(1, ".uno:EditAnnotation")
+ || tokens.equals(1, ".uno:InsertAnnotation")
+ || tokens.equals(1, ".uno:DeleteAnnotation")))
{
allowed = true;
}
More information about the Libreoffice-commits
mailing list