Commit 55bcddb9 authored by Sergey.Tsarkov's avatar Sergey.Tsarkov Committed by Alexander.Trofimov

на чтении формул убраны из объекта матрицы количество столбцов и строк

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@67666 954022d7-b5bf-4e40-9824-e11837661b57
parent 34ba143b
...@@ -9249,8 +9249,9 @@ function Binary_oMathReader(stream, oReadResult) ...@@ -9249,8 +9249,9 @@ function Binary_oMathReader(stream, oReadResult)
var oMatrix = {}; var oMatrix = {};
var arrContent = []; var arrContent = [];
props.mcs = []; props.mcs = [];
var oMatrCounter = {row:0, column:0};
res = this.bcr.Read1(length, function(t, l){ res = this.bcr.Read1(length, function(t, l){
return oThis.ReadMathMatrix(t,l,props,oElem,oMatrix,arrContent); return oThis.ReadMathMatrix(t,l,props,oElem,oMatrix,arrContent,oMatrCounter);
}); });
} }
else if (c_oSer_OMathContentType.Nary === type) else if (c_oSer_OMathContentType.Nary === type)
...@@ -10231,7 +10232,7 @@ function Binary_oMathReader(stream, oReadResult) ...@@ -10231,7 +10232,7 @@ function Binary_oMathReader(stream, oReadResult)
res = c_oSerConstants.ReadUnknown; res = c_oSerConstants.ReadUnknown;
return res; return res;
}; };
this.ReadMathMatrix = function(type, length, props, oParent, oMatr, arrContent) this.ReadMathMatrix = function(type, length, props, oParent, oMatr, arrContent, oMatrCounter)
{ {
var res = c_oSerConstants.ReadOk; var res = c_oSerConstants.ReadOk;
var oThis = this; var oThis = this;
...@@ -10246,9 +10247,6 @@ function Binary_oMathReader(stream, oReadResult) ...@@ -10246,9 +10247,6 @@ function Binary_oMathReader(stream, oReadResult)
oParent.addElementToContent(oMatrix); oParent.addElementToContent(oMatrix);
oMatr.content = oMatrix; oMatr.content = oMatrix;
oMatr.content.row = 0;
oMatr.content.column = 0;
var column = 0; var column = 0;
for (var i=0; i<props.mcs.length; i++) for (var i=0; i<props.mcs.length; i++)
column += props.mcs[i].count; column += props.mcs[i].count;
...@@ -10265,9 +10263,9 @@ function Binary_oMathReader(stream, oReadResult) ...@@ -10265,9 +10263,9 @@ function Binary_oMathReader(stream, oReadResult)
else if (c_oSer_OMathContentType.Mr === type) else if (c_oSer_OMathContentType.Mr === type)
{ {
res = this.bcr.Read1(length, function(t, l){ res = this.bcr.Read1(length, function(t, l){
return oThis.ReadMathMr(t,l,oMatr.content, arrContent); return oThis.ReadMathMr(t,l,oMatr.content, arrContent, oMatrCounter);
}); });
oMatr.content.row++; oMatrCounter.row++;
} }
else else
res = c_oSerConstants.ReadUnknown; res = c_oSerConstants.ReadUnknown;
...@@ -10432,21 +10430,21 @@ function Binary_oMathReader(stream, oReadResult) ...@@ -10432,21 +10430,21 @@ function Binary_oMathReader(stream, oReadResult)
res = c_oSerConstants.ReadUnknown; res = c_oSerConstants.ReadUnknown;
return res; return res;
}; };
this.ReadMathMr = function(type, length, oMatrix, arrContent) this.ReadMathMr = function(type, length, oMatrix, arrContent, oMatrCounter)
{ {
var res = c_oSerConstants.ReadOk; var res = c_oSerConstants.ReadOk;
var oThis = this; var oThis = this;
if (c_oSer_OMathContentType.Element === type) if (c_oSer_OMathContentType.Element === type)
{ {
var lRow = oMatrix.row; var lRow = oMatrCounter.row;
var lColumn = oMatrix.column; var lColumn = oMatrCounter.column;
res = this.bcr.Read1(length, function(t, l){ res = this.bcr.Read1(length, function(t, l){
return oThis.ReadMathArg(t,l,arrContent[lRow][lColumn]); return oThis.ReadMathArg(t,l,arrContent[lRow][lColumn]);
}); });
oMatrix.column++; oMatrCounter.column++;
if ( oMatrix.nCol == oMatrix.column) if ( oMatrix.nCol == oMatrCounter.column)
oMatrix.column = 0; oMatrCounter.column = 0;
} }
else else
res = c_oSerConstants.ReadUnknown; res = c_oSerConstants.ReadUnknown;
......
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