Commit 3ed04d78 authored by Alexander.Trofimov's avatar Alexander.Trofimov

fix SubtotalRow and RowSubheading with no compact mode

parent c9428161
......@@ -2673,6 +2673,18 @@ CT_pivotTableDefinition.prototype.getRowFieldsCount = function (compact) {
}
return res;
};
CT_pivotTableDefinition.prototype.getRowFieldPos = function (index) {
var res = 0;
if (this.rowFields) {
var field, fields = this.rowFields.field;
for (var i = 0; i < index && i < fields.length; ++i) {
field = this.pivotFields.pivotField[fields[i].asc_getIndex()];
res += (field && false === field.compact && 1);
}
}
return res;
};
CT_pivotTableDefinition.prototype.getDataFieldsCount = function () {
return (this.dataFields && this.dataFields.dataField.length) || 0;
};
......
......@@ -5199,7 +5199,8 @@
}
dxf = dxf && dxf.dxf;
if (dxf) {
cells = this.getRange3(start + j, pivotRange.c1, start + j, pivotRange.c2);
cells = this.getRange3(start + j, pivotRange.c1 + pivotTable.getRowFieldPos(r), start + j,
pivotRange.c2);
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