diff --git a/apps/spreadsheeteditor/main/app/view/SolverDlg.js b/apps/spreadsheeteditor/main/app/view/SolverDlg.js index a229ec5519..cbd40eedec 100644 --- a/apps/spreadsheeteditor/main/app/view/SolverDlg.js +++ b/apps/spreadsheeteditor/main/app/view/SolverDlg.js @@ -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; } } diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 9997ecaffd..cd967e109f 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -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",