Commit 2d2be2bb authored by Ilya Kirillov's avatar Ilya Kirillov

Fixed bug #34311

parent 4c1cf23b
...@@ -919,6 +919,8 @@ function CDocumentRecalcInfo() ...@@ -919,6 +919,8 @@ function CDocumentRecalcInfo()
this.FootnoteColumn = 0; this.FootnoteColumn = 0;
this.AdditionalInfo = null; this.AdditionalInfo = null;
this.NeedRecalculateFromStart = false;
} }
CDocumentRecalcInfo.prototype = CDocumentRecalcInfo.prototype =
...@@ -1074,7 +1076,18 @@ CDocumentRecalcInfo.prototype = ...@@ -1074,7 +1076,18 @@ CDocumentRecalcInfo.prototype =
this.FootnotePage = 0; this.FootnotePage = 0;
this.FootnoteColumn = 0; this.FootnoteColumn = 0;
this.FlowObjectPageBreakBefore = false; this.FlowObjectPageBreakBefore = false;
} },
Set_NeedRecalculateFromStart : function(isNeedRecalculate)
{
this.NeedRecalculateFromStart = isNeedRecalculate;
},
Is_NeedRecalculateFromStart : function()
{
return this.NeedRecalculateFromStart;
}
}; };
function CDocumentFieldsManager() function CDocumentFieldsManager()
...@@ -1817,6 +1830,13 @@ CDocument.prototype.Is_OnRecalculate = function() ...@@ -1817,6 +1830,13 @@ CDocument.prototype.Is_OnRecalculate = function()
*/ */
CDocument.prototype.Recalculate = function(bOneParagraph, bRecalcContentLast, _RecalcData) CDocument.prototype.Recalculate = function(bOneParagraph, bRecalcContentLast, _RecalcData)
{ {
if (this.RecalcInfo.Is_NeedRecalculateFromStart())
{
this.RecalcInfo.Set_NeedRecalculateFromStart(false);
this.Recalculate_FromStart();
return;
}
this.StartTime = new Date().getTime(); this.StartTime = new Date().getTime();
if (true !== this.Is_OnRecalculate()) if (true !== this.Is_OnRecalculate())
...@@ -9039,6 +9059,9 @@ CDocument.prototype.Update_SectionsInfo = function() ...@@ -9039,6 +9059,9 @@ CDocument.prototype.Update_SectionsInfo = function()
} }
this.SectionsInfo.Add(this.SectPr, Count); this.SectionsInfo.Add(this.SectPr, Count);
// Когда полностью обновляются секции надо пересчитывать с самого начала
this.RecalcInfo.Set_NeedRecalculateFromStart(true);
}; };
CDocument.prototype.Check_SectionLastParagraph = function() CDocument.prototype.Check_SectionLastParagraph = function()
{ {
......
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