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

Чтение для формул из doc

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@58570 954022d7-b5bf-4e40-9824-e11837661b57
parent ca29d5a9
...@@ -289,7 +289,8 @@ var c_oSerRunType = { ...@@ -289,7 +289,8 @@ var c_oSerRunType = {
fldend: 10, fldend: 10,
CommentReference: 11, CommentReference: 11,
pptxDrawing: 12, pptxDrawing: 12,
_LastRun: 13 //для копирования через бинарник _LastRun: 13, //для копирования через бинарник
object: 14
}; };
var c_oSerImageType = { var c_oSerImageType = {
MediaId:0, MediaId:0,
...@@ -7701,6 +7702,12 @@ function Binary_DocumentTableReader(doc, oReadResult, openParams, stream, bAllow ...@@ -7701,6 +7702,12 @@ function Binary_DocumentTableReader(doc, oReadResult, openParams, stream, bAllow
} }
else if (c_oSerRunType._LastRun === type) else if (c_oSerRunType._LastRun === type)
this.oReadResult.bLastRun = true; this.oReadResult.bLastRun = true;
else if (c_oSerRunType.object === type)
{
res = this.bcr.Read1(length, function(t, l){
return oThis.ReadObject(t,l,oParStruct);
});
}
else else
res = c_oSerConstants.ReadUnknown; res = c_oSerConstants.ReadUnknown;
if (null != oNewElem) if (null != oNewElem)
...@@ -7710,6 +7717,23 @@ function Binary_DocumentTableReader(doc, oReadResult, openParams, stream, bAllow ...@@ -7710,6 +7717,23 @@ function Binary_DocumentTableReader(doc, oReadResult, openParams, stream, bAllow
} }
return res; return res;
}; };
this.ReadObject = function (type, length, oParStruct)
{
var res = c_oSerConstants.ReadOk;
var oThis = this;
if (c_oSerParType.OMath === type)
{
if ( length > 0 )
{
var oMathPara = new ParaMath();
oParStruct.addToContent(oMathPara);
res = this.bcr.Read1(length, function(t, l){
return oThis.boMathr.ReadMathArg(t,l,oMathPara.Root);
});
}
}
}
this.parseField = function(hyp, fld) this.parseField = function(hyp, fld)
{ {
if(-1 != fld.indexOf("HYPERLINK")) if(-1 != fld.indexOf("HYPERLINK"))
...@@ -9025,6 +9049,8 @@ function Binary_oMathReader(stream) ...@@ -9025,6 +9049,8 @@ function Binary_oMathReader(stream)
return oThis.ReadMathEqArrPr(t,l,props); return oThis.ReadMathEqArrPr(t,l,props);
}); });
if (!props.ctrPrp)
props.ctrPrp = new CTextPr();
props.counter = 0; props.counter = 0;
var oEqArr = new CEqArray(props); var oEqArr = new CEqArray(props);
oElem.addElementToContent(oEqArr); oElem.addElementToContent(oEqArr);
...@@ -9816,6 +9842,8 @@ function Binary_oMathReader(stream) ...@@ -9816,6 +9842,8 @@ function Binary_oMathReader(stream)
res = this.bcr.Read1(length, function(t, l){ res = this.bcr.Read1(length, function(t, l){
return oThis.ReadMathNaryPr(t,l,props); return oThis.ReadMathNaryPr(t,l,props);
}); });
if (!props.ctrPrp)
props.ctrPrp = new CTextPr();
var oNary = new CNary(props); var oNary = new CNary(props);
if (oParent) if (oParent)
oParent.addElementToContent(oNary); oParent.addElementToContent(oNary);
...@@ -9847,6 +9875,13 @@ function Binary_oMathReader(stream) ...@@ -9847,6 +9875,13 @@ function Binary_oMathReader(stream)
return oThis.ReadMathArg(t,l,oContent.content); return oThis.ReadMathArg(t,l,oContent.content);
}); });
} }
else if (c_oSer_OMathContentType.CtrlPr)
{
res = this.bcr.Read1(length, function(t, l){
return oThis.ReadMathCtrlPr(t,l,props);
});
oParent.content[oParent.content.length-1].setCtrPrp(props.ctrPrp);
}
else else
res = c_oSerConstants.ReadUnknown; res = c_oSerConstants.ReadUnknown;
return res; return res;
......
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