Commit 50da25d4 authored by Dmitry.Vikulov's avatar Dmitry.Vikulov Committed by Alexander.Trofimov

Исправлен баг при открытии Microsoft (Demo-Hayden-Management-v2).docx

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49246 954022d7-b5bf-4e40-9824-e11837661b57
parent 84d0675a
...@@ -160,11 +160,18 @@ function asc_CChart(object) { ...@@ -160,11 +160,18 @@ function asc_CChart(object) {
for (var i = 0; i < object.series.length; i++) { for (var i = 0; i < object.series.length; i++) {
var ser = new asc_CChartSeria(); var ser = new asc_CChartSeria();
ser.asc_setTitle(object.series[i].Tx); ser.asc_setTitle(object.series[i].TxCache.Tx);
ser.asc_setTitleFormula(object.series[i].TxCache.Formula);
if (object.series[i].Val && object.series[i].Val.Formula) if (object.series[i].Val && object.series[i].Val.Formula)
ser.asc_setValFormula(object.series[i].Val.Formula); ser.asc_setValFormula(object.series[i].Val.Formula);
if (object.series[i].xVal && object.series[i].xVal.Formula) if (object.series[i].xVal && object.series[i].xVal.Formula)
ser.asc_setxValFormula(object.series[i].xVal.Formula); ser.asc_setxValFormula(object.series[i].xVal.Formula);
if (object.series[i].Cat && object.series[i].Cat.Formula)
ser.asc_setCatFormula(object.series[i].Cat.Formula);
if (object.series[i].Marker) { if (object.series[i].Marker) {
ser.asc_setMarkerSize(object.series[i].Marker.Size); ser.asc_setMarkerSize(object.series[i].Marker.Size);
ser.asc_setMarkerSymbol(object.series[i].Marker.Symbol); ser.asc_setMarkerSymbol(object.series[i].Marker.Symbol);
...@@ -1205,8 +1212,14 @@ asc_CChartSeria.prototype = { ...@@ -1205,8 +1212,14 @@ asc_CChartSeria.prototype = {
asc_getxValFormula: function() { return this.xVal.Formula; }, asc_getxValFormula: function() { return this.xVal.Formula; },
asc_setxValFormula: function(formula) { this.xVal.Formula = formula; }, asc_setxValFormula: function(formula) { this.xVal.Formula = formula; },
asc_getTitle: function() { return this.Tx; }, asc_getCatFormula: function() { return this.Cat.Formula; },
asc_setTitle: function(title) { this.Tx = title; }, asc_setCatFormula: function(formula) { this.Cat.Formula = formula; },
asc_getTitle: function() { return this.TxCache.Tx; },
asc_setTitle: function(title) { this.TxCache.Tx = title; },
asc_getTitleFormula: function() { return this.TxCache.Formula; },
asc_setTitleFormula: function(val) { this.TxCache.Formula = val; },
asc_getMarkerSize: function() { return this.Marker.Size; }, asc_getMarkerSize: function() { return this.Marker.Size; },
asc_setMarkerSize: function(size) { this.Marker.Size = size; }, asc_setMarkerSize: function(size) { this.Marker.Size = size; },
...@@ -1232,9 +1245,15 @@ prot["asc_setValFormula"] = prot.asc_setValFormula; ...@@ -1232,9 +1245,15 @@ prot["asc_setValFormula"] = prot.asc_setValFormula;
prot["asc_getxValFormula"] = prot.asc_getxValFormula; prot["asc_getxValFormula"] = prot.asc_getxValFormula;
prot["asc_setxValFormula"] = prot.asc_setxValFormula; prot["asc_setxValFormula"] = prot.asc_setxValFormula;
prot["asc_getCatFormula"] = prot.asc_getCatFormula;
prot["asc_setCatFormula"] = prot.asc_setCatFormula;
prot["asc_getTitle"] = prot.asc_getTitle; prot["asc_getTitle"] = prot.asc_getTitle;
prot["asc_setTitle"] = prot.asc_setTitle; prot["asc_setTitle"] = prot.asc_setTitle;
prot["asc_getTitleFormula"] = prot.asc_getTitleFormula;
prot["asc_setTitleFormula"] = prot.asc_setTitleFormula;
prot["asc_getMarkerSize"] = prot.asc_getMarkerSize; prot["asc_getMarkerSize"] = prot.asc_getMarkerSize;
prot["asc_setMarkerSize"] = prot.asc_setMarkerSize; prot["asc_setMarkerSize"] = prot.asc_setMarkerSize;
......
...@@ -8,7 +8,7 @@ function CChartAsGroup(drawingBase, drawingObjects) ...@@ -8,7 +8,7 @@ function CChartAsGroup(drawingBase, drawingObjects)
this.vAxisTitle = null; this.vAxisTitle = null;
this.hAxisTitle = null; this.hAxisTitle = null;
this.chart = new CChartData(); this.chart = new asc_CChart();
this.brush = new CBlipFill(); this.brush = new CBlipFill();
this.spPr = new CSpPr(); this.spPr = new CSpPr();
......
...@@ -5673,7 +5673,7 @@ function Binary_DocumentTableReader(doc, oReadResult, openParams, stream, bAllow ...@@ -5673,7 +5673,7 @@ function Binary_DocumentTableReader(doc, oReadResult, openParams, stream, bAllow
}, },
this.PrepareSeria = function(val, chart, formula) this.PrepareSeria = function(val, chart, formula)
{ {
var bbox = this.ParseFormula(formula); /*var bbox = this.ParseFormula(formula);
if(null != bbox) if(null != bbox)
{ {
var length = 0; var length = 0;
...@@ -5708,7 +5708,7 @@ function Binary_DocumentTableReader(doc, oReadResult, openParams, stream, bAllow ...@@ -5708,7 +5708,7 @@ function Binary_DocumentTableReader(doc, oReadResult, openParams, stream, bAllow
row.push(item); row.push(item);
} }
} }
} }*/
} }
this.ReadPptxDrawing = function(type, length, oParaDrawing, oChartObject) this.ReadPptxDrawing = function(type, length, oParaDrawing, oChartObject)
{ {
...@@ -5765,10 +5765,17 @@ function Binary_DocumentTableReader(doc, oReadResult, openParams, stream, bAllow ...@@ -5765,10 +5765,17 @@ function Binary_DocumentTableReader(doc, oReadResult, openParams, stream, bAllow
this.PrepareSeria(seria.Val.NumCache, chart, seria.Val.Formula); this.PrepareSeria(seria.Val.NumCache, chart, seria.Val.Formula);
} }
} }
var nRowCount = chart.data.length;
/*var nRowCount = chart.data.length;
var nColCount = 0;
if(nRowCount > 0)
nColCount = chart.data[0].length;*/
var nRowCount = chart.series.length;
var nColCount = 0; var nColCount = 0;
if(nRowCount > 0) if(nRowCount > 0)
nColCount = chart.data[0].length; nColCount = chart.series[0].Val.NumCache.length;
if(0 != nRowCount && 0 != nColCount) if(0 != nRowCount && 0 != nColCount)
{ {
var sColLetter = ""; var sColLetter = "";
...@@ -5784,7 +5791,7 @@ function Binary_DocumentTableReader(doc, oReadResult, openParams, stream, bAllow ...@@ -5784,7 +5791,7 @@ function Binary_DocumentTableReader(doc, oReadResult, openParams, stream, bAllow
sColLetter += String.fromCharCode( (n % 26) + 65); sColLetter += String.fromCharCode( (n % 26) + 65);
chart.range.interval = "Sheet1!A1:" + sColLetter + nRowCount; chart.range.interval = "Sheet1!A1:" + sColLetter + nRowCount;
var chartRender = new ChartRender(); //var chartRender = new ChartRender();
//chart.img = chartRender.insertChart(chart, null, chart.width, chart.height); //chart.img = chartRender.insertChart(chart, null, chart.width, chart.height);
oChartObject.chart = chart; oChartObject.chart = chart;
} }
......
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