Skip to content

Commit

Permalink
[se] Fix formula dependency and file assemble after add col/row (#312)
Browse files Browse the repository at this point in the history
One of scenarios:
-new spreadsheet
-set value: A1:1, B1:=A1
-insert B col
-set value: A1:2
-value in B2 still - 1
  • Loading branch information
konovalovsergey authored and agolybev committed Apr 17, 2018
1 parent e93346d commit 5567b16
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cell/model/Workbook.js
Original file line number Diff line number Diff line change
Expand Up @@ -3653,7 +3653,7 @@
var redrawTablesArr = this.autoFilters.insertRows("insCell", oActualRange, c_oAscInsertOptions.InsertColumns);
this.updatePivotOffset(oActualRange, offset);

this._updateFormulasParents(index + count, 0, gc_nMaxRow0, gc_nMaxCol0, offset);
this._updateFormulasParents(index, 0, gc_nMaxRow0, gc_nMaxCol0, offset);
//insert new row/cell
this.rowsData.insertRange(index, count);
this._forEachColData(function(sheetMemory) {
Expand Down Expand Up @@ -3756,7 +3756,7 @@
var redrawTablesArr = this.autoFilters.insertColumn(oActualRange, count);
this.updatePivotOffset(oActualRange, offset);

this._updateFormulasParents(0, index + count, gc_nMaxRow0, gc_nMaxCol0, offset);
this._updateFormulasParents(0, index, gc_nMaxRow0, gc_nMaxCol0, offset);
//remove tail
this.cellsByCol.splice(gc_nMaxCol0 - count + 1, count);
var prevCellsByCol = index > 0 ? this.cellsByCol[index - 1] : null;
Expand Down

0 comments on commit 5567b16

Please sign in to comment.