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

Добавил функцию getTableStyle у Range

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@59869 954022d7-b5bf-4e40-9824-e11837661b57
parent 181146b3
...@@ -3201,10 +3201,6 @@ Woorksheet.prototype._getCell=function(row, col){ ...@@ -3201,10 +3201,6 @@ Woorksheet.prototype._getCell=function(row, col){
} }
return oCurCell; return oCurCell;
}; };
Woorksheet.prototype._getCell2=function(cellId){
var oCellAddress = g_oCellAddressUtils.getCellAddress(cellId);
return this._getCell(oCellAddress.getRow0(), oCellAddress.getCow0());
};
Woorksheet.prototype._getCellNoEmpty=function(row, col){ Woorksheet.prototype._getCellNoEmpty=function(row, col){
//0-based //0-based
var oCurRow = this.aGCells[row]; var oCurRow = this.aGCells[row];
...@@ -4540,7 +4536,7 @@ Cell.prototype.setTableStyle=function(xfs){ ...@@ -4540,7 +4536,7 @@ Cell.prototype.setTableStyle=function(xfs){
this.bNeedCompileXfs = true; this.bNeedCompileXfs = true;
this.oValue.cleanCache(); this.oValue.cleanCache();
}; };
Cell.prototype.getTableStyle=function(xfs){ Cell.prototype.getTableStyle=function(){
return this.tableXfs; return this.tableXfs;
}; };
Cell.prototype.setStyle=function(xfs){ Cell.prototype.setStyle=function(xfs){
...@@ -5808,6 +5804,10 @@ Range.prototype.getStyleName=function(){ ...@@ -5808,6 +5804,10 @@ Range.prototype.getStyleName=function(){
// ToDo убрать эту заглушку (нужно делать на открытии) в InitStyleManager // ToDo убрать эту заглушку (нужно делать на открытии) в InitStyleManager
return res || this.worksheet.workbook.CellStyles.getStyleNameByXfId(g_oDefaultXfId); return res || this.worksheet.workbook.CellStyles.getStyleNameByXfId(g_oDefaultXfId);
}; };
Range.prototype.getTableStyle=function(){
var cell = this.worksheet._getCellNoEmpty(this.bbox.r1,this.bbox.c1);
return cell ? cell.getTableStyle() : null;
};
Range.prototype.getNumFormat=function(){ Range.prototype.getNumFormat=function(){
return oNumFormatCache.get(this.getNumFormatStr()); return oNumFormatCache.get(this.getNumFormatStr());
}; };
......
...@@ -3030,7 +3030,7 @@ var gUndoInsDelCellsFlag = true; ...@@ -3030,7 +3030,7 @@ var gUndoInsDelCellsFlag = true;
var ws = this.worksheet; var ws = this.worksheet;
var cloneActiveRange = ar.clone(true); // ToDo слишком много клонирования var cloneActiveRange = ar.clone(true); // ToDo слишком много клонирования
var isEnd = false, cell, isEndWhile, result; var isEnd = false, cell, result;
var prevActiveRange = {r1: cloneActiveRange.r1, c1: cloneActiveRange.c1, r2: cloneActiveRange.r2, c2: cloneActiveRange.c2}; var prevActiveRange = {r1: cloneActiveRange.r1, c1: cloneActiveRange.c1, r2: cloneActiveRange.r2, c2: cloneActiveRange.c2};
...@@ -3088,7 +3088,7 @@ var gUndoInsDelCellsFlag = true; ...@@ -3088,7 +3088,7 @@ var gUndoInsDelCellsFlag = true;
isEndWhile = true; isEndWhile = true;
else else
k++; k++;
}; }
//left //left
isEndWhile = false; isEndWhile = false;
...@@ -3113,8 +3113,7 @@ var gUndoInsDelCellsFlag = true; ...@@ -3113,8 +3113,7 @@ var gUndoInsDelCellsFlag = true;
} }
else if(n == cloneActiveRange.r2 + 1) else if(n == cloneActiveRange.r2 + 1)
isEndWhile = true; isEndWhile = true;
}; }
//right //right
isEndWhile = false; isEndWhile = false;
...@@ -3139,13 +3138,13 @@ var gUndoInsDelCellsFlag = true; ...@@ -3139,13 +3138,13 @@ var gUndoInsDelCellsFlag = true;
} }
else if(n == cloneActiveRange.r2 + 1) else if(n == cloneActiveRange.r2 + 1)
isEndWhile = true; isEndWhile = true;
}; }
if(prevActiveRange.r1 == cloneActiveRange.r1 && prevActiveRange.c1 == cloneActiveRange.c1 && prevActiveRange.r2 == cloneActiveRange.r2 && prevActiveRange.c2 == cloneActiveRange.c2) if(prevActiveRange.r1 == cloneActiveRange.r1 && prevActiveRange.c1 == cloneActiveRange.c1 && prevActiveRange.r2 == cloneActiveRange.r2 && prevActiveRange.c2 == cloneActiveRange.c2)
isEnd = true; isEnd = true;
prevActiveRange = {r1: cloneActiveRange.r1, c1: cloneActiveRange.c1, r2: cloneActiveRange.r2, c2: cloneActiveRange.c2}; prevActiveRange = {r1: cloneActiveRange.r1, c1: cloneActiveRange.c1, r2: cloneActiveRange.r2, c2: cloneActiveRange.c2};
}; }
//проверяем есть ли пустые строчки и столбцы в диапазоне //проверяем есть ли пустые строчки и столбцы в диапазоне
...@@ -3287,7 +3286,7 @@ var gUndoInsDelCellsFlag = true; ...@@ -3287,7 +3286,7 @@ var gUndoInsDelCellsFlag = true;
n = cloneActiveRange.r1 - 1; n = cloneActiveRange.r1 - 1;
if(cloneActiveRange.c1 > 0) if(cloneActiveRange.c1 > 0)
k = cloneActiveRange.c1 - 1; k = cloneActiveRange.c1 - 1;
}; }
if(n > cloneActiveRange.r1 && n < cloneActiveRange.r2 && k > cloneActiveRange.c1 && k < cloneActiveRange.c2) if(n > cloneActiveRange.r1 && n < cloneActiveRange.r2 && k > cloneActiveRange.c1 && k < cloneActiveRange.c2)
continue; continue;
......
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