Commit 866500bf authored by Alexander.Trofimov's avatar Alexander.Trofimov

Поправил чтение sqref. Поправил проверки.

parent 536980ce
......@@ -3605,13 +3605,13 @@
var oThis = this;
for(var i = 0, length = aReplies.length; i < length; ++i)
this.bs.WriteItem( c_oSer_CommentData.Reply, function(){oThis.WriteCommentData(aReplies[i]);});
}
};
this.WriteSparklineGroups = function(oSparklineGroups)
{
var oThis = this;
for(var i = 0, length = oSparklineGroups.arrSparklineGroup.length; i < length; ++i)
this.bs.WriteItem( c_oSer_Sparkline.SparklineGroup, function(){oThis.WriteSparklineGroup(oSparklineGroups.arrSparklineGroup[i]);});
}
};
this.WriteSparklineGroup = function(oSparklineGroup)
{
var oThis = this;
......@@ -3697,23 +3697,22 @@
if (null != oSparklineGroup.arrSparklines) {
this.bs.WriteItem(c_oSer_Sparkline.Sparklines, function(){oThis.WriteSparklines(oSparklineGroup);});
}
}
};
this.WriteSparklines = function(oSparklineGroup)
{
var oThis = this;
for(var i = 0, length = oSparklineGroup.arrSparklines.length; i < length; ++i)
this.bs.WriteItem( c_oSer_Sparkline.Sparkline, function(){oThis.WriteSparkline(oSparklineGroup.arrSparklines[i]);});
}
};
this.WriteSparkline = function(oSparkline)
{
var oThis = this;
if (null != oSparkline.f) {
this.memory.WriteByte(c_oSer_Sparkline.SparklineRef);
this.memory.WriteString2(oSparkline.f);
}
if (null != oSparkline.sqref) {
this.memory.WriteByte(c_oSer_Sparkline.SparklineSqRef);
this.memory.WriteString2(oSparkline.sqref);
this.memory.WriteString2(oSparkline.sqref.getName());
}
}
}
......@@ -6628,12 +6627,11 @@
return res;
};
this.ReadSparkline = function (type, length, oSparkline) {
var oThis = this;
var res = c_oSerConstants.ReadOk;
if (c_oSer_Sparkline.SparklineRef === type) {
oSparkline.f = this.stream.GetString2LE(length);
} else if (c_oSer_Sparkline.SparklineSqRef === type) {
oSparkline.sqref = this.stream.GetString2LE(length);
oSparkline.setSqref(this.stream.GetString2LE(length));
} else
res = c_oSerConstants.ReadUnknown;
return res;
......
......@@ -4456,7 +4456,7 @@ function sparklineGroup() {
this.rightToLeft = false;
// elements
this.colorSeries = null; // ToDo добавить значения по умолчанию
this.colorSeries = null;
this.colorNegative = null;
this.colorAxis = null;
this.colorMarkers = null;
......@@ -4464,7 +4464,7 @@ function sparklineGroup() {
this.colorLast = null;
this.colorHigh = null;
this.colorLow = null;
this.f = '??';
this.f = null;
this.arrSparklines = [];
this.arrCachedSparklines = [];
}
......@@ -4492,11 +4492,14 @@ sparklineGroup.prototype.updateCache = function(range) {
};
/** @constructor */
function sparkline() {
this.sqref = '??'; // ToDo добавить значение по умолчанию
this.f = '??';
this.sqref = null;
this.f = null;
}
sparkline.prototype.setSqref = function(sqref) {
this.sqref = Asc.g_oRangeCache.getAscRange(sqref);
};
sparkline.prototype.checkInRange = function(range) {
range.intersectionSimple(this.sqref);
return this.sqref ? range.isIntersect(this.sqref) : false;
};
// For Auto Filters
......
......@@ -369,7 +369,7 @@ CSparklineView.prototype.initFromSparkline = function(oSparkline, oSparklineGrou
var chart_space = DrawingObjectsController.prototype._getChartSpace(chartSeries, settings, true);
chart_space.setWorksheet(worksheetView.model);
this.chartSpace = chart_space;
var oBBox = worksheetView.model.getCell2(oSparkline.sqref);
var oBBox = oSparkline.sqref;
this.col = oBBox.c1;
this.row = oBBox.r1;
this.extX = worksheetView.getColumnWidth(oBBox.c1, 3);
......
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