Commit 76bc3808 authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

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

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@50530 954022d7-b5bf-4e40-9824-e11837661b57
parent 370a3415
...@@ -903,6 +903,12 @@ Paragraph.prototype = ...@@ -903,6 +903,12 @@ Paragraph.prototype =
Item.TextPr = EndTextPr; Item.TextPr = EndTextPr;
g_oTextMeasurer.SetTextPr( EndTextPr ); g_oTextMeasurer.SetTextPr( EndTextPr );
Item.Measure( g_oTextMeasurer, bEndCell ); Item.Measure( g_oTextMeasurer, bEndCell );
TextDescent = Math.abs( g_oTextMeasurer.GetDescender() );
TextHeight = g_oTextMeasurer.GetHeight();
TextAscent = TextHeight - TextDescent;
TextAscent2 = g_oTextMeasurer.GetAscender();
g_oTextMeasurer.SetTextPr( CurTextPr ); g_oTextMeasurer.SetTextPr( CurTextPr );
break; break;
...@@ -2054,6 +2060,13 @@ Paragraph.prototype = ...@@ -2054,6 +2060,13 @@ Paragraph.prototype =
// текста, на котором закончилась данная строка. // текста, на котором закончилась данная строка.
if ( true === bEmptyLine || LineAscent < 0.001 ) if ( true === bEmptyLine || LineAscent < 0.001 )
{ {
if ( true === bEnd )
{
TextAscent = Item.TextAscent;
TextDescent = Item.TextDescent;
TextAscent2 = Item.TextAscent2;
}
if ( LineTextAscent < TextAscent ) if ( LineTextAscent < TextAscent )
LineTextAscent = TextAscent; LineTextAscent = TextAscent;
...@@ -9329,7 +9342,7 @@ Paragraph.prototype = ...@@ -9329,7 +9342,7 @@ Paragraph.prototype =
Style_Get : function() Style_Get : function()
{ {
if ( undefined != typeof(this.Pr.PStyle) ) if ( undefined != this.Pr.PStyle )
return this.Pr.PStyle; return this.Pr.PStyle;
return undefined; return undefined;
......
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