fix deserializing charts

This commit is contained in:
Sergey Luzyanin
2024-04-15 14:30:37 +03:00
parent 0bd81dc938
commit d9f36460ba

View File

@ -290,7 +290,9 @@ var c_oserct_chartspaceTHEMEOVERRIDE = 15;
var c_oserct_chartspaceXLSX = 16;
var c_oserct_chartspaceSTYLES = 17;
var c_oserct_chartspaceCOLORS = 18;
var c_oserct_chartspaceCHARTDATA = 19;
var c_oserct_chartspaceXLSXEXTERNAL = 19;
var c_oserct_chartspaceXLSXZIP = 20;
var c_oserct_usershapes_COUNT = 0;
@ -1470,11 +1472,6 @@ BinaryChartWriter.prototype.WriteCT_ChartSpace = function (oVal) {
oThis.WriteCT_ChartColors(oVal.chartColors);
});
}
if(null != oVal.chartData) {
this.bs.WriteItem(c_oserct_chartspaceCHARTDATA, function() {
oThis.WriteCT_ChartData(oVal.chartData);
});
}
};
BinaryChartWriter.prototype.WriteCT_ChartExSpace = function (oVal) {
var oThis = this;
@ -7398,13 +7395,6 @@ BinaryChartReader.prototype.ReadCT_ChartSpace = function (type, length, val, cur
val.setChartColors(oNewVal);
}
}
else if(c_oserct_chartspaceCHARTDATA === type) {
oNewVal = new AscFormat.CChartData();
res = this.bcr.Read1(length, function (t, l) {
return oThis.ReadCT_ChartData(t, l, oNewVal);
});
val.setChartData(oNewVal);
}
else {
res = c_oSerConstants.ReadUnknown;
}