[Libreoffice-commits] online.git: loleaflet/src

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Mon Jun 8 06:39:47 UTC 2020


 loleaflet/src/control/Toolbar.js |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit aadb4422e36f8b45197bce46fabb1bf42be09393
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon Jun 8 08:00:31 2020 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Mon Jun 8 08:39:29 2020 +0200

    Allow to open word count in readonly mode
    
    Change-Id: I1277dc815c2cee7e133a2c283e1e7bab9bb4a174
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/95786
    Tested-by: Jenkins
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>

diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js
index 11f07f8f6..fdeec58af 100644
--- a/loleaflet/src/control/Toolbar.js
+++ b/loleaflet/src/control/Toolbar.js
@@ -157,7 +157,8 @@ L.Map.include({
 	},
 
 	sendUnoCommand: function (command, json) {
-		if (this._permission === 'edit') {
+		var isAllowedInReadOnly = command == '.uno:WordCountDialog';
+		if (this._permission === 'edit' || isAllowedInReadOnly) {
 			this._socket.sendMessage('uno ' + command + (json ? ' ' + JSON.stringify(json) : ''));
 		}
 	},


More information about the Libreoffice-commits mailing list