Skip to content

Commit

Permalink
[se] Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
GoshaZotov committed Feb 12, 2024
1 parent 43b1a12 commit f7a4345
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
14 changes: 13 additions & 1 deletion cell/model/Serialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -6085,6 +6085,11 @@
this.memory.WriteByte(c_oSerPropLenType.Variable);
this.memory.WriteString2(desc.name);
}
if (desc.type) {
this.memory.WriteByte(c_oSerUserProtectedRangeDesc.Type);
this.memory.WriteByte(c_oSerPropLenType.Byte);
this.memory.WriteByte(desc.type);
}
};
this.WriteUserProtectedRange = function (oUserProtectedRange) {

Expand Down Expand Up @@ -6124,6 +6129,11 @@
});
}
}
if (oUserProtectedRange.type) {
this.bs.WriteItem(c_oSerUserProtectedRange.Type, function () {
oThis.memory.WriteByte(oUserProtectedRange.type);
});
}
};

this.WriteTimelines = function (aTimelines) {
Expand Down Expand Up @@ -9220,7 +9230,9 @@
oUser.name = this.stream.GetString2LE(length);
} else if (c_oSerUserProtectedRangeDesc.Id === type) {
oUser.id = this.stream.GetString2LE(length);
} else {
} else if (c_oSerUserProtectedRangeDesc.Type === type) {
oUser.type = this.stream.GetByte();
} else {
res = c_oSerConstants.ReadUnknown;
}

Expand Down
16 changes: 8 additions & 8 deletions cell/model/protectRange.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@
//for warning
this.warningText = null;

this.type = null;//c_oSerUserProtectedRangeType -> notView/view/edit
//everyone edit/view type
this.type = null;//c_oSerUserProtectedRangeType -> notView/view/edit, //default -> AscCommonExcel.c_oSerUserProtectedRangeType.view

this.Id = AscCommon.g_oIdCounter.Get_NewId();
this._ws = ws;
Expand Down Expand Up @@ -370,7 +371,7 @@
CUserProtectedRangeUserInfo.prototype.asc_getName = function () {
return this.name;
};
CUserProtectedRangeUserInfo.prototype.asc_getUserProtectedType = function () {
CUserProtectedRangeUserInfo.prototype.asc_getType = function () {
return this.type;
};

Expand All @@ -380,7 +381,7 @@
CUserProtectedRangeUserInfo.prototype.asc_setName = function (val) {
this.name = val;
};
CUserProtectedRangeUserInfo.prototype.asc_setUserProtectedType = function (val) {
CUserProtectedRangeUserInfo.prototype.asc_setType = function (val) {
this.type = val;
};

Expand All @@ -396,27 +397,26 @@
prot["asc_getName"] = prot.asc_getName;
prot["asc_getUsers"] = prot.asc_getUsers;
prot["asc_getUserGroups"] = prot.asc_getUserGroups;
prot["asc_getUserProtectedType"] = prot.asc_getUserProtectedType;
prot["asc_getHideContent"] = prot.asc_getHideContent;
prot["asc_getType"] = prot.asc_getType;

prot["asc_setRef"] = prot.asc_setRef;
prot["asc_setName"] = prot.asc_setName;
prot["asc_setUsers"] = prot.asc_setUsers;
prot["asc_setHideContent"] = prot.asc_setHideContent;

prot["asc_getId"] = prot.asc_getId;

prot["asc_getIsLock"] = prot.asc_getIsLock;
prot["asc_setType"] = prot.asc_setType;



window["Asc"]["CUserProtectedRangeUserInfo"] = window["Asc"].CUserProtectedRangeUserInfo = CUserProtectedRangeUserInfo;
prot = CUserProtectedRangeUserInfo.prototype;
prot["asc_getId"] = prot.asc_getId;
prot["asc_getName"] = prot.asc_getName;
prot["asc_getUserProtectedType"] = prot.asc_getUserProtectedType;
prot["asc_getType"] = prot.asc_getType;
prot["asc_setId"] = prot.asc_setId;
prot["asc_setName"] = prot.asc_setName;
prot["asc_setUserProtectedType"] = prot.asc_setUserProtectedType;
prot["asc_setType"] = prot.asc_setType;

})(window);

0 comments on commit f7a4345

Please sign in to comment.