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

New commits:
commit 7d88dc9c7c46289d32982ff354c5c0ffe4440dbc
Author:     Szymon Kłos <[email protected]>
AuthorDate: Mon May 11 12:31:48 2020 +0200
Commit:     Andras Timar <[email protected]>
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 <[email protected]>
    Reviewed-by: Szymon Kłos <[email protected]>
    (cherry picked from commit 9f55b8f46eba1410f0be0f93f01278d0d345fc60)
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93803
    Reviewed-by: Andras Timar <[email protected]>

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()) {
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to