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

метод redrawCharts у Presentation для перестроения чартов при зуме

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@50995 954022d7-b5bf-4e40-9824-e11837661b57
parent 1dbab191
...@@ -199,6 +199,7 @@ CChartAsGroup.prototype = ...@@ -199,6 +199,7 @@ CChartAsGroup.prototype =
{ {
var chart = chartPr.ChartProperties; var chart = chartPr.ChartProperties;
var w = new CMemory(); var w = new CMemory();
this.chart.Write_ToBinary2(w); this.chart.Write_ToBinary2(w);
var bin = w.pos + ";" + w.GetBase64Memory(); var bin = w.pos + ";" + w.GetBase64Memory();
...@@ -206,6 +207,7 @@ CChartAsGroup.prototype = ...@@ -206,6 +207,7 @@ CChartAsGroup.prototype =
var new_chart_data = new asc_CChart(this.chart); var new_chart_data = new asc_CChart(this.chart);
var r = CreateBinaryReader(bin, 0, bin.length); var r = CreateBinaryReader(bin, 0, bin.length);
new_chart_data.Read_FromBinary2(r); new_chart_data.Read_FromBinary2(r);
if(chart.styleId != null) if(chart.styleId != null)
new_chart_data.asc_setStyleId(chart.styleId); new_chart_data.asc_setStyleId(chart.styleId);
if(chart.subType != null) if(chart.subType != null)
......
...@@ -1268,7 +1268,12 @@ CPresentation.prototype = ...@@ -1268,7 +1268,12 @@ CPresentation.prototype =
}, },
redrawCharts: function() redrawCharts: function()
{}, {
for(var i = 0; i < this.Slides.length; ++i)
{
this.Slides[i].graphicObjects.redrawCharts();
}
},
Add_InlineImage : function(W, H, Img, Chart, bFlow) Add_InlineImage : function(W, H, Img, Chart, bFlow)
{ {
......
...@@ -1614,6 +1614,31 @@ CGraphicObjects.prototype = { ...@@ -1614,6 +1614,31 @@ CGraphicObjects.prototype = {
return ret; return ret;
}, },
redrawCharts: function()
{
var sp_tree = this.slide.cSlcd.spTree;
for(var i = 0; i < sp_tree.length; ++i)
{
var sp = sp_tree[i];
if(sp instanceof CChartAsGroup)
{
sp.recalculate();
}
if(sp instanceof CGroupShape)
{
var arr_g_o = sp.arrGraphicObjects;
for(var j = 0; j < arr_g_o.length; ++j)
{
var cur_group_sp = arr_g_o[j];
if(cur_group_sp instanceof CChartAsGroup)
{
cur_group_sp.recalculate();
}
}
}
}
},
Hyperlink_CanAdd: function(bCheck) Hyperlink_CanAdd: function(bCheck)
{ {
if(this.State.textObject && this.State.textObject.Hyperlink_CanAdd) if(this.State.textObject && this.State.textObject.Hyperlink_CanAdd)
......
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