Commit 2b48e422 authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Исправлен баг с зацикливаением пересчета из-за висячих строк (баг 20251).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49699 954022d7-b5bf-4e40-9824-e11837661b57
parent 91c62fc6
...@@ -2322,7 +2322,7 @@ Paragraph.prototype = ...@@ -2322,7 +2322,7 @@ Paragraph.prototype =
if ( true === this.Use_YLimit() && (Top > this.YLimit || Bottom2 > this.YLimit ) && ( CurLine != this.Pages[CurPage].FirstLine || ( 0 === CurPage && ( null != this.Get_DocumentPrev() || true === this.Parent.Is_TableCellContent() ) ) ) && false === bBreakPageLineEmpty ) if ( true === this.Use_YLimit() && (Top > this.YLimit || Bottom2 > this.YLimit ) && ( CurLine != this.Pages[CurPage].FirstLine || ( 0 === CurPage && ( null != this.Get_DocumentPrev() || true === this.Parent.Is_TableCellContent() ) ) ) && false === bBreakPageLineEmpty )
{ {
// Проверим висячую строку // Проверим висячую строку
if ( this.Parent instanceof CDocument && true === ParaPr.WidowControl && CurLine - this.Pages[CurPage].StartLine <= 1 && CurLine >= 1 && true != bBreakPageLine ) if ( this.Parent instanceof CDocument && true === ParaPr.WidowControl && CurLine - this.Pages[CurPage].StartLine <= 1 && CurLine >= 1 && true != bBreakPageLine && ( 0 === CurPage && null != this.Get_DocumentPrev() ) )
{ {
this.Parent.RecalcInfo.WidowControlParagraph = this; this.Parent.RecalcInfo.WidowControlParagraph = this;
this.Parent.RecalcInfo.WidowControlLine = CurLine - 1; this.Parent.RecalcInfo.WidowControlLine = CurLine - 1;
...@@ -2667,7 +2667,7 @@ Paragraph.prototype = ...@@ -2667,7 +2667,7 @@ Paragraph.prototype =
} }
} }
if ( this.Parent instanceof CDocument && false === bBreakPagePrevLine ) if ( this.Parent instanceof CDocument && false === bBreakPagePrevLine && ( 1 === CurPage && null != this.Get_DocumentPrev() ) )
{ {
this.Parent.RecalcInfo.WidowControlParagraph = this; this.Parent.RecalcInfo.WidowControlParagraph = this;
this.Parent.RecalcInfo.WidowControlLine = ( CurLine > 2 ? CurLine - 1 : 0 ); // Если у нас в параграфе 3 строки, тогда сразу начинаем параграф с новой строки this.Parent.RecalcInfo.WidowControlLine = ( CurLine > 2 ? CurLine - 1 : 0 ); // Если у нас в параграфе 3 строки, тогда сразу начинаем параграф с новой строки
......
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