public themeFontDefinition_Handler(ThemeFontDefinition dataObject, ParsingContext context) : base(context) { m_dataObject = dataObject; }
public themeFontDefinition_Handler(ParsingContext context) : base(context) { m_dataObject = new ThemeFontDefinition(); }
void ProcessThemeFontDefinitions(ThemeFontDefinition tfd, bool isMajor) { if (tfd != null) { FCSFont fontInfo; if (m_dataObject.Fonts.TryGetValue( tfd.HAnsiTheme, out fontInfo)) { fontInfo.HAnsiTheme = true; if (isMajor) fontInfo.Major = true; else fontInfo.Minor = true; } if (!string.IsNullOrEmpty( tfd.EastAsiaTheme)) { if (m_dataObject.Fonts.TryGetValue( tfd.EastAsiaTheme, out fontInfo)) { fontInfo.EastAsiaTheme = true; if (isMajor) fontInfo.Major = true; else fontInfo.Minor = true; } } else { string tnr = "Times New Roman"; //appears to be the default for the others if (m_dataObject.Fonts.TryGetValue(tnr, out fontInfo)) { fontInfo.EastAsiaTheme = true; if (isMajor) fontInfo.Major = true; else fontInfo.Minor = true; } } if (!string.IsNullOrEmpty( tfd.BidiTheme)) { if (m_dataObject.Fonts.TryGetValue( tfd.BidiTheme, out fontInfo)) { fontInfo.BidiTheme = true; if (isMajor) fontInfo.Major = true; else fontInfo.Minor = true; } } else { string tnr = "Times New Roman"; //appears to be the default for the others if (m_dataObject.Fonts.TryGetValue(tnr, out fontInfo)) { fontInfo.BidiTheme = true; if (isMajor) fontInfo.Major = true; else fontInfo.Minor = true; } } } }