Skip to content

Commit

Permalink
[se] By warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
GoshaZotov committed Aug 11, 2023
1 parent 1bccc03 commit 9e02fad
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
9 changes: 6 additions & 3 deletions cell/model/FormulaObjects/traceDependents.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,14 +240,13 @@ function (window, undefined) {
this.setDependentsCall();
}
};
TraceDependentsManager.prototype._calculateDependents = function (cellIndex, curListener) {
TraceDependentsManager.prototype._calculateDependents = function (cellIndex, curListener, isRecursive) {
let t = this;
let ws = this.ws.model;
let wb = this.ws.model.workbook;
let dependencyFormulas = wb.dependencyFormulas;
let allDefNamesListeners = dependencyFormulas.defNameListeners;
let cellAddress = AscCommonExcel.getFromCellIndex(cellIndex, true);
const currentCellInfo = {};

const findCellListeners = function () {
const listeners = {};
Expand Down Expand Up @@ -575,11 +574,13 @@ function (window, undefined) {
if (!isUpdated) {
for (let i in this.dependents[cellIndex]) {
if (this.dependents[cellIndex].hasOwnProperty(i)) {
this._calculateDependents(i, curListener);
this._calculateDependents(i, curListener, true);
}
}
}
}
} else if (!isRecursive) {
this.ws.workbook.handlers.trigger("asc_onError", c_oAscError.ID.TraceDependentsNoFormulas, c_oAscError.Level.NoCritical);
}
};
TraceDependentsManager.prototype._getDependents = function (from, to) {
Expand Down Expand Up @@ -845,6 +846,8 @@ function (window, undefined) {
} else if (formulaParsed) {
this._calculatePrecedents(formulaParsed, row, col, isSecondCall);
this.setPrecedentsCall();
} else {
this.ws.workbook.handlers.trigger("asc_onError", c_oAscError.ID.TracePrecedentsNoValidReference, c_oAscError.Level.NoCritical);
}
};
TraceDependentsManager.prototype._calculatePrecedents = function (formulaParsed, row, col, isSecondCall) {
Expand Down
8 changes: 7 additions & 1 deletion common/errorCodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,10 @@

FillAllRowsWarning: 1040,

ProtectedRangeByOtherUser: 1050
ProtectedRangeByOtherUser: 1050,

TraceDependentsNoFormulas: 1060,
TracePrecedentsNoValidReference: 1061
}
};

Expand Down Expand Up @@ -393,5 +396,8 @@
prot['FillAllRowsWarning'] = prot.FillAllRowsWarning;
prot['CannotUseCommandProtectedSheet'] = prot.CannotUseCommandProtectedSheet;
prot['ProtectedRangeByOtherUser'] = prot.ProtectedRangeByOtherUser;
prot['TraceDependentsNoFormulas'] = prot.TraceDependentsNoFormulas;
prot['TracePrecedentsNoValidReference'] = prot.TracePrecedentsNoValidReference;


})(window);

0 comments on commit 9e02fad

Please sign in to comment.