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

1. Selection_Remove

2. getElem (для Remove)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55752 954022d7-b5bf-4e40-9824-e11837661b57
parent e8c1493a
......@@ -51,6 +51,7 @@ ParaMath.prototype =
// TODO: ParaMath.Copy
var NewMath = new ParaMath();
this.Root.Copy(Selected);
return NewMath;
},
......@@ -74,8 +75,6 @@ ParaMath.prototype =
{
// TODO: ParaMath.Get_TextPr
return new CTextPr();
},
......@@ -770,7 +769,9 @@ ParaMath.prototype =
if ( EndPos >= 1 )
{
this.Math.Draw( PDSE.X, PDSE.Y - this.Root.size.ascent, PDSE.Graphics );
//this.Math.Draw( PDSE.X, PDSE.Y - this.Root.size.ascent, PDSE.Graphics );
this.Math.Draw( PDSE.X, PDSE.Y, PDSE.Graphics );
PDSE.X += this.Width;
}
},
......
......@@ -1390,7 +1390,7 @@ CMathBase.prototype =
},
IsSelectEmpty: function()
{
return (this.SelectStart_X == this.SelectEnd_X) && (this.SelectStart_Y == this.SelectEnd_Y);
return (this.SelectStart_X == this.SelectEnd_X) && (this.SelectStart_Y == this.SelectEnd_Y) && (this.SelectStart_X !== -1 && this.SelectStart_Y !== -1);
},
Recalculate_CurPos: function(_X, Y, CurrentRun, _CurRange, _CurLine, _CurPage, UpdateCurPos, UpdateTarget, ReturnTarget)
{
......@@ -1411,6 +1411,15 @@ CMathBase.prototype =
for(var j = 0; j < this.nCol; j++)
if(!this.elements[i][j].IsJustDraw())
this.elements[i][j].SetRunEmptyToContent(bAll);
},
Selection_Remove: function()
{
var start_X = this.SelectStart_X,
start_Y = this.SelectStart_Y;
if(start_X !== -1 && start_Y !== -1)
this.elements[start_X][start_Y].Selection_Remove();
}
//////////////////////////
......
......@@ -5842,7 +5842,7 @@ CMathContent.prototype =
return bIncline;
},
/// Position for Paragraph
/// For Para Math
Recalculate_CurPos : function(_X, Y, CurrentRun, _CurRange, _CurLine, _CurPage, UpdateCurPos, UpdateTarget, ReturnTarget)
{
var result;
......@@ -6232,10 +6232,6 @@ CMathContent.prototype =
Get_LeftPos: function()
{
},
Selection_Remove: function()
{
},
getContent: function(stack, bCurrent)
{
......@@ -6257,7 +6253,28 @@ CMathContent.prototype =
{
return this.content.length == 1;
},
Copy: function(Selected)
{
},
Selection_Remove: function()
{
var start = this.SelectStartPos,
end = this.SelectEndPos;
if(this.content[start].typeObj !== MATH_PLACEHOLDER)
this.content[start].Selection_Remove();
if(this.content[end].typeObj !== MATH_PLACEHOLDER)
this.content[end].Selection_Remove();
this.SelectStartPos = 0;
this.SelectEndPos = 0;
},
getElem: function(nNum)
{
return this.content[nNum];
},
////////////////////////////////////////////////////////////////
......
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