[se] Fix bug 76527

This commit is contained in:
GoshaZotov
2025-10-10 12:44:40 +03:00
committed by Ilya Kirillov
parent 8135aa30c5
commit c2d79af406
2 changed files with 8 additions and 4 deletions

View File

@ -14007,15 +14007,13 @@
}
if (!userId) {
let oApi = Asc.editor;
userId = oApi.DocInfo && oApi.DocInfo.get_UserId();
userId = oApi && oApi.DocInfo && oApi.DocInfo.get_UserId();
}
oCell = {col: oCell.nCol, row: oCell.nRow};
if (this.userProtectedRanges && userId) {
for (let i = 0; i < this.userProtectedRanges.length; i++) {
let curUserProtectedRange = this.userProtectedRanges[i];
if (curUserProtectedRange.contains2(oCell) && (notCheckUser || !curUserProtectedRange.isUserCanDoByType(userId, type))) {
if (curUserProtectedRange.contains(oCell.nCol, oCell.nRow) && (notCheckUser || !curUserProtectedRange.isUserCanDoByType(userId, type))) {
return true;
}
}
@ -18288,6 +18286,9 @@
}
}
this._foreach(function(cell){
if (cell.ws.isUserProtectedRangesIntersectionCell(cell)) {
return;
}
var _val = val;
if (_formula) {
_formula.isParsed = false;

View File

@ -206,6 +206,9 @@
CUserProtectedRange.prototype.contains2 = function (oCell) {
return this.ref && this.ref.contains2(oCell);
};
CUserProtectedRange.prototype.contains = function (c, r) {
return this.ref && this.ref.contains(c, r);
};
CUserProtectedRange.prototype.isUserCanDoByType = function (userId, type) {
let res = false;