Commit 90d437a9 authored by Maxim Kadushkin's avatar Maxim Kadushkin

[SSE mobile] debug locked cell's state

parent 7ab00a31
......@@ -146,10 +146,12 @@ define([
onApiWorkbookLocked: function (l) {
locked.book = l;
this.onApiSelectionChanged();
},
onApiWorksheetLocked: function (l) {
locked.sheet = l;
this.onApiSelectionChanged();
},
onApiActiveSheetChanged: function (index) {
......@@ -165,23 +167,25 @@ define([
},
onApiSelectionChanged: function(info) {
var islocked = locked.book || locked.sheet;
if ( !islocked ) {
switch (info.asc_getFlags().asc_getSelectionType()) {
case Asc.c_oAscSelectionType.RangeCells:
islocked = info.asc_getLocked();
break;
case Asc.c_oAscSelectionType.RangeChart:
var objects = this.api.asc_getGraphicObjectProps();
for ( var i in objects ) {
if ( objects[i].asc_getObjectType() == Asc.c_oAscTypeSelectElement.Image ) {
if ((islocked = objects[i].asc_getObjectValue().asc_getLocked()))
break;
}
if ( !info ) info = this.api.asc_getCellInfo();
var islocked = false;
switch (info.asc_getFlags().asc_getSelectionType()) {
case Asc.c_oAscSelectionType.RangeChart:
case Asc.c_oAscSelectionType.RangeImage:
case Asc.c_oAscSelectionType.RangeShape:
case Asc.c_oAscSelectionType.RangeChartText:
case Asc.c_oAscSelectionType.RangeShapeText:
var objects = this.api.asc_getGraphicObjectProps();
for ( var i in objects ) {
if ( objects[i].asc_getObjectType() == Asc.c_oAscTypeSelectElement.Image ) {
if ((islocked = objects[i].asc_getObjectValue().asc_getLocked()))
break;
}
break;
}
break;
default:
islocked = info.asc_getLocked();
}
this.getView('Toolbar').disableControl(['add', 'edit'], islocked);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment