Commit f386027a authored by GoshaZotov's avatar GoshaZotov

add function asc_getLockedTable(asc_CCellInfo)

parent ddb5ce70
...@@ -263,6 +263,7 @@ ...@@ -263,6 +263,7 @@
this.hyperlink = null; this.hyperlink = null;
this.comments = []; this.comments = [];
this.isLocked = false; this.isLocked = false;
this.isLockedTable = null;
this.styleName = null; this.styleName = null;
this.numFormatType = null; this.numFormatType = null;
this.angle = null; this.angle = null;
...@@ -313,6 +314,9 @@ ...@@ -313,6 +314,9 @@
asc_CCellInfo.prototype.asc_getLocked = function () { asc_CCellInfo.prototype.asc_getLocked = function () {
return this.isLocked; return this.isLocked;
}; };
asc_CCellInfo.prototype.asc_getLockedTable = function () {
return this.isLockedTable;
};
asc_CCellInfo.prototype.asc_getStyleName = function () { asc_CCellInfo.prototype.asc_getStyleName = function () {
return this.styleName; return this.styleName;
}; };
...@@ -456,6 +460,7 @@ ...@@ -456,6 +460,7 @@
prot["asc_getHyperlink"] = prot.asc_getHyperlink; prot["asc_getHyperlink"] = prot.asc_getHyperlink;
prot["asc_getComments"] = prot.asc_getComments; prot["asc_getComments"] = prot.asc_getComments;
prot["asc_getLocked"] = prot.asc_getLocked; prot["asc_getLocked"] = prot.asc_getLocked;
prot["asc_getLockedTable"] = prot.asc_getLockedTable;
prot["asc_getStyleName"] = prot.asc_getStyleName; prot["asc_getStyleName"] = prot.asc_getStyleName;
prot["asc_getNumFormatType"] = prot.asc_getNumFormatType; prot["asc_getNumFormatType"] = prot.asc_getNumFormatType;
prot["asc_getAngle"] = prot.asc_getAngle; prot["asc_getAngle"] = prot.asc_getAngle;
......
...@@ -7035,6 +7035,21 @@ ...@@ -7035,6 +7035,21 @@
cell_info.isLocked = true; cell_info.isLocked = true;
} }
} }
if(null !== curTablePart){
var tableAr = curTablePart.Ref.clone();
var isTableIntersection = this._recalcRangeByInsertRowsAndColumns(sheetId, tableAr);
if (false === isTableIntersection) {
var tableLockInfo = this.collaborativeEditing.getLockInfo(c_oAscLockTypeElem.Range, /*subType*/null, sheetId,
new AscCommonExcel.asc_CCollaborativeRange(tableAr.c1, tableAr.r1, tableAr.c2, tableAr.r2));
if (false !== this.collaborativeEditing.getLockIntersection(tableLockInfo, c_oAscLockTypes.kLockTypeOther,
/*bCheckOnlyLockAll*/false)){
// Уже таблицу кто-то редактирует
cell_info.isLockedTable = true;
}
}
}
cell_info.sparklineInfo = this.model.getSparklineGroup(c1, r1); cell_info.sparklineInfo = this.model.getSparklineGroup(c1, r1);
......
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