Commit 31016fb2 authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Исправлено совместное редактирование в классаз CRadical, CGroupChar, CDelimiter.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@58711 954022d7-b5bf-4e40-9824-e11837661b57
parent 76876225
......@@ -421,7 +421,6 @@ CBorderBox.prototype.Get_Id = function()
return this.Id;
}
function CBox(props)
{
CBox.superclass.constructor.call(this);
......
......@@ -76,8 +76,10 @@ CLimit.prototype.Resize = function(oMeasure, Parent, ParaMath, RPI, ArgSize)
};
}
this.elements[0][0] = new CDegree(null, true);
this.elements[0][0].fillMathComposition(props, [this.ContentFName, this.ContentIterator]);
this.elements[0][0] = new CDegreeBase(null, true);
this.elements[0][0].setBase(this.ContentFName);
this.elements[0][0].setBase(this.ContentIterator);
this.elements[0][0].fillContent();
this.FName = this.ContentFName;
this.Iterator = this.ContentIterator;
......@@ -93,7 +95,7 @@ CLimit.prototype.Resize = function(oMeasure, Parent, ParaMath, RPI, ArgSize)
this.FName = this.ContentFName;
this.Iterator = new CDenominator();
this.Iterator.fillMathComposition(this.ContentIterator);
this.Iterator.setElement(this.ContentIterator);
this.elements[0][0] = this.FName;
this.elements[1][0] = this.Iterator;
......
......@@ -958,15 +958,6 @@ CEqArray.prototype.getElement = function(num)
{
return this.elements[num][0];
}
CEqArray.prototype.fillMathComposition = function(props, contents /*array*/)
{
this.setProperties(props);
this.setDimension(this.nRow, this.nCol);
this.setContent();
for(var i = 0; i < this.nRow; i++)
this.elements[i][0] = contents[i];
}
CEqArray.prototype.getPropsForWrite = function()
{
return this.Pr;
......
......@@ -155,6 +155,7 @@ CNary.prototype.fillContent = function(PropsInfo)
base = new CDegreeBase(prp, true);
base.setBase(Sign);
base.setIterator(this.UpperIterator);
base.fillContent();
}
else if(PropsInfo.supHide && PropsInfo.subHide)
{
......
This diff is collapsed.
......@@ -847,11 +847,10 @@ CSignRadical.prototype.relate = function(parent)
this.Parent = parent;
}
//context.fill() для заливки
//Graphics : df()
function CRadical(props)
{
CRadical.superclass.constructor.call(this);
this.Id = g_oIdCounter.Get_NewId();
this.kind = MATH_RADICAL;
......@@ -872,40 +871,15 @@ function CRadical(props)
this.gapDegree = 0;
this.gapWidth = 0; // в случае со степенью, если ширина степени не нулевая, добавляется расстояние для ширины
CMathBase.call(this);
if(props !== null && typeof(props)!== "undefined")
this.init(props);
g_oTableId.Add( this, this.Id );
}
Asc.extendClass(CRadical, CMathBase);
CRadical.prototype.init = function(props)
{
this.setProperties(props);
/////
//TEST
/*var contents = new Array();
if(props.degHide)
{
contents.push(new CMathContent());
contents.push(new CMathContent());
}
else
{
contents.push(new CMathContent());
contents.push(new CMathContent());
}
this.fillMathComposition(props, contents);*/
//
/////
//this.fillContent();
}
CRadical.prototype.setProperties = function(props)
{
......@@ -943,24 +917,6 @@ CRadical.prototype.fillContent = function()
this.addMCToContent([oDegree, oBase]);*/
}
}
CRadical.prototype.fillMathComposition = function(props, contents /*array*/)
{
this.setProperties(props);
this.fillContent();
this.Iterator = contents[0];
this.Base = contents[1];
//if(this.Iterator != null && props.degHide == false)
/*if(this.Pr.type == SQUARE_RADICAL)
this.elements[0][0] = contents[0];
else if(this.Pr.type == DEGREE_RADICAL)
this.elements[0][1] = contents[0];
if(this.Pr.degHide == false)
this.elements[0][0] = contents[1];*/
}
CRadical.prototype.Resize = function(oMeasure, Parent, ParaMath, RPI, ArgSize)
{
this.Parent = Parent;
......@@ -1226,8 +1182,9 @@ CRadical.prototype.Write_ToBinary2 = function( Writer )
{
Writer.WriteLong( historyitem_type_rad );
Writer.WriteString2( this.getDegree().Id );
Writer.WriteString2( this.getBase().Id );
Writer.WriteString2(this.Id);
Writer.WriteString2(this.getDegree().Id);
Writer.WriteString2(this.getBase().Id);
this.CtrPrp.Write_ToBinary(Writer);
......@@ -1246,12 +1203,12 @@ CRadical.prototype.Write_ToBinary2 = function( Writer )
}
CRadical.prototype.Read_FromBinary2 = function( Reader )
{
this.Id = Reader.GetString2();
this.Iterator = g_oTableId.Get_ById( Reader.GetString2());
this.Base = g_oTableId.Get_ById( Reader.GetString2());
var props = {ctrPrp: new CTextPr()};
var arrElems = [];
arrElems.push(g_oTableId.Get_ById( Reader.GetString2()));
arrElems.push(g_oTableId.Get_ById( Reader.GetString2()));
props.ctrPrp.Read_FromBinary(Reader);
var Flags = Reader.GetLong();
......@@ -1260,8 +1217,8 @@ CRadical.prototype.Read_FromBinary2 = function( Reader )
if (props.degHide == true)
this.Iterator = null;
this.fillMathComposition (props, arrElems);
this.setProperties(props);
}
CRadical.prototype.Get_Id = function()
{
......
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