Commit aeee8eb5 authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

правки для открытия chart в word(fontmap)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47683 954022d7-b5bf-4e40-9824-e11837661b57
parent 2c8ed810
......@@ -862,6 +862,29 @@ function CChartData(bWordContext, chart) {
History.Add( _this, { chart: cloneChart } );
}
_this.documentGetAllFontNames = function(AllFonts) {
this.documentGetAllFontNames_ExecuteFont(AllFonts, this.header.font);
this.documentGetAllFontNames_ExecuteFont(AllFonts, this.xAxis.titleFont);
this.documentGetAllFontNames_ExecuteFont(AllFonts, this.xAxis.labelFont);
this.documentGetAllFontNames_ExecuteFont(AllFonts, this.yAxis.titleFont);
this.documentGetAllFontNames_ExecuteFont(AllFonts, this.yAxis.labelFont);
this.documentGetAllFontNames_ExecuteFont(AllFonts, this.legend.font);
this.documentGetAllFontNames_ExecuteFont(AllFonts, this.legend.font);
for(var i = 0, length = this.series.length; i < length; ++i)
{
var seria = this.series[i];
if(null != seria)
{
this.documentGetAllFontNames_ExecuteFont(AllFonts, seria.titleFont);
this.documentGetAllFontNames_ExecuteFont(AllFonts, seria.labelFont);
}
}
}
_this.documentGetAllFontNames_ExecuteFont = function(AllFonts, font) {
if(null != font && null != font.name)
AllFonts[font.name] = true;
}
if ( bWordContext )
g_oTableId.Add( _this, _this.Id );
}
......
......@@ -695,7 +695,7 @@ function insertChart(chart, activeWorkSheet, width, height, isNewChart) {
var styleManager = api_doc ? api_doc.chartStyleManager : api_sheet.chartStyleManager;
arrBaseColors = styleManager.getBaseColors( parseInt(chart.styleId) );
if(chart.series && chart.series.length !=0)
if(!chart.data && chart.series && chart.series.length !=0)
{
isSeries = true;
var series = chart.series;
......
......@@ -449,7 +449,12 @@ WordImage.prototype =
},
documentGetAllFontNames: function(AllFonts)
{
if(isRealObject(this.chart) && typeof this.chart.documentGetAllFontNames === "function")
this.chart.documentGetAllFontNames(AllFonts);
},
setRotate: function(rot)
{
var history_obj = {};
......
......@@ -2724,6 +2724,8 @@ function BinaryFileReader(doc, openParams)
{
if(e.message == g_sErrorCharCountMessage)
return false;
else
throw "open error";
}
return true;
};
......@@ -5212,11 +5214,11 @@ function Binary_DocumentTableReader(doc, openParams, ImageMap, stream, bAllowFlo
chart.range.columns = true;
}
}
if(null != seria.xVal && null != seria.xVal.values)
this.PrepareSeria(seria.xVal.values, chart);
if(null != seria.xVal && null != seria.xVal.NumCache)
this.PrepareSeria(seria.xVal.NumCache, chart);
}
if(null != seria.Val.values)
this.PrepareSeria(seria.Val.values, chart);
if(null != seria.Val && null != seria.Val.NumCache)
this.PrepareSeria(seria.Val.NumCache, chart);
}
}
var nRowCount = chart.data.length;
......
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