Commit 906a46a0 authored by Ilya Kirillov's avatar Ilya Kirillov

Changes for all math classes were replaced with a new classes.

parent 9d56cf52
......@@ -96,6 +96,7 @@
"../word/Editor/Run.js",
"../word/Editor/RunChanges.js",
"../word/Editor/Math.js",
"../word/Editor/MathChanges.js",
"../word/Editor/Paragraph.js",
"../word/Editor/ParagraphChanges.js",
"../word/Editor/Paragraph_Recalculate.js",
......
......@@ -145,6 +145,7 @@
"../word/Editor/Run.js",
"../word/Editor/RunChanges.js",
"../word/Editor/Math.js",
"../word/Editor/MathChanges.js",
"../word/Editor/Paragraph.js",
"../word/Editor/ParagraphChanges.js",
"../word/Editor/Paragraph_Recalculate.js",
......
......@@ -167,6 +167,7 @@
"../word/Editor/HeaderFooterController.js",
"../word/Editor/HeaderFooter.js",
"../word/Editor/Math.js",
"../word/Editor/MathChanges.js",
"../word/Editor/Spelling.js",
"../word/Editor/Footnotes.js",
"../word/Editor/FootEndNote.js",
......
......@@ -118,6 +118,7 @@
"../word/Editor/Run.js",
"../word/Editor/RunChanges.js",
"../word/Editor/Math.js",
"../word/Editor/MathChanges.js",
"../word/Editor/Paragraph.js",
"../word/Editor/ParagraphChanges.js",
"../word/Editor/Paragraph_Recalculate.js",
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -466,53 +466,58 @@ CBorderBox.prototype.setPosition = function(pos, PosInfo)
};
CBorderBox.prototype.Apply_MenuProps = function(Props)
{
if(Props.Type == Asc.c_oAscMathInterfaceType.BorderBox)
if (Props.Type == Asc.c_oAscMathInterfaceType.BorderBox)
{
if(Props.HideTop !== undefined && Props.HideTop !== this.Pr.hideTop)
if (Props.HideTop !== undefined && Props.HideTop !== this.Pr.hideTop)
{
History.Add(this, new CChangesMathBorderBoxTop(Props.HideTop, this.Pr.hideTop));
History.Add(new CChangesMathBorderBoxTop(this, this.Pr.hideTop, Props.HideTop));
this.raw_SetTop(Props.HideTop);
}
if(Props.HideBottom !== undefined && Props.HideBottom !== this.Pr.hideBot)
if (Props.HideBottom !== undefined && Props.HideBottom !== this.Pr.hideBot)
{
History.Add(this, new CChangesMathBorderBoxBot(Props.HideBottom, this.Pr.hideBot));
History.Add(new CChangesMathBorderBoxBot(this, this.Pr.hideBot, Props.HideBottom));
this.raw_SetBot(Props.HideBottom);
}
if(Props.HideLeft !== undefined && Props.HideLeft !== this.Pr.hideLeft)
if (Props.HideLeft !== undefined && Props.HideLeft !== this.Pr.hideLeft)
{
History.Add(this, new CChangesMathBorderBoxLeft(Props.HideLeft, this.Pr.hideLeft));
History.Add(new CChangesMathBorderBoxLeft(this, this.Pr.hideLeft, Props.HideLeft));
this.raw_SetLeft(Props.HideLeft);
}
if(Props.HideRight !== undefined && Props.HideRight !== this.Pr.hideRight)
if (Props.HideRight !== undefined && Props.HideRight !== this.Pr.hideRight)
{
History.Add(this, new CChangesMathBorderBoxRight(Props.HideRight, this.Pr.hideRight));
History.Add(new CChangesMathBorderBoxRight(this, this.Pr.hideRight, Props.HideRight));
this.raw_SetRight(Props.HideRight);
}
if(Props.HideHor !== undefined && Props.HideHor == this.Pr.strikeH) // strikeH - нарисовать горизонтальную линию
if (Props.HideHor !== undefined && Props.HideHor == this.Pr.strikeH) // strikeH - нарисовать горизонтальную линию
{
History.Add(this, new CChangesMathBorderBoxHor(!Props.HideHor, this.Pr.strikeH));
History.Add(new CChangesMathBorderBoxHor(this, this.Pr.strikeH, !Props.HideHor));
this.raw_SetHor(!Props.HideHor);
}
if(Props.HideVer !== undefined && Props.HideVer == this.Pr.strikeV) // strikeV - нарисовать вертикальную линию
if (Props.HideVer !== undefined && Props.HideVer == this.Pr.strikeV) // strikeV - нарисовать вертикальную линию
{
History.Add(this, new CChangesMathBorderBoxVer(!Props.HideVer, this.Pr.strikeV));
History.Add(new CChangesMathBorderBoxVer(this, this.Pr.strikeV, !Props.HideVer));
this.raw_SetVer(!Props.HideVer);
}
if(Props.HideTopLTR !== undefined && Props.HideTopLTR == this.Pr.strikeTLBR) // strikeTLBR - нарисовать диагональ из верхнего угла слева направо
if (Props.HideTopLTR !== undefined && Props.HideTopLTR == this.Pr.strikeTLBR) // strikeTLBR - нарисовать диагональ из
// верхнего угла слева направо
{
History.Add(this, new CChangesMathBorderBoxTopLTR(!Props.HideTopLTR, this.Pr.strikeTLBR));
this.raw_SetTopLTR(!Props.HideTopLTR );
History.Add(new CChangesMathBorderBoxTopLTR(this, this.Pr.strikeTLBR, !Props.HideTopLTR));
this.raw_SetTopLTR(!Props.HideTopLTR);
}
if(Props.HideTopRTL !== undefined && Props.HideTopRTL == this.Pr.strikeBLTR)
if (Props.HideTopRTL !== undefined && Props.HideTopRTL == this.Pr.strikeBLTR)
{
History.Add(this, new CChangesMathBorderBoxTopRTL(!Props.HideTopRTL, this.Pr.strikeBLTR)); // strikeBLTR - нарисовать диагональ из нижнего угла слева направо
History.Add(new CChangesMathBorderBoxTopRTL(this, this.Pr.strikeBLTR, !Props.HideTopRTL)); // strikeBLTR -
// нарисовать
// диагональ из
// нижнего угла
// слева направо
this.raw_SetTopRTL(!Props.HideTopRTL);
}
}
......@@ -842,21 +847,21 @@ CBox.prototype.Get_AlignBrk = function()
};
CBox.prototype.Displace_BreakOperator = function(isForward, bBrkBefore, CountOperators)
{
if(this.Pr.brk !== undefined)
if (this.Pr.brk !== undefined)
{
var AlnAt = this.Pr.Get_AlnAt();
var NotIncrease = AlnAt == CountOperators && isForward == true;
if(NotIncrease == false)
if (NotIncrease == false)
{
this.Pr.Displace_Break(isForward);
var NewAlnAt = this.Pr.Get_AlnAt();
if(AlnAt !== NewAlnAt)
if (AlnAt !== NewAlnAt)
{
History.Add(this, new CChangesMathBoxAlnAt(NewAlnAt, AlnAt));
History.Add(new CChangesMathBoxAlnAt(this, AlnAt, NewAlnAt));
}
}
}
......@@ -876,14 +881,13 @@ CBox.prototype.Apply_MenuProps = function(Props)
if(Props.Action & c_oMathMenuAction.InsertForcedBreak && true == this.Can_InsertForcedBreak())
{
History.Add(this, new CChangesMathBoxForcedBreak(true, false));
History.Add(new CChangesMathBoxForcedBreak(this, false, true));
this.raw_ForcedBreak(true);
}
if(Props.Action & c_oMathMenuAction.DeleteForcedBreak && true == this.Can_DeleteForcedBreak())
{
var AlnAt = this.Pr.Get_AlnAt();
History.Add(this, new CChangesMathBoxForcedBreak(false, true, AlnAt));
History.Add(new CChangesMathBoxForcedBreak(this, true, false));
this.raw_ForcedBreak(false);
}
};
......@@ -1052,13 +1056,13 @@ CBar.prototype.getAscent = function()
};
CBar.prototype.Apply_MenuProps = function(Props)
{
if(Props.Type == Asc.c_oAscMathInterfaceType.Bar && Props.Pos !== undefined)
if (Props.Type == Asc.c_oAscMathInterfaceType.Bar && Props.Pos !== undefined)
{
var Pos = Props.Pos == Asc.c_oAscMathInterfaceBarPos.Bottom ? LOCATION_BOT : LOCATION_TOP;
if(Pos !== this.Pr.pos)
if (Pos !== this.Pr.pos)
{
History.Add(this, new CChangesMathBarLinePos(Pos, this.Pr.pos));
History.Add(new CChangesMathBarLinePos(this, this.Pr.pos, Pos));
this.raw_SetLinePos(Pos);
}
}
......
......@@ -1161,17 +1161,17 @@ CDegreeSubSup.prototype.protected_GetRangeEndPos = function(CurLine, CurRange)
};
CDegreeSubSup.prototype.Apply_MenuProps = function(Props)
{
if(Props.Type == Asc.c_oAscMathInterfaceType.Script)
if (Props.Type == Asc.c_oAscMathInterfaceType.Script)
{
if(Props.ScriptType == Asc.c_oAscMathInterfaceScript.PreSubSup && this.Pr.type == DEGREE_SubSup)
if (Props.ScriptType == Asc.c_oAscMathInterfaceScript.PreSubSup && this.Pr.type == DEGREE_SubSup)
{
AscCommon.History.Add(this, new CChangesMathDegreeSubSupType(DEGREE_PreSubSup, this.Pr.type));
AscCommon.History.Add(new CChangesMathDegreeSubSupType(this, this.Pr.type, DEGREE_PreSubSup));
this.raw_SetType(DEGREE_PreSubSup);
}
if(Props.ScriptType == Asc.c_oAscMathInterfaceScript.SubSup && this.Pr.type == DEGREE_PreSubSup)
if (Props.ScriptType == Asc.c_oAscMathInterfaceScript.SubSup && this.Pr.type == DEGREE_PreSubSup)
{
AscCommon.History.Add(this, new CChangesMathDegreeSubSupType(DEGREE_SubSup, this.Pr.type));
AscCommon.History.Add(new CChangesMathDegreeSubSupType(this, this.Pr.type, DEGREE_SubSup));
this.raw_SetType(DEGREE_SubSup);
}
}
......
......@@ -577,7 +577,7 @@ CFraction.prototype.fillContent = function()
};
CFraction.prototype.Apply_MenuProps = function(Props)
{
if(Props.Type == Asc.c_oAscMathInterfaceType.Fraction && Props.FractionType !== undefined)
if (Props.Type == Asc.c_oAscMathInterfaceType.Fraction && Props.FractionType !== undefined)
{
var FractionType = this.Pr.type;
......@@ -597,9 +597,9 @@ CFraction.prototype.Apply_MenuProps = function(Props)
break;
}
if(FractionType !== this.Pr.type)
if (FractionType !== this.Pr.type)
{
AscCommon.History.Add(this, new CChangesMathFractionType(FractionType, this.Pr.type));
AscCommon.History.Add(new CChangesMathFractionType(this, this.Pr.type, FractionType));
this.raw_SetFractionType(FractionType);
}
}
......
......@@ -285,13 +285,13 @@ CLimit.prototype.ApplyProperties = function(RPI)
};
CLimit.prototype.Apply_MenuProps = function(Props)
{
if(Props.Type == Asc.c_oAscMathInterfaceType.Limit && Props.Pos !== undefined)
if (Props.Type == Asc.c_oAscMathInterfaceType.Limit && Props.Pos !== undefined)
{
var Type = Props.Pos == Asc.c_oAscMathInterfaceLimitPos.Bottom ? LIMIT_LOW : LIMIT_UP;
if(this.Pr.type !== Type)
if (this.Pr.type !== Type)
{
AscCommon.History.Add(this, new CChangesMathLimitType(Type, this.Pr.type));
AscCommon.History.Add(new CChangesMathLimitType(this, this.Pr.type, Type));
this.raw_SetType(Type);
}
}
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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