[se] Fix bug 66550 (#4251)

* [se] Fix bug 66550
This commit is contained in:
Igor Zotov
2024-02-19 12:14:36 +03:00
committed by GitHub
parent 1c09215242
commit 875b0e5983

View File

@ -320,8 +320,17 @@ function (window, undefined) {
}
case _cCellFunctionLocal["protect"]: {
//default - protect, do not support on open
let isLocked = true;
cell = ws.getCell3(bbox.r1, bbox.c1);
if (cell.getLocked()) {
cell._foreachNoEmpty(function (cell) {
if (cell) {
let xfs = cell.xfs ? cell.xfs : cell.getCompiledStyle();
if (xfs) {
isLocked = xfs.getLocked();
}
}
});
if (isLocked) {
res = new cNumber(1);
} else {
res = new cNumber(0);