Commit 1358806b authored by Oleg.Korshul's avatar Oleg.Korshul

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55657 954022d7-b5bf-4e40-9824-e11837661b57
parent ddb0bc95
...@@ -143,6 +143,7 @@ function CTextMeasurer() ...@@ -143,6 +143,7 @@ function CTextMeasurer()
// RFonts // RFonts
this.m_oTextPr = null; this.m_oTextPr = null;
this.m_oGrFonts = new CGrRFonts();
this.m_oLastFont = new CFontSetup(); this.m_oLastFont = new CFontSetup();
this.Init = function() this.Init = function()
...@@ -187,18 +188,16 @@ function CTextMeasurer() ...@@ -187,18 +188,16 @@ function CTextMeasurer()
this.SetTextPr = function(textPr, theme) this.SetTextPr = function(textPr, theme)
{ {
this.m_oTextPr = textPr.Copy(); this.m_oTextPr = textPr;
this.theme = theme; if (theme)
var FontScheme = theme.themeElements.fontScheme; this.m_oGrFonts.checkFromTheme(theme.themeElements.fontScheme, this.m_oTextPr.RFonts);
this.m_oTextPr.RFonts.Ascii = {Name: FontScheme.checkFont(this.m_oTextPr.RFonts.Ascii.Name), Index: -1}; else
this.m_oTextPr.RFonts.EastAsia = {Name: FontScheme.checkFont(this.m_oTextPr.RFonts.EastAsia.Name), Index: -1}; this.m_oGrFonts = this.m_oTextPr.RFonts;
this.m_oTextPr.RFonts.HAnsi = {Name: FontScheme.checkFont(this.m_oTextPr.RFonts.HAnsi.Name), Index: -1};
this.m_oTextPr.RFonts.CS = {Name: FontScheme.checkFont(this.m_oTextPr.RFonts.CS.Name), Index: -1};
}; };
this.SetFontSlot = function(slot, fontSizeKoef) this.SetFontSlot = function(slot, fontSizeKoef)
{ {
var _rfonts = this.m_oTextPr.RFonts; var _rfonts = this.m_oGrFonts;
var _lastFont = this.m_oLastFont; var _lastFont = this.m_oLastFont;
switch (slot) switch (slot)
......
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