loleaflet/src/control/Control.ColumnHeader.js |   23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

New commits:
commit c9ee98d4d311a35702093b6a4a9bd0e6e43c7b76
Author:     Pranam Lashkari <lpra...@collabora.com>
AuthorDate: Tue Jan 28 23:15:03 2020 +0530
Commit:     Jan Holesovsky <ke...@collabora.com>
CommitDate: Tue Jan 28 18:49:25 2020 +0100

    Added option in context menu/mobile wizard for "Add column after"
    
    Change-Id: I4325fbdb14ef7277441e616f854116b8a3a0e0d8
    Reviewed-on: https://gerrit.libreoffice.org/c/online/+/87651
    Reviewed-by: Jan Holesovsky <ke...@collabora.com>
    Tested-by: Jan Holesovsky <ke...@collabora.com>

diff --git a/loleaflet/src/control/Control.ColumnHeader.js 
b/loleaflet/src/control/Control.ColumnHeader.js
index de58741fb..6ef875dc6 100644
--- a/loleaflet/src/control/Control.ColumnHeader.js
+++ b/loleaflet/src/control/Control.ColumnHeader.js
@@ -68,6 +68,10 @@ L.Control.ColumnHeader = L.Control.Header.extend({
                                name: _UNO('.uno:InsertColumnsBefore', 
'spreadsheet', true),
                                callback: (this._insertColBefore).bind(this)
                        },
+                       'insertcolafter': {
+                               name: _UNO('.uno:InsertColumnsAfter', 
'spreadsheet', true),
+                               callback: (this._insertColAfter).bind(this)
+                       },
                        'deleteselectedcol': {
                                name: _UNO('.uno:DeleteColumns', 'spreadsheet', 
true),
                                callback: (this._deleteSelectedCol).bind(this)
@@ -112,7 +116,7 @@ L.Control.ColumnHeader = L.Control.Header.extend({
                this._map.sendUnoCommand('.uno:SetOptimalColumnWidth');
        },
 
-       insertColumn: function(index) {
+       insertColumnBefore: function(index) {
                // First select the corresponding column because
                // .uno:InsertColumn doesn't accept any column number
                // as argument and just inserts before the selected column
@@ -123,6 +127,14 @@ L.Control.ColumnHeader = L.Control.Header.extend({
                this._updateColumnHeader();
        },
 
+       insertColumnAfter: function(index) {
+               if (this._map._docLayer._selections.getLayers().length === 0) {
+                       this._selectColumn(index, 0);
+               }
+               this._map.sendUnoCommand('.uno:InsertColumnsAfter');
+               this._updateColumnHeader();
+       },
+
        deleteColumn: function(index) {
                if (this._map._docLayer._selections.getLayers().length === 0) {
                        this._selectColumn(index, 0);
@@ -646,7 +658,14 @@ L.Control.ColumnHeader = L.Control.Header.extend({
        _insertColBefore: function() {
                var index = this._lastMouseOverIndex;
                if (index) {
-                       this.insertColumn.call(this, index);
+                       this.insertColumnBefore.call(this, index);
+               }
+       },
+
+       _insertColAfter: function() {
+               var index = this._lastMouseOverIndex;
+               if (index) {
+                       this.insertColumnAfter.call(this, index);
                }
        },
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to