[SSE] Validate range

This commit is contained in:
Julia.Radzhabova
2025-11-18 13:20:15 +03:00
parent 9090f2af01
commit ca31b597c8
2 changed files with 6 additions and 3 deletions

View File

@ -424,7 +424,7 @@ define([
win.setSettings({
api : me.api,
range : input.getValue(),
type : Asc.c_oAscSelectionDialogType.Chart,
type : Asc.c_oAscSelectionDialogType.Solver_ObjectiveCell,
validation: function() {return true;}
});
}
@ -650,9 +650,11 @@ define([
isvalid = false;
txtError = this.txtEmpty;
} else {
value = this.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, this.txtObjectiveRange.getValue(), true);
value = this.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Solver_ObjectiveCell, this.txtObjectiveRange.getValue(), true);
if (value != Asc.c_oAscError.ID.No) {
txtError = ''; // check errors
if (value == Asc.c_oAscError.ID.MustContainFormula) {
txtError = this.textMustContainFormula;
}
isvalid = false;
}
}

View File

@ -4085,6 +4085,7 @@
"SSE.Views.SolverDlg.textInt": "int",
"SSE.Views.SolverDlg.textBin": "bin",
"SSE.Views.SolverDlg.textDif": "dif",
"SSE.Views.SolverDlg.textMustContainFormula": "The cell must contain a formula",
"SSE.Views.SolverMethodDialog.txtTitle": "Method options",
"SSE.Views.SolverMethodDialog.txtPrecision": "Constraint precision",
"SSE.Views.SolverMethodDialog.txtAutoScale": "Use automatic scaling",