diff --git a/apps/spreadsheeteditor/main/app/view/ConstraintDialog.js b/apps/spreadsheeteditor/main/app/view/ConstraintDialog.js index 83604749e0..72dd3797cf 100644 --- a/apps/spreadsheeteditor/main/app/view/ConstraintDialog.js +++ b/apps/spreadsheeteditor/main/app/view/ConstraintDialog.js @@ -185,9 +185,13 @@ define([], function () { 'use strict'; var isvalid = true, txtError = '', value; - value = this.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Chart, this.txtCellRef.getValue(), true); + value = this.api.asc_checkDataRange(Asc.c_oAscSelectionDialogType.Solver_CellReference, this.txtCellRef.getValue(), true); if (value != Asc.c_oAscError.ID.No) { - txtError = this.txtNotValidRef; + if (value === Asc.c_oAscError.ID.TooManyCells) { + txtError = this.textTooManyCells; + } else { + txtError = this.txtNotValidRef; + } isvalid = false; } if (!isvalid) { @@ -204,6 +208,10 @@ define([], function () { 'use strict'; if (value !== Asc.c_oAscError.ID.No) { if (value === Asc.c_oAscError.ID.DataConstraintError) { txtError = this.textDataConstraint; + } else if (value === Asc.c_oAscError.ID.TooManyCells) { + txtError = this.textTooManyCells; + } else if (value === Asc.c_oAscError.ID.UnequalCellsNumber) { + txtError = this.textUnequalCellsNumber; } isvalid = false; } diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index fd2c65bc39..5bdd4b63cf 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -2791,6 +2791,8 @@ "SSE.Views.ConstraintDialog.txtNotValidRef": "Cell reference is empty or contents are not valid.", "SSE.Views.ConstraintDialog.txtTitle": "Add constraint", "SSE.Views.ConstraintDialog.txtTitleChange": "Change constraint", + "SSE.Views.ConstraintDialog.textTooManyCells": "Too many cells", + "SSE.Views.ConstraintDialog.textUnequalCellsNumber": "Unequal number of cells in Cell Reference and Constraint", "SSE.Views.CreatePivotDialog.textDataRange": "Source data range", "SSE.Views.CreatePivotDialog.textDestination": "Choose where to place the table", "SSE.Views.CreatePivotDialog.textExist": "Existing sheet",