Commit 01bbcf82 authored by Anna.Pavlova's avatar Anna.Pavlova Committed by Alexander.Trofimov

1. Поправила Set_MathTextPr2

2. Для BorderBox реализовала функции совместного редактирования

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@59353 954022d7-b5bf-4e40-9824-e11837661b57
parent 8fcb0465
......@@ -1690,18 +1690,18 @@ ParaMath.prototype.Handle_AddNewLine = function()
var NeedRecalculate = false;
if(CurrContent.ParentElement.kind == MATH_EQ_ARRAY)
if(CurrContent.Parent.kind == MATH_EQ_ARRAY)
{
var NewContent = CurrContent.ParentElement.addRow();
var NewContent = CurrContent.Parent.addRow();
CurrContent.SplitContent(NewContent, ContentPos, 0);
NewContent.Correct_Content(true);
CurrContent.Correct_Content(true);
NeedRecalculate = true;
}
else if(CurrContent.bRoot == false && CurrContent.ParentElement.kind !== MATH_MATRIX)
else if(CurrContent.bRoot == false && CurrContent.Parent.kind !== MATH_MATRIX)
{
var ctrPrp = CurrContent.ParentElement.CtrPrp.Copy();
var ctrPrp = CurrContent.Parent.CtrPrp.Copy();
var props = {row: 2, ctrPrp: ctrPrp};
var EqArray = new CEqArray(props);
......
......@@ -8051,8 +8051,8 @@ ParaRun.prototype.Set_MathPr = function(MPrp)
}
ParaRun.prototype.Set_MathTextPr2 = function(TextPr, MathPr)
{
this.Set_Pr(TextPr);
this.Set_MathPr(MathPr);
this.Set_Pr(TextPr.Copy());
this.Set_MathPr(MathPr.Copy());
}
ParaRun.prototype.IsAccent = function()
{
......
......@@ -418,6 +418,11 @@ CMathBase.prototype =
if(!this.elements[i][j].IsJustDraw())
this.elements[i][j].Resize_2(oMeasure, this, ParaMath, RPI, ArgSize);
},
SetParent: function(Parent, ParaMath)
{
this.Parent = Parent;
this.ParaMath = ParaMath;
},
Set_CompiledCtrPrp: function(Parent, ParaMath)
{
if(this.RecalcInfo.bCtrPrp == true)
......
......@@ -6,7 +6,7 @@ function CMathBreak()
}
CMathBreak.prototype.Set_FromObject = function(Obj)
{
if(Obj.AlnAt !== undefined && Obj.AlnAt !== null && Obj.AlnAt - 0 == 0)
if(Obj.AlnAt !== undefined && Obj.AlnAt !== null && Obj.AlnAt - 0 == Obj.AlnAt)
{
if(Obj.AlnAt >= 1 && Obj.AlnAt <= 255)
this.AlnAt = Obj.AlnAt;
......@@ -19,6 +19,29 @@ CMathBreak.prototype.Copy = function()
return NewMBreak;
}
CMathBreak.prototype.Write_ToBinary = function(Writer)
{
if(this.AlnAt !== undefined)
{
Writer.WriteBool(false);
Writer.WriteLong(this.AlnAt);
}
else
{
Writer.WriteBool(true);
}
}
CMathBreak.prototype.Read_FromBinary = function(Reader)
{
if(Reader.GetBool() == false)
{
this.AlnAt = Reader.GetLong();
}
else
{
this.AlnAt = undefined;
}
}
function CMathBorderBoxPr()
{
......@@ -134,7 +157,6 @@ Asc.extendClass(CBorderBox, CMathBase);
CBorderBox.prototype.ClassType = historyitem_type_borderBox;
CBorderBox.prototype.kind = MATH_BORDER_BOX;
CBorderBox.prototype.init = function(props)
{
this.Fill_LogicalContent(1);
......@@ -378,7 +400,7 @@ CMathBoxPr.prototype.Set_FromObject = function(Obj)
if(Obj.brk !== null && Obj.brk !== undefined)
{
this.brk = new CMathBreak();
this.brk.Set_FromObject(Obj);
this.brk.Set_FromObject(Obj.brk);
}
if(true === Obj.diff || 1 === Obj.diff)
......@@ -422,12 +444,19 @@ CMathBoxPr.prototype.Write_ToBinary = function(Writer)
// Bool : opEmu
Writer.WriteBool(this.aln);
Writer.WriteBool(this.brk);
//Writer.WriteBool(this.brk);
Writer.WriteBool(this.diff);
Writer.WriteBool(this.noBreak);
Writer.WriteBool(this.opEmu);
};
if ( undefined !== this.brk )
{
Writer.WriteBool(false);
this.brk.Write_ToBinary(Writer);
}
else
Writer.WriteBool(true);
};
CMathBoxPr.prototype.Read_FromBinary = function(Reader)
{
// Bool : aln
......@@ -437,10 +466,20 @@ CMathBoxPr.prototype.Read_FromBinary = function(Reader)
// Bool : opEmu
this.aln = Reader.GetBool();
this.brk = Reader.GetBool();
//this.brk = Reader.GetBool();
this.diff = Reader.GetBool();
this.noBreak = Reader.GetBool();
this.opEmu = Reader.GetBool();
if(Reader.GetBool() == false)
{
this.brk = new CMathBreak();
this.brk.Read_FromBinary(Reader);
}
else
{
this.brk = undefined;
}
};
function CBox(props)
......@@ -485,7 +524,6 @@ function CMathBarPr()
{
this.pos = LOCATION_BOT;
}
CMathBarPr.prototype.Set_FromObject = function(Obj)
{
if(LOCATION_TOP === Obj.pos || LOCATION_BOT === Obj.pos)
......
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