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

правки к удалению CMathComposition

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55949 954022d7-b5bf-4e40-9824-e11837661b57
parent 33654923
...@@ -258,13 +258,29 @@ ParaMath.prototype = ...@@ -258,13 +258,29 @@ ParaMath.prototype =
if (oContent.Start == oContent.End) if (oContent.Start == oContent.End)
{ {
var oElem = oContent.Content.getElem(oContent.Start); var oElem = oContent.Content.getElem(oContent.Start);
if (oElem.typeObj == MATH_COMP) if (oElem.typeObj == MATH_COMP || oElem.typeObj == MATH_PLACEHOLDER)
this.Math.Remove(oContent, Direction, bOnAddText); this.RemoveElem(oContent, Direction, bOnAddText);
else //mathrun else //mathrun
oElem.Remove(Direction, bOnAddText); oElem.Remove(Direction, bOnAddText);
} }
else else
return this.Math.Remove(oContent, Direction, bOnAddText); return this.RemoveElem(oContent, Direction, bOnAddText);
},
RemoveElem: function(oContent, nCount, bOnAdd)
{
History.Create_NewPoint();
var oStartContent = oContent.Content.content[oContent.Start];
var oEndContent = oContent.Content.content[oContent.End];
var Items = new Array();
for (var i=oContent.Start; i<=oContent.End; i++)
{
Items.push(oContent.Content.content[i]);
oContent.Content.content.splice( i, 1 );
}
History.Add(oContent.Content, {Type: historyitem_Math_RemoveItem, Items:Items, Pos: oContent.Start});
return;
}, },
GetSelectContent: function() GetSelectContent: function()
...@@ -1231,19 +1247,20 @@ ParaMath.prototype = ...@@ -1231,19 +1247,20 @@ ParaMath.prototype =
}, },
Write_ToBinary2 : function(Writer) Write_ToBinary2 : function(Writer)
{ {
Writer.WriteLong( historyitem_type_Math ); /*Writer.WriteLong( historyitem_type_Math );
/*var oThis = this; var oThis = this;
this.bs = new BinaryCommonWriter(Writer); this.bs = new BinaryCommonWriter(Writer);
this.boMaths = new Binary_oMathWriter(Writer); this.boMaths = new Binary_oMathWriter(Writer);
this.bs.WriteItemWithLength ( function(){oThis.boMaths.WriteOMathParaCollaborative(oThis.Math);});//WriteOMathParaCollaborative this.bs.WriteItemWithLength ( function(){oThis.boMaths.WriteOMathPara(oThis.Math);});
*/ */
}, },
Read_FromBinary2 : function(Reader) Read_FromBinary2 : function(Reader)
{ {
/*var oThis = this; /*
var oThis = this;
this.boMathr = new Binary_oMathReader(Reader); this.boMathr = new Binary_oMathReader(Reader);
this.bcr = new Binary_CommonReader(Reader); this.bcr = new Binary_CommonReader(Reader);
...@@ -1252,8 +1269,9 @@ ParaMath.prototype = ...@@ -1252,8 +1269,9 @@ ParaMath.prototype =
var res = false; var res = false;
Reader.cur += 3; Reader.cur += 3;
res = this.bcr.Read1(length, function(t, l){ res = this.bcr.Read1(length, function(t, l){
return oThis.boMathr.ReadMathOMathParaCollaborative(t,l,oThis.Math); return oThis.boMathr.ReadMathOMathPara(t,l,oThis.Math);
}); });
*/ */
} }
}; };
\ No newline at end of file
...@@ -7507,9 +7507,9 @@ function Binary_DocumentTableReader(doc, oReadResult, openParams, stream, bAllow ...@@ -7507,9 +7507,9 @@ function Binary_DocumentTableReader(doc, oReadResult, openParams, stream, bAllow
oParStruct.addToContent(oMathPara); oParStruct.addToContent(oMathPara);
res = this.bcr.Read1(length, function(t, l){ res = this.bcr.Read1(length, function(t, l){
return oThis.boMathr.ReadMathArg(t,l,oMathPara.Math.Root); return oThis.boMathr.ReadMathArg(t,l,oMathPara.Root);
}); });
oMathPara.Math.Root.SetRunEmptyToContent(true); oMathPara.Root.SetRunEmptyToContent(true);
} }
else if (c_oSerParType.Hyperlink == type) { else if (c_oSerParType.Hyperlink == type) {
var oHyperlinkObj = {Link: null, Anchor: null, Tooltip: null, History: null, DocLocation: null, TgtFrame: null}; var oHyperlinkObj = {Link: null, Anchor: null, Tooltip: null, History: null, DocLocation: null, TgtFrame: null};
......
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