Commit a88cd60e 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@56138 954022d7-b5bf-4e40-9824-e11837661b57
parent 86cba574
...@@ -177,7 +177,7 @@ ParaMath.prototype = ...@@ -177,7 +177,7 @@ ParaMath.prototype =
} }
}, },
AddText : function(oElem, sText, props) AddText : function(oElem, sText)
{ {
if(sText) if(sText)
{ {
...@@ -198,10 +198,10 @@ ParaMath.prototype = ...@@ -198,10 +198,10 @@ ParaMath.prototype =
} }
}, },
CreateElem : function (oElem, oParent, props) CreateElem : function (oElem, oParent)
{ {
oElem.relate(oParent); oElem.relate(oParent);
oElem.init(props);
var Pos = oParent.CurPos, var Pos = oParent.CurPos,
PosEnd = Pos + 1; PosEnd = Pos + 1;
...@@ -210,15 +210,15 @@ ParaMath.prototype = ...@@ -210,15 +210,15 @@ ParaMath.prototype =
if (oParent) if (oParent)
{ {
oParent.addElementToContent(oElem); oParent.addElementToContent(oElem);
items.push(oElem); //items.push(oElem);
History.Add(oParent, {Type: historyitem_Math_AddItem, Items: items, Pos: Pos, PosEnd: PosEnd}); //History.Add(oParent, {Type: historyitem_Math_AddItem, Items: items, Pos: Pos, PosEnd: PosEnd});
} }
}, },
CreateFraction : function (oFraction,oParentElem,props,sNumText,sDenText) CreateFraction : function (oFraction,oParentElem,sNumText,sDenText)
{ {
this.CreateElem(oFraction, oParentElem, props); this.CreateElem(oFraction, oParentElem);
var oElemDen = oFraction.getDenominator(); var oElemDen = oFraction.getDenominator();
this.AddText(oElemDen, sDenText); this.AddText(oElemDen, sDenText);
...@@ -227,9 +227,9 @@ ParaMath.prototype = ...@@ -227,9 +227,9 @@ ParaMath.prototype =
this.AddText(oElemNum, sNumText); this.AddText(oElemNum, sNumText);
}, },
CreateDegree : function (oDegree, oParentElem,props,sBaseText,sSupText,sSubText) CreateDegree : function (oDegree, oParentElem,sBaseText,sSupText,sSubText)
{ {
this.CreateElem(oDegree, oParentElem, props); this.CreateElem(oDegree, oParentElem);
var oElem = oDegree.getBase(); var oElem = oDegree.getBase();
this.AddText(oElem, sBaseText); this.AddText(oElem, sBaseText);
...@@ -241,9 +241,9 @@ ParaMath.prototype = ...@@ -241,9 +241,9 @@ ParaMath.prototype =
this.AddText(oSub, sSubText); this.AddText(oSub, sSubText);
}, },
CreateRadical : function (oRad,oParentElem,props,sElemText,sDegText) CreateRadical : function (oRad,oParentElem,sElemText,sDegText)
{ {
this.CreateElem(oRad, oParentElem, props); this.CreateElem(oRad, oParentElem);
var oElem = oRad.getBase(); var oElem = oRad.getBase();
this.AddText(oElem, sElemText); this.AddText(oElem, sElemText);
...@@ -252,9 +252,9 @@ ParaMath.prototype = ...@@ -252,9 +252,9 @@ ParaMath.prototype =
this.AddText(oDeg, sDegText); this.AddText(oDeg, sDegText);
}, },
CreateNary : function (oNary,oParentElem,props,sElemText,sSubText,sSupText) CreateNary : function (oNary,oParentElem,sElemText,sSubText,sSupText)
{ {
this.CreateElem(oNary, oParentElem, props); this.CreateElem(oNary, oParentElem);
var oElem = oNary.getBase(); var oElem = oNary.getBase();
this.AddText(oElem, sElemText); this.AddText(oElem, sElemText);
...@@ -266,9 +266,9 @@ ParaMath.prototype = ...@@ -266,9 +266,9 @@ ParaMath.prototype =
this.AddText(oSup, sSupText); this.AddText(oSup, sSupText);
}, },
CreateBox : function (oBox,oParentElem,props,sElemText) CreateBox : function (oBox,oParentElem,sElemText)
{ {
this.CreateElem(oBox, oParentElem, props); this.CreateElem(oBox, oParentElem);
var oElem = oBox.getBase(); var oElem = oBox.getBase();
this.AddText(oElem, sElemText); this.AddText(oElem, sElemText);
......
...@@ -9622,15 +9622,18 @@ function Binary_oMathReader(stream) ...@@ -9622,15 +9622,18 @@ function Binary_oMathReader(stream)
oMatr.content = oMatrix; oMatr.content = oMatrix;
for(var i=0; i<props.row; i++) for(var i=0; i<props.row; i++)
{
arrContent[i] = new Array();
for(var j=0; j<props.column; j++) for(var j=0; j<props.column; j++)
arrContent[i][j] = oMatrix.getElement(i,j); arrContent[i][j] = oMatrix.getElement(i,j);
}
} }
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);
}); });
oMatr.row++; oMatr.content.row++;
} }
else else
res = c_oSerConstants.ReadUnknown; res = c_oSerConstants.ReadUnknown;
...@@ -9843,6 +9846,7 @@ function Binary_oMathReader(stream) ...@@ -9843,6 +9846,7 @@ function Binary_oMathReader(stream)
{ {
var oText = new CMathText(false); var oText = new CMathText(false);
oText.addTxt(text[i]); oText.addTxt(text[i]);
History.Add( this, { Type : historyitem_ParaRun_AddItem, Pos : i, EndPos : i, Items : oText } );
oMRun.Content.splice( i, 0, oText ); oMRun.Content.splice( i, 0, oText );
} }
/*в будущем переделка под para_space /*в будущем переделка под para_space
...@@ -10558,6 +10562,7 @@ function Binary_oMathReader(stream) ...@@ -10558,6 +10562,7 @@ function Binary_oMathReader(stream)
}); });
props.type = DEGREE_SUPERSCRIPT; props.type = DEGREE_SUPERSCRIPT;
var oSSup = new CDegree(props); var oSSup = new CDegree(props);
oParent.addElementToContent(oSSup);
oSup.conten = oSSup.getUpperIterator(); oSup.conten = oSSup.getUpperIterator();
oContent.content = oSSup.getBase(); oContent.content = oSSup.getBase();
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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