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

правка бага 21752 Ошибка в консоли при открытии документа XLSX формата

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51172 954022d7-b5bf-4e40-9824-e11837661b57
parent 6dcd5ba1
...@@ -353,19 +353,27 @@ CChartAsGroup.prototype = ...@@ -353,19 +353,27 @@ CChartAsGroup.prototype =
this.spPr.xfrm.setExtents(metrics.extX, metrics.extY); this.spPr.xfrm.setExtents(metrics.extX, metrics.extY);
} }
if(isRealObject(this.chartTitle) && isRealObject(this.chartTitle.txBody)&& isRealObject(this.chartTitle.txBody.content)) var api = window["Asc"]["editor"];
if(isRealObject(this.chartTitle))
{ {
this.chartTitle.setType(CHART_TITLE_TYPE_TITLE); this.chartTitle.setType(CHART_TITLE_TYPE_TITLE);
this.chartTitle.drawingObjects = this.drawingObjects; this.chartTitle.drawingObjects = this.drawingObjects;
/*if(this.chartTitle.isEmpty()) if(this.chartTitle.isEmpty())
{ */ {
/*var title_str = "Chart Title"; if(this.chart.header && this.chart.header.bDefaultTitle)
this.chartTitle.setTextBody(new CTextBody(this.chartTitle)); {
for(var i in title_str) var title_str = api.chartTranslate.title;
this.chartTitle.txBody.content.Paragraph_Add(new ParaText(title_str[i]), false);*/ this.chartTitle.setTextBody(new CTextBody(this.chartTitle));
/*} for(var i in title_str)
this.chartTitle.txBody.content.Paragraph_Add(new ParaText(title_str[i]), false);
}
else
{
this.addTitle(null);
}
}
else else
{ */ {
var content = this.chartTitle.txBody.content; var content = this.chartTitle.txBody.content;
content.setParent(this.chartTitle.txBody); content.setParent(this.chartTitle.txBody);
content.setDrawingDocument(this.drawingObjects.drawingDocument); content.setDrawingDocument(this.drawingObjects.drawingDocument);
...@@ -375,7 +383,7 @@ CChartAsGroup.prototype = ...@@ -375,7 +383,7 @@ CChartAsGroup.prototype =
content.Content[i].setParent(content); content.Content[i].setParent(content);
content.Content[i].setTextPr(new ParaTextPr()); content.Content[i].setTextPr(new ParaTextPr());
} }
// } }
this.chart.header.title = this.chartTitle.txBody.content.getTextString(); this.chart.header.title = this.chartTitle.txBody.content.getTextString();
} }
...@@ -383,12 +391,19 @@ CChartAsGroup.prototype = ...@@ -383,12 +391,19 @@ CChartAsGroup.prototype =
{ {
this.hAxisTitle.setType(CHART_TITLE_TYPE_H_AXIS); this.hAxisTitle.setType(CHART_TITLE_TYPE_H_AXIS);
this.hAxisTitle.drawingObjects = this.drawingObjects; this.hAxisTitle.drawingObjects = this.drawingObjects;
if(this.hAxisTitle.isEmpty()) if(this.hAxisTitle.isEmpty() )
{ {
var title_str = "X Axis"; if(this.chart.xAxis && this.chart.xAxis.bDefaultTitle)
this.hAxisTitle.setTextBody(new CTextBody(this.hAxisTitle)); {
for(var i in title_str) var title_str = api.chartTranslate.xAxis;;
this.hAxisTitle.txBody.content.Paragraph_Add(new ParaText(title_str[i]), false); this.hAxisTitle.setTextBody(new CTextBody(this.hAxisTitle));
for(var i in title_str)
this.hAxisTitle.txBody.content.Paragraph_Add(new ParaText(title_str[i]), false);
}
else
{
this.addXAxis(null);
}
} }
else else
{ {
...@@ -413,12 +428,19 @@ CChartAsGroup.prototype = ...@@ -413,12 +428,19 @@ CChartAsGroup.prototype =
this.vAxisTitle.drawingObjects = this.drawingObjects; this.vAxisTitle.drawingObjects = this.drawingObjects;
if(this.vAxisTitle.isEmpty()) if(this.vAxisTitle.isEmpty())
{ {
var title_str = "Y Axis"; if(this.chart.yAxis && this.chart.yAxis.bDefaultTitle)
this.vAxisTitle.setTextBody(new CTextBody(this.vAxisTitle)); {
this.vAxisTitle.txBody.bodyPr.setVert(nVertTTvert270); var title_str = api.chartTranslate.yAxis;
this.vAxisTitle.setTextBody(new CTextBody(this.vAxisTitle));
for(var i in title_str) this.vAxisTitle.txBody.bodyPr.setVert(nVertTTvert270);
this.vAxisTitle.txBody.content.Paragraph_Add(new ParaText(title_str[i]), false);
for(var i in title_str)
this.vAxisTitle.txBody.content.Paragraph_Add(new ParaText(title_str[i]), false);
}
else
{
this.addYAxis(null);
}
} }
else else
{ {
......
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