Skip to content

Commit

Permalink
[se] Fix bug 72573
Browse files Browse the repository at this point in the history
  • Loading branch information
GoshaZotov committed Jan 17, 2025
1 parent e829dbf commit ddead93
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions cell/model/WorkbookElems.js
Original file line number Diff line number Diff line change
Expand Up @@ -15076,7 +15076,7 @@ function RangeDataManagerElem(bbox, data)
*/
for (let i = 0; i < this.DefinedNames.length; i++) {
let defname = this.DefinedNames[i];
let defnameFromWorkbook = wb.getDefinesNames(defname.Name);
let defnameFromWorkbook = wb && wb.getDefinesNames(defname.Name);
if (defnameFromWorkbook) {
let defnameArea3D = defnameFromWorkbook.parsedRef && defnameFromWorkbook.parsedRef.outStack && defnameFromWorkbook.parsedRef.outStack[0];
let defnameWorksheet = defnameArea3D && defnameArea3D.getWS && defnameArea3D.getWS();
Expand Down Expand Up @@ -15354,9 +15354,11 @@ function RangeDataManagerElem(bbox, data)

ExternalReference.prototype.prepareDefNames = function () {
let wb = this.getWb();
for (let i in wb.dependencyFormulas.defNames.wb) {
let defName = wb.dependencyFormulas.defNames.wb[i];
defName.parsedRef.parse();
if (wb && wb.dependencyFormulas && wb.dependencyFormulas.defNames && wb.dependencyFormulas.defNames.wb) {
for (let i in wb.dependencyFormulas.defNames.wb) {
let defName = wb.dependencyFormulas.defNames.wb[i];
defName.parsedRef.parse();
}
}
};

Expand Down Expand Up @@ -15473,7 +15475,7 @@ function RangeDataManagerElem(bbox, data)
stringToParse = defName.RefersTo.substring(1);
}
let oDefName = new Asc.asc_CDefName(defName.Name, stringToParse ? stringToParse : defName.RefersTo);
wb.editDefinesNames(null, oDefName);
wb && wb.editDefinesNames(null, oDefName);
AscCommonExcel.g_DefNameWorksheet = RealDefNameWorksheet;
}
}
Expand Down

0 comments on commit ddead93

Please sign in to comment.