Commit aaac19d1 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@50986 954022d7-b5bf-4e40-9824-e11837661b57
parent 9cdbd308
...@@ -1153,7 +1153,7 @@ Paragraph.prototype = ...@@ -1153,7 +1153,7 @@ Paragraph.prototype =
if ( para_Numbering === NumberingType ) if ( para_Numbering === NumberingType )
{ {
var NumPr = ParaPr.NumPr; var NumPr = ParaPr.NumPr;
if ( undefined === NumPr || undefined === NumPr.NumId || 0 === NumPr.NumId || "0" === ParaPr.NumPr.NumId ) if ( undefined === NumPr || undefined === NumPr.NumId || 0 === NumPr.NumId || "0" === NumPr.NumId )
{ {
// Так мы обнуляем все рассчитанные ширины данного элемента // Так мы обнуляем все рассчитанные ширины данного элемента
NumberingItem.Measure( g_oTextMeasurer, undefined ); NumberingItem.Measure( g_oTextMeasurer, undefined );
...@@ -2693,7 +2693,7 @@ Paragraph.prototype = ...@@ -2693,7 +2693,7 @@ Paragraph.prototype =
} }
} }
if ( this.Parent instanceof CDocument && true === this.Parent.RecalcInfo.Can_RecalcObject() && false === bBreakPagePrevLine && ( 1 === CurPage && null != this.Get_DocumentPrev() ) ) if ( this.Parent instanceof CDocument && true === this.Parent.RecalcInfo.Can_RecalcObject() && false === bBreakPagePrevLine && ( 1 === CurPage && null != this.Get_DocumentPrev() ) && this.Lines[CurLine - 1].Ranges.length <= 1 )
{ {
this.Parent.RecalcInfo.Set_WidowControl(this, ( CurLine > 2 ? CurLine - 1 : 0 ) ); // Если у нас в параграфе 3 строки, тогда сразу начинаем параграф с новой строки this.Parent.RecalcInfo.Set_WidowControl(this, ( CurLine > 2 ? CurLine - 1 : 0 ) ); // Если у нас в параграфе 3 строки, тогда сразу начинаем параграф с новой строки
RecalcResult = recalcresult_PrevPage; RecalcResult = recalcresult_PrevPage;
...@@ -3602,7 +3602,7 @@ Paragraph.prototype = ...@@ -3602,7 +3602,7 @@ Paragraph.prototype =
var ParaPr = Pr.ParaPr; var ParaPr = Pr.ParaPr;
var NumPr = ParaPr.NumPr; var NumPr = ParaPr.NumPr;
if ( undefined === NumPr || undefined === NumPr.NumId || 0 === NumPr.NumId || "0" === ParaPr.NumPr.NumId ) if ( undefined === NumPr || undefined === NumPr.NumId || 0 === NumPr.NumId || "0" === NumPr.NumId )
return new CTextPr(); return new CTextPr();
var Numbering = this.Parent.Get_Numbering(); var Numbering = this.Parent.Get_Numbering();
...@@ -4162,7 +4162,7 @@ Paragraph.prototype = ...@@ -4162,7 +4162,7 @@ Paragraph.prototype =
if ( para_Numbering === NumberingType ) if ( para_Numbering === NumberingType )
{ {
var NumPr = Pr.ParaPr.NumPr; var NumPr = Pr.ParaPr.NumPr;
if ( undefined === NumPr || undefined === NumPr.NumId || 0 === NumPr.NumId || "0" === ParaPr.NumPr.NumId ) if ( undefined === NumPr || undefined === NumPr.NumId || 0 === NumPr.NumId || "0" === NumPr.NumId )
break; break;
var Numbering = this.Parent.Get_Numbering(); var Numbering = this.Parent.Get_Numbering();
...@@ -4577,7 +4577,7 @@ Paragraph.prototype = ...@@ -4577,7 +4577,7 @@ Paragraph.prototype =
if ( para_Numbering === this.Numbering.Type ) if ( para_Numbering === this.Numbering.Type )
{ {
var NumPr = Pr.ParaPr.NumPr; var NumPr = Pr.ParaPr.NumPr;
if ( undefined === NumPr || undefined === NumPr.NumId || 0 === NumPr.NumId || "0" === ParaPr.NumPr.NumId ) if ( undefined === NumPr || undefined === NumPr.NumId || 0 === NumPr.NumId || "0" === NumPr.NumId )
break; break;
var Numbering = this.Parent.Get_Numbering(); var Numbering = this.Parent.Get_Numbering();
...@@ -10532,7 +10532,7 @@ Paragraph.prototype = ...@@ -10532,7 +10532,7 @@ Paragraph.prototype =
{ {
var ParaPr = this.CompiledPr.Pr.ParaPr; var ParaPr = this.CompiledPr.Pr.ParaPr;
var NumPr = ParaPr.NumPr; var NumPr = ParaPr.NumPr;
if ( undefined === NumPr || undefined === NumPr.NumId || 0 === NumPr.NumId || "0" === ParaPr.NumPr.NumId ) if ( undefined === NumPr || undefined === NumPr.NumId || 0 === NumPr.NumId || "0" === NumPr.NumId )
continue; continue;
var Numbering = this.Parent.Get_Numbering(); var Numbering = this.Parent.Get_Numbering();
......
...@@ -15109,9 +15109,9 @@ CTable.prototype = ...@@ -15109,9 +15109,9 @@ CTable.prototype =
var CellHeight = this.TableRowsBottom[CurRow][CurPage] - Y; var CellHeight = this.TableRowsBottom[CurRow][CurPage] - Y;
// TODO: улучшить проверку на высоту строки (для строк разбитых на страницы) // TODO: улучшить проверку на высоту строки (для строк разбитых на страницы)
if ( false === bNextPage && heightrule_AtLeast === RowH.HRule && CellHeight < RowH.Value - MaxTopBorder[CurRow] ) if ( false === bNextPage && heightrule_AtLeast === RowH.HRule && CellHeight < RowH.Value )
{ {
CellHeight = RowH.Value - MaxTopBorder[CurRow]; CellHeight = RowH.Value;
this.TableRowsBottom[CurRow][CurPage] = Y + CellHeight; this.TableRowsBottom[CurRow][CurPage] = Y + CellHeight;
} }
......
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