Commit cd160890 authored by Alexey.Musinov's avatar Alexey.Musinov Committed by Alexander.Trofimov

[mobile] сборка скриптов для таблиц

parent bdb13b23
...@@ -2683,7 +2683,7 @@ function asc_ReadCBorder(s, p) { ...@@ -2683,7 +2683,7 @@ function asc_ReadCBorder(s, p) {
return null; return null;
} }
function asc_ReadAdjustPrint(s, p) { function asc_ReadAdjustPrint(s, p) {
var adjustPrint = new asc.asc_CAdjustPrint(); var adjustPrint = new window["Asc"].asc_CAdjustPrint();
var next = true; var next = true;
while (next) while (next)
...@@ -2891,7 +2891,7 @@ function asc_ReadCHyperLink(_params, _cursor) { ...@@ -2891,7 +2891,7 @@ function asc_ReadCHyperLink(_params, _cursor) {
return _settings; return _settings;
} }
function asc_ReadAddFormatTableOptions(s, p) { function asc_ReadAddFormatTableOptions(s, p) {
var format = new asc.AddFormatTableOptions(); var format = new window["Asc"].AddFormatTableOptions();
var next = true; var next = true;
while (next) while (next)
...@@ -3237,7 +3237,7 @@ function OfflineEditor () { ...@@ -3237,7 +3237,7 @@ function OfflineEditor () {
return; return;
var BB = drawing.bbox.seriesBBox; var BB = drawing.bbox.seriesBBox;
var range = asc.Range(BB.c1, BB.r1, BB.c2, BB.r2, true); var range = window["Asc"].Range(BB.c1, BB.r1, BB.c2, BB.r2, true);
worksheet.arrActiveChartsRanges.push(range); worksheet.arrActiveChartsRanges.push(range);
worksheet.isChartAreaEditMode = true; worksheet.isChartAreaEditMode = true;
worksheet._drawSelection(); worksheet._drawSelection();
...@@ -3458,9 +3458,9 @@ function OfflineEditor () { ...@@ -3458,9 +3458,9 @@ function OfflineEditor () {
_graphics.SetIntegerGrid(false); _graphics.SetIntegerGrid(false);
}; };
var asc_Range = asc.Range; var asc_Range = window["Asc"].Range;
var asc_round = asc.round; var asc_round = window["Asc"].round;
var asc_typeof = asc.typeOf; var asc_typeof = window["Asc"].typeOf;
/** /**
* header styles * header styles
...@@ -3484,7 +3484,7 @@ function OfflineEditor () { ...@@ -3484,7 +3484,7 @@ function OfflineEditor () {
var kNone = "none"; var kNone = "none";
asc.WorksheetView.prototype.__drawColumnHeaders = function (drawingCtx, start, end, style, offsetXForDraw, offsetYForDraw) { window["Asc"].WorksheetView.prototype.__drawColumnHeaders = function (drawingCtx, start, end, style, offsetXForDraw, offsetYForDraw) {
if (undefined === drawingCtx && false === this.model.sheetViews[0].asc_getShowRowColHeaders()) if (undefined === drawingCtx && false === this.model.sheetViews[0].asc_getShowRowColHeaders())
return; return;
...@@ -3521,7 +3521,7 @@ function OfflineEditor () { ...@@ -3521,7 +3521,7 @@ function OfflineEditor () {
} }
}; };
asc.WorksheetView.prototype.__drawHeader = function (drawingCtx, x, y, w, h, style, isColHeader, index) { window["Asc"].WorksheetView.prototype.__drawHeader = function (drawingCtx, x, y, w, h, style, isColHeader, index) {
// Для отрисовки невидимого столбца/строки // Для отрисовки невидимого столбца/строки
var isZeroHeader = false; var isZeroHeader = false;
if (-1 !== index) { if (-1 !== index) {
...@@ -3620,7 +3620,7 @@ function OfflineEditor () { ...@@ -3620,7 +3620,7 @@ function OfflineEditor () {
} }
}; };
asc.WorksheetView.prototype.__drawRowHeaders = function (drawingCtx, start, end, style, offsetXForDraw, offsetYForDraw) { window["Asc"].WorksheetView.prototype.__drawRowHeaders = function (drawingCtx, start, end, style, offsetXForDraw, offsetYForDraw) {
if (undefined === drawingCtx && false === this.model.sheetViews[0].asc_getShowRowColHeaders()) if (undefined === drawingCtx && false === this.model.sheetViews[0].asc_getShowRowColHeaders())
return; return;
...@@ -3657,13 +3657,13 @@ function OfflineEditor () { ...@@ -3657,13 +3657,13 @@ function OfflineEditor () {
} }
}; };
asc.WorksheetView.prototype.__drawGrid = function (drawingCtx, c1, r1, c2, r2, leftFieldInPt, topFieldInPt, width, height) { window["Asc"].WorksheetView.prototype.__drawGrid = function (drawingCtx, c1, r1, c2, r2, leftFieldInPt, topFieldInPt, width, height) {
var range = new asc_Range(c1, r1, c2, r2); var range = new asc_Range(c1, r1, c2, r2);
this._prepareCellTextMetricsCache(range); this._prepareCellTextMetricsCache(range);
this._drawGrid(drawingCtx, range, leftFieldInPt, topFieldInPt, width, height); this._drawGrid(drawingCtx, range, leftFieldInPt, topFieldInPt, width, height);
}; };
asc.WorksheetView.prototype.__drawCellsAndBorders = function (drawingCtx, c1, r1, c2, r2, offsetXForDraw, offsetYForDraw, istoplayer) { window["Asc"].WorksheetView.prototype.__drawCellsAndBorders = function (drawingCtx, c1, r1, c2, r2, offsetXForDraw, offsetYForDraw, istoplayer) {
var range = new asc_Range(c1, r1, c2, r2); var range = new asc_Range(c1, r1, c2, r2);
if (false === istoplayer) { if (false === istoplayer) {
...@@ -3697,7 +3697,7 @@ function OfflineEditor () { ...@@ -3697,7 +3697,7 @@ function OfflineEditor () {
this.visibleRange = oldrange; this.visibleRange = oldrange;
}; };
asc.WorksheetView.prototype.__selection = function (c1, r1, c2, r2, isFrozen) { window["Asc"].WorksheetView.prototype.__selection = function (c1, r1, c2, r2, isFrozen) {
var native_selection = []; var native_selection = [];
...@@ -3706,7 +3706,7 @@ function OfflineEditor () { ...@@ -3706,7 +3706,7 @@ function OfflineEditor () {
this.visibleRange = new asc_Range(c1, r1, c2, r2); this.visibleRange = new asc_Range(c1, r1, c2, r2);
isFrozen = !!isFrozen; isFrozen = !!isFrozen;
if (asc["editor"].isStartAddShape || this.objectRender.selectedGraphicObjectsExists()) { if (window["Asc"]["editor"].isStartAddShape || this.objectRender.selectedGraphicObjectsExists()) {
//if (this.isChartAreaEditMode) { //if (this.isChartAreaEditMode) {
// this._drawFormulaRanges(this.arrActiveChartsRanges); // this._drawFormulaRanges(this.arrActiveChartsRanges);
//} //}
...@@ -4066,7 +4066,7 @@ function OfflineEditor () { ...@@ -4066,7 +4066,7 @@ function OfflineEditor () {
//} //}
}; };
asc.WorksheetView.prototype.__changeSelectionTopLeft = function (x, y, isCoord, isSelectMode, isTopLeft) { window["Asc"].WorksheetView.prototype.__changeSelectionTopLeft = function (x, y, isCoord, isSelectMode, isTopLeft) {
//var ar = (this.isFormulaEditMode) ? this.arrActiveFormulaRanges[this.arrActiveFormulaRanges.length - 1] : this.activeRange; //var ar = (this.isFormulaEditMode) ? this.arrActiveFormulaRanges[this.arrActiveFormulaRanges.length - 1] : this.activeRange;
var isMoveActiveCellToLeftTop = false; var isMoveActiveCellToLeftTop = false;
...@@ -4133,13 +4133,13 @@ function OfflineEditor () { ...@@ -4133,13 +4133,13 @@ function OfflineEditor () {
return this._calcActiveRangeOffset(x,y); return this._calcActiveRangeOffset(x,y);
}; };
asc.WorksheetView.prototype.__chartsRanges = function(ranges) { window["Asc"].WorksheetView.prototype.__chartsRanges = function(ranges) {
if (ranges) { if (ranges) {
return this.__drawFormulaRanges(ranges, 0, 0, Asc.c_oAscSelectionType.RangeChart); return this.__drawFormulaRanges(ranges, 0, 0, Asc.c_oAscSelectionType.RangeChart);
} }
if (asc["editor"].isStartAddShape || this.objectRender.selectedGraphicObjectsExists()) { if (window["Asc"]["editor"].isStartAddShape || this.objectRender.selectedGraphicObjectsExists()) {
if (this.isChartAreaEditMode && this.arrActiveChartsRanges.length) { if (this.isChartAreaEditMode && this.arrActiveChartsRanges.length) {
return this.__drawFormulaRanges(this.arrActiveChartsRanges, 0, 0, Asc.c_oAscSelectionType.RangeChart); return this.__drawFormulaRanges(this.arrActiveChartsRanges, 0, 0, Asc.c_oAscSelectionType.RangeChart);
} }
...@@ -4148,7 +4148,7 @@ function OfflineEditor () { ...@@ -4148,7 +4148,7 @@ function OfflineEditor () {
return null; return null;
}; };
asc.WorksheetView.prototype.__drawFormulaRanges = function (arrRanges, offsetX, offsetY, rangetype) { window["Asc"].WorksheetView.prototype.__drawFormulaRanges = function (arrRanges, offsetX, offsetY, rangetype) {
var ranges = [],i = 0, type = 0, left = 0, right = 0, top = 0, bottom = 0; var ranges = [],i = 0, type = 0, left = 0, right = 0, top = 0, bottom = 0;
var addt, addl, addr, addb, colsCount = this.cols.length - 1, rowsCount = this.rows.length - 1; var addt, addl, addr, addb, colsCount = this.cols.length - 1, rowsCount = this.rows.length - 1;
var defaultWidth = this.model.getDefaultWidth(); var defaultWidth = this.model.getDefaultWidth();
...@@ -4862,7 +4862,7 @@ function OfflineEditor () { ...@@ -4862,7 +4862,7 @@ function OfflineEditor () {
var imageUrl = options[0]; var imageUrl = options[0];
function ascCvtRatio(fromUnits, toUnits) { function ascCvtRatio(fromUnits, toUnits) {
return asc.getCvtRatio(fromUnits, toUnits, objectRender.getContext().getPPIX()); return window["Asc"].getCvtRatio(fromUnits, toUnits, objectRender.getContext().getPPIX());
} }
function ptToMm(val) { function ptToMm(val) {
return val * ascCvtRatio(1, 3); return val * ascCvtRatio(1, 3);
...@@ -4993,7 +4993,7 @@ function OfflineEditor () { ...@@ -4993,7 +4993,7 @@ function OfflineEditor () {
var bottom = params[4]; var bottom = params[4];
function ascCvtRatio(fromUnits, toUnits) { function ascCvtRatio(fromUnits, toUnits) {
return asc.getCvtRatio(fromUnits, toUnits, objectRender.getContext().getPPIX()); return window["Asc"].getCvtRatio(fromUnits, toUnits, objectRender.getContext().getPPIX());
} }
function ptToMm(val) { function ptToMm(val) {
return val * ascCvtRatio(1, 3); return val * ascCvtRatio(1, 3);
...@@ -5091,7 +5091,7 @@ function OfflineEditor () { ...@@ -5091,7 +5091,7 @@ function OfflineEditor () {
// STYLE MANAGER // STYLE MANAGER
asc.asc_CStylesPainter.prototype.generateStylesAll = function (cellStylesAll, fmgrGraphics, oFont, stringRenderer) { window["Asc"].asc_CStylesPainter.prototype.generateStylesAll = function (cellStylesAll, fmgrGraphics, oFont, stringRenderer) {
var pxTomm = 1.0; // 72.0 / 96.0; var pxTomm = 1.0; // 72.0 / 96.0;
...@@ -5110,9 +5110,9 @@ function OfflineEditor () { ...@@ -5110,9 +5110,9 @@ function OfflineEditor () {
this.generateDefaultStyles(cellStylesAll, fmgrGraphics, oFont, stringRenderer); this.generateDefaultStyles(cellStylesAll, fmgrGraphics, oFont, stringRenderer);
this.generateDocumentStyles(cellStylesAll, fmgrGraphics, oFont, stringRenderer); this.generateDocumentStyles(cellStylesAll, fmgrGraphics, oFont, stringRenderer);
}; };
asc.asc_CStylesPainter.prototype.generateDefaultStyles = function (cellStylesAll, fmgrGraphics, oFont, stringRenderer) { window["Asc"].asc_CStylesPainter.prototype.generateDefaultStyles = function (cellStylesAll, fmgrGraphics, oFont, stringRenderer) {
var cellStyles = cellStylesAll.DefaultStyles; var cellStyles = cellStylesAll.DefaultStyles;
var oGraphics = new asc.DrawingContext({canvas: null, units: 0/*pt*/, fmgrGraphics: fmgrGraphics, font: oFont}); var oGraphics = new window["Asc"].DrawingContext({canvas: null, units: 0/*pt*/, fmgrGraphics: fmgrGraphics, font: oFont});
var oStyle, oCustomStyle; var styleIndex = 0; var oStyle, oCustomStyle; var styleIndex = 0;
for (var i = 0; i < cellStyles.length; ++i) { for (var i = 0; i < cellStyles.length; ++i) {
...@@ -5130,9 +5130,9 @@ function OfflineEditor () { ...@@ -5130,9 +5130,9 @@ function OfflineEditor () {
++styleIndex; ++styleIndex;
} }
}; };
asc.asc_CStylesPainter.prototype.generateDocumentStyles = function (cellStylesAll, fmgrGraphics, oFont, stringRenderer) { window["Asc"].asc_CStylesPainter.prototype.generateDocumentStyles = function (cellStylesAll, fmgrGraphics, oFont, stringRenderer) {
var cellStyles = cellStylesAll.CustomStyles; var cellStyles = cellStylesAll.CustomStyles;
var oGraphics = new asc.DrawingContext({canvas: null, units: 0/*pt*/, fmgrGraphics: fmgrGraphics, font: oFont}); var oGraphics = new window["Asc"].DrawingContext({canvas: null, units: 0/*pt*/, fmgrGraphics: fmgrGraphics, font: oFont});
var oStyle; var styleIndex = 10000; var oStyle; var styleIndex = 10000;
for (var i = 0; i < cellStyles.length; ++i) { for (var i = 0; i < cellStyles.length; ++i) {
...@@ -5147,7 +5147,7 @@ function OfflineEditor () { ...@@ -5147,7 +5147,7 @@ function OfflineEditor () {
++styleIndex; ++styleIndex;
} }
}; };
asc.asc_CStylesPainter.prototype.drawStyle = function (oGraphics, stringRenderer, oStyle, sStyleName, nIndex) { window["Asc"].asc_CStylesPainter.prototype.drawStyle = function (oGraphics, stringRenderer, oStyle, sStyleName, nIndex) {
var oColor = oStyle.getFill(); var oColor = oStyle.getFill();
if (null !== oColor) { if (null !== oColor) {
...@@ -5178,7 +5178,7 @@ function OfflineEditor () { ...@@ -5178,7 +5178,7 @@ function OfflineEditor () {
var oFontColor = fc !== null ? fc : new AscCommon.CColor(0, 0, 0); var oFontColor = fc !== null ? fc : new AscCommon.CColor(0, 0, 0);
var format = oStyle.getFont(); var format = oStyle.getFont();
// Для размера шрифта делаем ограничение для превью в 16pt (у Excel 18pt, но и высота превью больше 22px) // Для размера шрифта делаем ограничение для превью в 16pt (у Excel 18pt, но и высота превью больше 22px)
var oFont = new asc.FontProperties(format.fn, (16 < format.fs) ? 16 : format.fs, format.b, format.i, format.u, format.s); var oFont = new window["Asc"].FontProperties(format.fn, (16 < format.fs) ? 16 : format.fs, format.b, format.i, format.u, format.s);
var width_padding = 3; // 4 * 72 / 96 var width_padding = 3; // 4 * 72 / 96
...@@ -5197,10 +5197,10 @@ function OfflineEditor () { ...@@ -5197,10 +5197,10 @@ function OfflineEditor () {
var styleThumbnailWidth = Math.floor(92.0 * pxToMM); var styleThumbnailWidth = Math.floor(92.0 * pxToMM);
var styleThumbnailHeight = Math.floor(48.0 * pxToMM); var styleThumbnailHeight = Math.floor(48.0 * pxToMM);
asc.WorkbookView.prototype = Object.create (asc.WorkbookView.prototype); window["Asc"].WorkbookView.prototype = Object.create (window["Asc"].WorkbookView.prototype);
asc.WorkbookView.prototype.constructor = asc.WorkbookView; window["Asc"].WorkbookView.prototype.constructor = window["Asc"].WorkbookView;
asc.WorkbookView.prototype.af_getTablePictures = function(wb, fmgrGraphics, oFont) { window["Asc"].WorkbookView.prototype.af_getTablePictures = function(wb, fmgrGraphics, oFont) {
window['native'].SetStylesType(1); window['native'].SetStylesType(1);
...@@ -5266,7 +5266,7 @@ function OfflineEditor () { ...@@ -5266,7 +5266,7 @@ function OfflineEditor () {
} }
return result; return result;
}; };
asc.WorkbookView.prototype.af_getSmallIconTable = function(canvas, style, fmgrGraphics, oFont) { window["Asc"].WorkbookView.prototype.af_getSmallIconTable = function(canvas, style, fmgrGraphics, oFont) {
var ctx = new Asc.DrawingContext({canvas: canvas, units: 0/*pt*/, fmgrGraphics: fmgrGraphics, font: oFont}); var ctx = new Asc.DrawingContext({canvas: canvas, units: 0/*pt*/, fmgrGraphics: fmgrGraphics, font: oFont});
var styleOptions = style; var styleOptions = style;
...@@ -5836,7 +5836,7 @@ function offline_mouse_down(x, y, pin, isViewerMode, isFormulaEditMode, isRangeR ...@@ -5836,7 +5836,7 @@ function offline_mouse_down(x, y, pin, isViewerMode, isFormulaEditMode, isRangeR
ws.startCellMoveResizeRange = null; ws.startCellMoveResizeRange = null;
var rangeChange = new asc.Range(resizeRange[0], resizeRange[1], resizeRange[2], resizeRange[3]); var rangeChange = new window["Asc"].Range(resizeRange[0], resizeRange[1], resizeRange[2], resizeRange[3]);
var target = { var target = {
formulaRange: rangeChange, formulaRange: rangeChange,
row: ct.row, //isChartRange ? ct.row : targetRow, row: ct.row, //isChartRange ? ct.row : targetRow,
...@@ -5893,7 +5893,7 @@ function offline_mouse_move(x, y, isViewerMode, isRangeResize, isChartRange, ind ...@@ -5893,7 +5893,7 @@ function offline_mouse_move(x, y, isViewerMode, isRangeResize, isChartRange, ind
if (!isViewerMode) { if (!isViewerMode) {
var ct = ws.getCursorTypeFromXY(x, y, isViewerMode); var ct = ws.getCursorTypeFromXY(x, y, isViewerMode);
var rangeChange = new asc.Range(resizeRange[0], resizeRange[1], resizeRange[2], resizeRange[3]); var rangeChange = new window["Asc"].Range(resizeRange[0], resizeRange[1], resizeRange[2], resizeRange[3]);
var target = { var target = {
//formulaRange: rangeChange, //formulaRange: rangeChange,
row: isChartRange ? ct.row : targetRow, row: isChartRange ? ct.row : targetRow,
......
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