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