Commit 12dfbf2f 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@58761 954022d7-b5bf-4e40-9824-e11837661b57
parent cc8e9d28
...@@ -597,9 +597,8 @@ var c_oSer_OMathContentType = { ...@@ -597,9 +597,8 @@ var c_oSer_OMathContentType = {
Sup: 56, Sup: 56,
MText: 57, MText: 57,
CtrlPr: 58, CtrlPr: 58,
Id: 59, pagebreak: 59,
pagebreak: 60, linebreak: 60
linebreak: 61
}; };
var c_oSer_HyperlinkType = { var c_oSer_HyperlinkType = {
Content: 0, Content: 0,
...@@ -7445,7 +7444,7 @@ function Binary_DocumentTableReader(doc, oReadResult, openParams, stream, bAllow ...@@ -7445,7 +7444,7 @@ function Binary_DocumentTableReader(doc, oReadResult, openParams, stream, bAllow
oParStruct.addToContent(oMath); oParStruct.addToContent(oMath);
res = this.bcr.Read1(length, function(t, l){ res = this.bcr.Read1(length, function(t, l){
return oThis.boMathr.ReadMathArg(t,l,oMath.Root); return oThis.boMathr.ReadMathArg(t,l,oMath.Root, oParStruct);
}); });
} }
else if (c_oSerParType.Hyperlink == type) { else if (c_oSerParType.Hyperlink == type) {
...@@ -8392,7 +8391,7 @@ function Binary_oMathReader(stream) ...@@ -8392,7 +8391,7 @@ function Binary_oMathReader(stream)
res = c_oSerConstants.ReadUnknown; res = c_oSerConstants.ReadUnknown;
return res; return res;
}; };
this.ReadMathArg = function(type, length, oElem) this.ReadMathArg = function(type, length, oElem, oParStruct)
{ {
var bLast = this.bcr.stream.bLast; var bLast = this.bcr.stream.bLast;
...@@ -8529,7 +8528,7 @@ function Binary_oMathReader(stream) ...@@ -8529,7 +8528,7 @@ function Binary_oMathReader(stream)
{ {
var oMRun = new ParaRun(null, true); var oMRun = new ParaRun(null, true);
res = this.bcr.Read1(length, function(t, l){ res = this.bcr.Read1(length, function(t, l){
return oThis.ReadMathMRun(t,l,oMRun,props,oElem); return oThis.ReadMathMRun(t,l,oMRun,props,oElem,oParStruct);
}); });
if (oElem) if (oElem)
oElem.addElementToContent(oMRun); oElem.addElementToContent(oMRun);
...@@ -9736,7 +9735,7 @@ function Binary_oMathReader(stream) ...@@ -9736,7 +9735,7 @@ function Binary_oMathReader(stream)
res = c_oSerConstants.ReadUnknown; res = c_oSerConstants.ReadUnknown;
return res; return res;
}; };
this.ReadMathMRun = function(type, length, oMRun, props, oParent) this.ReadMathMRun = function(type, length, oMRun, props, oParent, oParStruct)
{ {
var res = c_oSerConstants.ReadOk; var res = c_oSerConstants.ReadOk;
var oThis = this; var oThis = this;
...@@ -9781,21 +9780,22 @@ function Binary_oMathReader(stream) ...@@ -9781,21 +9780,22 @@ function Binary_oMathReader(stream)
res = this.brPrr.Read(length, rPr); res = this.brPrr.Read(length, rPr);
oMRun.Set_Pr(rPr); oMRun.Set_Pr(rPr);
} }
else if (c_oSer_OMathContentType.pagenum === type) else if (c_oSer_OMathContentType.pagebreak === type)
{ {
oNewElem = new ParaPageNum(); oNewElem = new ParaNewLine( break_Page );
} }
else if (c_oSer_OMathContentType.pagebreak === type) else if (c_oSer_OMathContentType.linebreak === type)
{ {
oNewElem = new ParaNewLine( break_Page ); oNewElem = new ParaNewLine();
} }
else else
res = c_oSerConstants.ReadUnknown; res = c_oSerConstants.ReadUnknown;
if (null != oNewElem) if (null != oNewElem)
{ {
//TODO обработка переноса var oNewRun = new ParaRun(oParStruct.paragraph);
//oMRun.Add_ToContent(0, oNewElem, false); oNewRun.Add_ToContent(0, oNewElem, false);
oParStruct.addToContent(oNewRun);
} }
return res; return res;
...@@ -9987,7 +9987,7 @@ function Binary_oMathReader(stream) ...@@ -9987,7 +9987,7 @@ function Binary_oMathReader(stream)
var oMath = new ParaMath(props); var oMath = new ParaMath(props);
oParStruct.addToContent(oMath); oParStruct.addToContent(oMath);
res = this.bcr.Read1(length, function(t, l){ res = this.bcr.Read1(length, function(t, l){
return oThis.ReadMathArg(t,l,oMath.Root); return oThis.ReadMathArg(t,l,oMath.Root,oParStruct);
}); });
} }
else if (c_oSer_OMathContentType.OMathParaPr === type) else if (c_oSer_OMathContentType.OMathParaPr === type)
......
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