Commit 1bb79ab4 authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Устранено засивание пересчета многострочных формул.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@62894 954022d7-b5bf-4e40-9824-e11837661b57
parent bf85a127
......@@ -1087,7 +1087,7 @@ ParaMath.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
var ParaRange = PRS.Range;
var Page = AbsolutePage + PRS.Page;
var PrevLineObject = PRS.PrevLineRecalcInfo.Object;
var PrevLineObject = PRS.RestartPageRecalcInfo.Object;
var bStartLine = this.Root.IsStartLine(ParaLine);
var MathSettings = Get_WordDocumentDefaultMathSettings();
......@@ -1146,7 +1146,7 @@ ParaMath.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
if(PrevLineObject == null || PrevLineObject == this)
{
PRS.RecalcResult = recalcresult_NextLine;
PRS.PrevLineRecalcInfo.Object = null;
PRS.Reset_RestartPageRecalcInfo();
}
// заглушка для пересчета Gaps элементов в текущей строке
......@@ -1192,9 +1192,8 @@ ParaMath.prototype.UpdateInfoForBreak = function(PRS)
var AbsolutePage = this.Paragraph == null ? 0 : this.Paragraph.Get_StartPage_Absolute();
var Page = AbsolutePage + PRS.Page;
PRS.PrevLineRecalcInfo.Object = this;
PRS.Set_RestartPageRecalcInfo(this.PageInfo.GetFirstLineOnPage(Page), this);
PRS.RecalcResult = recalcresult_PrevLine;
PRS.PrevLineRecalcInfo.Line = this.PageInfo.GetFirstLineOnPage(Page)/*this.CurPageInfo.FirstLine + this.Root.StartLine*/;
PRS.NewRange = true;
};
ParaMath.prototype.Save_MathInfo = function(Copy)
......@@ -1254,7 +1253,7 @@ ParaMath.prototype.Recalculate_Range_Width = function(PRSC, _CurLine, _CurRange)
};
ParaMath.prototype.UpdateWidthLine = function(PRS, Width)
{
var PrevRecalcObject = PRS.PrevLineRecalcInfo.Object;
var PrevRecalcObject = PRS.RestartPageRecalcInfo.Object;
if(PrevRecalcObject == null || PrevRecalcObject == this)
{
......
......@@ -472,7 +472,7 @@ Paragraph.prototype.private_RecalculateFastRange = function(CurRange, CurL
return this.Get_StartPage_Absolute() + CurPage;
};
Paragraph.prototype.private_RecalculatePage = function(CurPage, bResetPrevLineInfo)
Paragraph.prototype.private_RecalculatePage = function(CurPage, bFirstRecalculate)
{
var PRS = this.m_oPRSW;
......@@ -506,8 +506,8 @@ Paragraph.prototype.private_RecalculatePage = function(CurPage, bRese
PRS.Reset_Ranges();
PRS.Reset_PageBreak();
if (false !== bResetPrevLineInfo)
PRS.Reset_PrevLineRecalcInfo();
if (false !== bFirstRecalculate)
PRS.Reset_RestartPageRecalcInfo();
var RecalcResult;
while (true)
......@@ -526,7 +526,6 @@ Paragraph.prototype.private_RecalculatePage = function(CurPage, bRese
PRS.Reset_Ranges();
PRS.Reset_PageBreak();
PRS.Reset_RunRecalcInfo();
PRS.Reset_PrevLineRecalcInfo();
}
else if (recalcresult_PrevLine === RecalcResult)
{
......@@ -2177,7 +2176,7 @@ function CParagraphRecalculateStateWrap(Para)
this.RecalcResult = 0x00;//recalcresult_NextElement;
this.PrevLineRecalcInfo = // Информация для пересчета предыдущей строки
this.RestartPageRecalcInfo = // Информация о том, почему текущая страница параграфа пересчитывается заново
{
Line : 0, // Номер строки, начиная с которой надо пересчитать
Object : null // Объект, который вызвал пересчет
......@@ -2275,10 +2274,16 @@ CParagraphRecalculateStateWrap.prototype =
this.bBoxOperator = false;
},
Reset_PrevLineRecalcInfo : function()
Reset_RestartPageRecalcInfo : function()
{
this.PrevLineRecalcInfo.Line = 0;
this.PrevLineRecalcInfo.Object = null;
this.RestartPageRecalcInfo.Line = 0;
this.RestartPageRecalcInfo.Object = null;
},
Set_RestartPageRecalcInfo : function(Line, Object)
{
this.RestartPageRecalcInfo.Line = Line;
this.RestartPageRecalcInfo.Object = Object;
},
Set_LineBreakPos : function(PosObj)
......
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