Commit 9e31c91a authored by Dmitry.Vikulov's avatar Dmitry.Vikulov Committed by Alexander.Trofimov

Правка по чтению из бинарника

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49259 954022d7-b5bf-4e40-9824-e11837661b57
parent b4801699
...@@ -571,6 +571,7 @@ asc_CChart.prototype = { ...@@ -571,6 +571,7 @@ asc_CChart.prototype = {
Read_FromBinary2: function(Reader) { Read_FromBinary2: function(Reader) {
Reader.GetLong();
this.Id = Reader.GetString2(); this.Id = Reader.GetString2();
this.type = Reader.GetString2(); this.type = Reader.GetString2();
...@@ -617,28 +618,34 @@ asc_CChart.prototype = { ...@@ -617,28 +618,34 @@ asc_CChart.prototype = {
var numCacheCount = Reader.GetLong(); var numCacheCount = Reader.GetLong();
for (var j = 0; j < numCacheCount; j++) { for (var j = 0; j < numCacheCount; j++) {
this.series[i].Val.NumCache[j].numFormatStr = Reader.GetString2(); var item = {};
this.series[i].Val.NumCache[j].isDateTimeFormat = Reader.GetBool(); item.numFormatStr = Reader.GetString2();
this.series[i].Val.NumCache[j].val = Reader.GetString2(); item.isDateTimeFormat = Reader.GetBool();
this.series[i].Val.NumCache[j].isHidden = Reader.GetBool(); item.val = Reader.GetString2();
item.isHidden = Reader.GetBool();
seria.Val.NumCache.push(item);
} }
seria.xVal.Formula = Reader.GetString2(); seria.xVal.Formula = Reader.GetString2();
numCacheCount = Reader.GetLong(); numCacheCount = Reader.GetLong();
for (var j = 0; j < numCacheCount; j++) { for (var j = 0; j < numCacheCount; j++) {
this.series[i].xVal.NumCache[j].numFormatStr = Reader.GetString2(); var item = {};
this.series[i].xVal.NumCache[j].isDateTimeFormat = Reader.GetBool(); item.numFormatStr = Reader.GetString2();
this.series[i].xVal.NumCache[j].val = Reader.GetString2(); item.isDateTimeFormat = Reader.GetBool();
this.series[i].xVal.NumCache[j].isHidden = Reader.GetBool(); item.val = Reader.GetString2();
item.isHidden = Reader.GetBool();
seria.xVal.NumCache.push(item);
} }
seria.Cat.Formula = Reader.GetString2(); seria.Cat.Formula = Reader.GetString2();
numCacheCount = Reader.GetLong(); numCacheCount = Reader.GetLong();
for (var j = 0; j < numCacheCount; j++) { for (var j = 0; j < numCacheCount; j++) {
this.series[i].Cat.NumCache[j].numFormatStr = Reader.GetString2(); var item = {};
this.series[i].Cat.NumCache[j].isDateTimeFormat = Reader.GetBool(); item.numFormatStr = Reader.GetString2();
this.series[i].Cat.NumCache[j].val = Reader.GetString2(); item.isDateTimeFormat = Reader.GetBool();
this.series[i].Cat.NumCache[j].isHidden = Reader.GetBool(); item.val = Reader.GetString2();
item.isHidden = Reader.GetBool();
seria.Cat.NumCache.push(item);
} }
seria.TxCache.Tx = Reader.GetString2(); seria.TxCache.Tx = Reader.GetString2();
...@@ -3270,6 +3277,9 @@ function DrawingObjects() { ...@@ -3270,6 +3277,9 @@ function DrawingObjects() {
} }
else if ( isObject(chart) && chart["binary"] ) { else if ( isObject(chart) && chart["binary"] ) {
var chartBin = new CChartAsGroup(null, _this);
chartBin.setChartBinary(chart["binary"]);
/* Вставка данных в таблицу и применение темы /* Вставка данных в таблицу и применение темы
// Инжектим тему и перестраиваем превью диаграмм // Инжектим тему и перестраиваем превью диаграмм
if ( wordChart.themeColors ) { if ( wordChart.themeColors ) {
......
...@@ -954,7 +954,7 @@ CChartTitle.prototype = ...@@ -954,7 +954,7 @@ CChartTitle.prototype =
writeToBinary: function(w) writeToBinary: function(w)
{ {
w.WriteBool(isRealObject(this.layout)); w.WriteBool(isRealObject(this.layout));
if(isRealOBject(this.layout)) if(isRealObject(this.layout))
this.layout.writeToBinary(w); this.layout.writeToBinary(w);
w.WriteBool(this.overlay); w.WriteBool(this.overlay);
this.spPr.Write_ToBinary2(w); this.spPr.Write_ToBinary2(w);
......
...@@ -926,7 +926,7 @@ CTextBody.prototype = ...@@ -926,7 +926,7 @@ CTextBody.prototype =
readFromBinary: function(r, drawingDocument) readFromBinary: function(r, drawingDocument)
{ {
this.bodyPr.readFromBinary(r); this.bodyPr.Read_FromBinary2(r);
readFromBinaryDocContent(this.content, r); readFromBinaryDocContent(this.content, r);
} }
}; };
...@@ -961,7 +961,7 @@ function writeToBinaryParagraph(p, w) ...@@ -961,7 +961,7 @@ function writeToBinaryParagraph(p, w)
{ {
p.Pr.Write_ToBinary( w ); p.Pr.Write_ToBinary( w );
p.TextPr.writeToBinary(w); //p.TextPr.writeToBinary(w);
var StartPos = w.GetCurPosition(); var StartPos = w.GetCurPosition();
w.Skip( 4 ); w.Skip( 4 );
...@@ -990,7 +990,7 @@ function readFromBinaryParagraph(p, r) ...@@ -990,7 +990,7 @@ function readFromBinaryParagraph(p, r)
p.Pr.Read_FromBinary( r ); p.Pr.Read_FromBinary( r );
p.TextPr = new ParaTextPr(); p.TextPr = new ParaTextPr();
p.TextPr.readFromBinary(r); //p.TextPr.readFromBinary(r);
p.Content = new Array(); p.Content = new Array();
var Count = r.GetLong(); var Count = r.GetLong();
......
...@@ -923,7 +923,7 @@ CChartTitle.prototype = ...@@ -923,7 +923,7 @@ CChartTitle.prototype =
writeToBinary: function(w) writeToBinary: function(w)
{ {
w.WriteBool(isRealObject(this.layout)); w.WriteBool(isRealObject(this.layout));
if(isRealOBject(this.layout)) if(isRealObject(this.layout))
this.layout.writeToBinary(w); this.layout.writeToBinary(w);
w.WriteBool(this.overlay); w.WriteBool(this.overlay);
this.spPr.Write_ToBinary2(w); this.spPr.Write_ToBinary2(w);
......
...@@ -559,7 +559,7 @@ CTextBody.prototype = ...@@ -559,7 +559,7 @@ CTextBody.prototype =
readFromBinary: function(r, drawingDocument) readFromBinary: function(r, drawingDocument)
{ {
this.bodyPr.readFromBinary(r); this.bodyPr.Read_FromBinary2(r);
readFromBinaryDocContent(this.content, r); readFromBinaryDocContent(this.content, r);
} }
}; };
...@@ -594,7 +594,7 @@ function writeToBinaryParagraph(p, w) ...@@ -594,7 +594,7 @@ function writeToBinaryParagraph(p, w)
{ {
p.Pr.Write_ToBinary( w ); p.Pr.Write_ToBinary( w );
p.TextPr.writeToBinary(w); //p.TextPr.writeToBinary(w);
var StartPos = w.GetCurPosition(); var StartPos = w.GetCurPosition();
w.Skip( 4 ); w.Skip( 4 );
...@@ -623,7 +623,7 @@ function readFromBinaryParagraph(p, r) ...@@ -623,7 +623,7 @@ function readFromBinaryParagraph(p, r)
p.Pr.Read_FromBinary( r ); p.Pr.Read_FromBinary( r );
p.TextPr = new ParaTextPr(); p.TextPr = new ParaTextPr();
p.TextPr.readFromBinary(r); //p.TextPr.readFromBinary(r);
p.Content = new Array(); p.Content = new Array();
var Count = r.GetLong(); var Count = r.GetLong();
......
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