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

Изменение положения итераторов для DegreeSubSup относительно основания через контекстное меню

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@68226 954022d7-b5bf-4e40-9824-e11837661b57
parent b8715072
......@@ -3868,6 +3868,7 @@ var historyitem_Math_MatrixPlh = 53;
var historyitem_Math_MatrixMinColumnWidth = 54;
var historyitem_Math_BarLinePos = 55;
var historyitem_Math_BoxAddForcedBreak = 56;
var historyitem_Math_DegreeSubSupType = 57;
function ReadChanges_FromBinary(Reader, Class)
......@@ -3929,6 +3930,8 @@ function ReadChanges_FromBinary(Reader, Class)
case historyitem_Math_MatrixPlh : Changes = new CChangesMathMatrixPlh(); break;
case historyitem_Math_MatrixMinColumnWidth : Changes = new CChangesMathMatrixMinColumnWidth(); break;
case historyitem_Math_BarLinePos : Changes = new CChangesMathBarLinePos(); break;
case historyitem_Math_BoxAddForcedBreak : Changes = new CChangesMathBoxAddForcedBreak(); break;
case historyitem_Math_DegreeSubSupType : Changes = new CChangesMathDegreeSubSupType(); break;
}
if (null !== Changes)
......@@ -6124,6 +6127,42 @@ CChangesMathBoxAddForcedBreak.prototype.Undo = function(Class)
};
function CChangesMathDegreeSubSupType(NewType, OldType)
{
this.New = NewType;
this.Old = OldType;
}
CChangesMathDegreeSubSupType.prototype.Type = historyitem_Math_DegreeSubSupType;
CChangesMathDegreeSubSupType.prototype.Undo = function(Class)
{
Class.raw_SetType(this.Old);
};
CChangesMathDegreeSubSupType.prototype.Redo = function(Class)
{
Class.raw_SetType(this.New);
};
CChangesMathDegreeSubSupType.prototype.Save_Changes = function(Writer)
{
if ( undefined === this.New )
{
Writer.WriteBool( true );
}
else
{
Writer.WriteBool( false );
Writer.WriteLong( this.New );
}
};
CChangesMathDegreeSubSupType.prototype.Load_Changes = function(Reader, Class)
{
if (true === Reader.GetBool())
this.New = undefined;
else
this.New = Reader.GetLong();
this.Redo(Class);
};
function MatGetKoeffArgSize(FontSize, ArgSize)
{
......
......@@ -1117,6 +1117,28 @@ CDegreeSubSup.prototype.protected_GetRangeEndPos = function(CurLine, CurRange)
return this.Need_Iters(_CurLine, _CurRange) ? 2 : 0;
};
CDegreeSubSup.prototype.Apply_MenuProps = function(Props)
{
if(Props.Type == c_oAscMathInterfaceType.Script)
{
if(Props.ScriptType == c_oAscMathInterfaceScript.PreSubSup && this.Pr.type == DEGREE_SubSup)
{
History.Add(this, new CChangesMathDegreeSubSupType(DEGREE_PreSubSup, this.Pr.type));
this.raw_SetType(DEGREE_PreSubSup);
}
if(Props.ScriptType == c_oAscMathInterfaceScript.SubSup && this.Pr.type == DEGREE_PreSubSup)
{
History.Add(this, new CChangesMathDegreeSubSupType(DEGREE_SubSup, this.Pr.type));
this.raw_SetType(DEGREE_SubSup);
}
}
};
CDegreeSubSup.prototype.raw_SetType = function(type)
{
this.Pr.type = type;
this.fillContent();
};
CDegreeSubSup.prototype.Get_InterfaceProps = function()
{
var Type = this.Pr.type == DEGREE_PreSubSup ? c_oAscMathInterfaceScript.PreSubSup : c_oAscMathInterfaceScript.SubSup;
......
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