Commit 54308e7f 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@56675 954022d7-b5bf-4e40-9824-e11837661b57
parent bb6cc6cd
...@@ -1225,7 +1225,7 @@ CDegreeSubSup.prototype.Read_FromBinary2 = function( Reader ) ...@@ -1225,7 +1225,7 @@ CDegreeSubSup.prototype.Read_FromBinary2 = function( Reader )
{ {
var Flags = Reader.GetLong(); var Flags = Reader.GetLong();
if ( Flags & 1 ) if ( Flags & 1 )
props.alnScr = Writer.GetBool(); props.alnScr = Reader.GetBool();
} }
this.fillMathComposition (props, arrElems); this.fillMathComposition (props, arrElems);
} }
......
...@@ -6779,30 +6779,13 @@ CMathContent.prototype = ...@@ -6779,30 +6779,13 @@ CMathContent.prototype =
{ {
var bArray = Data.UseArray; var bArray = Data.UseArray;
var Count = Data.Items.length; var Count = Data.Items.length;
Writer.WriteLong( Count );
var StartPos = Writer.GetCurPosition();
Writer.Skip(4);
var RealCount = Count;
for ( var Index = 0; Index < Count; Index++ ) for ( var Index = 0; Index < Count; Index++ )
{ {
if ( true === bArray ) Writer.WriteLong( Data.Pos );
{
if ( false === Data.PosArray[Index] )
RealCount--;
else
Writer.WriteLong( Data.PosArray[Index] );
}
else
Writer.WriteLong( Data.Pos );
} }
var EndPos = Writer.GetCurPosition();
Writer.Seek( StartPos );
Writer.WriteLong( RealCount );
Writer.Seek( EndPos );
break; break;
} }
} }
...@@ -6849,20 +6832,11 @@ CMathContent.prototype = ...@@ -6849,20 +6832,11 @@ CMathContent.prototype =
} }
case historyitem_Math_RemoveItem: case historyitem_Math_RemoveItem:
{ {
// Long : Количество удаляемых элементов
// Array of Long : позиции удаляемых элементов
var Count = Reader.GetLong(); var Count = Reader.GetLong();
for ( var Index = 0; Index < Count; Index++ ) for ( var Index = 0; Index < Count; Index++ )
{ {
var ChangesPos = this.m_oContentChanges.Check( contentchanges_Remove, Reader.GetLong() ); var Pos = Reader.GetLong();
// действие совпало, не делаем его
if ( false === ChangesPos )
continue;
var Pos = ( true !== Debug_ParaRunMode ? this.Internal_Get_RealPos( ChangesPos ) : ChangesPos );
this.Content.splice( Pos, 1 ); this.Content.splice( Pos, 1 );
} }
...@@ -8722,7 +8696,7 @@ CMathContent.prototype = ...@@ -8722,7 +8696,7 @@ CMathContent.prototype =
oGroupChr.fillPlaceholders(); oGroupChr.fillPlaceholders();
break; break;
case 205: props = {ctrPrp: new CTextPr(), opEmu:1}; case 205: props = {ctrPrp: new CTextPr(), opEmu:1};
var oBox = new CBoxprops var oBox = new CBox(props);
this.CreateElem(oBox,this); this.CreateElem(oBox,this);
var oElem = oBox.getBase(); var oElem = oBox.getBase();
...@@ -9000,7 +8974,9 @@ CMathContent.prototype = ...@@ -9000,7 +8974,9 @@ CMathContent.prototype =
} }
oElem.addElementToContent(MathRun); oElem.addElementToContent(MathRun);
items.push(MathRun); items.push(MathRun);
History.Add(oElem, {Type: historyitem_Math_AddItem, Items: items, Pos: Pos, PosEnd: PosEnd}); History.Add(oElem, {Type: historyitem_Math_AddItem, Items: items, Pos: Pos, PosEnd: PosEnd});
oElem.CurPos++;
} }
}, },
...@@ -9016,6 +8992,8 @@ CMathContent.prototype = ...@@ -9016,6 +8992,8 @@ CMathContent.prototype =
oParent.Add(oElem,Pos); oParent.Add(oElem,Pos);
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});
oElem.CurPos++;
} }
}, },
CreateFraction : function (oFraction,oParentElem,sNumText,sDenText) CreateFraction : function (oFraction,oParentElem,sNumText,sDenText)
......
...@@ -317,19 +317,19 @@ CNary.prototype.Refresh_RecalcData = function(Data) ...@@ -317,19 +317,19 @@ CNary.prototype.Refresh_RecalcData = function(Data)
CNary.prototype.Write_ToBinary2 = function( Writer ) CNary.prototype.Write_ToBinary2 = function( Writer )
{ {
Writer.WriteLong( historyitem_type_nary ); Writer.WriteLong( historyitem_type_nary );
Writer.WriteString2( this.oNary.getBase().Id ); Writer.WriteString2( this.getBase().Id );
var StartPos = Writer.GetCurPosition(); var StartPos = Writer.GetCurPosition();
Writer.Skip(4); Writer.Skip(4);
var Flags = 0; var Flags = 0;
if ( undefined != this.getUpperIterator() ) if ( undefined != this.getUpperIterator() )
{ {
Writer.WriteLong(this.getUpperIterator().Id); Writer.WriteString2(this.getUpperIterator().Id);
Flags |= 1; Flags |= 1;
} }
if ( undefined != this.getLowerIterator()) if ( undefined != this.getLowerIterator())
{ {
Writer.WriteLong(this.getLowerIterator().Id); Writer.WriteString2(this.getLowerIterator().Id);
Flags |= 2; Flags |= 2;
} }
var EndPos = Writer.GetCurPosition(); var EndPos = Writer.GetCurPosition();
......
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