Commit 809ed210 authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Поправил падение в bug #27325

Для выставления null-стиля таблицы не делаем новые ячейки

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@59445 954022d7-b5bf-4e40-9824-e11837661b57
parent c2b0d9f7
...@@ -5080,7 +5080,7 @@ Range.prototype.setTableStyle=function(val){ ...@@ -5080,7 +5080,7 @@ Range.prototype.setTableStyle=function(val){
this.createCellOnRowColCross(); this.createCellOnRowColCross();
var fSetProperty = this._setProperty; var fSetProperty = this._setProperty;
var nRangeType = this._getRangeType(); var nRangeType = this._getRangeType();
if(c_oRangeType.All == nRangeType) if(c_oRangeType.All == nRangeType || null === val)
{ {
//this.worksheet.getAllCol().setCellStyle(val); //this.worksheet.getAllCol().setCellStyle(val);
fSetProperty = this._setPropertyNoEmpty; fSetProperty = this._setPropertyNoEmpty;
......
...@@ -4114,8 +4114,9 @@ ...@@ -4114,8 +4114,9 @@
* @param {Asc.Range} range description * @param {Asc.Range} range description
*/ */
WorksheetView.prototype._calcCellsTextMetrics = function (range) { WorksheetView.prototype._calcCellsTextMetrics = function (range) {
var colsLength = this.cols.length;
if (range === undefined) { if (range === undefined) {
range = new Asc.Range(0, 0, this.cols.length - 1, this.rows.length - 1); range = new Asc.Range(0, 0, colsLength - 1, this.rows.length - 1);
} }
var rowModel, rowCells, cellColl; var rowModel, rowCells, cellColl;
for (var row = range.r1; row <= range.r2; ++row) { for (var row = range.r1; row <= range.r2; ++row) {
...@@ -4127,7 +4128,7 @@ ...@@ -4127,7 +4128,7 @@
rowCells = rowModel.getCells(); rowCells = rowModel.getCells();
for (cellColl in rowCells) { for (cellColl in rowCells) {
cellColl = cellColl - 0; cellColl = cellColl - 0;
if (this.width_1px > this.cols[cellColl].width) {continue;} if (colsLength <= cellColl || this.width_1px > this.cols[cellColl].width) {continue;}
this._addCellTextToCache(cellColl, row); this._addCellTextToCache(cellColl, row);
} }
......
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