Commit c1284ae5 authored by Dmitry.Vikulov's avatar Dmitry.Vikulov Committed by Alexander.Trofimov

api для работы с закреплёнными областями: asc_clearFrozenCell,...

api для работы с закреплёнными областями: asc_clearFrozenCell, asc_setSelectedFrozenCell, asc_setFirstFrozenCol, asc_setFirstFrozenRow

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@54833 954022d7-b5bf-4e40-9824-e11837661b57
parent 571e34d6
......@@ -2666,6 +2666,35 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
asyncImageEndLoadedBackground: function() {
},
// Frozen pane
asc_clearFrozenCell: function() {
if ( this.wb ) {
var ws = this.wb.getWorksheet();
ws.clearFrozenCell();
}
},
asc_setSelectedFrozenCell: function() {
if ( this.wb ) {
var ws = this.wb.getWorksheet();
ws.setSelectedFrozenCell();
}
},
asc_setFirstFrozenCol: function() {
if ( this.wb ) {
var ws = this.wb.getWorksheet();
ws.setFirstFrozenCol();
}
},
asc_setFirstFrozenRow: function() {
if ( this.wb ) {
var ws = this.wb.getWorksheet();
ws.setFirstFrozenRow();
}
},
// Cell interface
asc_getCellInfo: function (bExt) {
return this.wb.getWorksheet().getSelectionInfo(!!bExt);
......@@ -3678,6 +3707,12 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
prot["asc_setDrawImagePlaceParagraph"] = prot.asc_setDrawImagePlaceParagraph;
prot["asc_changeShapeImageFromFile"] = prot.asc_changeShapeImageFromFile;
// Frozen pane
prot["asc_clearFrozenCell"] = prot.asc_clearFrozenCell;
prot["asc_setSelectedFrozenCell"] = prot.asc_setSelectedFrozenCell;
prot["asc_setFirstFrozenCol"] = prot.asc_setFirstFrozenCol;
prot["asc_setFirstFrozenRow"] = prot.asc_setFirstFrozenRow;
// Cell interface
prot["asc_getCellInfo"] = prot.asc_getCellInfo;
prot["asc_getActiveCellCoord"] = prot.asc_getActiveCellCoord;
......
......@@ -3104,9 +3104,9 @@
}
else {
if ( _this.topLeftFrozenCell )
_this.topLeftFrozenCell.col = col + 1;
_this.setFrozenCell(col, _this.topLeftFrozenCell.getRow0(), true);
else
_this.topLeftFrozenCell = new CellAddress(0, col, 0);
_this.setFrozenCell(col, 0, true);
}
}
break;
......@@ -3121,19 +3121,42 @@
}
else {
if ( _this.topLeftFrozenCell )
_this.topLeftFrozenCell.row = row + 1;
_this.setFrozenCell(_this.topLeftFrozenCell.getCol0(), row, true);
else
_this.topLeftFrozenCell = new CellAddress(row, 0, 0);
_this.setFrozenCell(0, row, true);
}
}
break;
}
if ( !bMove ) {
_this.visibleRange.r1 = _this.topLeftFrozenCell.getRow0();
_this.visibleRange.c1 = _this.topLeftFrozenCell.getCol0();
_this.objectRender.drawingArea.init();
_this.draw();
}
}
WorksheetView.prototype.setFrozenCell = function(col, row, bRedraw) {
this.topLeftFrozenCell = new CellAddress(row, col, 0);
this.visibleRange.c1 = col;
this.visibleRange.r1 = row;
this.objectRender.drawingArea.init();
if ( bRedraw )
this.draw();
}
WorksheetView.prototype.clearFrozenCell = function() {
this.topLeftFrozenCell = null;
this.visibleRange.c1 = 0;
this.visibleRange.r1 = 0;
this.objectRender.drawingArea.init();
this.draw();
}
WorksheetView.prototype.setSelectedFrozenCell = function() {
this.setFrozenCell(this.getSelectedColumnIndex(), this.getSelectedRowIndex(), true);
}
WorksheetView.prototype.setFirstFrozenCol = function() {
this.setFrozenCell(1, 0, true);
}
WorksheetView.prototype.setFirstFrozenRow = function() {
this.setFrozenCell(0, 1, true);
}
WorksheetView.prototype._drawSelectionElement = function (visibleRange, offsetX, offsetY, args) {
......
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