Commit d5f318de authored by Sergey Luzyanin's avatar Sergey Luzyanin

fix Bug 33914

parent d6bc5872
...@@ -24,6 +24,11 @@ ...@@ -24,6 +24,11 @@
} }
AscCommon.extendClass(CChangesDrawingsBool, AscDFH.CChangesBaseBoolProperty); AscCommon.extendClass(CChangesDrawingsBool, AscDFH.CChangesBaseBoolProperty);
CChangesDrawingsBool.prototype.private_SetValue = private_SetValue; CChangesDrawingsBool.prototype.private_SetValue = private_SetValue;
CChangesDrawingsBool.prototype.Load = function(){
this.Redo();
this.RefreshRecalcData();
};
CChangesDrawingsBool.prototype.ReadFromBinary = function (reader) { CChangesDrawingsBool.prototype.ReadFromBinary = function (reader) {
reader.Seek2(reader.GetCurPos() - 4); reader.Seek2(reader.GetCurPos() - 4);
this.Type = reader.GetLong(); this.Type = reader.GetLong();
...@@ -42,6 +47,10 @@ ...@@ -42,6 +47,10 @@
AscCommon.extendClass(CChangesDrawingsLong, AscDFH.CChangesBaseLongProperty); AscCommon.extendClass(CChangesDrawingsLong, AscDFH.CChangesBaseLongProperty);
CChangesDrawingsLong.prototype.private_SetValue = private_SetValue; CChangesDrawingsLong.prototype.private_SetValue = private_SetValue;
CChangesDrawingsLong.prototype.Load = function(){
this.Redo();
this.RefreshRecalcData();
};
CChangesDrawingsLong.prototype.ReadFromBinary = function (reader) { CChangesDrawingsLong.prototype.ReadFromBinary = function (reader) {
reader.Seek2(reader.GetCurPos() - 4); reader.Seek2(reader.GetCurPos() - 4);
this.Type = reader.GetLong(); this.Type = reader.GetLong();
...@@ -59,6 +68,11 @@ ...@@ -59,6 +68,11 @@
AscCommon.extendClass(CChangesDrawingsDouble, AscDFH.CChangesBaseDoubleProperty); AscCommon.extendClass(CChangesDrawingsDouble, AscDFH.CChangesBaseDoubleProperty);
CChangesDrawingsDouble.prototype.private_SetValue = private_SetValue; CChangesDrawingsDouble.prototype.private_SetValue = private_SetValue;
CChangesDrawingsDouble.prototype.Load = function(){
this.Redo();
this.RefreshRecalcData();
};
CChangesDrawingsDouble.prototype.ReadFromBinary = function (reader) { CChangesDrawingsDouble.prototype.ReadFromBinary = function (reader) {
reader.Seek2(reader.GetCurPos() - 4); reader.Seek2(reader.GetCurPos() - 4);
...@@ -78,6 +92,11 @@ ...@@ -78,6 +92,11 @@
AscCommon.extendClass(CChangesDrawingsString, AscDFH.CChangesBaseStringProperty); AscCommon.extendClass(CChangesDrawingsString, AscDFH.CChangesBaseStringProperty);
CChangesDrawingsString.prototype.private_SetValue = private_SetValue; CChangesDrawingsString.prototype.private_SetValue = private_SetValue;
CChangesDrawingsString.prototype.Load = function(){
this.Redo();
this.RefreshRecalcData();
};
CChangesDrawingsString.prototype.ReadFromBinary = function (reader) { CChangesDrawingsString.prototype.ReadFromBinary = function (reader) {
reader.Seek2(reader.GetCurPos() - 4); reader.Seek2(reader.GetCurPos() - 4);
this.Type = reader.GetLong(); this.Type = reader.GetLong();
...@@ -96,6 +115,10 @@ ...@@ -96,6 +115,10 @@
AscCommon.extendClass(CChangesDrawingsObjectNoId, AscDFH.CChangesBaseObjectProperty); AscCommon.extendClass(CChangesDrawingsObjectNoId, AscDFH.CChangesBaseObjectProperty);
CChangesDrawingsObjectNoId.prototype.private_SetValue = private_SetValue; CChangesDrawingsObjectNoId.prototype.private_SetValue = private_SetValue;
CChangesDrawingsObjectNoId.prototype.Load = function(){
this.Redo();
this.RefreshRecalcData();
};
window['AscDFH'].CChangesDrawingsObjectNoId = CChangesDrawingsObjectNoId; window['AscDFH'].CChangesDrawingsObjectNoId = CChangesDrawingsObjectNoId;
CChangesDrawingsObjectNoId.prototype.ReadFromBinary = function (reader) { CChangesDrawingsObjectNoId.prototype.ReadFromBinary = function (reader) {
reader.Seek2(reader.GetCurPos() - 4); reader.Seek2(reader.GetCurPos() - 4);
...@@ -103,7 +126,6 @@ ...@@ -103,7 +126,6 @@
this.FromLoad = true; this.FromLoad = true;
CChangesDrawingsObjectNoId.superclass.ReadFromBinary.call(this, reader); CChangesDrawingsObjectNoId.superclass.ReadFromBinary.call(this, reader);
}; };
CChangesDrawingsObjectNoId.prototype.private_SetValue = private_SetValue;
CChangesDrawingsObjectNoId.prototype.private_CreateObject = function () { CChangesDrawingsObjectNoId.prototype.private_CreateObject = function () {
if (AscDFH.drawingsConstructorsMap[this.Type]) { if (AscDFH.drawingsConstructorsMap[this.Type]) {
return new AscDFH.drawingsConstructorsMap[this.Type](); return new AscDFH.drawingsConstructorsMap[this.Type]();
...@@ -138,7 +160,10 @@ ...@@ -138,7 +160,10 @@
AscDFH.drawingsChangesMap[this.Type](this.Class, oObject); AscDFH.drawingsChangesMap[this.Type](this.Class, oObject);
} }
}; };
CChangesDrawingsObject.prototype.Load = function(){
this.Redo();
this.RefreshRecalcData();
};
function CChangesDrawingsContent(Class, Type, Pos, Items, isAdd) { function CChangesDrawingsContent(Class, Type, Pos, Items, isAdd) {
this.Type = Type; this.Type = Type;
CChangesDrawingsContent.superclass.constructor.call(this, Class, Pos, Items, isAdd); CChangesDrawingsContent.superclass.constructor.call(this, Class, Pos, Items, isAdd);
...@@ -251,6 +276,7 @@ ...@@ -251,6 +276,7 @@
else { else {
this.private_RemoveInArrayLoad(); this.private_RemoveInArrayLoad();
} }
this.RefreshRecalcData();
}; };
CChangesDrawingsContent.prototype.Undo = function () { CChangesDrawingsContent.prototype.Undo = function () {
...@@ -396,6 +422,11 @@ ...@@ -396,6 +422,11 @@
this.Do(); this.Do();
}; };
CChangesDrawingChangeTheme.prototype.Load = function(){
this.Redo();
this.RefreshRecalcData();
};
window['AscDFH'].CChangesDrawingChangeTheme = CChangesDrawingChangeTheme; window['AscDFH'].CChangesDrawingChangeTheme = CChangesDrawingChangeTheme;
...@@ -445,6 +476,10 @@ ...@@ -445,6 +476,10 @@
oSlide.transitionLock = this.transitionLock; oSlide.transitionLock = this.transitionLock;
oSlide.layoutLock = this.layoutLock; oSlide.layoutLock = this.layoutLock;
}; };
CChangesDrawingTimingLocks.prototype.Load = function(){
this.Redo();
this.RefreshRecalcData();
};
window['AscDFH'].CChangesDrawingTimingLocks = CChangesDrawingTimingLocks; window['AscDFH'].CChangesDrawingTimingLocks = CChangesDrawingTimingLocks;
...@@ -517,6 +552,10 @@ ...@@ -517,6 +552,10 @@
CChangesSparklinesChangeData.prototype.Redo = function(){ CChangesSparklinesChangeData.prototype.Redo = function(){
this.Fill(this.NewPr); this.Fill(this.NewPr);
}; };
CChangesSparklinesChangeData.prototype.Load = function(){
this.Redo();
this.RefreshRecalcData();
};
window['AscDFH'].CChangesSparklinesChangeData = CChangesSparklinesChangeData; window['AscDFH'].CChangesSparklinesChangeData = CChangesSparklinesChangeData;
...@@ -612,6 +651,11 @@ ...@@ -612,6 +651,11 @@
CChangesDrawingsExcelColor.prototype.Redo = function(){ CChangesDrawingsExcelColor.prototype.Redo = function(){
this.Fill(this.NewPr); this.Fill(this.NewPr);
}; };
CChangesDrawingsExcelColor.prototype.Load = function(){
this.Redo();
this.RefreshRecalcData();
};
CChangesDrawingsExcelColor.prototype.Fill = function(Pr){ CChangesDrawingsExcelColor.prototype.Fill = function(Pr){
var oClass = this.Class; var oClass = this.Class;
switch(this.Type){ switch(this.Type){
...@@ -658,6 +702,10 @@ ...@@ -658,6 +702,10 @@
this.Class.worksheet.removeSparklineGroup(this.Class.Get_Id()); this.Class.worksheet.removeSparklineGroup(this.Class.Get_Id());
} }
}; };
CChangesDrawingsSparklinesRemove.prototype.Load = function(){
this.Redo();
this.RefreshRecalcData();
};
window['AscDFH'].CChangesDrawingsSparklinesRemove = CChangesDrawingsSparklinesRemove; window['AscDFH'].CChangesDrawingsSparklinesRemove = CChangesDrawingsSparklinesRemove;
function CChangesDrawingsSparklineRemoveData(Class, Col, Row){ function CChangesDrawingsSparklineRemoveData(Class, Col, Row){
......
...@@ -11114,7 +11114,12 @@ CStockChart.prototype = ...@@ -11114,7 +11114,12 @@ CStockChart.prototype =
}, },
Refresh_RecalcData: function() Refresh_RecalcData: function()
{}, {
if(this.parent && this.parent.parent && this.parent.parent.parent)
{
this.parent.parent.parent.handleUpdateType();
}
},
removeSeries: function(idx) removeSeries: function(idx)
{ {
if(this.series[idx]) if(this.series[idx])
...@@ -12475,7 +12480,7 @@ CTitle.prototype = ...@@ -12475,7 +12480,7 @@ CTitle.prototype =
{ {
History.Add(new CChangesDrawingsObject(this, AscDFH.historyitem_CommonChartFormat_SetParent, this.parent, pr)); History.Add(new CChangesDrawingsObject(this, AscDFH.historyitem_CommonChartFormat_SetParent, this.parent, pr));
this.parent = pr; this.parent = pr;
} }
}; };
function CTrendLine() function CTrendLine()
...@@ -12646,6 +12651,7 @@ function CUpDownBars() ...@@ -12646,6 +12651,7 @@ function CUpDownBars()
this.downBars = null; this.downBars = null;
this.gapWidth = null; this.gapWidth = null;
this.upBars = null; this.upBars = null;
this.parent = null;
this.Id = g_oIdCounter.Get_NewId(); this.Id = g_oIdCounter.Get_NewId();
g_oTableId.Add(this, this.Id); g_oTableId.Add(this, this.Id);
} }
...@@ -12659,16 +12665,30 @@ CUpDownBars.prototype = ...@@ -12659,16 +12665,30 @@ CUpDownBars.prototype =
}, },
Refresh_RecalcData: function() Refresh_RecalcData: function()
{}, {
if(this.parent){
this.parent.Refresh_RecalcData && this.parent.Refresh_RecalcData();
}
},
getObjectType: function() getObjectType: function()
{ {
return AscDFH.historyitem_type_UpDownBars; return AscDFH.historyitem_type_UpDownBars;
}, },
setParent: function(pr)
{
History.Add(new CChangesDrawingsObject(this, AscDFH.historyitem_CommonChartFormat_SetParent, this.parent, pr));
this.parent = pr;
},
setDownBars: function(pr) setDownBars: function(pr)
{ {
History.Add(new CChangesDrawingsObject(this, AscDFH.historyitem_UpDownBars_SetDownBars, this.downBars, pr)); History.Add(new CChangesDrawingsObject(this, AscDFH.historyitem_UpDownBars_SetDownBars, this.downBars, pr));
this.downBars = pr; this.downBars = pr;
if(this.downBars){
this.downBars.setParent(this);
}
}, },
setGapWidth: function(pr) setGapWidth: function(pr)
...@@ -12682,6 +12702,21 @@ CUpDownBars.prototype = ...@@ -12682,6 +12702,21 @@ CUpDownBars.prototype =
{ {
History.Add(new CChangesDrawingsObject(this, AscDFH.historyitem_UpDownBars_SetUpBars, this.downBars, pr)); History.Add(new CChangesDrawingsObject(this, AscDFH.historyitem_UpDownBars_SetUpBars, this.downBars, pr));
this.upBars = pr; this.upBars = pr;
if(this.upBars){
this.upBars.setParent(this);
}
},
handleUpdateFill: function()
{
this.Refresh_RecalcData();
},
handleUpdateLn: function()
{
this.Refresh_RecalcData();
}, },
createDuplicate: function() createDuplicate: function()
......
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