From 875b0e5983e42db114d00b29b6daadef6888727f Mon Sep 17 00:00:00 2001 From: Igor Zotov Date: Mon, 19 Feb 2024 12:14:36 +0300 Subject: [PATCH] [se] Fix bug 66550 (#4251) * [se] Fix bug 66550 --- cell/model/FormulaObjects/informationFunctions.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/cell/model/FormulaObjects/informationFunctions.js b/cell/model/FormulaObjects/informationFunctions.js index 65c50f2c02..07d9993b00 100644 --- a/cell/model/FormulaObjects/informationFunctions.js +++ b/cell/model/FormulaObjects/informationFunctions.js @@ -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);