[SSE] Check insert on protected sheet

This commit is contained in:
Julia Radzhabova 2021-07-20 00:02:30 +03:00
parent 992b831a79
commit 0d666fe210
2 changed files with 12 additions and 0 deletions

View file

@ -416,6 +416,10 @@ define([
},
onSortCells: function(menu, item) {
Common.NotificationCenter.trigger('protect:check', this.onSortCellsCallback, this, [menu, item]);
},
onSortCellsCallback: function(menu, item) {
if (item.value=='advanced') {
Common.NotificationCenter.trigger('data:sortcustom', this);
return;

View file

@ -1199,6 +1199,10 @@ define([
},
onSortType: function(type, btn) {
Common.NotificationCenter.trigger('protect:check', this.onSortTypeCallback, this, [type, btn]);
},
onSortTypeCallback: function(type, btn) {
if (this.api) {
if (this.api.asc_getCellInfo().asc_getSelectionType()==Asc.c_oAscSelectionType.RangeSlicer) {
var selectedObjects = this.api.asc_getGraphicObjectProps();
@ -3234,6 +3238,10 @@ define([
},
onInsertSymbolClick: function() {
Common.NotificationCenter.trigger('protect:check', this.onInsertSymbolClickCallback, this, []);
},
onInsertSymbolClickCallback: function() {
if (this.api) {
var me = this,
selected = me.api.asc_GetSelectedText(),