Commit 123aca78 authored by Sergey Luzyanin's avatar Sergey Luzyanin

fix Bug 34275

parent e642a454
...@@ -10285,10 +10285,16 @@ function ApplyPresetToChartSpace(oChartSpace, aPreset, bCreate){ ...@@ -10285,10 +10285,16 @@ function ApplyPresetToChartSpace(oChartSpace, aPreset, bCreate){
if(oChart.getObjectType() === AscDFH.historyitem_type_StockChart){ if(oChart.getObjectType() === AscDFH.historyitem_type_StockChart){
var oOlDSpPr = oChartSpace.spPr && oChartSpace.spPr.createDuplicate(); var oSpPr = oChartSpace.spPr;
oChartSpace.setSpPr(null); if(oChart.hiLowLines){
ApplySpPr(aPreset[23], oChartSpace); oChartSpace.spPr = oChart.hiLowLines;
oChart.setHiLowLines(oChartSpace.spPr); ApplySpPr(aPreset[23], oChartSpace);
}
else{
oChartSpace.spPr = new AscFormat.CSpPr();
ApplySpPr(aPreset[23], oChartSpace);
oChart.setHiLowLines(oChartSpace.spPr);
}
if(!aPreset[24]){ if(!aPreset[24]){
oChart.setUpDownBars(null); oChart.setUpDownBars(null);
...@@ -10297,15 +10303,30 @@ function ApplyPresetToChartSpace(oChartSpace, aPreset, bCreate){ ...@@ -10297,15 +10303,30 @@ function ApplyPresetToChartSpace(oChartSpace, aPreset, bCreate){
if(!oChart.upDownBars){ if(!oChart.upDownBars){
oChart.setUpDownBars(new AscFormat.CUpDownBars()); oChart.setUpDownBars(new AscFormat.CUpDownBars());
} }
oChartSpace.setSpPr(null);
ApplySpPr(aPreset[24][0], oChartSpace); if(oChart.upDownBars.downBars){
oChart.upDownBars.setDownBars(oChartSpace.spPr); oChartSpace.spPr = oChart.upDownBars.downBars;
ApplySpPr(aPreset[24][0], oChartSpace);
}
else{
oChartSpace.spPr = new AscFormat.CSpPr();
ApplySpPr(aPreset[24][0], oChartSpace);
oChart.upDownBars.setDownBars(oChartSpace.spPr);
}
oChart.upDownBars.setGapWidth(aPreset[24][1]); oChart.upDownBars.setGapWidth(aPreset[24][1]);
oChartSpace.setSpPr(null);
ApplySpPr(aPreset[24][2], oChartSpace); if(oChart.upDownBars.upBars){
oChart.upDownBars.setUpBars(oChartSpace.spPr); oChartSpace.spPr = oChart.upDownBars.upBars;
ApplySpPr(aPreset[24][2], oChartSpace);
}
else{
oChartSpace.spPr = new AscFormat.CSpPr();
ApplySpPr(aPreset[24][2], oChartSpace);
oChart.upDownBars.setUpBars(oChartSpace.spPr);
}
} }
oChartSpace.setSpPr(oOlDSpPr); oChartSpace.spPr = oSpPr;
} }
} }
function CMathPainter(_api) function CMathPainter(_api)
......
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