Commit 2134a9a9 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin

Bug 27658 - Ошибка при изменении расширенных настроек диаграммы, с осью в формате Время

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@59757 954022d7-b5bf-4e40-9824-e11837661b57
parent ee56f631
...@@ -15460,7 +15460,7 @@ CMinusPlus.prototype = ...@@ -15460,7 +15460,7 @@ CMinusPlus.prototype =
function CMultiLvlStrCache() function CMultiLvlStrCache()
{ {
this.lvl = null; this.lvl = [];
this.ptCount = null; this.ptCount = 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);
...@@ -15481,9 +15481,10 @@ CMultiLvlStrCache.prototype = ...@@ -15481,9 +15481,10 @@ CMultiLvlStrCache.prototype =
createDuplicate: function() createDuplicate: function()
{ {
var c = new CMultiLvlStrCache(); var c = new CMultiLvlStrCache();
if(this.lvl)
for(var i = 0; i < this.lvl.length; ++i)
{ {
c.setLvl(this.lvl.createDuplicate()); c.setLvl(this.lvl[i].createDuplicate());
} }
c.setPtCount(this.ptCount); c.setPtCount(this.ptCount);
return c; return c;
...@@ -15496,8 +15497,8 @@ CMultiLvlStrCache.prototype = ...@@ -15496,8 +15497,8 @@ CMultiLvlStrCache.prototype =
setLvl: function(pr) setLvl: function(pr)
{ {
History.Add(this, {Type: historyitem_MultiLvlStrCache_SetLvl, newPr: pr, oldPr: this.lvl}); History.Add(this, {Type: historyitem_MultiLvlStrCache_SetLvl, newPr: pr, oldPr: this.lvl.length});
this.lvl = pr; this.lvl.push(pr);
}, },
setPtCount: function(pr) setPtCount: function(pr)
...@@ -15512,7 +15513,7 @@ CMultiLvlStrCache.prototype = ...@@ -15512,7 +15513,7 @@ CMultiLvlStrCache.prototype =
{ {
case historyitem_MultiLvlStrCache_SetLvl: case historyitem_MultiLvlStrCache_SetLvl:
{ {
this.lvl = data.oldPr; this.lvl.splice(data.oldPr, 1);
break; break;
} }
case historyitem_MultiLvlStrCache_SetPtCount: case historyitem_MultiLvlStrCache_SetPtCount:
...@@ -15529,7 +15530,7 @@ CMultiLvlStrCache.prototype = ...@@ -15529,7 +15530,7 @@ CMultiLvlStrCache.prototype =
{ {
case historyitem_MultiLvlStrCache_SetLvl: case historyitem_MultiLvlStrCache_SetLvl:
{ {
this.lvl = data.newPr; this.lvl.splice(data.oldPr, 0, data.newPr);
break; break;
} }
case historyitem_MultiLvlStrCache_SetPtCount: case historyitem_MultiLvlStrCache_SetPtCount:
...@@ -15548,6 +15549,7 @@ CMultiLvlStrCache.prototype = ...@@ -15548,6 +15549,7 @@ CMultiLvlStrCache.prototype =
case historyitem_MultiLvlStrCache_SetLvl: case historyitem_MultiLvlStrCache_SetLvl:
{ {
writeObject(w, data.newPr); writeObject(w, data.newPr);
writeLong(w, data.oldPr);
break; break;
} }
case historyitem_MultiLvlStrCache_SetPtCount: case historyitem_MultiLvlStrCache_SetPtCount:
...@@ -15565,7 +15567,9 @@ CMultiLvlStrCache.prototype = ...@@ -15565,7 +15567,9 @@ CMultiLvlStrCache.prototype =
{ {
case historyitem_MultiLvlStrCache_SetLvl: case historyitem_MultiLvlStrCache_SetLvl:
{ {
this.lvl = readObject(r); var str_pt = readObject(r);
var pos = readLong(r);
this.lvl.splice(pos, 0, str_pt);
break; break;
} }
case historyitem_MultiLvlStrCache_SetPtCount: case historyitem_MultiLvlStrCache_SetPtCount:
......
...@@ -8356,7 +8356,10 @@ BinaryChartReader.prototype.ReadCT_MultiLvlStrData = function (type, length, val ...@@ -8356,7 +8356,10 @@ BinaryChartReader.prototype.ReadCT_MultiLvlStrData = function (type, length, val
res = this.bcr.Read1(length, function (t, l) { res = this.bcr.Read1(length, function (t, l) {
return oThis.ReadCT_lvl(t, l, oNewVal); return oThis.ReadCT_lvl(t, l, oNewVal);
}); });
val.setLvl(oNewVal); for(var i = 0; i < oNewVal.length; ++i)
{
val.setLvl(oNewVal[i]);
}
} }
else if (c_oserct_multilvlstrdataEXTLST === type) { else if (c_oserct_multilvlstrdataEXTLST === type) {
var oNewVal = {}; var oNewVal = {};
......
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