Commit abddaa82 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Вернуд код, чтобы работало старое меню (убрать после новых изменений)!

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57566 954022d7-b5bf-4e40-9824-e11837661b57
parent 8f6c493e
...@@ -419,6 +419,35 @@ ChartPreviewManager.prototype.getChartPreviews = function(chartType) { ...@@ -419,6 +419,35 @@ 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;
......
...@@ -2542,6 +2542,14 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -2542,6 +2542,14 @@ 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);
...@@ -3721,6 +3729,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -3721,6 +3729,7 @@ 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;
......
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