loleaflet/src/control/Control.FormulaBar.js |   41 ----------------------------
 loleaflet/src/control/Control.Toolbar.js    |   23 ---------------
 2 files changed, 64 deletions(-)

New commits:
commit 6aff5967da51546331060225e342a08ef5d9fee6
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Wed Apr 15 13:49:15 2020 +0200
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Wed Apr 15 17:07:34 2020 +0200

    Remove unused formula bar code
    
    Code is unused due to formulabar tunneling
    b7743930cde9b9583490bbdc6d7b6b09d32cdccd
    
    Change-Id: Ie8d51f48669e111bb8006fd8afafaa1eeaba52e2
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/92270
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>

diff --git a/loleaflet/src/control/Control.FormulaBar.js 
b/loleaflet/src/control/Control.FormulaBar.js
index e90e3f141..fe7d8f838 100644
--- a/loleaflet/src/control/Control.FormulaBar.js
+++ b/loleaflet/src/control/Control.FormulaBar.js
@@ -119,47 +119,6 @@ L.Control.FormulaBar = L.Control.extend({
                }
        },
 
-       onFormulaInput: function(e) {
-               // keycode = 13 is 'enter'
-               if (e.keyCode === 13) {
-                       // formula bar should not have focus anymore
-                       this.map.focus();
-
-                       // forward the 'enter' keystroke to map to deal with 
the formula entered
-                       var data = {
-                               originalEvent: e
-                       };
-                       this.map.fire('keypress', data);
-               } else if (e.keyCode === 27) { // 27 = esc key
-                       this.map.sendUnoCommand('.uno:Cancel');
-                       this.map.focus();
-               } else {
-                       
this.map.cellEnterString(L.DomUtil.get('formulaInput').value);
-               }
-       },
-
-       onFormulaBarFocus: function() {
-               var formulabar = w2ui.formulabar;
-               formulabar.hide('sum');
-               formulabar.hide('function');
-               formulabar.show('cancelformula');
-               formulabar.show('acceptformula');
-       },
-
-       onFormulaBarBlur: function() {
-               // The timeout is needed because we want 'click' event on 
'cancel',
-               // 'accept' button to act before we hide these buttons because
-               // once hidden, click event won't be processed.
-               // TODO: Some better way to do it ?
-               setTimeout(function() {
-                       var formulabar = w2ui.formulabar;
-                       formulabar.show('sum');
-                       formulabar.show('function');
-                       formulabar.hide('cancelformula');
-                       formulabar.hide('acceptformula');
-               }, 250);
-       },
-
        onAddressInput: function(e) {
                if (e.keyCode === 13) {
                        // address control should not have focus anymore
diff --git a/loleaflet/src/control/Control.Toolbar.js 
b/loleaflet/src/control/Control.Toolbar.js
index df1822d26..b546c7011 100644
--- a/loleaflet/src/control/Control.Toolbar.js
+++ b/loleaflet/src/control/Control.Toolbar.js
@@ -169,29 +169,6 @@ function onClick(e, id, item) {
        else if (id === 'backgroundcolor' && typeof e.color !== 'undefined') {
                onColorPick(id, e.color);
        }
-       else if (id === 'sum') {
-               map.sendUnoCommand('.uno:AutoSum');
-       }
-       else if (id === 'function') {
-               L.DomUtil.get('formulaInput').value = '=';
-               L.DomUtil.get('formulaInput').focus();
-               map.cellEnterString(L.DomUtil.get('formulaInput').value);
-       }
-       else if (id === 'cancelformula') {
-               map.sendUnoCommand('.uno:Cancel');
-               w2ui['formulabar'].hide('acceptformula', 'cancelformula');
-               w2ui['formulabar'].show('sum', 'function');
-       }
-       else if (id === 'acceptformula') {
-               // focus on map, and press enter
-               map.focus();
-               map._docLayer.postKeyboardEvent('input',
-                                                map.keyboard.keyCodes.enter,
-                                                
map.keyboard._toUNOKeyCode(map.keyboard.keyCodes.enter));
-
-               w2ui['formulabar'].hide('acceptformula', 'cancelformula');
-               w2ui['formulabar'].show('sum', 'function');
-       }
        else if (id === 'fold' || id === 'hamburger-tablet') {
                map.toggleMenubar();
        }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to