Commit 15651877 authored by Alexander.Trofimov's avatar Alexander.Trofimov

refactoring style Range.getFont

parent 6dd31636
...@@ -8276,24 +8276,15 @@ ...@@ -8276,24 +8276,15 @@
return (cellFont.getName() !== rowFont.getName() || cellFont.getSize() !== rowFont.getSize()); return (cellFont.getName() !== rowFont.getName() || cellFont.getSize() !== rowFont.getSize());
}; };
Range.prototype.getFont = function(){ Range.prototype.getFont = function () {
var t = this; var t = this;
var nRow = this.bbox.r1; var nRow = this.bbox.r1;
var nCol = this.bbox.c1; var nCol = this.bbox.c1;
var font = g_oDefaultFormat.Font; var font = g_oDefaultFormat.Font;
this.worksheet._getCellNoEmpty(nRow, nCol, function(cell) { this.worksheet._getCellNoEmpty(nRow, nCol, function (cell) {
if(null != cell) var xfs = cell ? cell.getCompiledStyle() : getCompiledStyleWs(t.worksheet, nRow, nCol);
{ if (xfs && xfs.font) {
var xfs = cell.getCompiledStyle(); font = xfs.font;
if(null != xfs && null != xfs.font)
font = xfs.font;
}
else
{
var xfs = getCompiledStyleWs(t.worksheet, nRow, nCol);
if (null != xfs && null != xfs.font) {
font = xfs.font;
}
} }
}); });
return font return font
......
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