Commit 74605804 authored by Ilya.Kirillov's avatar Ilya.Kirillov

Исправлен баг с быстрым пересчетом параграфа.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@58720 954022d7-b5bf-4e40-9824-e11837661b57
parent a4c9eab7
...@@ -34,15 +34,15 @@ Paragraph.prototype.Recalculate_FastWholeParagraph = function() ...@@ -34,15 +34,15 @@ Paragraph.prototype.Recalculate_FastWholeParagraph = function()
// смотрим изменяeтся ли положение flow-объектов, привязанных к данному параграфу, кроме того, если по какой-то // смотрим изменяeтся ли положение flow-объектов, привязанных к данному параграфу, кроме того, если по какой-то
// причине пересчет возвращает не recalcresult_NextElement, тогда тоже отменяем быстрый пересчет // причине пересчет возвращает не recalcresult_NextElement, тогда тоже отменяем быстрый пересчет
var PageNum = this.Get_StartPage_Absolute(); var PageNum = this.Get_StartPage_Relative();
var OldBounds = this.Pages[0].Bounds; var OldBounds = this.Pages[0].Bounds;
var FastRecalcResult = this.Recalculate_Page(PageNum, true); var FastRecalcResult = this.Recalculate_Page(PageNum, true);
if (FastRecalcResult === recalcresult_NextElement && 1 === this.Pages.length && true === this.Pages[0].Bounds.Compare(OldBounds)) if (FastRecalcResult === recalcresult_NextElement && 1 === this.Pages.length && true === this.Pages[0].Bounds.Compare(OldBounds))
{ {
//console.log("Recalc Fast WholeParagraph 1 page"); //console.log("Recalc Fast WholeParagraph 1 page");
var PageNum_abs = this.Get_StartPage_Absolute();
return [PageNum]; return [PageNum_abs];
} }
} }
else if (2 === this.Pages.length) else if (2 === this.Pages.length)
...@@ -65,7 +65,7 @@ Paragraph.prototype.Recalculate_FastWholeParagraph = function() ...@@ -65,7 +65,7 @@ Paragraph.prototype.Recalculate_FastWholeParagraph = function()
var OldLinesCount_0 = this.Pages[0].EndLine - this.Pages[0].StartLine + 1; var OldLinesCount_0 = this.Pages[0].EndLine - this.Pages[0].StartLine + 1;
var OldLinesCount_1 = this.Pages[1].EndLine - this.Pages[1].StartLine + 1; var OldLinesCount_1 = this.Pages[1].EndLine - this.Pages[1].StartLine + 1;
var PageNum = this.Get_StartPage_Absolute(); var PageNum = this.Get_StartPage_Relative();
var FastRecalcResult = this.Recalculate_Page(PageNum, true); var FastRecalcResult = this.Recalculate_Page(PageNum, true);
if (FastRecalcResult !== recalcresult_NextPage) if (FastRecalcResult !== recalcresult_NextPage)
...@@ -101,10 +101,13 @@ Paragraph.prototype.Recalculate_FastWholeParagraph = function() ...@@ -101,10 +101,13 @@ Paragraph.prototype.Recalculate_FastWholeParagraph = function()
// Если параграф начинается с новой страницы, тогда не надо перерисовывать первую страницу, т.к. она // Если параграф начинается с новой страницы, тогда не надо перерисовывать первую страницу, т.к. она
// изначально была пустая, и сейчас пустая. // изначально была пустая, и сейчас пустая.
var PageNum_abs = this.Get_StartPage_Absolute();
if (true === StartFromNewPage) if (true === StartFromNewPage)
return [PageNum + 1]; return [PageNum_abs + 1];
else else
return [PageNum, PageNum + 1]; return [PageNum_abs, PageNum_abs + 1];
} }
return []; return [];
......
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