Commit bb6cc6cd 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@56674 954022d7-b5bf-4e40-9824-e11837661b57
parent c86f8d85
......@@ -203,8 +203,9 @@ ParaMath.prototype =
History.Add(oContent.Content, {Type: historyitem_Math_AddItem, Items: items, Pos: Pos, PosEnd: PosEnd});
}
oContent.Content.SetRunEmptyToContent(false);
}
oContent.Content.SetRunEmptyToContent(true);
}
},
......@@ -231,6 +232,7 @@ ParaMath.prototype =
History.Add(oContent.Content, {Type: historyitem_Math_RemoveItem, Items:Items, Pos: 0});
var oMRun = new ParaRun(this.Paragraph, true);
oMRun.StartLine = 0; oMRun.StartRange = 0;
oContent.Content.addElementToContent(oMRun);
var items = [];
items.push(oMRun);
......@@ -242,7 +244,7 @@ ParaMath.prototype =
{
History.Create_NewPoint();
oElem.Remove(Direction, bOnAddText);
if(oElem.Content.length == 0) //тк pararun пустой, удаляем его
if(oElem.Content.length == 0 && !bOnAddText) //тк pararun пустой, удаляем его
{
var Items = [];
Items.push(oElem.Parent.content[0]);
......
......@@ -7759,6 +7759,7 @@ Paragraph.prototype =
var Elem = new ParaMath();
//Elem.Set_Paragraph(this);
Elem.Root.Load_FromMenu(Item.Menu, this);
Elem.Root.SetRunEmptyToContent(true);
// Добавляем гиперссылку в содержимое параграфа
this.Internal_Content_Add( CurPos + 1, Elem );
......
......@@ -1845,9 +1845,9 @@ function Binary_oMathWriter(memory, oMathPara)
case MATH_FUNCTION : this.bs.WriteItem(c_oSer_OMathContentType.Func, function(){oThis.WriteFunc(item);}); break;
case MATH_GROUP_CHARACTER : this.bs.WriteItem(c_oSer_OMathContentType.GroupChr, function(){oThis.WriteGroupChr(item);}); break;
case MATH_LIMIT :
if (LIMIT_LOW == item.type)
if (LIMIT_LOW == item.Pr.type)
this.bs.WriteItem(c_oSer_OMathContentType.LimLow, function(){oThis.WriteLimLow(item);});
else if (LIMIT_UP == item.type)
else if (LIMIT_UP == item.Pr.type)
this.bs.WriteItem(c_oSer_OMathContentType.LimUpp, function(){oThis.WriteLimUpp(item);});
break;
case MATH_MATRIX : this.bs.WriteItem(c_oSer_OMathContentType.Matrix, function(){oThis.WriteMatrix(item);}); break;
......@@ -1858,15 +1858,15 @@ function Binary_oMathWriter(memory, oMathPara)
case MATH_RUN : this.bs.WriteItem(c_oSer_OMathContentType.MRun, function(){oThis.WriteMRun(item);}); break;
case MATH_RADICAL : this.bs.WriteItem(c_oSer_OMathContentType.Rad, function(){oThis.WriteRad(item);}); break;
case MATH_DEGREESubSup :
if (DEGREE_PreSubSup == item.type)
if (DEGREE_PreSubSup == item.Pr.type)
this.bs.WriteItem(c_oSer_OMathContentType.SPre, function(){oThis.WriteSPre(item);});
else if (DEGREE_SubSup == item.type)
else if (DEGREE_SubSup == item.Pr.type)
this.bs.WriteItem(c_oSer_OMathContentType.SSubSup, function(){oThis.WriteSSubSup(item);});
break;
case MATH_DEGREE :
if (DEGREE_SUBSCRIPT == item.type)
if (DEGREE_SUBSCRIPT == item.Pr.type)
this.bs.WriteItem(c_oSer_OMathContentType.SSub, function(){oThis.WriteSSub(item);});
else if (DEGREE_SUPERSCRIPT == item.type)
else if (DEGREE_SUPERSCRIPT == item.Pr.type)
this.bs.WriteItem(c_oSer_OMathContentType.SSup, function(){oThis.WriteSSup(item);});
break;
}
......
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