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

Поправлены баги при разбивке формулы на две колонки Файл "Разбивка формулы на 2 колонки.docx"

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@68267 954022d7-b5bf-4e40-9824-e11837661b57
parent 595e9a86
......@@ -685,17 +685,20 @@ CParaMathLineWidths.prototype.GetNumberLine = function(Line)
function CMathPageInfo()
{
this.WPages = []; // widths on page
this.StartLine = -1;
this.StartPage = -1;
this.CurPage = -1;
this.WPages = []; // widths on page
this.StartLine = -1;
this.StartPage = -1;
this.CurPage = -1;
this.RelativePage = -1;
}
CMathPageInfo.prototype.Reset = function()
{
this.StartLine = -1;
this.StartPage = -1;
this.CurPage = -1;
this.WPages.length = 0;
this.StartLine = -1;
this.StartPage = -1;
this.CurPage = -1;
this.RelativePage = -1;
this.WPages.length = 0;
};
CMathPageInfo.prototype.Reset_Page = function(_Page)
{
......@@ -717,6 +720,10 @@ CMathPageInfo.prototype.SetStartPos = function(Page, StartLine)
this.StartPage = Page;
this.StartLine = StartLine;
};
CMathPageInfo.prototype.Update_RelativePage = function(RelativePage)
{
this.RelativePage = RelativePage;
};
CMathPageInfo.prototype.UpdateCurrentPage = function(Page, ParaLine)
{
this.CurPage = Page - this.StartPage;
......@@ -843,11 +850,14 @@ CMathPageInfo.prototype.IsResetNextPage = function(_Page)
{
var Page = _Page - this.StartPage;
bReset = this.CurPage < Page;
}
return bReset;
};
CMathPageInfo.prototype.IsResetRelativePage = function(_RelativePage)
{
return this.CurPage == -1 ? false : _RelativePage !== this.RelativePage;
};
CMathPageInfo.prototype.IsFirstLineOnPage = function(_Line, _Page)
{
var bFirstLine = true;
......@@ -1616,10 +1626,11 @@ ParaMath.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
this.protected_UpdateSpellChecking();
}
var Para = PRS.Paragraph;
var ParaLine = PRS.Line;
var ParaRange = PRS.Range;
var Page = this.Paragraph == null ? 0 : this.Paragraph.Get_AbsolutePage(PRS.Page);
var Para = PRS.Paragraph;
var ParaLine = PRS.Line;
var ParaRange = PRS.Range;
var Page = this.Paragraph == null ? 0 : this.Paragraph.Get_AbsolutePage(PRS.Page);
var RelativePage = PRS.Page;
var bStartRange = this.Root.IsStartRange(ParaLine, ParaRange);
......@@ -1644,7 +1655,7 @@ ParaMath.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
this.PageInfo.Reset();
this.PageInfo.SetStartPos(Page, ParaLine);
this.PageInfo.Update_RelativePage(RelativePage);
this.ParaMathRPI.Reset(PRS, ParaPr);
}
else
......@@ -1668,7 +1679,16 @@ ParaMath.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
{
this.ParaMathRPI.Reset(PRS, ParaPr);
this.PageInfo.Reset_Page(Page);
}
if(true == this.PageInfo.IsResetRelativePage(PRS.Page))
{
this.ParaMathRPI.Reset(PRS, ParaPr);
this.PageInfo.Update_RelativePage(RelativePage);
}
}
PRS.MathNotInline = this.ParaMathRPI.bInline == false; // если неинлайновая формула, то рассчитываем Ranges по максимальному измерению
......
......@@ -10038,7 +10038,6 @@ ParaRun.prototype.Math_Correct_Content = function()
ParaRun.prototype.OnlyOnePlaceholder = function()
{
return this.Content.length == 1 && this.Content[0].Type == para_Math_Placeholder;
};
ParaRun.prototype.Set_MathPr = function(MPrp)
{
......
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