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

Исправлен баг с отрисовкой нумерации страниц (баг 19657).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49497 954022d7-b5bf-4e40-9824-e11837661b57
parent 7505f237
...@@ -814,6 +814,7 @@ Paragraph.prototype = ...@@ -814,6 +814,7 @@ Paragraph.prototype =
{ {
case para_Text: case para_Text:
case para_Space: case para_Space:
case para_PageNum:
{ {
Item.Measure( g_oTextMeasurer, CurTextPr); Item.Measure( g_oTextMeasurer, CurTextPr);
break; break;
...@@ -827,7 +828,6 @@ Paragraph.prototype = ...@@ -827,7 +828,6 @@ Paragraph.prototype =
Item.Measure( g_oTextMeasurer, CurTextPr); Item.Measure( g_oTextMeasurer, CurTextPr);
break; break;
} }
case para_PageNum:
case para_Tab: case para_Tab:
case para_NewLine: case para_NewLine:
{ {
......
...@@ -6488,6 +6488,8 @@ GraphicPicture.prototype = ...@@ -6488,6 +6488,8 @@ GraphicPicture.prototype =
function ParaPageNum() function ParaPageNum()
{ {
this.Type = para_PageNum; this.Type = para_PageNum;
this.FontKoef = 1;
} }
ParaPageNum.prototype = ParaPageNum.prototype =
...@@ -6500,7 +6502,7 @@ ParaPageNum.prototype = ...@@ -6500,7 +6502,7 @@ ParaPageNum.prototype =
var sValue = "" + (Value + 1); var sValue = "" + (Value + 1);
g_oTextMeasurer.SetTextPr( Context.GetTextPr() ); g_oTextMeasurer.SetTextPr( Context.GetTextPr() );
g_oTextMeasurer.SetFontSlot( fontslot_ASCII ); g_oTextMeasurer.SetFontSlot( fontslot_ASCII, this.FontKoef );
var RealWidth = 0; var RealWidth = 0;
for ( var Index = 0; Index < sValue.length; Index++ ) for ( var Index = 0; Index < sValue.length; Index++ )
...@@ -6531,6 +6533,7 @@ ParaPageNum.prototype = ...@@ -6531,6 +6533,7 @@ ParaPageNum.prototype =
} }
} }
Context.SetFontSlot( fontslot_ASCII, this.FontKoef );
for ( var Index = 0; Index < sValue.length; Index++ ) for ( var Index = 0; Index < sValue.length; Index++ )
{ {
var Char = sValue.charAt(Index); var Char = sValue.charAt(Index);
...@@ -6539,8 +6542,11 @@ ParaPageNum.prototype = ...@@ -6539,8 +6542,11 @@ ParaPageNum.prototype =
} }
}, },
Measure : function (Context) Measure : function (Context, TextPr)
{ {
this.FontKoef = TextPr.Get_FontKoef();
Context.SetFontSlot( fontslot_ASCII, this.FontKoef );
var Width = 0; var Width = 0;
for ( var Index = 0; Index < 10; Index++ ) for ( var Index = 0; Index < 10; Index++ )
{ {
......
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