Commit 15966de7 authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Исправлены баги при копировании диаграмм (баг 24615).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56582 954022d7-b5bf-4e40-9824-e11837661b57
parent fec05ac8
...@@ -1748,6 +1748,20 @@ CPlotArea.prototype = ...@@ -1748,6 +1748,20 @@ CPlotArea.prototype =
c.addAxis(this.axId[i].createDuplicate()); c.addAxis(this.axId[i].createDuplicate());
} }
//TODO: разобраться с осями в дочерних объектах //TODO: разобраться с осями в дочерних объектах
if ( this.valAx )
c.valAx = this.valAx.createDuplicate();
if ( this.catAx )
c.catAx = this.catAx.createDuplicate();
if ( this.dateAx )
c.dateAx = this.dateAx.createDuplicate();
if ( this.chart )
c.chart = this.chart.createDuplicate();
return c;
}, },
Write_ToBinary2: function(w) Write_ToBinary2: function(w)
...@@ -11576,7 +11590,7 @@ CLineChart.prototype = ...@@ -11576,7 +11590,7 @@ CLineChart.prototype =
return historyitem_type_LineChart; return historyitem_type_LineChart;
}, },
craeteDuplicate: function() createDuplicate: function()
{ {
var c = new CLineChart(); var c = new CLineChart();
if(this.dLbls) if(this.dLbls)
...@@ -12717,7 +12731,7 @@ CMinusPlus.prototype = ...@@ -12717,7 +12731,7 @@ CMinusPlus.prototype =
} }
if(this.numLit) if(this.numLit)
{ {
c.setNumLit(this.numLit.craeteDuplicate()); c.setNumLit(this.numLit.createDuplicate());
} }
return c; return c;
}, },
...@@ -13115,6 +13129,7 @@ CNumRef.prototype = ...@@ -13115,6 +13129,7 @@ CNumRef.prototype =
{ {
c.setNumCache(this.numCache.createDuplicate()); c.setNumCache(this.numCache.createDuplicate());
} }
return c;
}, },
getObjectType: function() getObjectType: function()
...@@ -15133,7 +15148,7 @@ CPivotFmt.prototype = ...@@ -15133,7 +15148,7 @@ CPivotFmt.prototype =
} }
if(this.txPr) if(this.txPr)
{ {
c.setTxPr(this.txPr.craeteDuplicate()); c.setTxPr(this.txPr.createDuplicate());
} }
return c; return c;
}, },
...@@ -15379,7 +15394,7 @@ CRadarChart.prototype = ...@@ -15379,7 +15394,7 @@ CRadarChart.prototype =
var c = new CRadarChart(); var c = new CRadarChart();
if(this.dLbls) if(this.dLbls)
{ {
c.setDLbls(this.dLbls.craeteDuplicate()); c.setDLbls(this.dLbls.createDuplicate());
} }
c.setRadarStyle(this.radarStyle); c.setRadarStyle(this.radarStyle);
for(var i = 0; i < this.series.length; ++i) for(var i = 0; i < this.series.length; ++i)
...@@ -15694,7 +15709,7 @@ CRadarSeries.prototype = ...@@ -15694,7 +15709,7 @@ CRadarSeries.prototype =
} }
if(this.dLbls) if(this.dLbls)
{ {
c.setDLbls(this.dLbls.craeteDuplicate()); c.setDLbls(this.dLbls.createDuplicate());
} }
for(var i = 0; i < this.dPt.length; ++i) for(var i = 0; i < this.dPt.length; ++i)
{ {
...@@ -16615,7 +16630,7 @@ CScatterSeries.prototype = ...@@ -16615,7 +16630,7 @@ CScatterSeries.prototype =
c.setSmooth(this.smooth); c.setSmooth(this.smooth);
if(this.spPr) if(this.spPr)
{ {
c.setSpPr(this.spPr.craeteDuplicate()); c.setSpPr(this.spPr.createDuplicate());
} }
if(this.trendline) if(this.trendline)
{ {
...@@ -18104,7 +18119,7 @@ CSurfaceChart.prototype = ...@@ -18104,7 +18119,7 @@ CSurfaceChart.prototype =
var c = new CSurfaceChart(), i; var c = new CSurfaceChart(), i;
for(i = 0; i < this.bandFmts.length; ++i) for(i = 0; i < this.bandFmts.length; ++i)
{ {
c.addBandFmt(this.bandFmts[i].craeteDuplicate()); c.addBandFmt(this.bandFmts[i].createDuplicate());
} }
for(i =0 ; i < this.series.length; ++i) for(i =0 ; i < this.series.length; ++i)
{ {
...@@ -18726,7 +18741,7 @@ CTitle.prototype = ...@@ -18726,7 +18741,7 @@ CTitle.prototype =
} }
if(this.tx) if(this.tx)
{ {
c.setTx(this.tx.craeteDuplicate()); c.setTx(this.tx.createDuplicate());
} }
if(this.txPr) if(this.txPr)
{ {
...@@ -19813,6 +19828,8 @@ CYVal.prototype = ...@@ -19813,6 +19828,8 @@ CYVal.prototype =
{ {
copy.setNumRef(this.numRef.createDuplicate()); copy.setNumRef(this.numRef.createDuplicate());
} }
return copy;
}, },
getObjectType: function() getObjectType: function()
...@@ -19960,7 +19977,36 @@ CChart.prototype = ...@@ -19960,7 +19977,36 @@ CChart.prototype =
createDuplicate: function() createDuplicate: function()
{ {
// TODO: Проверить данную функцию
var c = new CChart(); var c = new CChart();
c.autoTitleDeleted = this.autoTitleDeleted;
c.backWall = this.backWall;
c.dispBlanksAs = this.dispBlanksAs;
c.floor = this.floor;
if ( this.legend )
c.legend = this.legend.createDuplicate();
var Count = this.pivotFmts;
for ( var i = 0; i < this.pivotFmts; i++ )
c.pivotFmts[i] = this.pivotFmts[i];
if ( this.plotArea )
c.plotArea = this.plotArea.createDuplicate();
c.plotVisOnly = this.plotVisOnly;
c.showDLblsOverMax = this.showDLblsOverMax;
c.sideWall = this.sideWall;
if ( this.title )
c.title = this.title.createDuplicate();
if ( this.view3D )
c.view3D = this.view3D.createDuplicate();
return c;
}, },
Write_ToBinary2: function(w) Write_ToBinary2: function(w)
......
...@@ -7983,6 +7983,21 @@ CPrintSettings.prototype = ...@@ -7983,6 +7983,21 @@ CPrintSettings.prototype =
return this.Id; return this.Id;
}, },
createDuplicate : function()
{
var oPS = new CPrintSettings();
if ( this.headerFooter )
oPS.headerFooter = this.headerFooter.createDuplicate();
if ( this.pageMargins )
oPS.pageMargins = this.pageMargins.createDuplicate();
if ( this.pageSetup )
oPS.pageSetup = this.pageSetup.createDuplicate();
return oPS;
},
Refresh_RecalcData: function() Refresh_RecalcData: function()
{}, {},
...@@ -8126,6 +8141,36 @@ CHeaderFooterChart.prototype = ...@@ -8126,6 +8141,36 @@ CHeaderFooterChart.prototype =
return this.Id; return this.Id;
}, },
createDuplicate : function()
{
// TODO: Проверить работу данной функции
var oHFC = new CHeaderFooterChart();
oHFC.alignWithMargins = this.alignWithMargins;
oHFC.differentFirst = this.differentFirst;
oHFC.differentOddEven = this.differentOddEven;
if ( this.evenFooter )
oHFC.evenFooter = this.evenFooter.createDuplicate();
if ( this.evenHeader )
oHFC.evenHeader = this.evenHeader.createDuplicate();
if ( this.firstFooter )
oHFC.firstFooter = this.firstFooter.createDuplicate();
if ( this.firstHeader )
oHFC.firstHeader = this.firstHeader.createDuplicate();
if ( this.oddFooter )
oHFC.oddFooter = this.oddFooter.createDuplicate();
if ( this.oddHeader )
oHFC.oddHeader = this.oddHeader.createDuplicate();
return oHFC;
},
Refresh_RecalcData: function() Refresh_RecalcData: function()
{}, {},
...@@ -8396,6 +8441,19 @@ CPageMarginsChart.prototype = ...@@ -8396,6 +8441,19 @@ CPageMarginsChart.prototype =
return this.Id; return this.Id;
}, },
createDuplicate : function()
{
var oPMC = new CPageMarginsChart();
oPMC.b = this.b;
oPMC.footer = this.footer;
oPMC.header = this.header;
oPMC.l = this.l;
oPMC.r = this.r;
oPMC.t = this.t;
return oPMC;
},
Refresh_RecalcData: function() Refresh_RecalcData: function()
{}, {},
...@@ -8606,6 +8664,25 @@ CPageSetup.prototype = ...@@ -8606,6 +8664,25 @@ CPageSetup.prototype =
{ {
return this.Id; return this.Id;
}, },
createDuplicate : function()
{
var oPS = new CPageSetup();
oPS.blackAndWhite = this.blackAndWhite;
oPS.copies = this.copies;
oPS.draft = this.draft;
oPS.firstPageNumber = this.firstPageNumber;
oPS.horizontalDpi = this.horizontalDpi;
oPS.orientation = this.orientation;
oPS.paperHeight = this.paperHeight;
oPS.paperSize = this.paperSize;
oPS.paperWidth = this.paperWidth;
oPS.useFirstPageNumb = this.useFirstPageNumb;
oPS.verticalDpi = this.verticalDpi;
return oPS;
},
Refresh_RecalcData: function() Refresh_RecalcData: 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