Commit 3c1a3105 authored by Sergey Konovalov's avatar Sergey Konovalov

ConditionalFormatting formula calculates with current cell

parent c56ab743
...@@ -367,9 +367,9 @@ ...@@ -367,9 +367,9 @@
this.init(ws); this.init(ws);
return this._f.calculate(null, null).getValue(); return this._f.calculate(null, null).getValue();
}; };
CFormulaCF.prototype.getValueRaw = function(ws, opt_parent, opt_offset) { CFormulaCF.prototype.getValueRaw = function(ws, opt_parent, opt_bbox, opt_offset) {
this.init(ws, opt_parent); this.init(ws, opt_parent);
return this._f.calculate(null, null, opt_offset); return this._f.calculate(null, opt_bbox, opt_offset);
}; };
function CIconSet () { function CIconSet () {
......
...@@ -2921,7 +2921,8 @@ ...@@ -2921,7 +2921,8 @@
return function(val, c) { return function(val, c) {
offset.offsetRow = c.nRow - rowLT; offset.offsetRow = c.nRow - rowLT;
offset.offsetCol = c.nCol - colLT; offset.offsetCol = c.nCol - colLT;
var res = formulaCF && formulaCF.getValueRaw(t, formulaParent, offset); var bboxCell = new Asc.Range(c.nCol, c.nRow, c.nCol, c.nRow);
var res = formulaCF && formulaCF.getValueRaw(t, formulaParent, bboxCell, offset);
if(res && res.tocBool){ if(res && res.tocBool){
res = res.tocBool(); res = res.tocBool();
if(res && res.toBool) { if(res && res.toBool) {
......
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