Commit 1bc710cb authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Исправлен баг с выбором шрифта из 4 шрифтов для нумерации.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47855 954022d7-b5bf-4e40-9824-e11837661b57
parent cbe10471
......@@ -820,11 +820,10 @@ CAbstractNum.prototype =
{
var Text = this.Lvl[Lvl].LvlText;
var OldFont = Context.GetFont();
var OldFont2 = g_oTextMeasurer.GetFont();
Context.SetFont( NumTextPr );
g_oTextMeasurer.SetFont( NumTextPr );
Context.SetTextPr( NumTextPr );
Context.SetFontSlot( fontslot_ASCII );
g_oTextMeasurer.SetTextPr( NumTextPr );
g_oTextMeasurer.SetFontSlot( fontslot_ASCII );
for ( var Index = 0; Index < Text.length; Index++ )
{
......@@ -832,6 +831,16 @@ CAbstractNum.prototype =
{
case numbering_lvltext_Text:
{
var Hint = NumTextPr.RFonts.Hint;
var bCS = NumTextPr.CS;
var bRTL = NumTextPr.RTL;
var lcid = NumTextPr.Lang.EastAsia;
var FontSlot = g_font_detector.Get_FontClass( Text[Index].Value.charCodeAt(0), Hint, lcid, bCS, bRTL );
Context.SetFontSlot( FontSlot );
g_oTextMeasurer.SetFontSlot( FontSlot );
Context.FillText( X, Y, Text[Index].Value );
X += g_oTextMeasurer.Measure( Text[Index].Value ).Width;
......@@ -839,6 +848,9 @@ CAbstractNum.prototype =
}
case numbering_lvltext_Num:
{
Context.SetFontSlot( fontslot_ASCII );
g_oTextMeasurer.SetFontSlot( fontslot_ASCII );
var CurLvl = Text[Index].Value;
switch( this.Lvl[CurLvl].Format )
{
......@@ -970,9 +982,6 @@ CAbstractNum.prototype =
}
}
}
Context.SetFont( OldFont );
g_oTextMeasurer.SetFont( OldFont2 );
},
Measure : function(Context, Lvl, NumInfo, NumTextPr)
......@@ -980,9 +989,8 @@ CAbstractNum.prototype =
var X = 0;
var Text = this.Lvl[Lvl].LvlText;
var OldFont = Context.GetFont();
Context.SetFont( NumTextPr );
Context.SetTextPr( NumTextPr );
Context.SetFontSlot( fontslot_ASCII );
var Ascent = Context.GetAscender();
for ( var Index = 0; Index < Text.length; Index++ )
......@@ -991,12 +999,21 @@ CAbstractNum.prototype =
{
case numbering_lvltext_Text:
{
var Hint = NumTextPr.RFonts.Hint;
var bCS = NumTextPr.CS;
var bRTL = NumTextPr.RTL;
var lcid = NumTextPr.Lang.EastAsia;
var FontSlot = g_font_detector.Get_FontClass( Text[Index].Value.charCodeAt(0), Hint, lcid, bCS, bRTL );
Context.SetFontSlot( FontSlot );
X += Context.Measure( Text[Index].Value ).Width;
break;
}
case numbering_lvltext_Num:
{
Context.SetFontSlot( fontslot_ASCII );
var CurLvl = Text[Index].Value;
switch( this.Lvl[CurLvl].Format )
{
......@@ -1123,7 +1140,6 @@ CAbstractNum.prototype =
}
}
Context.SetFont( OldFont );
return { Width : X, Ascent : Ascent };
},
......
......@@ -3353,12 +3353,12 @@ Paragraph.prototype =
var Numbering = this.Parent.Get_Numbering();
var NumLvl = Numbering.Get_AbstractNum( NumPr.NumId ).Lvl[NumPr.Lvl];
var NumSuff = NumLvl.Suff;
var NumJc = NumLvl.Jc;
var NumInfo = this.Parent.Internal_GetNumInfo( this.Id, NumPr );
var NumTextPr = this.Get_CompiledPr2(false).TextPr.Copy();
NumTextPr.Merge( this.TextPr.Value );
NumTextPr.Merge( NumLvl.TextPr );
NumTextPr.FontFamily.Name = NumTextPr.RFonts.Ascii.Name;
return NumTextPr;
},
......@@ -4323,6 +4323,13 @@ Paragraph.prototype =
X += NumberingItem.WidthVisible;
// Восстановим настройки
pGraphics.SetTextPr( CurTextPr );
if ( true === bVisitedHyperlink )
pGraphics.b_color1( 128, 0, 151, 255 );
else
pGraphics.b_color1( CurTextPr.Color.r, CurTextPr.Color.g, CurTextPr.Color.b, 255);
}
else if ( para_PresentationNumbering === this.Numbering.Type )
{
......
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