Commit 499e642a authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Ветка Math_Menu_Features слита на транк.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@68154 954022d7-b5bf-4e40-9824-e11837661b57
parent a4660615
......@@ -868,6 +868,7 @@ var historyitem_Document_Orientation = 5; // Меняем ориентац
var historyitem_Document_DefaultTab = 6; // Меняем таб по умолчанию
var historyitem_Document_EvenAndOddHeaders = 7; // Меняем настройку различия четных/нечетных колонтитулов
var historyitem_Document_DefaultLanguage = 8; // Меняем язык по умолчанию для всего документа
var historyitem_Document_MathSettings = 9; // Меняем настройки формул
// Типы изменений в классе Paragraph
var historyitem_Paragraph_AddItem = 1; // Добавляем элемент в параграф
......@@ -952,6 +953,7 @@ var historyitem_ParaRun_PrReviewInfo = 38; // Изменение инфор
var historyitem_ParaRun_ContentReviewInfo = 39; // Изменение информации о рецензировании содержимого рана
var historyitem_ParaRun_OnStartSplit = 40; // Специальное измненение для контролля позиции курсора и селекта
var historyitem_ParaRun_OnEndSplit = 41; // Специальное измненение для контролля позиции курсора и селекта
var historyitem_ParaRun_MathAlnAt = 42; // меняем alnAt в математических свойствах Run
// Типы изменений в классе ParaTextPr
......@@ -1593,9 +1595,9 @@ var historydescription_Document_SetColumnsFromRuler = 0x012f;
var historydescription_Document_SetColumnsProps = 0x0130;
var historydescription_Document_AddColumnBreak = 0x0131;
var historydescription_Document_SetSectionProps = 0x0132;
var historydescription_Document_AddTabToMath = 0x0133;
var historydescription_Document_SetMathProps = 0x0134;
var historydescription_Document_ApplyPrToMath = 0x0135;
function Get_HistoryPointStringDescription(nDescription)
{
var sString = "Unknown";
......@@ -1909,6 +1911,9 @@ function Get_HistoryPointStringDescription(nDescription)
case historydescription_Document_SetColumnsFromRuler : sString = "Document_SetColumnsFromRuler "; break;
case historydescription_Document_SetColumnsProps : sString = "Document_SetColumnsProps "; break;
case historydescription_Document_AddColumnBreak : sString = "Document_AddColumnBreak "; break;
case historydescription_Document_AddTabToMath : sString = "Document_AddTabToMath "; break;
case historydescription_Document_ApplyPrToMath : sString = "Document_ApplyPrToMath "; break;
case historydescription_Document_SetMathProps : sString = "Document_SetMathProps "; break;
case historydescription_Document_SetSectionProps : sString = "Document_SetColumnsProps "; break;
}
return sString;
......
......@@ -10250,7 +10250,18 @@ CDocument.prototype =
{
var SelectedInfo = this.Get_SelectedElementsInfo();
if ( true === SelectedInfo.Is_InTable() && true != e.CtrlKey )
if (null !== SelectedInfo.Get_Math())
{
var ParaMath = SelectedInfo.Get_Math();
var Paragraph = ParaMath.Get_Paragraph();
if (Paragraph && false === this.Document_Is_SelectionLocked(changestype_None, {Type : changestype_2_Element_and_Type, Element : Paragraph, CheckType : changestype_Paragraph_Content}))
{
this.Create_NewHistoryPoint(historydescription_Document_AddTabToMath);
ParaMath.Handle_Tab(!e.ShiftKey);
this.Recalculate();
}
}
else if ( true === SelectedInfo.Is_InTable() && true != e.CtrlKey )
{
this.Cursor_MoveToCell(true === e.ShiftKey ? false : true);
}
......@@ -13455,6 +13466,12 @@ CDocument.prototype =
this.Restart_CheckSpelling();
break;
}
case historyitem_Document_MathSettings:
{
this.Settings.MathSettings.SetPr(Data.OldPr);
break;
}
}
},
......@@ -13507,6 +13524,13 @@ CDocument.prototype =
this.Restart_CheckSpelling();
break;
}
case historyitem_Document_MathSettings:
{
this.Settings.MathSettings.SetPr(Data.NewPr);
break;
}
}
},
......@@ -13533,6 +13557,7 @@ CDocument.prototype =
case historyitem_Document_DefaultTab:
case historyitem_Document_EvenAndOddHeaders:
case historyitem_Document_MathSettings:
{
ChangePos = 0;
break;
......@@ -13861,6 +13886,11 @@ CDocument.prototype =
Writer.WriteLong( Data.New );
break;
}
case historyitem_Document_MathSettings:
{
this.Settings.MathSettings.Write_ToBinary(Writer);
break;
}
}
return Writer;
......@@ -14026,6 +14056,11 @@ CDocument.prototype =
break;
}
case historyitem_Document_MathSettings:
{
this.Settings.MathSettings.Read_FromBinary(Reader);
break;
}
}
return true;
......@@ -16300,6 +16335,24 @@ CDocument.prototype.Get_CompatibilityMode = function()
{
return this.Settings.CompatibilityMode;
};
//----------------------------------------------------------------------------------------------------------------------
// Math
//----------------------------------------------------------------------------------------------------------------------
CDocument.prototype.Set_MathProps = function(MathProps)
{
var SelectedInfo = this.Get_SelectedElementsInfo();
if (null !== SelectedInfo.Get_Math() && false === this.Document_Is_SelectionLocked(changestype_Paragraph_Content))
{
this.Create_NewHistoryPoint(historydescription_Document_SetMathProps);
var ParaMath = SelectedInfo.Get_Math();
ParaMath.Set_MenuProps(MathProps);
this.Recalculate();
this.Document_UpdateSelectionState();
this.Document_UpdateInterfaceState();
}
};
//-----------------------------------------------------------------------------------
// Private
//-----------------------------------------------------------------------------------
......
This diff is collapsed.
......@@ -2457,10 +2457,10 @@ function CParagraphRecalculateStateWrap(Para)
this.bFirstLine = false;
this.bNoOneBreakOperator = true; // прежде чем обновлять позицию в контент Run, учтем были ли до этого break-операторы (проверки на Word == false не достаточно, т.к. формула мб инлайновая и тогда не нужно обновлять позицию)
this.BreakBox = false;
this.bForcedBreak = false;
this.bInsideOper = false; // учитываем есть ли разбивка внутри мат объекта, чтобы случайно не вставить в конец пред оператора (при Brk_Before == false)
this.bOnlyForcedBreak = false; // учитывается, если возможна разбивка только по операторам выше уровням => в этом случае можно сделать принудительный разрыв во внутреннем контенте
this.bBoxOperator = false;
this.bBreakBox = false;
//-----------------------------//
this.bFastRecalculate = false;
......@@ -2506,10 +2506,10 @@ CParagraphRecalculateStateWrap.prototype =
this.bContainCompareOper = true;
this.bInsideOper = false;
this.bOnlyForcedBreak = false;
this.bBreakBox = false;
this.bNoOneBreakOperator = true;
this.bFastRecalculate = false;
this.bBoxOperator = false;
this.BreakBox = false;
this.bForcedBreak = false;
this.bBreakPosInLWord = true;
this.MathNotInline = null;
......@@ -2546,10 +2546,10 @@ CParagraphRecalculateStateWrap.prototype =
this.bContainCompareOper = true;
this.bInsideOper = false;
this.bOnlyForcedBreak = false;
this.bBreakBox = false;
this.bNoOneBreakOperator = true;
this.BreakBox = false;
this.bForcedBreak = false;
this.bFastRecalculate = false;
this.bBoxOperator = false;
this.bBreakPosInLWord = true;
},
......
This diff is collapsed.
......@@ -646,8 +646,31 @@ CAccent.prototype.GetLastElement = function()
{
return this.Content[0].GetLastElement();
};
CAccent.prototype.Document_UpdateInterfaceState = function(MathProps)
CAccent.prototype.Can_Delete = function()
{
MathProps.Type = c_oAscMathInterfaceType.Accent;
MathProps.Pr = null;
return true;
};
CAccent.prototype.Is_SimpleDelete = function()
{
return true;
};
CAccent.prototype.Get_InterfaceProps = function()
{
return new CMathMenuAccent(this);
};
/**
*
* @param CMathMenuAccent
* @constructor
* @extends {CMathMenuBase}
*/
function CMathMenuAccent(Accent)
{
CMathMenuAccent.superclass.constructor.call(this, Accent);
this.Type = c_oAscMathInterfaceType.Accent;
}
Asc.extendClass(CMathMenuAccent, CMathMenuBase);
window["CMathMenuAccent"] = CMathMenuAccent;
This diff is collapsed.
This diff is collapsed.
......@@ -83,7 +83,7 @@ CDegreeBase.prototype.PreRecalc = function(Parent, ParaMath, ArgSize, RPI, GapsI
this.baseContent.PreRecalc(this, ParaMath, ArgSize, RPI);
var ArgSzDegr = ArgSize.Copy();
ArgSzDegr.decrease();
ArgSzDegr.Decrease();
var RPIDegr = RPI.Copy();
RPIDegr.bDecreasedComp = true;
......@@ -437,11 +437,6 @@ CDegree.prototype.fillContent = function()
CDegree.superclass.fillContent.call(this);
};
CDegree.prototype.Document_UpdateInterfaceState = function(MathProps)
{
MathProps.Type = c_oAscMathInterfaceType.Script;
MathProps.Pr = null;
};
CDegree.prototype.Recalculate_LineMetrics = function(PRS, ParaPr, _CurLine, _CurRange, ContentMetrics)
{
var CurLine = _CurLine - this.StartLine;
......@@ -504,6 +499,23 @@ CDegree.prototype.setPosition = function(pos, PosInfo)
CMathBase.prototype.setPosition.call(this, pos, PosInfo);
}
};
CDegree.prototype.Can_Delete = function()
{
return true;
};
CDegree.prototype.Is_SimpleDelete = function()
{
return true;
};
CDegree.prototype.Get_InterfaceProps = function()
{
var Type = this.Pr.type == DEGREE_SUBSCRIPT ? c_oAscMathInterfaceScript.Sub : c_oAscMathInterfaceScript.Sup;
return new CMathMenuScript(this, Type);
};
CDegree.prototype.Can_ModifyArgSize = function()
{
return this.CurPos == 1 && false === this.Is_SelectInside(); // находимся в итераторе
};
/**
*
......@@ -516,10 +528,6 @@ function CIterators(iterUp, iterDn)
{
CIterators.superclass.constructor.call(this, true);
this.lUp = 0; // центр основания
this.lD = 0; // высота - центр основания
this.upper = 0; // смещение сверху для позиции основания
this.iterUp = iterUp;
this.iterDn = iterDn;
}
......@@ -580,6 +588,31 @@ CIterators.prototype.alignIterators = function(mcJc)
{
this.alignment.wdt[0] = mcJc;
};
CIterators.prototype.setPosition = function(pos, PosInfo)
{
this.pos.x = pos.x;
this.pos.y = pos.y;
var UpIterPos = new CMathPosition();
var al = this.align(0, 0);
UpIterPos.x = this.pos.x + this.GapLeft + al.x;
UpIterPos.y = this.pos.y + this.iterUp.size.ascent;
var DownIterPos = new CMathPosition();
al = this.align(1, 0);
DownIterPos.x = this.pos.x + this.GapLeft + al.x;
DownIterPos.y = this.pos.y + this.dH + this.iterUp.size.height + this.iterDn.size.ascent;
// сначала выставляем setPosition у верхнего итератора, потом у нижнего
// такой порядок нужен для выравнивания Box по операторам (так же как в Ворде)
this.iterDn.setPosition(DownIterPos, PosInfo);
this.iterUp.setPosition(UpIterPos, PosInfo);
pos.x += this.size.width;
};
function CMathDegreeSubSupPr()
{
......@@ -662,9 +695,6 @@ CDegreeSubSupBase.prototype.fillContent = function()
oIters.init();
oIters.lUp = 0;
oIters.lD = 0;
if(this.Pr.type == DEGREE_SubSup)
{
oIters.alignIterators(MCJC_LEFT);
......@@ -903,7 +933,7 @@ CDegreeSubSup.prototype.Recalculate_LineMetrics = function(PRS, ParaPr, _CurLine
}
else
{
CDegreeBase.prototype.Recalculate_LineMetrics.call(this, PRS, ParaPr, _CurLine, _CurRange, ContentMetrics);
CDegreeSubSupBase.prototype.Recalculate_LineMetrics.call(this, PRS, ParaPr, _CurLine, _CurRange, ContentMetrics);
}
};
......@@ -1095,8 +1125,54 @@ CDegreeSubSup.prototype.protected_GetRangeEndPos = function(CurLine, CurRange)
return this.Need_Iters(_CurLine, _CurRange) ? 2 : 0;
};
CDegreeSubSup.prototype.Document_UpdateInterfaceState = function(MathProps)
CDegreeSubSup.prototype.Can_DeleteSubScript = function()
{
return this.Pr.type == DEGREE_SubSup;
};
CDegreeSubSup.prototype.Can_DeleteSuperScript = function()
{
return this.Pr.type == DEGREE_SubSup;
};
CDegreeSubSup.prototype.Can_Delete = function()
{
return this.Pr.type == DEGREE_PreSubSup;
};
CDegreeSubSup.prototype.Is_SimpleDelete = function()
{
return true;
};
CDegreeSubSup.prototype.Get_InterfaceProps = function()
{
MathProps.Type = c_oAscMathInterfaceType.Script;
MathProps.Pr = null;
var Type = this.Pr.type == DEGREE_PreSubSup ? c_oAscMathInterfaceScript.PreSubSup : c_oAscMathInterfaceScript.SubSup;
return new CMathMenuScript(this, Type);
};
CDegreeSubSup.prototype.Can_ModifyArgSize = function()
{
return this.CurPos !== 0 && false === this.Is_SelectInside(); // находимся в итераторе
};
/**
*
* @param CMathMenuScript
* @constructor
* @extends {CMathMenuBase}
*/
function CMathMenuScript(Script, Type)
{
CMathMenuScript.superclass.constructor.call(this, Script);
this.Type = c_oAscMathInterfaceType.Script;
if (undefined !== Type)
this.ScriptType = Type;
else
this.ScriptType = undefined;
}
Asc.extendClass(CMathMenuScript, CMathMenuBase);
CMathMenuScript.prototype.get_ScriptType = function(){return this.ScriptType;};
CMathMenuScript.prototype.put_ScriptType = function(Type){this.ScriptType = Type;};
window["CMathMenuScript"] = CMathMenuScript;
CMathMenuScript.prototype["get_ScriptType"] = CMathMenuScript.prototype.get_ScriptType;
CMathMenuScript.prototype["put_ScriptType"] = CMathMenuScript.prototype.put_ScriptType;
\ No newline at end of file
......@@ -43,8 +43,6 @@ function CFraction(props)
this.Pr = new CMathFractionPr();
this.bHideBar = false;
if(props !== null && typeof(props) !== "undefined")
this.init(props);
......@@ -102,9 +100,9 @@ CFraction.prototype.drawBarFraction = function(PDSE)
var x1 = this.pos.x + PosLine.x + this.GapLeft,
x2 = this.pos.x + PosLine.x + this.GapLeft + width,
y1 = this.pos.y + PosLine.y + numHeight- penW;
y1 = this.pos.y + PosLine.y + numHeight - penW;
if( !this.bHideBar )
if(this.Pr.type == BAR_FRACTION)
{
PDSE.Graphics.SetFont(mgCtrPrp);
......@@ -311,7 +309,7 @@ CFraction.prototype.PreRecalc = function(Parent, ParaMath, ArgSize, RPI, GapsInf
if(RPI.bInline == true && (this.Pr.type === BAR_FRACTION || this.Pr.type == NO_BAR_FRACTION)) // уменьшае размер числителя и знаменателя
{
ArgSzNumDen.decrease(); // для контентов числителя и знаменателя
ArgSzNumDen.Decrease(); // для контентов числителя и знаменателя
this.ArgSize.SetValue(-1); // для CtrPrp
}
else if(RPI.bDecreasedComp == true) // уменьшаем расстояние между числителем и знаменателем (размер FontSize для TxtPr ControlLetter)
......@@ -324,8 +322,6 @@ CFraction.prototype.PreRecalc = function(Parent, ParaMath, ArgSize, RPI, GapsInf
this.ArgSize.SetValue(0);
}
this.RecalcInfo.bCtrPrp = true;
this.Set_CompiledCtrPrp(Parent, ParaMath, RPI);
this.ApplyProperties(RPI);
......@@ -466,9 +462,6 @@ CFraction.prototype.fillContent = function()
{
this.setDimension(2, 1);
if(this.Pr.type == NO_BAR_FRACTION)
this.bHideBar = true;
this.elements[0][0] = this.Numerator;
this.elements[1][0] = this.Denominator;
}
......@@ -485,11 +478,122 @@ CFraction.prototype.fillContent = function()
this.elements[0][1] = this.Denominator.getElement();
}
};
CFraction.prototype.Document_UpdateInterfaceState = function(MathProps)
CFraction.prototype.Apply_MenuProps = function(Props)
{
MathProps.Type = c_oAscMathInterfaceType.Fraction;
MathProps.Pr = null;
if(Props.Type == c_oAscMathInterfaceType.Fraction && Props.FractionType !== undefined)
{
var FractionType = this.Pr.type;
switch (Props.FractionType)
{
case c_oAscMathInterfaceFraction.Bar:
FractionType = BAR_FRACTION;
break;
case c_oAscMathInterfaceFraction.Skewed:
FractionType = SKEWED_FRACTION;
break;
case c_oAscMathInterfaceFraction.Linear:
FractionType = LINEAR_FRACTION;
break;
case c_oAscMathInterfaceFraction.NoBar:
FractionType = NO_BAR_FRACTION;
break;
}
if(FractionType !== this.Pr.type)
{
History.Add(this, new CChangesMathFractionType(FractionType, this.Pr.type));
this.raw_SetFractionType(FractionType);
}
}
/*var FractionType;
switch(Type)
{
case c_oAscMathMenuTypes.FractionBar:
{
FractionType = BAR_FRACTION;
break;
}
case c_oAscMathMenuTypes.FractionSkewed:
{
FractionType = SKEWED_FRACTION;
break;
}
case c_oAscMathMenuTypes.FractionLinear:
{
FractionType = LINEAR_FRACTION;
break;
}
case c_oAscMathMenuTypes.FractionNoBar:
{
FractionType = NO_BAR_FRACTION;
break;
}
}
if(FractionType !== undefined && FractionType !== this.Pr.type)
{
History.Add(this, new CChangesMathFractionType(FractionType, this.Pr.type));
this.raw_SetFractionType(FractionType);
}*/
};
CFraction.prototype.Get_InterfaceProps = function()
{
return new CMathMenuFraction(this);
};
CFraction.prototype.raw_SetFractionType = function(FractionType)
{
this.Pr.type = FractionType;
this.fillContent();
};
/**
*
* @param CMathMenuFraction
* @constructor
* @extends {CMathMenuBase}
*/
function CMathMenuFraction(Fraction)
{
CMathMenuFraction.superclass.constructor.call(this, Fraction);
this.Type = c_oAscMathInterfaceType.Fraction;
if (undefined !== Fraction)
{
this.FractionType = c_oAscMathInterfaceFraction.Bar;
switch (Fraction.Pr.type)
{
case BAR_FRACTION:
this.FractionType = c_oAscMathInterfaceFraction.Bar;
break;
case SKEWED_FRACTION:
this.FractionType = c_oAscMathInterfaceFraction.Skewed;
break;
case LINEAR_FRACTION:
this.FractionType = c_oAscMathInterfaceFraction.Linear;
break;
case NO_BAR_FRACTION:
this.FractionType = c_oAscMathInterfaceFraction.NoBar;
break;
}
}
else
{
this.FractionType = undefined;
}
}
Asc.extendClass(CMathMenuFraction, CMathMenuBase);
CMathMenuFraction.prototype.get_FractionType = function(){return this.FractionType;};
CMathMenuFraction.prototype.put_FractionType = function(Type){this.FractionType = Type;};
window["CMathMenuFraction"] = CMathMenuFraction;
CMathMenuFraction.prototype["get_FractionType"] = CMathMenuFraction.prototype.get_FractionType;
CMathMenuFraction.prototype["put_FractionType"] = CMathMenuFraction.prototype.put_FractionType;
/**
*
......
......@@ -85,7 +85,7 @@ CLimitPrimary.prototype.PreRecalc = function(Parent, ParaMath, ArgSize, RPI, Gap
this.FName.PreRecalc(this, ParaMath, ArgSize, RPI);
var ArgSzIter = ArgSize.Copy();
ArgSzIter.decrease();
ArgSzIter.Decrease();
var NewRPI = RPI.Copy();
NewRPI.bDecreasedComp = true;
......@@ -116,7 +116,7 @@ CLimitPrimary.prototype.recalculateSize = function(oMeasure)
if(this.Type == LIMIT_LOW)
ascent = SizeFName.ascent;
else if(this.Type == LIMIT_UP)
else
ascent = SizeIter.height + this.dH + SizeFName.ascent;
......@@ -126,6 +126,42 @@ CLimitPrimary.prototype.recalculateSize = function(oMeasure)
this.size.width = width;
this.size.ascent = ascent;
};
CLimitPrimary.prototype.setPosition = function(pos, PosInfo)
{
this.pos.x = pos.x;
this.pos.y = pos.y;
var maxW = this.FName.size.width > this.Iterator.size.width ? this.FName.size.width : this.Iterator.size.width;
var alignFNameX = (maxW - this.FName.size.width)/2;
var alignIterX = (maxW - this.Iterator.size.width)/2;
var FNamePos = new CMathPosition();
var IterPos = new CMathPosition();
if(this.Type == LIMIT_LOW)
{
FNamePos.x = this.pos.x + this.GapLeft + alignFNameX;
FNamePos.y = this.pos.y + this.FName.size.ascent;
IterPos.x = this.pos.x + this.GapLeft + alignIterX;
IterPos.y = this.pos.y + this.dH + this.FName.size.height;
}
else
{
IterPos.x = this.pos.x + this.GapLeft + alignIterX;
IterPos.y = this.pos.y + this.Iterator.size.ascent;
FNamePos.x = this.pos.x + this.GapLeft + alignFNameX;
FNamePos.y = this.pos.y + this.FName.size.ascent + this.dH + this.Iterator.size.height;
}
// такой порядок нужен для выравнивания Box по операторам
this.FName.setPosition(FNamePos, PosInfo);
this.Iterator.setPosition(IterPos, PosInfo);
pos.x += this.size.width;
};
/**
*
......@@ -205,7 +241,7 @@ CLimit.prototype.ApplyProperties = function(RPI)
this.RecalcInfo.bProps = false;
}*/
if(this.RecalcInfo.bProps == true || RPI.bChangeInline == true)
if(this.RecalcInfo.bProps == true || (RPI != undefined && RPI.bChangeInline == true))
{
this.setDimension(1, 1);
this.elements[0][0] = new CLimitPrimary(true, this.Pr.type, this.getFName(), this.getIterator());
......@@ -213,11 +249,81 @@ CLimit.prototype.ApplyProperties = function(RPI)
}
};
CLimit.prototype.Document_UpdateInterfaceState = function(MathProps)
CLimit.prototype.Apply_MenuProps = function(Props)
{
MathProps.Type = c_oAscMathInterfaceType.Limit;
MathProps.Pr = null;
if(Props.Type == c_oAscMathInterfaceType.Limit && Props.Pos !== undefined)
{
var Type = Props.Pos == c_oAscMathInterfaceLimitPos.Bottom ? LIMIT_LOW : LIMIT_UP;
if(this.Pr.type !== Type)
{
History.Add(this, new CChangesMathLimitType(Type, this.Pr.type));
this.raw_SetType(Type);
}
}
/*if(Type == c_oAscMathMenuTypes.LimitOver && this.Pr.type == LIMIT_LOW)
{
History.Add(this, new CChangesMathLimitType(LIMIT_UP, this.Pr.type));
this.raw_SetType(LIMIT_UP);
}
else if(Type == c_oAscMathMenuTypes.LimitUnder && this.Pr.type == LIMIT_UP)
{
History.Add(this, new CChangesMathLimitType(LIMIT_LOW, this.Pr.type));
this.raw_SetType(LIMIT_LOW);
}*/
};
CLimit.prototype.Get_InterfaceProps = function()
{
return new CMathMenuLimit(this);
};
CLimit.prototype.raw_SetType = function(Value)
{
if(this.Pr.type !== Value)
{
this.Pr.type = Value;
this.RecalcInfo.bProps = true;
this.ApplyProperties();
}
};
CLimit.prototype.Can_Delete = function()
{
return true;
};
CLimit.prototype.Is_SimpleDelete = function()
{
return true;
};
CLimit.prototype.Can_ModifyArgSize = function()
{
return this.CurPos == 1 && false === this.Is_SelectInside();
};
/**
*
* @param CMathMenuLimit
* @constructor
* @extends {CMathMenuBase}
*/
function CMathMenuLimit(Limit)
{
CMathMenuLimit.superclass.constructor.call(this);
this.Type = c_oAscMathInterfaceType.Limit;
if (undefined !== Limit.Pr)
this.Pos = (LIMIT_LOW === Limit.Pr.type) ? c_oAscMathInterfaceLimitPos.Bottom : c_oAscMathInterfaceLimitPos.Top;
else
this.Pos = undefined;
}
Asc.extendClass(CMathMenuLimit, CMathMenuBase);
CMathMenuLimit.prototype.get_Pos = function(){return this.Pos;};
CMathMenuLimit.prototype.put_Pos = function(Pos){this.Pos = Pos;};
window["CMathMenuLimit"] = CMathMenuLimit;
CMathMenuLimit.prototype["get_Pos"] = CMathMenuLimit.prototype.get_Pos;
CMathMenuLimit.prototype["put_Pos"] = CMathMenuLimit.prototype.put_Pos;
/**
*
......@@ -285,8 +391,3 @@ CMathFunc.prototype.fillContent = function()
this.elements[0][0] = this.getFName();
this.elements[0][1] = this.getArgument();
};
CMathFunc.prototype.Document_UpdateInterfaceState = function(MathProps)
{
MathProps.Type = c_oAscMathInterfaceType.Function;
MathProps.Pr = null;
};
This diff is collapsed.
......@@ -52,12 +52,6 @@ var NARY_TEXT_OPER = 13;
var NARY_UndOvr = 0;
var NARY_SubSup = 1;
var BOX_DIFF = 0;
var BOX_OpEmu = 1;
var BOX_ALIGN = 2;
var BOX_BREAK = 3;
var BOX_NOBREAK = 4;
////////////////////////////////////////////////////
// operators:
......@@ -164,13 +158,6 @@ var JC_CENTERGROUP = 1;
var JC_LEFT = 2;
var JC_RIGHT = 3;
var MATH_TEXT = 0;
var MATH_RUN_PRP = 1;
var MATH_COMP = 2;
var MATH_EMPTY = 3;
var MATH_PLACEHOLDER = 4;
var MATH_PARA_RUN = 5;
var LOCATION_TOP = 0;
var LOCATION_BOT = 1;
var LOCATION_LEFT = 2;
......@@ -211,3 +198,81 @@ var MATH_UPDWRAP_UNDERFLOW = 2;
var MATH_SIZE = 0;
var MATH_BOUNDS_MEASURES = 1;
var MATH_MATRIX_ROW = 0;
var MATH_MATRIX_COLUMN = 1;
var c_oAscMathMenuTypes =
{
FractionBar: 0x001,
FractionSkewed: 0x002,
FractionLinear: 0x003,
FractionNoBar: 0x004,
RadicalHideDegree: 0x005,
NaryLimLoc: 0x006,
NaryHideUpperIterator: 0x007,
NaryHideLowerIterator: 0x008,
DelimiterHideBegOper: 0x009,
DelimiterHideEndOper: 0x00A,
DelimiterAddToLeft: 0x00B,
DelimiterAddToRight: 0x00C,
DelimiterRemoveContent: 0x00D,
DelimiterGrow: 0x00E,
DelimiterShpCentred: 0x00F,
GroupCharOver: 0x010,
GroupCharUnder: 0x011,
LimitOver: 0x012,
LimitUnder: 0x013,
BorderBoxHideTop: 0x014,
BorderBoxHideBot: 0x015,
BorderBoxHideLeft: 0x016,
BorderBoxHideRight: 0x017,
BorderBoxStrikeHor: 0x018,
BorderBoxStrikeVer: 0x019,
BorderBoxStrikeTopLTR: 0x020,
BorderBoxStrikeTopRTL: 0x021,
MatrixAddRowUnder: 0x022,
MatrixAddRowOver: 0x023,
MatrixRemoveRow: 0x024,
MatrixAddColumnToLeft: 0x025,
MatrixAddColumnToRight: 0x026,
MatrixRemoveColumn: 0x027,
MatrixBaseJcCenter: 0x028,
MatrixBaseJcTop: 0x029,
MatrixBaseJcBottom: 0x030,
MatrixColumnJcCenter: 0x031,
MatrixColumnJcLeft: 0x032,
MatrixColumnJcRight: 0x033,
MatrixRowSingleGap: 0x034,
MatrixRowOneAndHalfGap: 0x035,
MatrixRowDoubleGap: 0x036,
MatrixRowExactlyGap: 0x037,
MatrixRowMultipleGap: 0x038,
MatrixColumnSingleGap: 0x039,
MatrixColumnOneAndHalfGap: 0x040,
MatrixColumnDoubleGap: 0x041,
MatrixColumnExactlyGap: 0x042,
MatrixColumnMultipleGap: 0x043,
MatrixHidePlaceholders: 0x044,
MatrixMinColumnWidth: 0x045,
EqArrayAddRowUnder: 0x046,
EqArrayAddRowOver: 0x047,
EqArrayRemoveRow: 0x048,
EqArrayBaseJcCenter: 0x049,
EqArrayBaseJcTop: 0x050,
EqArrayBaseJcBottom: 0x051,
EqArrayRowSingleGap: 0x052,
EqArrayRowOneAndHalfGap: 0x053,
EqArrayRowDoubleGap: 0x054,
EqArrayRowExactlyGap: 0x055,
EqArrayRowMultipleGap: 0x056,
BarLineOver: 0x057,
BarLineUnder: 0x058,
DeleteElement: 0x059,
DeleteSubScript: 0x060,
DeleteSuperScript: 0x061,
IncreaseArgSize: 0x062,
DecreaseArgSize: 0x063,
AddForcedBreak: 0x064,
DeleteForcedBreak: 0x065
};
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
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