Commit 208a1592 authored by Alexey.Musinov's avatar Alexey.Musinov

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

parent 8293e48b
...@@ -2707,7 +2707,7 @@ function asc_ReadCBorder(s, p) { ...@@ -2707,7 +2707,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)
...@@ -2915,7 +2915,7 @@ function asc_ReadCHyperLink(_params, _cursor) { ...@@ -2915,7 +2915,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)
...@@ -3261,7 +3261,7 @@ function OfflineEditor () { ...@@ -3261,7 +3261,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();
...@@ -3482,9 +3482,9 @@ function OfflineEditor () { ...@@ -3482,9 +3482,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
...@@ -3508,7 +3508,7 @@ function OfflineEditor () { ...@@ -3508,7 +3508,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;
...@@ -3545,7 +3545,7 @@ function OfflineEditor () { ...@@ -3545,7 +3545,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) {
...@@ -3644,7 +3644,7 @@ function OfflineEditor () { ...@@ -3644,7 +3644,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;
...@@ -3681,13 +3681,13 @@ function OfflineEditor () { ...@@ -3681,13 +3681,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) {
...@@ -3721,7 +3721,7 @@ function OfflineEditor () { ...@@ -3721,7 +3721,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 = [];
...@@ -3730,7 +3730,7 @@ function OfflineEditor () { ...@@ -3730,7 +3730,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);
//} //}
...@@ -4090,7 +4090,7 @@ function OfflineEditor () { ...@@ -4090,7 +4090,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;
...@@ -4157,13 +4157,13 @@ function OfflineEditor () { ...@@ -4157,13 +4157,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);
} }
...@@ -4172,7 +4172,7 @@ function OfflineEditor () { ...@@ -4172,7 +4172,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();
...@@ -4886,7 +4886,7 @@ function OfflineEditor () { ...@@ -4886,7 +4886,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);
...@@ -5017,7 +5017,7 @@ function OfflineEditor () { ...@@ -5017,7 +5017,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);
...@@ -5115,7 +5115,7 @@ function OfflineEditor () { ...@@ -5115,7 +5115,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;
...@@ -5134,9 +5134,9 @@ function OfflineEditor () { ...@@ -5134,9 +5134,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) {
...@@ -5154,9 +5154,9 @@ function OfflineEditor () { ...@@ -5154,9 +5154,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) {
...@@ -5171,7 +5171,7 @@ function OfflineEditor () { ...@@ -5171,7 +5171,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) {
...@@ -5202,7 +5202,7 @@ function OfflineEditor () { ...@@ -5202,7 +5202,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
...@@ -5221,10 +5221,10 @@ function OfflineEditor () { ...@@ -5221,10 +5221,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);
...@@ -5290,7 +5290,7 @@ function OfflineEditor () { ...@@ -5290,7 +5290,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;
...@@ -5860,7 +5860,7 @@ function offline_mouse_down(x, y, pin, isViewerMode, isFormulaEditMode, isRangeR ...@@ -5860,7 +5860,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,
...@@ -5917,7 +5917,7 @@ function offline_mouse_move(x, y, isViewerMode, isRangeResize, isChartRange, ind ...@@ -5917,7 +5917,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