Commit d2f6e6f5 authored by Alexander.Trofimov's avatar Alexander.Trofimov

historyitem_Sparkline_Clone_Sparklines -> historyitem_Sparkline_CloneSparklines

historyitem_Sparkline_Remove_Data -> historyitem_Sparkline_RemoveData
historyitem_Sparkline_Remove_Sparkline -> historyitem_Sparkline_RemoveSparkline
parent d04d69be
...@@ -170,9 +170,9 @@ function (window, undefined) { ...@@ -170,9 +170,9 @@ function (window, undefined) {
window['AscCH'].historyitem_Sparkline_ColorHigh = 24; window['AscCH'].historyitem_Sparkline_ColorHigh = 24;
window['AscCH'].historyitem_Sparkline_ColorLow = 25; window['AscCH'].historyitem_Sparkline_ColorLow = 25;
window['AscCH'].historyitem_Sparkline_F = 26; window['AscCH'].historyitem_Sparkline_F = 26;
window['AscCH'].historyitem_Sparkline_Clone_Sparklines = 27; window['AscCH'].historyitem_Sparkline_CloneSparklines = 27;
window['AscCH'].historyitem_Sparkline_Remove_Data = 28; window['AscCH'].historyitem_Sparkline_RemoveData = 28;
window['AscCH'].historyitem_Sparkline_Remove_Sparkline = 29; window['AscCH'].historyitem_Sparkline_RemoveSparkline = 29;
function CHistory() function CHistory()
{ {
......
...@@ -5712,7 +5712,7 @@ Woorksheet.prototype.updateSparklineCache = function(sheet, ranges) { ...@@ -5712,7 +5712,7 @@ Woorksheet.prototype.updateSparklineCache = function(sheet, ranges) {
Woorksheet.prototype.removeSparklines = function (range) { Woorksheet.prototype.removeSparklines = function (range) {
for (var i = 0; i < this.aSparklineGroups.length; ++i) { for (var i = 0; i < this.aSparklineGroups.length; ++i) {
if (this.aSparklineGroups[i].remove(range)) { if (this.aSparklineGroups[i].remove(range)) {
History.Add(this.aSparklineGroups[i], {Type: AscCH.historyitem_Sparkline_Remove_Sparkline, oldPr: null, newPr: null}); History.Add(this.aSparklineGroups[i], {Type: AscCH.historyitem_Sparkline_RemoveSparkline, oldPr: null, newPr: null});
this.aSparklineGroups.splice(i--, 1); this.aSparklineGroups.splice(i--, 1);
} }
} }
...@@ -5720,7 +5720,7 @@ Woorksheet.prototype.updateSparklineCache = function(sheet, ranges) { ...@@ -5720,7 +5720,7 @@ Woorksheet.prototype.updateSparklineCache = function(sheet, ranges) {
Woorksheet.prototype.removeSparklineGroups = function (range) { Woorksheet.prototype.removeSparklineGroups = function (range) {
for (var i = 0; i < this.aSparklineGroups.length; ++i) { for (var i = 0; i < this.aSparklineGroups.length; ++i) {
if (-1 !== this.aSparklineGroups[i].intersectionSimple(range)) { if (-1 !== this.aSparklineGroups[i].intersectionSimple(range)) {
History.Add(this.aSparklineGroups[i], {Type: AscCH.historyitem_Sparkline_Remove_Sparkline, oldPr: null, newPr: null}); History.Add(this.aSparklineGroups[i], {Type: AscCH.historyitem_Sparkline_RemoveSparkline, oldPr: null, newPr: null});
this.aSparklineGroups.splice(i--, 1); this.aSparklineGroups.splice(i--, 1);
} }
} }
......
...@@ -4785,7 +4785,7 @@ CellArea.prototype = { ...@@ -4785,7 +4785,7 @@ CellArea.prototype = {
w.WriteString2(data.newPr); w.WriteString2(data.newPr);
} }
break; break;
case AscCH.historyitem_Sparkline_Clone_Sparklines: case AscCH.historyitem_Sparkline_CloneSparklines:
if (data.newPr) { if (data.newPr) {
w.WriteLong(data.newPr.length); w.WriteLong(data.newPr.length);
data.newPr.forEach(function (item) { data.newPr.forEach(function (item) {
...@@ -4795,11 +4795,11 @@ CellArea.prototype = { ...@@ -4795,11 +4795,11 @@ CellArea.prototype = {
}); });
} }
break; break;
case AscCH.historyitem_Sparkline_Remove_Data: case AscCH.historyitem_Sparkline_RemoveData:
w.WriteLong(data.oldPr.sqref.c1); w.WriteLong(data.oldPr.sqref.c1);
w.WriteLong(data.oldPr.sqref.r1); w.WriteLong(data.oldPr.sqref.r1);
break; break;
case AscCH.historyitem_Sparkline_Remove_Sparkline: case AscCH.historyitem_Sparkline_RemoveSparkline:
break; break;
} }
}; };
...@@ -4902,7 +4902,7 @@ CellArea.prototype = { ...@@ -4902,7 +4902,7 @@ CellArea.prototype = {
case AscCH.historyitem_Sparkline_F: case AscCH.historyitem_Sparkline_F:
this.f = r.GetBool() ? r.GetString2() : null; this.f = r.GetBool() ? r.GetString2() : null;
break; break;
case AscCH.historyitem_Sparkline_Clone_Sparklines: case AscCH.historyitem_Sparkline_CloneSparklines:
var count = r.GetLong(), oSparkline; var count = r.GetLong(), oSparkline;
for (var i = 0; i < count; ++i) { for (var i = 0; i < count; ++i) {
oSparkline = new sparkline(); oSparkline = new sparkline();
...@@ -4913,12 +4913,12 @@ CellArea.prototype = { ...@@ -4913,12 +4913,12 @@ CellArea.prototype = {
this.arrSparklines.push(oSparkline); this.arrSparklines.push(oSparkline);
} }
break; break;
case AscCH.historyitem_Sparkline_Remove_Data: case AscCH.historyitem_Sparkline_RemoveData:
col = r.GetLong(); col = r.GetLong();
row = r.GetLong(); row = r.GetLong();
this.remove(new Asc.Range(col, row, col, row)); this.remove(new Asc.Range(col, row, col, row));
break; break;
case AscCH.historyitem_Sparkline_Remove_Sparkline: case AscCH.historyitem_Sparkline_RemoveSparkline:
if (this.worksheet) { if (this.worksheet) {
this.worksheet.removeSparklineGroup(this.Get_Id()); this.worksheet.removeSparklineGroup(this.Get_Id());
} }
...@@ -5021,10 +5021,10 @@ CellArea.prototype = { ...@@ -5021,10 +5021,10 @@ CellArea.prototype = {
case AscCH.historyitem_Sparkline_F: case AscCH.historyitem_Sparkline_F:
this.f = data.oldPr; this.f = data.oldPr;
break; break;
case AscCH.historyitem_Sparkline_Remove_Data: case AscCH.historyitem_Sparkline_RemoveData:
this.arrSparklines.push(data.oldPr); this.arrSparklines.push(data.oldPr);
break; break;
case AscCH.historyitem_Sparkline_Remove_Sparkline: case AscCH.historyitem_Sparkline_RemoveSparkline:
if (this.worksheet) { if (this.worksheet) {
this.worksheet.insertSparklineGroup(this); this.worksheet.insertSparklineGroup(this);
} }
...@@ -5113,10 +5113,10 @@ CellArea.prototype = { ...@@ -5113,10 +5113,10 @@ CellArea.prototype = {
case AscCH.historyitem_Sparkline_F: case AscCH.historyitem_Sparkline_F:
this.f = data.newPr; this.f = data.newPr;
break; break;
case AscCH.historyitem_Sparkline_Remove_Data: case AscCH.historyitem_Sparkline_RemoveData:
this.remove(data.oldPr.sqref); this.remove(data.oldPr.sqref);
break; break;
case AscCH.historyitem_Sparkline_Remove_Sparkline: case AscCH.historyitem_Sparkline_RemoveSparkline:
if (this.worksheet) { if (this.worksheet) {
this.worksheet.removeSparklineGroup(this.Get_Id()); this.worksheet.removeSparklineGroup(this.Get_Id());
} }
...@@ -5214,7 +5214,7 @@ CellArea.prototype = { ...@@ -5214,7 +5214,7 @@ CellArea.prototype = {
res.arrSparklines.push(this.arrSparklines[i].clone()); res.arrSparklines.push(this.arrSparklines[i].clone());
newSparklines.push(this.arrSparklines[i].clone()); newSparklines.push(this.arrSparklines[i].clone());
} }
History.Add(res, {Type: AscCH.historyitem_Sparkline_Clone_Sparklines, oldPr: null, newPr: newSparklines}); History.Add(res, {Type: AscCH.historyitem_Sparkline_CloneSparklines, oldPr: null, newPr: newSparklines});
} }
return res; return res;
...@@ -5268,7 +5268,7 @@ CellArea.prototype = { ...@@ -5268,7 +5268,7 @@ CellArea.prototype = {
sparklineGroup.prototype.remove = function (range) { sparklineGroup.prototype.remove = function (range) {
for (var i = 0; i < this.arrSparklines.length; ++i) { for (var i = 0; i < this.arrSparklines.length; ++i) {
if (this.arrSparklines[i].checkInRange(range)) { if (this.arrSparklines[i].checkInRange(range)) {
History.Add(this, {Type: AscCH.historyitem_Sparkline_Remove_Data, oldPr: this.arrSparklines[i], newPr: null}); History.Add(this, {Type: AscCH.historyitem_Sparkline_RemoveData, oldPr: this.arrSparklines[i], newPr: null});
this.arrSparklines.splice(i, 1); this.arrSparklines.splice(i, 1);
--i; --i;
} }
...@@ -5276,7 +5276,7 @@ CellArea.prototype = { ...@@ -5276,7 +5276,7 @@ CellArea.prototype = {
var bRemove = 0 === this.arrSparklines.length; var bRemove = 0 === this.arrSparklines.length;
if (bRemove) { if (bRemove) {
History.Add(this, {Type: AscCH.historyitem_Sparkline_Remove_Sparkline, oldPr: this, newPr: null}); History.Add(this, {Type: AscCH.historyitem_Sparkline_RemoveSparkline, oldPr: this, newPr: null});
} }
return bRemove; return bRemove;
}; };
......
...@@ -610,7 +610,7 @@ ...@@ -610,7 +610,7 @@
} }
return oRes && Range3D.superclass.isIntersect.apply(this, arguments); return oRes && Range3D.superclass.isIntersect.apply(this, arguments);
}; };
Range3D.prototype.clone = function(){ Range3D.prototype.clone = function () {
return new Range3D(ActiveRange.superclass.clone.apply(this, arguments), this.sheet, this.sheet2); return new Range3D(ActiveRange.superclass.clone.apply(this, arguments), this.sheet, this.sheet2);
}; };
......
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