Commit 5ec044a9 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@47180 954022d7-b5bf-4e40-9824-e11837661b57
parent 39137c7b
......@@ -8952,24 +8952,10 @@ Paragraph.prototype =
}
var CurTextPr = this.CompiledPr.Pr.TextPr.Copy();
var Style = ( true === CurTextPr.Bold ? 1 : 0 ) + ( true === CurTextPr.Italic ? 2 : 0 );
var Key = "" + CurTextPr.FontFamily.Name + "_" + Style + "_" + CurTextPr.FontSize;
this.FontMap.Map[Key] =
{
Name : CurTextPr.FontFamily.Name,
Style : Style,
Size : CurTextPr.FontSize
};
CurTextPr.Document_CreateFontMap( this.FontMap.Map );
CurTextPr.Merge( this.TextPr.Value );
var Style = ( true === CurTextPr.Bold ? 1 : 0 ) + ( true === CurTextPr.Italic ? 2 : 0 );
var Key = "" + CurTextPr.FontFamily.Name + "_" + Style + "_" + CurTextPr.FontSize;
this.FontMap.Map[Key] =
{
Name : CurTextPr.FontFamily.Name,
Style : Style,
Size : CurTextPr.FontSize
};
CurTextPr.Document_CreateFontMap( this.FontMap.Map );
for ( var Index = 0; Index < this.Content.length; Index++ )
{
......@@ -8992,14 +8978,7 @@ Paragraph.prototype =
// Копируем прямые настройки
CurTextPr.Merge( _CurTextPr );
Style = ( true === CurTextPr.Bold ? 1 : 0 ) + ( true === CurTextPr.Italic ? 2 : 0 );
Key = "" + CurTextPr.FontFamily.Name + "_" + Style + "_" + CurTextPr.FontSize;
this.FontMap.Map[Key] =
{
Name : CurTextPr.FontFamily.Name,
Style : Style,
Size : CurTextPr.FontSize
};
CurTextPr.Document_CreateFontMap( this.FontMap.Map );
}
}
this.FontMap.NeedRecalc = false;
......
......@@ -4912,6 +4912,59 @@ CTextPr.prototype =
if ( undefined != this.RFonts.CS )
AllFonts[this.RFonts.CS.Name] = true;
},
Document_CreateFontMap : function(FontMap)
{
var Style = ( true === this.Bold ? 1 : 0 ) + ( true === this.Italic ? 2 : 0 );
var StyleCS = ( true === this.BoldCS ? 1 : 0 ) + ( true === this.ItalicCS ? 2 : 0 );
var Size = this.FontSize;
var SizeCS = this.FontSizeCS;
var RFonts = this.RFonts;
if ( undefined != RFonts.Ascii )
{
var Key = "" + RFonts.Ascii.Name + "_" + Style + "_" + Size;
FontMap[Key] =
{
Name : RFonts.Ascii.Name,
Style : Style,
Size : Size
};
}
if ( undefined != RFonts.EastAsia )
{
var Key = "" + RFonts.EastAsia.Name + "_" + Style + "_" + Size;
FontMap[Key] =
{
Name : RFonts.EastAsia.Name,
Style : Style,
Size : Size
};
}
if ( undefined != RFonts.HAnsi )
{
var Key = "" + RFonts.HAnsi.Name + "_" + Style + "_" + Size;
FontMap[Key] =
{
Name : RFonts.HAnsi.Name,
Style : Style,
Size : Size
};
}
if ( undefined != RFonts.CS )
{
var Key = "" + RFonts.CS.Name + "_" + StyleCS + "_" + SizeCS;
FontMap[Key] =
{
Name : RFonts.CS.Name,
Style : StyleCS,
Size : SizeCS
};
}
}
}
......
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