Commit 17205c6a authored by Alexander.Trofimov's avatar Alexander.Trofimov

fix grand total row style

parent 1a0acbaf
...@@ -5212,7 +5212,7 @@ ...@@ -5212,7 +5212,7 @@
}; };
Worksheet.prototype.updatePivotTablesStyle = function (range) { Worksheet.prototype.updatePivotTablesStyle = function (range) {
var pivotTable, pivotRange, styleInfo, style, wholeStyle, cells, j, r, pos, firstHeaderRow0, countC, var pivotTable, pivotRange, styleInfo, style, wholeStyle, cells, j, r, pos, firstHeaderRow0, countC,
countCWValues, countR, countD, stripe1, stripe2, items, item, start = 0, countCWValues, countR, countD, stripe1, stripe2, items, item, start,
emptyStripe = new Asc.CTableStyleElement(); emptyStripe = new Asc.CTableStyleElement();
var dxf, dxfLabels, dxfValues, grandColumn; var dxf, dxfLabels, dxfValues, grandColumn;
for (var i = 0; i < this.pivotTables.length; ++i) { for (var i = 0; i < this.pivotTables.length; ++i) {
...@@ -5355,6 +5355,7 @@ ...@@ -5355,6 +5355,7 @@
item = items[j]; item = items[j];
if (AscCommonExcel.c_oAscItemType.Grand === item.t || 0 === countR) { if (AscCommonExcel.c_oAscItemType.Grand === item.t || 0 === countR) {
dxf = style.totalRow; dxf = style.totalRow;
pos = 0;
} else if (styleInfo.showRowHeaders) { } else if (styleInfo.showRowHeaders) {
r = item.getR(); r = item.getR();
if (r + 1 !== countR) { if (r + 1 !== countR) {
...@@ -5365,12 +5366,12 @@ ...@@ -5365,12 +5366,12 @@
} else { } else {
dxf = item.t ? style.thirdSubtotalRow : style.thirdRowSubheading; dxf = item.t ? style.thirdSubtotalRow : style.thirdRowSubheading;
} }
pos = pivotTable.getRowFieldPos(r);
} }
} }
dxf = dxf && dxf.dxf; dxf = dxf && dxf.dxf;
if (dxf) { if (dxf) {
cells = this.getRange3(start + j, pivotRange.c1 + pivotTable.getRowFieldPos(r), start + j, cells = this.getRange3(start + j, pivotRange.c1 + pos, start + j, pivotRange.c2);
pivotRange.c2);
cells.setTableStyle(dxf); cells.setTableStyle(dxf);
} }
} }
......
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