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

Merged revision(s) 68465-68562 from...

Merged revision(s) 68465-68562 from AVS/Sources/TeamlabOffice/branches/TeamlabOffice_v3.7_Math_ForcedBreak

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@68568 954022d7-b5bf-4e40-9824-e11837661b57
parent fdfdac4e
......@@ -555,49 +555,59 @@ MathMenu.prototype =
}
};
function CMathParametersWidth()
function CMathLineState()
{
this.Measure = 0;
this.bMathWordLarge = false;
this.StyleLine = MATH_LINE_WRAP;
this.Width = 0;
this.SpaceAlign = 0;
this.MaxWidth = 0;
this.WrapState = ALIGN_EMPTY;
}
function CMathLineInfo()
{
this.StyleLine = MATH_LINE_WRAP;
this.Measure = 0;
this.SpaceAlign = 0;
this.bWordLarge = false;
}
CMathLineInfo.prototype.Get_GeneralWidth = function()
{
return this.Measure + this.SpaceAlign;
};
function CParaMathLineWidths()
function CParaMathLineParameters(FirstLineNumber)
{
this.FirstLineOnPage = -1;
this.FirstLineNumber = FirstLineNumber;
this.WrapState = ALIGN_EMPTY;
this.Widths = [];
this.LineParameters = [];
this.MaxW = 0; // without first line
this.MaxW = 0;
this.bWordLarge = false;
this.bMathWordLarge = false;
this.NeedUpdateWrap = true;
}
CParaMathLineWidths.prototype.UpdateWidth = function(Line, W)
CParaMathLineParameters.prototype.Update_Width = function(Line, W)
{
var bUpdMaxWidth = false;
var NumLine = this.private_GetNumberLine(Line);
if(Line >= this.Widths.length)
if(Math.abs(this.LineParameters[NumLine].Measure - W) > 0.00001)
{
this.Widths[Line] = new CMathParametersWidth();
this.Widths[Line].Measure = W;
bUpdMaxWidth = this.UpdateMinMax(Line);
}
else if(Math.abs(this.Widths[Line].Measure - W) > 0.00001)
{
var lng = this.Widths.length;
var Max = this.MaxW;
var CountLines = this.LineParameters.length;
this.Widths[Line].Measure = W;
this.LineParameters[NumLine].Measure = W;
if(lng > 0)
this.MaxW = this.LineParameters[0].Get_GeneralWidth();
for(var Pos = 1; Pos < CountLines; Pos++)
{
this.MaxW = this.Widths[0].Measure;
var GeneralWidth = this.LineParameters[Pos].Get_GeneralWidth();
for(var i = 1; i < lng; i++)
{
this.UpdateMinMax(i);
}
if(this.MaxW < GeneralWidth)
this.MaxW = GeneralWidth;
}
bUpdMaxWidth = Math.abs(Max - this.MaxW) > 0.0001;
......@@ -605,84 +615,109 @@ CParaMathLineWidths.prototype.UpdateWidth = function(Line, W)
return bUpdMaxWidth;
};
CParaMathLineWidths.prototype.SetWordLarge = function(Line, bWordLarge)
CParaMathLineParameters.prototype.Set_WordLarge = function(Line, bWordLarge)
{
if(Line >= this.Widths.length)
{
this.Widths[Line] = new CMathParametersWidth();
this.Widths[Line].bMathWordLarge = bWordLarge;
var NumLine = this.private_GetNumberLine(Line);
if(this.WrapState !== ALIGN_EMPTY)
bWordLarge = false;
if(bWordLarge)
this.bWordLarge = true;
if(bWordLarge)
{
this.bMathWordLarge = true;
this.LineParameters[NumLine].bWordLarge = true;
}
else
{
if(this.Widths[Line].bMathWordLarge !== bWordLarge)
{
this.Widths[Line].bMathWordLarge = bWordLarge;
this.bMathWordLarge = false;
var Lng = this.Widths.length;
var CountLines = this.LineParameters.length;
this.bWordLarge = false;
for(var Pos = 0; Pos < Lng; Pos++)
for(var Pos = 0; Pos < CountLines; Pos++)
{
if(this.LineParameters[Pos].bWordLarge == true)
{
if(this.Widths[Pos].bMathWordLarge == true)
{
this.bWordLarge = true;
break;
}
this.bMathWordLarge = true;
break;
}
}
this.LineParameters[NumLine].bWordLarge = false;
}
};
CParaMathLineWidths.prototype.IsLarge = function()
CParaMathLineParameters.prototype.Add_Line = function(Line, bStartLine, bStartPage, AlignAt)
{
return this.bWordLarge;
var bInsideBounds = true;
var NumLine = this.private_GetNumberLine(Line);
if(NumLine >= this.LineParameters.length)
{
this.LineParameters[NumLine] = new CMathLineInfo();
if(bStartLine)
{
this.LineParameters[NumLine].StyleLine = MATH_LINE_START;
}
else if(AlignAt !== undefined && AlignAt !== null)
{
this.LineParameters[NumLine].StyleLine = MATH_LINE_ALiGN_AT;
this.LineParameters[NumLine].SpaceAlign = AlignAt;
}
else
{
var MathSettings = Get_WordDocumentDefaultMathSettings();
this.LineParameters[NumLine].StyleLine = MATH_LINE_WRAP;
this.LineParameters[NumLine].SpaceAlign = bStartPage == true ? MathSettings.Get_WrapIndent(this.WrapState) : 0;
}
bInsideBounds = false;
}
return bInsideBounds;
};
CParaMathLineWidths.prototype.Get = function(Line)
CParaMathLineParameters.prototype.Is_Large = function()
{
return this.private_GetW(Line);
return this.bMathWordLarge;
};
CParaMathLineWidths.prototype.GetFirst = function()
CParaMathLineParameters.prototype.Get_MaxWidth = function()
{
return this.private_GetW(0);
return this.MaxW;
};
CParaMathLineWidths.prototype.GetMax = function()
CParaMathLineParameters.prototype.private_GetNumberLine = function(NumLine)
{
return this.MaxW;
return NumLine - this.FirstLineNumber;
};
CParaMathLineWidths.prototype.UpdateMinMax = function(Pos)
CParaMathLineParameters.prototype.Get_LineState = function(Line)
{
var bUpdMaxWidth = false;
var NumLine = this.private_GetNumberLine(Line);
var ItemW = this.Widths[Pos].Measure;
var LineInfo = this.LineParameters[NumLine];
if(this.MaxW < ItemW)
{
this.MaxW = ItemW;
bUpdMaxWidth = true;
}
var LineState = new CMathLineState();
LineState.StyleLine = LineInfo.StyleLine;
LineState.Width = LineInfo.Measure;
LineState.SpaceAlign = this.Get_SpaceAlign(Line);
LineState.MaxWidth = this.MaxW;
LineState.WrapState = this.WrapState;
return bUpdMaxWidth;
return LineState;
};
CParaMathLineWidths.prototype.private_GetW = function(Line)
CParaMathLineParameters.prototype.Get_SpaceAlign = function(Line)
{
var W;
var NumLine = this.private_GetNumberLine(Line);
if(Line < this.Widths.length)
W = this.Widths[Line].Measure;
var SpaceAlign = 0;
return W;
};
CParaMathLineWidths.prototype.GetCountLines = function()
{
return this.Widths.length;
};
CParaMathLineWidths.prototype.GetNumberLine = function(Line)
{
return Line - this.FirstLineOnPage;
if(this.bMathWordLarge == false && (this.WrapState == ALIGN_MARGIN_WRAP || this.WrapState == ALIGN_WRAP))
SpaceAlign = this.LineParameters[NumLine].SpaceAlign;
return SpaceAlign;
};
function CMathPageInfo()
{
this.WPages = []; // widths on page
......@@ -698,7 +733,6 @@ CMathPageInfo.prototype.Reset = function()
this.CurPage = -1;
this.RelativePage = -1;
this.WPages.length = 0;
};
CMathPageInfo.prototype.Reset_Page = function(_Page)
{
......@@ -715,7 +749,7 @@ CMathPageInfo.prototype.Reset_Page = function(_Page)
}
}
};
CMathPageInfo.prototype.SetStartPos = function(Page, StartLine)
CMathPageInfo.prototype.Set_StartPos = function(Page, StartLine)
{
this.StartPage = Page;
this.StartLine = StartLine;
......@@ -724,7 +758,7 @@ CMathPageInfo.prototype.Update_RelativePage = function(RelativePage)
{
this.RelativePage = RelativePage;
};
CMathPageInfo.prototype.UpdateCurrentPage = function(Page, ParaLine)
CMathPageInfo.prototype.Update_CurrentPage = function(Page, ParaLine)
{
this.CurPage = Page - this.StartPage;
......@@ -732,12 +766,10 @@ CMathPageInfo.prototype.UpdateCurrentPage = function(Page, ParaLine)
if(this.CurPage >= Lng)
{
var FirstLineOnPage = ParaLine - this.StartLine;
this.WPages[this.CurPage] = new CParaMathLineWidths();
this.WPages[this.CurPage].FirstLineOnPage = FirstLineOnPage;
this.WPages[this.CurPage] = new CParaMathLineParameters(FirstLineOnPage);
}
};
CMathPageInfo.prototype.UpdateCurrentWrap = function(DispDef, bInline)
CMathPageInfo.prototype.Update_CurrentWrap = function(DispDef, bInline)
{
if(this.WPages[this.CurPage].NeedUpdateWrap == true)
{
......@@ -754,91 +786,52 @@ CMathPageInfo.prototype.UpdateCurrentWrap = function(DispDef, bInline)
this.WPages[this.CurPage].NeedUpdateWrap = false;
}
};
CMathPageInfo.prototype.SetNeedUpdateWrap = function()
CMathPageInfo.prototype.Set_NeedUpdateWrap = function()
{
this.WPages[this.CurPage].NeedUpdateWrap = true;
};
CMathPageInfo.prototype.SetCurrentWrapState = function(WrapState)
CMathPageInfo.prototype.Set_CurrentWrapState = function(WrapState)
{
this.WPages[this.CurPage].WrapState = WrapState;
};
CMathPageInfo.prototype.SetNextWrapState = function()
CMathPageInfo.prototype.Set_NextWrapState = function()
{
var InfoPage = this.WPages[this.CurPage];
if(InfoPage.WrapState !== ALIGN_EMPTY)
InfoPage.WrapState++;
};
CMathPageInfo.prototype.SetStateWordLarge = function(_Line, bWordLarge)
CMathPageInfo.prototype.Set_StateWordLarge = function(_Line, bWordLarge)
{
var Line = this.WPages[this.CurPage].GetNumberLine(_Line - this.StartLine);
this.WPages[this.CurPage].SetWordLarge(Line, bWordLarge);
this.WPages[this.CurPage].Set_WordLarge(_Line - this.StartLine, bWordLarge);
};
CMathPageInfo.prototype.GetCurrentWrapState = function()
CMathPageInfo.prototype.Get_CurrentWrapState = function()
{
return this.WPages[this.CurPage].WrapState;
};
CMathPageInfo.prototype.GetWrapStateOnPage = function(_Page)
{
var Page = _Page - this.StartPage;
return this.WPages[Page].WrapState;
};
CMathPageInfo.prototype.GetCurrentStateWordLarge = function()
{
return this.WPages[this.CurPage].IsLarge();
};
CMathPageInfo.prototype.GetStartLinetWidth = function()
{
return this.WPages[0].GetFirst();
};
CMathPageInfo.prototype.UpdateCurrentWidth = function(_Line, Width)
CMathPageInfo.prototype.Get_CurrentStateWordLarge = function()
{
var Line = this.WPages[this.CurPage].GetNumberLine(_Line - this.StartLine);
return this.WPages[this.CurPage].UpdateWidth(Line, Width);
return this.WPages[this.CurPage].Is_Large();
};
CMathPageInfo.prototype.GetCurrentMaxWidthAllLines = function()
CMathPageInfo.prototype.Update_CurrentWidth = function(_Line, Width)
{
var MaxW = 0;
if(this.CurPage !== 0)
{
MaxW = this.WPages[this.CurPage].GetMax();
}
else
{
var MaxWOFirst = this.WPages[this.CurPage].GetMax(),
FirstW = this.WPages[this.CurPage].GetFirst();
var MathSettings = Get_WordDocumentDefaultMathSettings(),
WrapState = this.GetCurrentWrapState();
var wrapIndent = MathSettings.Get_WrapIndent(WrapState);
MaxW = FirstW > wrapIndent + MaxWOFirst ? FirstW: MaxWOFirst + wrapIndent;
}
return MaxW;
return this.WPages[this.CurPage].Update_Width(_Line - this.StartLine, Width);
};
CMathPageInfo.prototype.GetMaxW = function(_Page) // without first page
CMathPageInfo.prototype.Get_MaxWidthOnCurrentPage = function()
{
var Page = _Page - this.StartPage;
return this.WPages[Page].GetMax();
return this.WPages[this.CurPage].Get_MaxWidth();
};
CMathPageInfo.prototype.GetFirstLineOnPage = function(_Page)
CMathPageInfo.prototype.Get_FirstLineOnPage = function(_Page)
{
var FirstLine = null;
var FirstLineOnPage = null;
var Page = _Page - this.StartPage;
if(Page >= 0 && Page < this.WPages.length)
{
var FirstLineOnPage = this.WPages[Page].FirstLineOnPage;
FirstLine = this.StartLine + FirstLineOnPage;
}
FirstLineOnPage = this.StartLine + this.WPages[Page].FirstLineNumber;
return FirstLine;
return FirstLineOnPage;
};
CMathPageInfo.prototype.IsResetNextPage = function(_Page)
CMathPageInfo.prototype.Is_ResetNextPage = function(_Page)
{
var bReset = true;
......@@ -854,11 +847,11 @@ CMathPageInfo.prototype.IsResetNextPage = function(_Page)
return bReset;
};
CMathPageInfo.prototype.IsResetRelativePage = function(_RelativePage)
CMathPageInfo.prototype.Is_ResetRelativePage = function(_RelativePage)
{
return this.CurPage == -1 ? false : _RelativePage !== this.RelativePage;
};
CMathPageInfo.prototype.IsFirstLineOnPage = function(_Line, _Page)
CMathPageInfo.prototype.Is_FirstLineOnPage = function(_Line, _Page)
{
var bFirstLine = true;
......@@ -867,15 +860,37 @@ CMathPageInfo.prototype.IsFirstLineOnPage = function(_Line, _Page)
var Page = _Page - this.StartPage;
if(Page < this.WPages.length) // если нет, то только начали расчет страницы
{
var FirstLine = this.GetFirstLineOnPage(_Page);
bFirstLine = _Line == FirstLine;
}
bFirstLine = _Line == this.Get_FirstLineOnPage(_Page);
}
return bFirstLine;
};
CMathPageInfo.prototype.Get_LineState = function(_Line, _Page)
{
var Page = _Page - this.StartPage;
return this.WPages[Page].Get_LineState(_Line - this.StartLine);
};
// создаем новый объект с параметрами, необходимые для рассчета линий в ф-ии ParaMath.private_UpdateXLimits
// именно в этой функции нужно получить смещения линий (Wrap, Align)
// это происходит до принятия ширины контента для текущей линии (функция Update_CurrentWidth) и до получения флага WordLarge (функция Set_StateWordLarge)
CMathPageInfo.prototype.Add_Line = function(_Line, _Page, AlignAt)
{
var Page = _Page - this.StartPage,
Line = _Line - this.StartLine,
bStartLine = _Line == this.StartLine,
bStartPage = _Page == this.StartPage;
this.WPages[Page].Add_Line(Line, bStartLine, bStartPage, AlignAt);
};
CMathPageInfo.prototype.Get_SpaceAlign = function(_Line, _Page)
{
var Page = _Page - this.StartPage,
Line = _Line - this.StartLine;
return this.WPages[Page].Get_SpaceAlign(Line);
};
/**
......@@ -1129,11 +1144,6 @@ ParaMath.prototype.Get_AlignToLine = function(_CurLine, _CurRange, _Page, _X, _X
var MathSettings = Get_WordDocumentDefaultMathSettings();
var Page = this.Paragraph == null ? 0 : this.Paragraph.Get_AbsolutePage(_Page);
var WrapState = this.PageInfo.GetWrapStateOnPage(Page);
var bFirstLine = this.Root.IsStartLine(_CurLine);
// выставим сначала Position до пересчета выравнивания для формулы
// для расчета смещений относительно операторов
......@@ -1164,57 +1174,41 @@ ParaMath.prototype.Get_AlignToLine = function(_CurLine, _CurRange, _Page, _X, _X
XEnd = _XLimit;
}
var LineState = this.PageInfo.Get_LineState(_CurLine, _Page);
var StyleLine = LineState.StyleLine,
WidthLine = LineState.Width,
MaxWidth = LineState.MaxWidth,
WrapLine = LineState.SpaceAlign,
WrapState = LineState.WrapState;
XStart += MathSettings.Get_LeftMargin(WrapState);
XEnd -= MathSettings.Get_RightMargin(WrapState);
var Jc = this.Get_Align();
var W = this.PageInfo.GetMaxW(Page);
var alignBrk = this.Root.Get_AlignBrk(_CurLine, _CurRange);
var DispLng = this.DispositionOpers.length;
var bAlignAt = WrapState === ALIGN_MARGIN_WRAP && DispLng > 0 && bFirstLine === false && alignBrk > 0;
if(bFirstLine == true || bAlignAt == true) // первая строка первой страницы, если строка разбивается на несколько отрезков, то это уже будет inline-формула => ф-ия Get_AlignToLine не будет вызвана
{ // bAlignAt == true - учтем выравниевание первой строки + прибавим смещение для alnAt
var StartLineWidth = this.PageInfo.GetStartLinetWidth(); // если страница не первая, то ширину первой строки формулы не учитываем
if(StyleLine == MATH_LINE_START || StyleLine == MATH_LINE_ALiGN_AT) // первая строка первой страницы, если строка разбивается на несколько отрезков, то это уже будет inline-формула => ф-ия Get_AlignToLine не будет вызвана
{ // либо строка выровнена относительно первой строки
switch(Jc)
{
case align_Left: X = XStart; break;
case align_Right: X = Math.max(XEnd - StartLineWidth, XStart); break;
case align_Center: X = Math.max(XStart + (XEnd - XStart - StartLineWidth)/2, XStart); break;
case align_Left: X = XStart + WrapLine; break;
case align_Right: X = Math.max(XEnd - WidthLine + WrapLine, XStart); break;
case align_Center: X = Math.max(XStart + (XEnd - XStart - WidthLine)/2 + WrapLine, XStart); break;
case align_Justify:
{
X = Math.max(XStart + (XEnd - XStart - W)/2, XStart);
X = Math.max(XStart + (XEnd - XStart - MaxWidth)/2 + WrapLine , XStart);
break;
}
}
if(bAlignAt == true)
{
var PosAln = alignBrk < DispLng ? alignBrk -1 : DispLng - 1;
X += this.DispositionOpers[PosAln];
}
}
else
{
var wrap = 0;
var wrapIndent = MathSettings.Get_WrapIndent(WrapState);
if(true == MathSettings.IsWrap(WrapState))
{
wrap = this.Root.Get_WrapToLine(_CurLine, _CurRange, wrapIndent);
}
if(Jc == align_Justify)
{
X = XEnd - XStart > W ? XStart + (XEnd - XStart - W)/2 + wrap : XStart;
X = XEnd - XStart > MaxWidth ? XStart + (XEnd - XStart - MaxWidth)/2 + WrapLine : XStart;
}
else
{
X = XEnd - XStart > W ? XStart + wrap : XStart;
X = XEnd - XStart > MaxWidth ? XStart + WrapLine : XStart;
}
}
......@@ -1649,41 +1643,38 @@ ParaMath.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
// информация о пересчете
var RPI = new CRPI();
RPI.MergeMathInfo(this.ParaMathRPI);
var ArgSize = new CMathArgSize();
this.Root.PreRecalc(null, this, ArgSize, RPI);
this.Root.PreRecalc(null, this, new CMathArgSize(), RPI);
this.PageInfo.Reset();
this.PageInfo.SetStartPos(Page, ParaLine);
this.PageInfo.Set_StartPos(Page, ParaLine);
this.PageInfo.Update_RelativePage(RelativePage);
this.ParaMathRPI.Reset(PRS, ParaPr);
}
else
{
// true == this.PageInfo.IsResetNextPage(Page)
// true == this.PageInfo.Is_ResetNextPage(Page)
/// при переходе на следующую страницу выставляем стартовые параметры для отрезка, в к-ом пересчитываем
// может произойти в одной из 2-х ситуаций:
// 1. первый раз пересчитываем формулу => для PageInfo ширины и др . параметры еще не рассчитали
// 2. произошли изменения на пред страницах, их пересчитали, перешли к следующей => для PageInfo нужно выставить дефолтные настройки для параметров и обнулить массив ширин
// параметры для ParaMathRPI выставляем дефолтные в любом из этих двух случаев
// false == this.PageInfo.IsResetNextPage(Page) && true == this.PageInfo.IsFirstLineOnPage(Line, Page)
// false == this.PageInfo.Is_ResetNextPage(Page) && true == this.PageInfo.Is_FirstLineOnPage(Line, Page)
// т.е. рассчитываем текущую страницу с первой строки
// может произойти, если вновь стали (PrevLineObject !== null) пересчитывать формулу на данной странице (из-за того что изменилась макс ширина и нужно заново пересчитать формулу на странице и т.п.)
// или же произошли какие-то изменения на странице и вызвался пересчет для этой страницы (PrevLineObject == null) и отсутствует быстрый пересчет (PRS.bFastRecalculate == false)
var bResetNextPage = true == this.PageInfo.IsResetNextPage(Page);
var bResetPageInfo = PrevLineObject == null && bContinueRecalc == false && PRS.bFastRecalculate == false && true == this.PageInfo.IsFirstLineOnPage(ParaLine, Page);
var bResetNextPage = true == this.PageInfo.Is_ResetNextPage(Page);
var bResetPageInfo = PrevLineObject == null && bContinueRecalc == false && PRS.bFastRecalculate == false && true == this.PageInfo.Is_FirstLineOnPage(ParaLine, Page);
if(bResetNextPage == true || bResetPageInfo == true)
{
this.ParaMathRPI.Reset(PRS, ParaPr);
this.PageInfo.Reset_Page(Page);
}
if(true == this.PageInfo.IsResetRelativePage(PRS.Page))
if(true == this.PageInfo.Is_ResetRelativePage(PRS.Page))
{
this.ParaMathRPI.Reset(PRS, ParaPr);
this.PageInfo.Update_RelativePage(RelativePage);
......@@ -1722,7 +1713,7 @@ ParaMath.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
this.Root.Set_Paragraph(Para);
this.Root.Set_ParaMath(this, null);
this.PageInfo.UpdateCurrentPage(Page, ParaLine);
this.PageInfo.Update_CurrentPage(Page, ParaLine);
var bRecalcNormal = true;
......@@ -1758,7 +1749,7 @@ ParaMath.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
bInline = this.Is_Inline(); // учитываем, если формула внутристроковая или же разбивается плавающим объектом (в этом случае тоже нужно рассчитывать как инлайновую)
//здесь обновляем WrapState, исходя из этого параметра будем считать WrapIndent
this.PageInfo.UpdateCurrentWrap(DispDef, bInline);
this.PageInfo.Update_CurrentWrap(DispDef, bInline);
// формулы не инлайновая, есть Ranges пересчитываем формулу в макс Range => private_RecalculateRangeInsideInterval
......@@ -2002,16 +1993,16 @@ ParaMath.prototype.private_RecalculateRangeWrap = function(PRS, ParaPr, Depth)
this.private_RecalculateRoot(PRS, ParaPr, Depth);
var WrapState = this.PageInfo.GetCurrentWrapState();
var bWordLarge = PRS.bMathWordLarge == true && WrapState == ALIGN_EMPTY;
this.PageInfo.SetStateWordLarge(PRS.Line, bWordLarge);
var WrapState = this.PageInfo.Get_CurrentWrapState();
this.PageInfo.Set_StateWordLarge(PRS.Line, PRS.bMathWordLarge);
if(PRS.bMathWordLarge == true)
{
if(WrapState !== ALIGN_EMPTY)
{
this.private_SetRestartRecalcInfo(PRS);
this.PageInfo.SetNextWrapState();
this.PageInfo.Set_NextWrapState();
}
else if(this.ParaMathRPI.bInline == true && PRS.Ranges.length > 0)
{
......@@ -2065,7 +2056,7 @@ ParaMath.prototype.private_RecalculateRoot = function(PRS, ParaPr, Depth)
ParaMath.prototype.private_SetRestartRecalcInfo = function(PRS)
{
var Page = this.Paragraph == null ? 0 : this.Paragraph.Get_AbsolutePage(PRS.Page);
var Line = this.PageInfo.GetFirstLineOnPage(Page);
var Line = this.PageInfo.Get_FirstLineOnPage(Page);
PRS.Set_RestartPageRecalcInfo(Line, this);
PRS.RecalcResult = recalcresult_PrevLine;
PRS.NewRange = true;
......@@ -2093,7 +2084,7 @@ ParaMath.prototype.private_UpdateRangeY = function(PRS, RY)
};
ParaMath.prototype.private_SetShiftY = function(PRS, RY)
{
this.PageInfo.SetNeedUpdateWrap();
this.PageInfo.Set_NeedUpdateWrap();
this.ParaMathRPI.UpdateShiftY(RY);
this.ParaMathRPI.Reset_WrapSettings();
this.private_SetRestartRecalcInfo(PRS);
......@@ -2102,7 +2093,7 @@ ParaMath.prototype.private_UpdateXLimits = function(PRS)
{
var MathSettings = Get_WordDocumentDefaultMathSettings();
var WrapState = this.PageInfo.GetCurrentWrapState();
var WrapState = this.PageInfo.Get_CurrentWrapState();
PRS.X += MathSettings.Get_LeftMargin(WrapState);
PRS.XEnd -= MathSettings.Get_RightMargin(WrapState);
......@@ -2110,14 +2101,33 @@ ParaMath.prototype.private_UpdateXLimits = function(PRS)
PRS.WrapIndent = MathSettings.Get_WrapIndent(WrapState);
var bFirstLine = this.Root.IsStartLine(PRS.Line);
PRS.bFirstLine = bFirstLine;
PRS.bFirstLine = this.Root.IsStartLine(PRS.Line);
if(bFirstLine == false && true == MathSettings.IsWrap(WrapState))
var AlignAt;
var Jc = this.Get_Align();
if(Jc == align_Left || Jc == align_Justify)
{
PRS.X += this.Root.Get_WrapToLine(PRS.Line, PRS.Range, PRS.WrapIndent);
var alignBrk = this.Root.Get_AlignBrk(PRS.Line, this.Is_BrkBinBefore());
if(alignBrk !== null)
{
if(alignBrk == 0)
{
AlignAt = 0;
}
else
{
var PosAln = alignBrk < this.DispositionOpers.length ? alignBrk - 1 : this.DispositionOpers.length - 1;
AlignAt = this.DispositionOpers[PosAln];
}
}
}
this.PageInfo.Add_Line(PRS.Line, PRS.Page, AlignAt);
PRS.X += this.PageInfo.Get_SpaceAlign(PRS.Line, PRS.Page);
PRS.XRange = PRS.X;
};
ParaMath.prototype.Save_MathInfo = function(Copy)
......@@ -2200,20 +2210,15 @@ ParaMath.prototype.UpdateWidthLine = function(PRS, Width)
if(PrevRecalcObject == null || PrevRecalcObject == this)
{
var MathSettings = Get_WordDocumentDefaultMathSettings(),
Page = this.Paragraph == null ? 0 : this.Paragraph.Get_AbsolutePage(PRS.Page);
var W = Width - PRS.OperGapRight - PRS.OperGapLeft;
var WrapState = this.PageInfo.GetWrapStateOnPage(Page), // если впоследствии State будет изменен, то пересчитаем с первой строки текущей страницы
WrapIndent = MathSettings.Get_WrapIndent(WrapState);
var wrap = PRS.Page == 0 ? this.Root.Get_WrapToLine(PRS.Line, PRS.Range, WrapIndent) : 0;
var W = Width - PRS.OperGapRight - PRS.OperGapLeft + wrap;
var bChangeMaxW = this.PageInfo.UpdateCurrentWidth(PRS.Line, W);
var bChangeMaxW = this.PageInfo.Update_CurrentWidth(PRS.Line, W);
if(bChangeMaxW == true && this.Is_Inline() == false && align_Justify == this.Get_Align())
{
var Line = this.PageInfo.GetFirstLineOnPage(Page);
var Page = this.Paragraph == null ? 0 : this.Paragraph.Get_AbsolutePage(PRS.Page);
var Line = this.PageInfo.Get_FirstLineOnPage(Page);
PRS.Set_RestartPageRecalcInfo(Line, this);
PRS.RecalcResult = recalcresult_PrevLine;
PRS.NewRange = true;
......@@ -2312,9 +2317,8 @@ ParaMath.prototype.Recalculate_MinMaxContentWidth = function(MinMax)
{
var RPI = new CRPI();
RPI.MergeMathInfo(this.ParaMathRPI);
var ArgSize = new CMathArgSize();
this.Root.PreRecalc(null, this, ArgSize, RPI);
this.Root.PreRecalc(null, this, new CMathArgSize(), RPI);
this.Root.Recalculate_MinMaxContentWidth(MinMax);
};
......@@ -3335,9 +3339,9 @@ ParaMath.prototype.Handle_Tab = function(isForward)
{
if(this.ParaMathRPI.bInline == false)
{
var ParaPos = this.Get_CurrentParaPos();
var CountOperators = this.DispositionOpers.length;
this.Root.Displace_BreakOperator(ParaPos.Line, ParaPos.Range, isForward, CountOperators);
var bBrkBefore = this.Is_BrkBinBefore();
this.Root.Displace_BreakOperator(isForward, bBrkBefore, CountOperators);
}
};
......@@ -5821,15 +5825,15 @@ CMathRecalculateObject.prototype.Fill = function(StructRecalc)
var PageInfo = StructRecalc.PageInfo;
this.WrapState = PageInfo.GetCurrentWrapState();
this.MaxW = PageInfo.GetCurrentMaxWidthAllLines();
this.bWordLarge = PageInfo.GetCurrentStateWordLarge();
this.WrapState = PageInfo.Get_CurrentWrapState();
this.MaxW = PageInfo.Get_MaxWidthOnCurrentPage();
this.bWordLarge = PageInfo.Get_CurrentStateWordLarge();
this.bEmptyFirstRange = StructRecalc.bEmptyFirstRange;
};
CMathRecalculateObject.prototype.Load_MathInfo = function(PageInfo)
{
PageInfo.SetCurrentWrapState(this.WrapState);
PageInfo.Set_CurrentWrapState(this.WrapState);
// текущая MaxW и MaxW в PageInfo это не одно и то же
//PageInfo.SetCurrentMaxWidth(this.MaxW);
......@@ -5841,18 +5845,18 @@ CMathRecalculateObject.prototype.Compare = function(PageInfo)
if(this.bFastRecalculate == false)
result = false;
if(this.WrapState !== PageInfo.GetCurrentWrapState())
if(this.WrapState !== PageInfo.Get_CurrentWrapState())
result = false;
if(this.bEmptyFirstRange !== PageInfo.bEmptyFirstRange)
result = false;
var DiffMaxW = this.MaxW - PageInfo.GetCurrentMaxWidthAllLines();
var DiffMaxW = this.MaxW - PageInfo.Get_MaxWidthOnCurrentPage();
if(DiffMaxW < 0)
DiffMaxW = -DiffMaxW;
var LargeComposition = this.bWordLarge == true && true == PageInfo.GetCurrentStateWordLarge();
var LargeComposition = this.bWordLarge == true && true == PageInfo.Get_CurrentStateWordLarge();
if(LargeComposition == false && this.bInline == false && this.Align == align_Justify && DiffMaxW > 0.001)
result = false;
......
......@@ -10275,15 +10275,38 @@ ParaRun.prototype.IsForcedBreak = function()
};
ParaRun.prototype.Is_StartForcedBreakOperator = function()
{
return true == this.IsForcedBreak() && true == this.Is_StartBreakOperator();
var bStartOperator = this.Content.length > 0 && this.Content[0].Type == para_Math_BreakOperator;
return true == this.IsForcedBreak() && true == bStartOperator;
};
ParaRun.prototype.Is_StartBreakOperator = function()
ParaRun.prototype.Get_AlignBrk = function(_CurLine, bBrkBefore)
{
return this.Content.length > 0 && this.Content[0].Type == para_Math_BreakOperator;
};
ParaRun.prototype.Get_AlignBrk = function()
{
return true == this.Is_StartForcedBreakOperator() ? this.MathPrp.Get_AlignBrk() : 0;
// null - break отсутствует
// 0 - break присутствует, alnAt = undefined
// Number = break присутствует, alnAt = Number
// если оператор находится в конце строки и по этому оператору осушествляется принудительный перенос (Forced)
// тогда StartPos = 0, EndPos = 1 (для предыдущей строки), т.к. оператор с принудительным переносом всегда должен находится в начале Run
var CurLine = _CurLine - this.StartLine;
var AlnAt = null;
if(CurLine > 0)
{
var RangesCount = this.protected_GetRangesCount(CurLine - 1);
var StartPos = this.protected_GetRangeStartPos(CurLine - 1, RangesCount - 1);
var EndPos = this.protected_GetRangeEndPos(CurLine - 1, RangesCount - 1);
var bStartBreakOperator = bBrkBefore == true && StartPos == 0 && EndPos == 0;
var bEndBreakOperator = bBrkBefore == false && StartPos == 0 && EndPos == 1;
if(bStartBreakOperator || bEndBreakOperator)
{
AlnAt = false == this.Is_StartForcedBreakOperator() ? null : this.MathPrp.Get_AlignBrk();
}
}
return AlnAt;
};
ParaRun.prototype.Math_Is_InclineLetter = function()
{
......@@ -10817,9 +10840,13 @@ ParaRun.prototype.Is_UseInParagraph = function()
return true;
};
ParaRun.prototype.Displace_BreakOperator = function(_CurLine, _CurRange, isForward, CountOperators)
ParaRun.prototype.Displace_BreakOperator = function(isForward, bBrkBefore, CountOperators)
{
if(true === this.Is_StartForcedBreakOperator())
var bResult = true;
var bFirstItem = this.State.ContentPos == 0 || this.State.ContentPos == 1,
bLastItem = this.State.ContentPos == this.Content.length - 1 || this.State.ContentPos == this.Content.length;
if(true === this.Is_StartForcedBreakOperator() && bFirstItem == true)
{
var AlnAt = this.MathPrp.Get_AlnAt();
......@@ -10837,6 +10864,12 @@ ParaRun.prototype.Displace_BreakOperator = function(_CurLine, _CurRange, isForwa
}
}
}
else
{
bResult = (bLastItem && bBrkBefore) || (bFirstItem && !bBrkBefore) ? false : true;
}
return bResult; // применили смещение к данному Run
};
ParaRun.prototype.Math_UpdateLineMetrics = function(PRS, ParaPr)
{
......
......@@ -2102,7 +2102,7 @@ CMathBase.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
PRS.bMath_OneLine = bOneLine;
PRS.bContainCompareOper = bContainCompareOper;
};
CMathBase.prototype.Get_WrapToLine = function(_CurLine, _CurRange, WrapIndent)
/*CMathBase.prototype.Get_WrapToLine = function(_CurLine, _CurRange, WrapIndent)
{
var Wrap = 0;
......@@ -2117,7 +2117,7 @@ CMathBase.prototype.Get_WrapToLine = function(_CurLine, _CurRange, WrapIndent)
}
return Wrap;
};
};*/
CMathBase.prototype.Recalculate_MinMaxContentWidth = function(MinMax)
{
var bOneLine = MinMax.bMath_OneLine;
......@@ -2417,13 +2417,13 @@ CMathBase.prototype.Get_Range_VisibleWidth = function(RangeW, _CurLine, _CurRang
}
}
};
CMathBase.prototype.Displace_BreakOperator = function(_CurLine, _CurRange, isForward, CountOperators)
CMathBase.prototype.Displace_BreakOperator = function(isForward, bBrkBefore, CountOperators)
{
this.Content[this.NumBreakContent].Displace_BreakOperator(_CurLine, _CurRange, isForward, CountOperators);
this.Content[this.NumBreakContent].Displace_BreakOperator(isForward, bBrkBefore, CountOperators);
};
CMathBase.prototype.Get_AlignBrk = function(_CurLine, _CurRange)
CMathBase.prototype.Get_AlignBrk = function(_CurLine, bBrkBefore)
{
return this.Content[this.NumBreakContent].Get_AlignBrk(_CurLine, _CurRange);
return this.Content[this.NumBreakContent].Get_AlignBrk(_CurLine, bBrkBefore);
};
CMathBase.prototype.raw_SetReviewType = function(Type, Info)
{
......
......@@ -21,6 +21,10 @@ CMathBreak.prototype.Copy = function()
};
CMathBreak.prototype.Get_AlignBrk = function()
{
// undefined - break отсутствует
// 0 - break присутствует, alnAt = undefined
// Number = break присутствует, alnAt = Number
return this.alnAt !== undefined ? this.alnAt : 0;
};
CMathBreak.prototype.Get_AlnAt = function()
......@@ -227,6 +231,7 @@ CBorderBox.prototype.recalculateSize = function()
height += this.gapBrd;
ascent += this.gapBrd;
}
if(this.Pr.hideBot == false)
height += this.gapBrd;
......@@ -623,14 +628,14 @@ CMathBoxPr.prototype.Set_FromObject = function(Obj)
else
this.opEmu = false;
};
CMathBoxPr.prototype.Get_AlignBrk = function()
{
return this.brk !== undefined ? this.brk.Get_AlignBrk() : 0;
};
CMathBoxPr.prototype.Get_AlnAt = function()
{
return this.brk != undefined ? this.brk.Get_AlnAt() : undefined;
};
CMathBoxPr.prototype.Get_AlignBrk = function()
{
return this.brk == undefined ? null : this.brk.Get_AlignBrk();
};
CMathBoxPr.prototype.Displace_Break = function(isForward)
{
if(this.brk !== undefined)
......@@ -794,9 +799,13 @@ CBox.prototype.IsForcedBreak = function()
};
CBox.prototype.Get_AlignBrk = function()
{
return this.Pr.Get_AlignBrk();
// null - break отсутствует
// 0 - break присутствует, alnAt = undefined
// Number = break присутствует, alnAt = Number
return false == this.private_CanUseForcedBreak() ? null : this.Pr.Get_AlignBrk();
};
CBox.prototype.Displace_BreakOperator = function(_CurLine, _CurRange, isForward, CountOperators)
CBox.prototype.Displace_BreakOperator = function(isForward, bBrkBefore, CountOperators)
{
if(this.Pr.brk !== undefined)
{
......
......@@ -150,7 +150,6 @@ CDegreeBase.prototype.GetSizeSup = function(oMeasure, Metric)
}
var PlH = 0.64*this.ParaMath.GetPlh(oMeasure, mgCtrPrp);
//var UpBaseline = 1.65*shCenter; // расстояние от baseline основания до бейзлайна итератора
var UpBaseline = 0.75*PlH; // расстояние от baseline основания до бейзлайна итератора
if(bTextElement)
......
......@@ -60,10 +60,6 @@ CFraction.prototype.init = function(props)
this.setProperties(props);
this.fillContent();
};
CFraction.prototype.getType = function()
{
return this.Pr.type;
};
CFraction.prototype.draw = function(x, y, pGraphics, PDSE)
{
if(this.Pr.type == BAR_FRACTION || this.Pr.type == NO_BAR_FRACTION)
......
......@@ -656,7 +656,7 @@ CMPrp.prototype =
},
Get_AlignBrk: function()
{
return this.brk !== undefined ? this.brk.Get_AlignBrk() : 0;
return this.brk !== undefined ? this.brk.Get_AlignBrk() : null;
},
Get_AlnAt: function()
{
......@@ -3891,7 +3891,7 @@ CMathContent.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
{
this.bOneLine = PRS.bMath_OneLine;
// для неинлайн формул :
// для неинлайн формул:
// у операторов, находяхщихся на этом уровне (в Run) приоритет выше, чем у внутренних операторов (внутри мат объектов)
// возможен только принудительный разрыв
var bOnlyForcedBreak = PRS.bOnlyForcedBreak;
......@@ -4142,52 +4142,6 @@ CMathContent.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
this.protected_FillRange(CurLine, CurRange, RangeStartPos, RangeEndPos);
};
CMathContent.prototype.Get_WrapToLine = function(_CurLine, _CurRange, WrapIndent)
{
// Get_WrapToLine может прийти до Recalculate_Range
var CurLine = _CurLine - this.StartLine;
var CurRange = ( 0 === CurLine ? _CurRange - this.StartRange : _CurRange );
var Pos = this.protected_GetPrevRangeEndPos(CurLine, CurRange);
var ContentLen = this.Content.length;
var Wrap = 0;
if(this.bRoot == false || false == this.IsStartLine(_CurLine, _CurRange))
{
while(Pos < ContentLen)
{
var bInline = this.ParaMath.Is_Inline();
var Item = this.Content[Pos];
var bEmptyRun = Item.Type == para_Math_Run && true == Item.Math_EmptyRange(_CurLine, _CurRange);
var bBoxBreak = Item.Type == para_Math_Composition && Item.kind == MATH_BOX && true == Item.IsForcedBreak();
if(Item.Type == para_Math_Composition)
{
if(bBoxBreak == true)
{
Wrap = 0;
}
else
{
Wrap = Item.Get_WrapToLine(_CurLine, _CurRange, WrapIndent);
}
break;
}
else if(bEmptyRun == false)
{
if(false === Item.IsForcedBreak())
Wrap = WrapIndent;
break;
}
Pos++;
}
}
return Wrap;
};
CMathContent.prototype.private_ForceBreakBox = function(PRS, Box, _Depth, PrevLastPos, LastPos)
{
var BoxLen = Box.size.width;
......@@ -4351,42 +4305,24 @@ CMathContent.prototype.IsEmptyRange = function(_CurLine, _CurRange)
return bEmpty;
};
CMathContent.prototype.IsEmptyLine = function(_CurLine)
CMathContent.prototype.Displace_BreakOperator = function(isForward, bBrkBefore, CountOperators)
{
var CurLine = _CurLine - this.StartLine;
var StartRange = ( 0 === CurLine ? this.StartRange : 0 );
var RangesCount = StartRange + this.protected_GetRangesCount(CurLine);
var bEmpty = true;
var Pos = this.CurPos;
for(var _CurRange = StartRange; _CurRange < RangesCount; _CurRange++)
if(this.Content[Pos].Type == para_Math_Run)
{
if(false == this.IsEmptyRange(_CurLine, _CurRange))
var bApplyBreak = this.Content[Pos].Displace_BreakOperator(isForward, bBrkBefore, CountOperators);
var NewPos = bBrkBefore ? Pos + 1 : Pos - 1;
if(bApplyBreak == false && (this.Content[NewPos].Type == para_Math_Run || this.Content[NewPos].kind == MATH_BOX))
{
bEmpty = false;
break;
this.Content[NewPos].Displace_BreakOperator(isForward, bBrkBefore, CountOperators);
}
}
return bEmpty;
};
CMathContent.prototype.Displace_BreakOperator = function(_CurLine, _CurRange, isForward, CountOperators)
{
var CurLine = _CurLine - this.StartLine;
var CurRange = ( 0 === CurLine ? _CurRange - this.StartRange : _CurRange );
var StartPos = this.protected_GetRangeStartPos(CurLine, CurRange);
var EndPos = this.protected_GetRangeEndPos(CurLine, CurRange);
var bNextBox = true === this.Content[StartPos].IsEmptyRange(_CurLine, _CurRange) && StartPos != EndPos && this.Content[StartPos + 1].kind == MATH_BOX;
if(true === bNextBox) // Next element is Box
else
{
StartPos++;
this.Content[Pos].Displace_BreakOperator(isForward, bBrkBefore, CountOperators);
}
this.Content[StartPos].Displace_BreakOperator(_CurLine, _CurRange, isForward, CountOperators);
};
CMathContent.prototype.Recalculate_Range_Width = function(PRSC, _CurLine, _CurRange)
{
......@@ -4646,48 +4582,37 @@ CMathContent.prototype.Math_Is_End = function(_CurLine, _CurRange)
return result;
};
CMathContent.prototype.Get_AlignBrk = function(_CurLine, _CurRange)
CMathContent.prototype.Get_AlignBrk = function(_CurLine, bBrkBefore)
{
var CurLine = _CurLine - this.StartLine;
var CurRange = ( 0 === CurLine ? _CurRange - this.StartRange : _CurRange );
var AlnAt = null;
var AlnAt = 0;
var CurLine = _CurLine - this.StartLine;
var RangesCount = this.protected_GetRangesCount(CurLine - 1);
var EndPos = this.protected_GetRangeEndPos(CurLine - 1, RangesCount - 1);
if(CurLine !== 0)
if(CurLine !== 0) // получаем смещение до расчета Recalculate_Range
{
if(true == this.ParaMath.Is_BrkBinBefore())
{
var StartPos = this.protected_GetRangeStartPos(CurLine, CurRange);
var bEndRun = this.Content[EndPos].Type == para_Math_Run && true == this.Content[EndPos].Math_Is_End(_CurLine - 1, RangesCount - 1),
bNextBox = EndPos < this.Content.length - 1 && this.Content[EndPos + 1].kind == MATH_BOX;
var Lng = this.Content.length;
while(StartPos < Lng - 1 && this.Content[StartPos].Type == para_Math_Run && true == this.Content[StartPos].Is_EmptyRange(_CurLine, _CurRange))
{
StartPos++;
}
var bCheckNextBox = bEndRun == true && bNextBox == true && bBrkBefore == true;
var bRunEmptyRange = this.Content[EndPos].Type == para_Math_Run && this.Content[EndPos].Is_EmptyRange(_CurLine - 1, RangesCount - 1),
bPrevBox = EndPos > 0 && this.Content[EndPos - 1].kind == MATH_BOX;
var bCheckPrevNextBox = bRunEmptyRange == true && bPrevBox == true && bBrkBefore == false;
AlnAt = this.Content[StartPos].Get_AlignBrk(_CurLine, _CurRange);
if(bCheckPrevNextBox)
{
AlnAt = this.Content[EndPos - 1].Get_AlignBrk(_CurLine, bBrkBefore);
}
else if(bCheckNextBox)
{
AlnAt = this.Content[EndPos + 1].Get_AlignBrk(_CurLine, bBrkBefore);
}
else
{
var RangesCount = this.protected_GetRangesCount(CurLine - 1);
var EndPos = this.protected_GetRangeEndPos(CurLine - 1, RangesCount - 1);
var Range = CurLine - 1 == 0 ? this.StartRange + RangesCount - 1 : RangesCount - 1;
if(EndPos == this.Content.length - 1) // сюда не должны зайти, т.к. ищем AlnAt для оператора из предыдущей строки, соответственно предыдущая строка не может заканчиваться последним элементом
{
AlnAt = 0;
}
else
{
while(EndPos > 0 && this.Content[EndPos].Type == para_Math_Run && true == this.Content[EndPos].Is_EmptyRange(_CurLine - 1, Range))
{
EndPos--;
}
AlnAt = this.Content[EndPos].Get_AlignBrk(_CurLine, _CurRange);
}
AlnAt = this.Content[EndPos].Get_AlignBrk(_CurLine, bBrkBefore);
}
}
......@@ -4735,11 +4660,11 @@ CMathContent.prototype.Can_ModifyForcedBreak = function(Pr)
if(Pos !== null && this.bOneLine == false)
{
var bBreakOperator = this.Content[Pos].Check_ForcedBreak();
var CurrentRun = this.Content[Pos];
var bCanCheckNearsRun = bBreakOperator == false && false == CurrentRun.Is_SelectionUse();
var bPrevItem = bCanCheckNearsRun && Pos > 0 && true == CurrentRun.Cursor_Is_Start(),
bNextItem = bCanCheckNearsRun && Pos < this.Content.length - 1 && true == CurrentRun.Cursor_Is_End();
var bBreakOperator = this.Content[Pos].Check_ForcedBreak();
var CurrentRun = this.Content[Pos];
var bCanCheckNearsRun = bBreakOperator == false && false == CurrentRun.Is_SelectionUse();
var bPrevItem = bCanCheckNearsRun && Pos > 0 && true == CurrentRun.Cursor_Is_Start(),
bNextItem = bCanCheckNearsRun && Pos < this.Content.length - 1 && true == CurrentRun.Cursor_Is_End();
var bPrevRun = bPrevItem && this.Content[Pos - 1].Type == para_Math_Run,
bNextRun = bNextItem && this.Content[Pos + 1].Type == para_Math_Run;
......
......@@ -202,77 +202,7 @@ 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
var MATH_LINE_START = 0;
var MATH_LINE_WRAP = 1;
var MATH_LINE_ALiGN_AT = 2;
\ No newline at end of file
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