Commit 1d9eb47e authored by Alexander.Trofimov's avatar Alexander.Trofimov

fix bug 35947

parent 46b48509
......@@ -2004,6 +2004,7 @@ function CT_pivotTableDefinition() {
this.pageFieldsPositions = null;
this.clearGrid = false;
this.hasCompact = true;
}
CT_pivotTableDefinition.prototype.readAttributes = function(attr, uq) {
if (attr()) {
......@@ -2724,6 +2725,7 @@ CT_pivotTableDefinition.prototype.init = function () {
};
CT_pivotTableDefinition.prototype.updatePivotType = function () {
this.clearGrid = false;
this.hasCompact = false;
var field;
var pivotFields = this.asc_getPivotFields();
var rowFields = this.asc_getRowFields();
......@@ -2732,7 +2734,9 @@ CT_pivotTableDefinition.prototype.updatePivotType = function () {
field = pivotFields[rowFields[i].asc_getIndex()];
if (false !== field.outline) {
this.clearGrid = true;
break;
}
if (false !== field.compact) {
this.hasCompact = true;
}
}
}
......
......@@ -5484,9 +5484,12 @@
pivotRange = pivotTable.getRange();
if (countR) {
cell = new AscCommon.CellBase(pivotRange.r1 + pivotTable.getFirstHeaderRow0(), pivotRange.c1);
if (range.contains2(cell)) {
res.push(cell);
countR = pivotTable.hasCompact ? 1 : countR;
for (j = 0; j < countR; ++j) {
cell = new AscCommon.CellBase(pivotRange.r1 + pivotTable.getFirstHeaderRow0(), pivotRange.c1 + j);
if (range.contains2(cell)) {
res.push(cell);
}
}
}
if (countCWValues) {
......
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