Commit 7a2d333c authored by Anna.Pavlova's avatar Anna.Pavlova Committed by Alexander.Trofimov

Прокинула ctrPrp в конструктур для мат объектов

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56087 954022d7-b5bf-4e40-9824-e11837661b57
parent 8ae1c698
......@@ -155,6 +155,7 @@ ParaMath.prototype =
var oMRun = new ParaRun(null, true);
oMRun.Pr = oStartContent.Pr;
for (i=nPosStart; i<nLenStart; i++)
{
var Pos = oMRun.Content.length;
......@@ -288,10 +289,25 @@ ParaMath.prototype =
return this.RemoveElem(oContent, Direction, bOnAddText);
},
RemoveElem: function(oContent, nCount, bOnAdd)
RemoveElem: function(oContent, Direction, bOnAdd)
{
var start = oContent.Start,
end = oContent.End,
oMathContent = oContent.Content;
if(start == end)
{
var elem = oMathContent.content[start];
if(elem.typeObj == MATH_PARA_RUN && elem.Is_Empty())
{
}
}
History.Create_NewPoint();
var oStartContent = oContent.Content.content[oContent.Start];
var oEndContent = oContent.Content.content[oContent.End];
var Items = new Array();
......@@ -302,6 +318,14 @@ ParaMath.prototype =
}
History.Add(oContent.Content, {Type: historyitem_Math_RemoveItem, Items:Items, Pos: oContent.Start});
return;
},
SetSelectionForRemove: function(Content, pos)
{
this.bSelectionUse = true;
},
GetSelectContent: function()
......@@ -324,8 +348,6 @@ ParaMath.prototype =
{
// TODO: ParaMath.Apply_TextPr
},
Clear_TextPr : function()
......@@ -1287,7 +1309,6 @@ ParaMath.prototype =
// TODO: ParaMath.Set_SelectionContentPos
this.Root.Set_SelectionContentPos(StartContentPos, EndContentPos, Depth, StartFlag, EndFlag);
this.bSelectionUse = true;
},
......
......@@ -1013,6 +1013,7 @@ function CAccent(props)
CMathBase.call(this);
this.init(props);
this.setCtrPrp(props.ctrPrp);
}
extend(CAccent, CMathBase);
CAccent.prototype.init = function(props)
......
......@@ -1600,7 +1600,7 @@ CMathBase.prototype =
start_y++;
if(start_x >= this.nCol)
if(start_y >= this.nCol)
{
start_x++;
start_y = 0;
......@@ -1622,6 +1622,10 @@ CMathBase.prototype =
}
return TextPr;
},
Get_CompiledPr: function(Copy)
{
return this.Get_CompiledTextPr(Copy);
}
//////////////////////////
......
......@@ -30,6 +30,7 @@ function CBorderBox(props)
CMathBase.call(this);
this.init(props);
this.setCtrPrp(props.ctrPrp);
}
extend(CBorderBox, CMathBase);
CBorderBox.prototype.init = function(props)
......@@ -315,6 +316,7 @@ function CBox(props)
CMathBase.call(this);
this.init(props);
this.setCtrPrp(props.ctrPrp);
}
extend(CBox, CMathBase);
CBox.prototype.init = function(props)
......@@ -371,6 +373,7 @@ function CBar(props)
CCharacter.call(this);
this.init(props);
this.setCtrPrp(props.ctrPrp);
}
extend(CBar, CCharacter);
CBar.prototype.init = function(props)
......@@ -434,6 +437,7 @@ function CPhantom(props)
CMathBase.call(this);
this.init(props);
this.setCtrPrp(props.ctrPrp);
}
extend(CPhantom, CMathBase);
CPhantom.prototype.init = function(props)
......
......@@ -10,6 +10,7 @@ function CDegree(props)
CMathBase.call(this);
this.init(props);
this.setCtrPrp(props.ctrPrp);
}
extend(CDegree, CMathBase);
CDegree.prototype.init = function(props)
......@@ -625,6 +626,7 @@ function CDegreeSubSup(props)
CMathBase.call(this);
this.init(props);
this.setCtrPrp(props.ctrPrp);
}
extend(CDegreeSubSup, CMathBase);
CDegreeSubSup.prototype.init = function(props)
......
......@@ -8,6 +8,7 @@ function CFraction(props)
CMathBase.call(this);
this.init(props);
this.setCtrPrp(props.ctrPrp);
}
extend(CFraction, CMathBase);
CFraction.prototype.init = function(props)
......
......@@ -6,6 +6,7 @@ function CLimit(props)
CMathBase.call(this);
this.init(props);
this.setCtrPrp(props.ctrPrp);
}
extend(CLimit, CMathBase);
CLimit.prototype.init = function(props)
......@@ -72,10 +73,13 @@ CLimit.prototype.getPropsForWrite = function()
return props;
}
function CMathFunc()
function CMathFunc(props)
{
this.kind = MATH_FUNCTION;
CMathBase.call(this);
this.init(props);
this.setCtrPrp(props.ctrPrp);
}
extend(CMathFunc, CMathBase);
CMathFunc.prototype.init = function()
......
......@@ -6263,8 +6263,9 @@ CMathContent.prototype =
for ( var CurPos = StartPos; CurPos <= EndPos; CurPos++ )
{
var CurTextPr = this.content[CurPos].Get_CompiledPr(false);
var CurTextPr;
CurTextPr = this.content[CurPos].Get_CompiledPr(false);
if ( null !== CurTextPr )
TextPr = TextPr.Compare( CurTextPr );
}
......
......@@ -39,6 +39,7 @@ function CMathMatrix(props)
CMathBase.call(this);
this.init(props);
this.setCtrPrp(props.ctrPrp);
}
extend(CMathMatrix, CMathBase);
CMathMatrix.prototype.init = function(props)
......@@ -501,7 +502,7 @@ CMathMatrix.prototype.getPropsForWrite = function()
}
////
function CEqArray()
function CEqArray(props)
{
this.kind = MATH_EQ_ARRAY;
......@@ -509,6 +510,9 @@ function CEqArray()
this.objDist = 0;
CMathMatrix.call(this);
this.init(props);
this.setCtrPrp(props.ctrPrp);
}
extend(CEqArray, CMathMatrix);
CEqArray.prototype.init = function(props)
......
......@@ -23,6 +23,7 @@ function CNary(props)
CMathBase.call(this);
this.init(props);
this.setCtrPrp(props.ctrPrp);
}
extend(CNary, CMathBase);
CNary.prototype.init = function(props)
......@@ -186,23 +187,19 @@ CNary.prototype.init = function(props)
{
if( this.supHide && !this.subHide )
{
base = new CDegree();
var prp = {type: DEGREE_SUBSCRIPT, indef: 2, oBase: sign};
//base.init_2(prp, sign);
base = new CDegree(prp);
}
else if( !this.supHide && this.subHide )
{
base = new CDegree();
var prp = {type: DEGREE_SUPERSCRIPT, indef: 2, oBase: sign};
//base.init_2(prp, sign);
base = new CDegree(prp);
}
else
{
base = new CDegreeSubSup();
var prp = {type: DEGREE_SubSup, indef: 2, oBase: sign};
//base.init_2(prp, sign);
base = new CDegreeSubSup(prp);
}
}
if(!this.supHide || !this.subHide)
......
......@@ -3305,6 +3305,7 @@ function CDelimiter(props)
CMathBase.call(this);
this.init(props);
this.setCtrPrp(props.ctrPrp);
}
extend(CDelimiter, CMathBase);
CDelimiter.prototype.init = function(props)
......@@ -4114,7 +4115,7 @@ CCharacter.prototype.getBase = function()
function CGroupCharacter()
function CGroupCharacter(props)
{
this.kind = MATH_GROUP_CHARACTER;
......@@ -4122,6 +4123,9 @@ function CGroupCharacter()
this.loc = LOCATION_BOT;
CCharacter.call(this);
this.init(props);
this.setCtrPrp(props.ctrPrp);
}
extend(CGroupCharacter, CCharacter);
CGroupCharacter.prototype.init = function(props)
......
......@@ -895,6 +895,7 @@ function CRadical(props)
CMathBase.call(this);
this.init(props);
this.setCtrPrp(props.ctrPrp);
}
extend(CRadical, CMathBase);
CRadical.prototype.init = function(props)
......
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