Skip to content

Commit

Permalink
Merge pull request #298 from ONLYOFFICE/feature/fix-pivot
Browse files Browse the repository at this point in the history
[se] Fix pivot
  • Loading branch information
agolybev authored Apr 9, 2018
2 parents 3338600 + 93dfdc9 commit d7c0747
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 5 additions & 2 deletions cell/model/PivotTables.js
Original file line number Diff line number Diff line change
Expand Up @@ -2716,9 +2716,10 @@ CT_pivotTableDefinition.prototype.updatePivotType = function () {
var pivotFields = this.asc_getPivotFields();
var rowFields = this.asc_getRowFields();
if (rowFields) {
var i;
var i, index;
for (i = 0; i < rowFields.length; ++i) {
if (false !== pivotFields[rowFields[i].asc_getIndex()].outline) {
index = rowFields[i].asc_getIndex();
if (st_VALUES !== index && false !== pivotFields[index].outline) {
this.clearGrid = true;
break;
}
Expand Down Expand Up @@ -11117,6 +11118,8 @@ prot['Hour'] = prot.Hour;
prot['Minute'] = prot.Minute;
prot['Second'] = prot.Second;

window['Asc']['st_VALUES'] = window['AscCommonExcel'].st_VALUES = st_VALUES;

window['AscCommonExcel'].ToName_ST_ItemType = ToName_ST_ItemType;

window['Asc']['CT_PivotCacheDefinition'] = window['Asc'].CT_PivotCacheDefinition = CT_PivotCacheDefinition;
Expand Down
5 changes: 3 additions & 2 deletions cell/model/Workbook.js
Original file line number Diff line number Diff line change
Expand Up @@ -5341,7 +5341,7 @@
var pivotTable, pivotRange, pivotFields, rowFields, styleInfo, style, wholeStyle, cells, j, r, x, pos,
firstHeaderRow0, firstDataCol0, countC, countCWValues, countR, countD, stripe1, stripe2, items, l, item,
start, end, isOutline, arrSubheading, emptyStripe = new Asc.CTableStyleElement();
var dxf, dxfLabels, dxfValues, grandColumn;
var dxf, dxfLabels, dxfValues, grandColumn, index;
var checkRowSubheading = function (_i, _r, _v, _dxf) {
var sub, bSet = true;
if ((sub = arrSubheading[_i])) {
Expand Down Expand Up @@ -5540,7 +5540,8 @@
} else if (styleInfo.showRowHeaders) {
// Row Subheading
r = item.getR();
isOutline = (false !== pivotFields[rowFields[r].asc_getIndex()].outline);
index = rowFields[r].asc_getIndex();
isOutline = (AscCommonExcel.st_VALUES !== index && false !== pivotFields[index].outline);
for (x = 0, l = item.x.length; x < l; ++x, ++r) {
dxf = null;
if (r + 1 !== countR) {
Expand Down

0 comments on commit d7c0747

Please sign in to comment.