Commit 232c0fc9 authored by konovalovsergey's avatar konovalovsergey

add Range.setNum

parent 698596ef
...@@ -6439,25 +6439,27 @@ ...@@ -6439,25 +6439,27 @@
} }
}; };
Range.prototype.setNumFormat=function(val){ Range.prototype.setNumFormat=function(val){
this.setNum(new AscCommonExcel.Num({f:val}));
};
Range.prototype.setNum = function(val) {
History.Create_NewPoint(); History.Create_NewPoint();
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) {
{ this.worksheet.getAllCol().setNum(val);
this.worksheet.getAllCol().setNumFormat(val);
fSetProperty = this._setPropertyNoEmpty; fSetProperty = this._setPropertyNoEmpty;
} }
fSetProperty.call(this, function(row){ fSetProperty.call(this, function(row) {
if(c_oRangeType.All == nRangeType && null == row.xfs) if (c_oRangeType.All == nRangeType && null == row.xfs)
return; return;
row.setNumFormat(val); row.setNum(val);
}, },
function(col){ function(col) {
col.setNumFormat(val); col.setNum(val);
}, },
function(cell){ function(cell) {
cell.setNumFormat(val); cell.setNum(val);
}); });
}; };
Range.prototype.shiftNumFormat=function(nShift, aDigitsCount){ Range.prototype.shiftNumFormat=function(nShift, aDigitsCount){
......
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