Commit e009d582 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

правка критических багов с чартами

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@52037 954022d7-b5bf-4e40-9824-e11837661b57
parent 22016d3e
......@@ -1145,8 +1145,10 @@ CChartAsGroup.prototype =
recalculate: function(updateImage)
{
try
{
if(!isRealObject(this.parent))
return;
var parents = this.getParentObjects();
this.recalculatePosExt();
this.recalculateTransform();
......@@ -1335,6 +1337,10 @@ CChartAsGroup.prototype =
this.brush.fill.RasterImageId = "";
//editor.WordControl.m_oLogicDocument.DrawingObjects.urlMap.push(this.brush.fill.RasterImageId);
}
}
catch(e)
{}
},
......
......@@ -918,7 +918,8 @@ CChartTitle.prototype =
var newLayout = layout ? layout.createDuplicate() : null;
History.Add(this, {Type: historyitem_SetCahrtLayout, oldLayout: oldLayout, newLayout: newLayout});
this.layout = layout;
editor.WordControl.m_oLogicDocument.recalcMap[this.Id] = this.chartGroup;
if(this.chartGroup)
editor.WordControl.m_oLogicDocument.recalcMap[this.chartGroup.Id] = this.chartGroup;
},
......@@ -988,7 +989,8 @@ CChartTitle.prototype =
onParagraphChanged: function()
{
editor.WordControl.m_oLogicDocument.recalcMap[this.Id] = this.chartGroup;
if(this.chartGroup)
editor.WordControl.m_oLogicDocument.recalcMap[this.chartGroup.Id] = this.chartGroup;
},
writeToBinary: function(w)
......@@ -1094,7 +1096,8 @@ CChartTitle.prototype =
break;
}
}
editor.WordControl.m_oLogicDocument.recalcMap[this.Id] = this.chartGroup;
if(this.chartGroup)
editor.WordControl.m_oLogicDocument.recalcMap[this.chartGroup.Id] = this.chartGroup;
},
Redo: function(data)
......@@ -1142,7 +1145,8 @@ CChartTitle.prototype =
break;
}
}
editor.WordControl.m_oLogicDocument.recalcMap[this.Id] = this.chartGroup;
if(this.chartGroup)
editor.WordControl.m_oLogicDocument.recalcMap[this.chartGroup.Id] = this.chartGroup;
},
Refresh_RecalcData: function()
......@@ -1289,7 +1293,8 @@ CChartTitle.prototype =
}
}
editor.WordControl.m_oLogicDocument.recalcMap[this.Id] = this.chartGroup;
if(this.chartGroup)
editor.WordControl.m_oLogicDocument.recalcMap[this.chartGroup.Id] = this.chartGroup;
}
}
};
\ No newline at end of file
......@@ -1287,6 +1287,7 @@ CPresentation.prototype =
addChart: function(binary)
{
this.Slides[this.CurPage].graphicObjects.addChart(binary);
this.Document_UpdateUndoRedoState();
this.Recalculate();
},
......
......@@ -1756,7 +1756,7 @@ CGraphicObjects.prototype = {
if(selected_arr[i].chart != null)
return selected_arr[i];
}
History.TurnOff();
var ret = new CChartAsGroup();
ret.setAscChart(new asc_CChart());
var options = {};
......@@ -1775,6 +1775,7 @@ CGraphicObjects.prototype = {
ret.spPr.xfrm.offY = (presentation.Height - chart_height)/2;
ret.spPr.xfrm.extX = chart_width;//this.slide.Width*2/3;//ditor.WordControl.m_oDrawingDocument.GetMMPerDot(c_oAscChartDefines.defaultChartWidth);
ret.spPr.xfrm.extY = chart_height;//0.593*this.slide.Height;//ditor.WordControl.m_oDrawingDocument.GetMMPerDot(c_oAscChartDefines.defaultChartHeight);
History.TurnOn();
return ret;
},
......
......@@ -1053,10 +1053,14 @@ function MoveInternalChartObjectState(drawingObjectsController, drawingObjects,
this.onMouseUp = function(e, x, y)
{
History.Create_NewPoint();
this.drawingObjectsController.trackEnd();
if(this.drawingObjects.presentation.Document_Is_SelectionLocked(changestype_Drawing_Props) === false)
{
History.Create_NewPoint();
this.drawingObjectsController.trackEnd();
editor.WordControl.m_oLogicDocument.Recalculate();
}
this.drawingObjectsController.clearTrackObjects();
editor.WordControl.m_oLogicDocument.Recalculate();
this.drawingObjects.OnUpdateOverlay();
this.drawingObjectsController.changeCurrentState(new ChartState(this.drawingObjectsController, this.drawingObjects, this.chartElement.chartGroup));
......
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