[Libreoffice-commits] online.git: Branch 'distro/collabora/co-4-2-3' - loleaflet/src

Szymon KÅ‚os (via logerrit) logerrit at kemper.freedesktop.org
Mon May 11 17:57:11 UTC 2020


 loleaflet/src/control/Control.StatusBar.js |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

New commits:
commit 7d88dc9c7c46289d32982ff354c5c0ffe4440dbc
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Mon May 11 12:31:48 2020 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Mon May 11 19:56:51 2020 +0200

    Fix language menu in statusbar
    
    Sub items from the language submenu are executed by
    uno calls - added handler.
    
    Change-Id: Ia83cd9331de6468c7d5a7b6f5cdbe45e68595a8b
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93956
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Szymon Kłos <szymon.klos at collabora.com>
    (cherry picked from commit 9f55b8f46eba1410f0be0f93f01278d0d345fc60)
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93803
    Reviewed-by: Andras Timar <andras.timar at collabora.com>

diff --git a/loleaflet/src/control/Control.StatusBar.js b/loleaflet/src/control/Control.StatusBar.js
index 9bd0c8d53..59f567ad7 100644
--- a/loleaflet/src/control/Control.StatusBar.js
+++ b/loleaflet/src/control/Control.StatusBar.js
@@ -109,7 +109,15 @@ L.Control.StatusBar = L.Control.extend({
 
 		var docLayer = this.map._docLayer;
 
-		if (id === 'zoomin' && this.map.getZoom() < this.map.getMaxZoom()) {
+		if (item.uno) {
+			if (item.unosheet && this.map.getDocType() === 'spreadsheet') {
+				this.map.toggleCommandState(item.unosheet);
+			}
+			else {
+				this.map.toggleCommandState(window.getUNOCommand(item.uno));
+			}
+		}
+		else if (id === 'zoomin' && this.map.getZoom() < this.map.getMaxZoom()) {
 			this.map.zoomIn(1);
 		}
 		else if (id === 'zoomout' && this.map.getZoom() > this.map.getMinZoom()) {


More information about the Libreoffice-commits mailing list