Commit 8184db1c authored by Sergey.Luzyanin's avatar Sergey.Luzyanin

Правка багов при совместно редактировании диаграммм

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56844 954022d7-b5bf-4e40-9824-e11837661b57
parent 140be490
......@@ -4822,7 +4822,7 @@ CCatAx.prototype =
}
case historyitem_CatAxSetAxId:
{
writeString(w, data.newPr);
writeLong(w, data.newPr);
break;
}
case historyitem_CatAxSetAxPos:
......@@ -4949,7 +4949,7 @@ CCatAx.prototype =
}
case historyitem_CatAxSetAxId:
{
this.axId = readString(r);
this.axId = readLong(r);
break;
}
case historyitem_CatAxSetAxPos:
......@@ -6902,7 +6902,7 @@ CSerAx.prototype =
}
case historyitem_SerAxSetAxId:
{
writeString(w, data.newPr);
writeLong(w, data.newPr);
break;
}
case historyitem_SerAxSetAxPos:
......@@ -7009,7 +7009,7 @@ CSerAx.prototype =
}
case historyitem_SerAxSetAxId:
{
this.axId = readString(r);
this.axId = readLong(r);
break;
}
case historyitem_SerAxSetAxPos:
......@@ -7881,7 +7881,7 @@ CValAx.prototype =
}
case historyitem_ValAxSetAxId:
{
writeString(w, data.newPr);
writeLong(w, data.newPr);
break;
}
case historyitem_ValAxSetAxPos:
......@@ -7994,7 +7994,7 @@ CValAx.prototype =
}
case historyitem_ValAxSetAxId:
{
this.axId = readString(r);
this.axId = readLong(r);
break;
}
case historyitem_ValAxSetAxPos:
......@@ -10033,22 +10033,22 @@ CCat.prototype =
},
setNumLit: function(pr)
{
History.Add(this, {Type: historyitem_Cat_SetMultiLvlStrRef, oldPr: this.multiLvlStrRef, newPr: pr});
History.Add(this, {Type: historyitem_Cat_SetNumLit, oldPr: this.multiLvlStrRef, newPr: pr});
this.numLit = pr;
},
setNumRef: function(pr)
{
History.Add(this, {Type: historyitem_Cat_SetMultiLvlStrRef, oldPr: this.multiLvlStrRef, newPr: pr});
History.Add(this, {Type: historyitem_Cat_SetNumRef, oldPr: this.multiLvlStrRef, newPr: pr});
this.numRef = pr;
},
setStrLit: function(pr)
{
History.Add(this, {Type: historyitem_Cat_SetMultiLvlStrRef, oldPr: this.multiLvlStrRef, newPr: pr});
History.Add(this, {Type: historyitem_Cat_SetStrLit, oldPr: this.multiLvlStrRef, newPr: pr});
this.strLit = pr;
},
setStrRef: function(pr)
{
History.Add(this, {Type: historyitem_Cat_SetMultiLvlStrRef, oldPr: this.multiLvlStrRef, newPr: pr});
History.Add(this, {Type: historyitem_Cat_SetStrRef, oldPr: this.multiLvlStrRef, newPr: pr});
this.strRef = pr;
},
......@@ -10245,7 +10245,7 @@ CChartText.prototype =
Read_FromBinary2: function(r)
{
this.Id = r.GetLong();
this.Id = r.GetString2();
},
setRich: function(pr)
......@@ -15594,7 +15594,6 @@ CNumericPoint.prototype =
switch (data.Type)
{
case historyitem_NumericPoint_SetFormatCode:
case historyitem_NumericPoint_SetVal:
{
w.WriteBool(typeof data.newPr === "string");
if(typeof data.newPr === "string")
......@@ -15613,6 +15612,11 @@ CNumericPoint.prototype =
}
break;
}
case historyitem_NumericPoint_SetVal:
{
writeDouble(w, data.newPr);
break;
}
}
},
......@@ -15647,14 +15651,7 @@ CNumericPoint.prototype =
}
case historyitem_NumericPoint_SetVal:
{
if(r.GetBool())
{
this.val = r.GetString2();
}
else
{
this.val = null;
}
this.val = readDouble(r);
break;
}
}
......@@ -22736,7 +22733,7 @@ CYVal.prototype =
Read_FromBinary2: function(r)
{
this.Id = r.GetLong();
this.Id = r.GetString2();
},
setNumLit: function(pr)
......
......@@ -237,6 +237,15 @@ CChartSpace.prototype =
checkHitToBounds: CShape.prototype.checkHitToBounds,
recalculateTextPr: function()
{
if(this.txPr && this.txPr.content)
{
this.txPr.content.Reset(0, 0, 10, 10);
this.txPr.content.Recalculate_Page(0, true);
}
},
getSelectionState: function()
{
var content_selection = null;
......
......@@ -59,7 +59,8 @@ CChartSpace.prototype.setRecalculateInfo = function()
recalculateReferences: true,
recalculateBBox: true,
recalculateFormulas: true,
recalculatePenBrush: true
recalculatePenBrush: true,
recalculateTextPr : true
};
this.baseColors = [];
this.bounds = {l: 0, t: 0, r: 0, b:0, w: 0, h:0};
......@@ -401,6 +402,12 @@ CChartSpace.prototype.recalculate = function()
this.recalcInfo.recalculateWrapPolygon = false;
}
if(this.recalcInfo.recalculateTextPr)
{
this.recalculateTextPr();
this.recalcInfo.recalculateTextPr = false;
}
this.recalcInfo.axisLabels.length = 0;
this.bNeedUpdatePosition = true;
......
......@@ -244,8 +244,9 @@ function CTableId()
case historyitem_type_WrapPolygon : Element = new CWrapPolygon(); break;
case historyitem_type_DateAx : Element = new CDateAx(); break;
case historyitem_type_SerAx : Element = new CSerAx(); break;
case historyitem_type_Math : Element = new ParaMath(false); break;
case historyitem_type_Title : Element = new CTitle(); break;
case historyitem_type_Math : Element = new ParaMath(false); break;
case historyitem_type_MathContent : Element = new CMathContent(); break;
case historyitem_type_acc : Element = new CAccent(); break;
case historyitem_type_bar : Element = new CBar(); break;
......
......@@ -8498,6 +8498,7 @@ CDocumentContent.prototype =
Writer.WriteString2( this.Parent.Get_Id() );
Writer.WriteBool(this.TurnOffInnerWrap);
Writer.WriteBool(this.Split);
writeBool(Writer, this.bPresentation);
var Count = this.Content.length;
Writer.WriteLong(Count);
......@@ -8541,6 +8542,7 @@ CDocumentContent.prototype =
LinkData.Parent = Reader.GetString2();
this.TurnOffInnerWrap = Reader.GetBool();
this.Split = Reader.GetBool();
this.bPresentation = readBool(Reader);
var Count = Reader.GetLong();
this.Content = [];
......
......@@ -88,7 +88,8 @@ CChartSpace.prototype.setRecalculateInfo = function()
recalculateUpDownBars: true,
recalculateLegend: true,
recalculateWrapPolygon: true,
recalculatePenBrush: true
recalculatePenBrush: true,
recalculateTextPr: true
};
this.baseColors = [];
......@@ -231,62 +232,6 @@ CChartSpace.prototype.createMoveTrack = CShape.prototype.createMoveTrack;
CChartSpace.prototype.getAspect = CShape.prototype.getAspect;
CChartSpace.prototype.getRectBounds = CShape.prototype.getRectBounds;
/*CChartSpace.prototype.draw = function(graphics)
{
var intGrid = graphics.GetIntegerGrid();
graphics.SetIntegerGrid(false);
graphics.transform3(this.transform, false);
this.chartObj.draw(this, graphics);
graphics.reset();
graphics.SetIntegerGrid(intGrid);
if(this.chart)
{
if(this.chart.plotArea)
{
if(this.chart.plotArea.chart && this.chart.plotArea.chart.series)
{
var series = this.chart.plotArea.chart.series;
for(var i = 0; i < series.length; ++i)
{
var ser = series[i];
var pts = getPtsFromSeries(ser);
for(var j = 0; j < pts.length; ++j)
{
if(pts[j].compiledDlb)
pts[j].compiledDlb.draw(graphics);
}
}
}
if(this.chart.plotArea.catAx)
{
if(this.chart.plotArea.catAx.title)
this.chart.plotArea.catAx.title.draw(graphics);
if(this.chart.plotArea.catAx.labels)
this.chart.plotArea.catAx.labels.draw(graphics);
}
if(this.chart.plotArea.valAx)
{
if(this.chart.plotArea.valAx.title)
this.chart.plotArea.valAx.title.draw(graphics);
if(this.chart.plotArea.valAx.labels)
this.chart.plotArea.valAx.labels.draw(graphics);
}
}
if(this.chart.title)
{
this.chart.title.draw(graphics);
}
if(this.chart.legend)
{
this.chart.legend.draw(graphics);
}
}
}; */
CChartSpace.prototype.recalculate = function()
{
if(this.bDeleted)
......@@ -464,6 +409,11 @@ CChartSpace.prototype.recalculate = function()
var pos = this.chartObj.reCalculatePositionText("legend", this, this.chart.legend);
this.chart.legend.setPosition(pos.x, pos.y);
}
if(this.recalcInfo.recalculateTextPr)
{
this.recalculateTextPr();
this.recalcInfo.recalculateTextPr = false;
}
if(this.recalcInfo.recalculateBounds)
{
......
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