Commit 29e5ae03 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Удалил asc_checkChartInterval

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57592 954022d7-b5bf-4e40-9824-e11837661b57
parent b42c3227
...@@ -419,35 +419,6 @@ ChartPreviewManager.prototype.getChartPreviews = function(chartType) { ...@@ -419,35 +419,6 @@ ChartPreviewManager.prototype.getChartPreviews = function(chartType) {
return null; return null;
}; };
// ToDo убрать!
function checkDataRange(type, interval, isRows) {
var dataRange = parserHelp.parse3DRef(interval);
if (null !== dataRange)
dataRange = Asc.g_oRangeCache.getAscRange(dataRange.range);
if (null === dataRange)
return c_oAscError.ID.DataRangeError;
//проверка максимального дипазона
var maxSeries = 255;
var minStockVal = 4;
var intervalValues, intervalSeries;
if (isRows) {
intervalSeries = dataRange.r2 - dataRange.r1 + 1;
intervalValues = dataRange.c2 - dataRange.c1 + 1;
} else {
intervalSeries = dataRange.c2 - dataRange.c1 + 1;
intervalValues = dataRange.r2 - dataRange.r1 + 1;
}
if (c_oAscChartTypeSettings.stock === type) {
if (minStockVal !== intervalSeries || intervalValues < minStockVal)
return c_oAscError.ID.StockChartError;
} else if (intervalSeries > maxSeries)
return c_oAscError.ID.DataRangeError;
return c_oAscError.ID.No;
}
function arrReverse(arr) { function arrReverse(arr) {
if(!arr || !arr.length) if(!arr || !arr.length)
return; return;
......
...@@ -2547,14 +2547,6 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -2547,14 +2547,6 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
asc_getChartPreviews: function(chartType) { asc_getChartPreviews: function(chartType) {
return this.chartPreviewManager.getChartPreviews(chartType); return this.chartPreviewManager.getChartPreviews(chartType);
}, },
asc_checkChartInterval: function(type, interval, isRows) {
var errorId = checkDataRange(type, interval, isRows);
var bResult = errorId !== c_oAscError.ID.No;
if (bResult)
this.handlers.trigger("asc_onError", errorId, c_oAscError.Level.NoCritical);
return !bResult;
},
asc_checkDataRange: function(dialogType, dataRange, isRows, chartType) { asc_checkDataRange: function(dialogType, dataRange, isRows, chartType) {
return parserHelp.checkDataRange(this.wbModel, dialogType, dataRange, isRows, chartType); return parserHelp.checkDataRange(this.wbModel, dialogType, dataRange, isRows, chartType);
...@@ -3735,7 +3727,6 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -3735,7 +3727,6 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
prot["asc_setSelectedDrawingObjectLayer"] = prot.asc_setSelectedDrawingObjectLayer; prot["asc_setSelectedDrawingObjectLayer"] = prot.asc_setSelectedDrawingObjectLayer;
prot["asc_getChartPreviews"] = prot.asc_getChartPreviews; prot["asc_getChartPreviews"] = prot.asc_getChartPreviews;
prot["asc_checkDataRange"] = prot.asc_checkDataRange; prot["asc_checkDataRange"] = prot.asc_checkDataRange;
prot["asc_checkChartInterval"] = prot.asc_checkChartInterval; // ToDo убрать!
prot["asc_getBinaryFileWriter"] = prot.asc_getBinaryFileWriter; prot["asc_getBinaryFileWriter"] = prot.asc_getBinaryFileWriter;
prot["asc_getWordChartObject"] = prot.asc_getWordChartObject; prot["asc_getWordChartObject"] = prot.asc_getWordChartObject;
prot["asc_cleanWorksheet"] = prot.asc_cleanWorksheet; prot["asc_cleanWorksheet"] = prot.asc_cleanWorksheet;
......
...@@ -2178,6 +2178,7 @@ ...@@ -2178,6 +2178,7 @@
//chartForm.find("#chartRange").val(interval); //chartForm.find("#chartRange").val(interval);
// //
//chartForm.find("#chartRange").bind("keyup", function() { //chartForm.find("#chartRange").bind("keyup", function() {
// ToDo asc_checkChartInterval -> asc_checkDataRange
// var result = api.asc_checkChartInterval(chartForm.find("#chartType").val(), chartForm.find("#chartSubType").val(), chartForm.find("#chartRange").val(), chartForm.find("#dataRows").is(":checked")); // var result = api.asc_checkChartInterval(chartForm.find("#chartType").val(), chartForm.find("#chartSubType").val(), chartForm.find("#chartRange").val(), chartForm.find("#dataRows").is(":checked"));
// if (result) // if (result)
// chartForm.find("#chartRange").css("color", "black"); // chartForm.find("#chartRange").css("color", "black");
......
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