Commit 44808aaa authored by Alexander.Trofimov's avatar Alexander.Trofimov

fix check item.type

parent 17205c6a
...@@ -5326,8 +5326,8 @@ ...@@ -5326,8 +5326,8 @@
dxf = style.lastColumn; dxf = style.lastColumn;
grandColumn = 1; grandColumn = 1;
} else { } else {
if (r + 1 !== countCWValues) { if (r + 1 !== countC) {
if (countD && item.t) { if (countD && null !== item.t) {
if (0 === r) { if (0 === r) {
dxf = style.firstSubtotalColumn; dxf = style.firstSubtotalColumn;
} else if (1 === r % 2) { } else if (1 === r % 2) {
...@@ -5360,11 +5360,11 @@ ...@@ -5360,11 +5360,11 @@
r = item.getR(); r = item.getR();
if (r + 1 !== countR) { if (r + 1 !== countR) {
if (0 === r) { if (0 === r) {
dxf = item.t ? style.firstSubtotalRow : style.firstRowSubheading; dxf = null !== item.t ? style.firstSubtotalRow : style.firstRowSubheading;
} else if (1 === r % 2) { } else if (1 === r % 2) {
dxf = item.t ? style.secondSubtotalRow : style.secondRowSubheading; dxf = null !== item.t ? style.secondSubtotalRow : style.secondRowSubheading;
} else { } else {
dxf = item.t ? style.thirdSubtotalRow : style.thirdRowSubheading; dxf = null !== item.t ? style.thirdSubtotalRow : style.thirdRowSubheading;
} }
pos = pivotTable.getRowFieldPos(r); pos = pivotTable.getRowFieldPos(r);
} }
...@@ -5396,9 +5396,10 @@ ...@@ -5396,9 +5396,10 @@
cells.setTableStyle(dxf); cells.setTableStyle(dxf);
} }
} }
pos = pivotRange.r1 + 1 + firstHeaderRow0 - (countR ? 1 : 0);
for (j = 0; j < items.length; ++j) { for (j = 0; j < items.length; ++j) {
item = items[j]; item = items[j];
if (item.t && AscCommonExcel.c_oAscItemType.Grand !== item.t) { if (null !== item.t && AscCommonExcel.c_oAscItemType.Grand !== item.t) {
r = item.getR(); r = item.getR();
if (0 === r) { if (0 === r) {
dxf = style.firstColumnSubheading; dxf = style.firstColumnSubheading;
...@@ -5410,8 +5411,7 @@ ...@@ -5410,8 +5411,7 @@
dxf = dxf && dxf.dxf; dxf = dxf && dxf.dxf;
if (dxf) { if (dxf) {
cells = cells =
this.getRange3(pivotRange.r1 + 1 + r, start + j, pivotRange.r1 + 1 + firstHeaderRow0 - this.getRange3(pivotRange.r1 + 1 + r, start + j, pos, start + j);
(countR ? 1 : 0), start + j);
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