Commit f62e626a authored by konovalovsergey's avatar konovalovsergey

in case of changes in workbook defname should not be sheet defname

parent 073adb85
...@@ -1587,10 +1587,17 @@ cName.prototype.Calculate = function () { ...@@ -1587,10 +1587,17 @@ cName.prototype.Calculate = function () {
}; };
cName.prototype.changeDefName = function (from, to) { cName.prototype.changeDefName = function (from, to) {
var sheetId = this.ws ? this.ws.getId() : null; var sheetId = this.ws ? this.ws.getId() : null;
if (AscCommonExcel.getDefNameIndex(this.value) == AscCommonExcel.getDefNameIndex(from.name) && if (AscCommonExcel.getDefNameIndex(this.value) == AscCommonExcel.getDefNameIndex(from.name)) {
(null == from.sheetId || sheetId == from.sheetId )) { if (null == from.sheetId) {
//in case of changes in workbook defname should not be sheet defname
var defName = this.getDefName();
if (!(defName && null != defName.sheetId)) {
this.value = to.name;
}
} else if (sheetId == from.sheetId) {
this.value = to.name; this.value = to.name;
} }
}
}; };
/** @constructor */ /** @constructor */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment