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

1) поправлен баг на удаление последнего элемента из run

2) прокинут argSz на чтение
3) при вставке первой формулы в mathcontent позиция curpos остается в нуле

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57503 954022d7-b5bf-4e40-9824-e11837661b57
parent 1db308b4
......@@ -303,8 +303,9 @@ ParaMath.prototype =
}
else //справа есть элемент
{
var nextElem = oContent.Content.getElem(oContent.Start + 1);
if (nextElem.typeObj == para_Math_Composition) //справа композиция
var nNextElem = oContent.Start + 1;
var nextElem = oContent.Content.getElem(nNextElem);
if (nextElem.Type == para_Math_Composition) //справа композиция
{
this.Set_Select_ToMComp(Direction);
return;
......@@ -317,8 +318,8 @@ ParaMath.prototype =
if(nextElem.Content.length == 0 && !bOnAddText) //тк pararun пустой, удаляем его
{
var Items = [];
Items.push(nextElem.Parent.content[0]);
nextElem.Parent.content.splice( 0, 1 );
Items.push(nextElem);
nextElem.Parent.content.splice( nNextElem, 1 );
History.Add(nextElem.Parent, {Type: historyitem_Math_RemoveItem, Items:Items, Pos: 0});
}
return;
......@@ -331,9 +332,9 @@ ParaMath.prototype =
if(oElem.Content.length == 0 && !bOnAddText) //тк pararun пустой, удаляем его
{
var Items = [];
Items.push(oElem.Parent.content[0]);
oElem.Parent.content.splice( 0, 1 );
History.Add(oElem.Parent, {Type: historyitem_Math_RemoveItem, Items:Items, Pos: 0});
Items.push(oElem.Parent.content[oContent.Start]);
oElem.Parent.content.splice( oContent.Start, 1 );
History.Add(oElem.Parent, {Type: historyitem_Math_RemoveItem, Items:Items, Pos: oContent.Start});
if (Direction < 0)
oContent.Content.CurPos--;
}
......
......@@ -8434,6 +8434,7 @@ function Binary_oMathReader(stream)
res = this.bcr.Read2(length, function(t, l){
return oThis.ReadMathArgSz(t,l,props);
});
oElem.SetArgSize(props.argSz);
}
else
res = c_oSerConstants.ReadUnknown;
......
......@@ -7179,7 +7179,8 @@ CMathContent.prototype =
{
this.content.splice(Pos,0,oElem);
}
this.CurPos++;
if (this.content.length != 1)
this.CurPos++;
},
AddText : function(oElem, sText)
{
......
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