internal void FromBorderPropertiesType(VerticalBorder border) { if (border.Color != null) { clrReal = new SLColor(listThemeColors, listIndexedColors); clrReal.FromSpreadsheetColor(border.Color); HasColor = !clrReal.IsEmpty(); } else { RemoveColor(); } if (border.Style != null) { BorderStyle = border.Style.Value; } else { RemoveBorderStyle(); } }
internal void FromFont(Font f) { SetAllNull(); if ((f.FontName != null) && (f.FontName.Val != null)) { FontName = f.FontName.Val.Value; } if ((f.FontCharSet != null) && (f.FontCharSet.Val != null)) { CharacterSet = f.FontCharSet.Val.Value; } if ((f.FontFamilyNumbering != null) && (f.FontFamilyNumbering.Val != null)) { FontFamily = f.FontFamilyNumbering.Val.Value; } if (f.Bold != null) { if (f.Bold.Val == null) { Bold = true; } else if (f.Bold.Val.Value) { Bold = true; } } if (f.Italic != null) { if (f.Italic.Val == null) { Italic = true; } else if (f.Italic.Val.Value) { Italic = true; } } if (f.Strike != null) { if (f.Strike.Val == null) { Strike = true; } else if (f.Strike.Val.Value) { Strike = true; } } if (f.Outline != null) { if (f.Outline.Val == null) { Outline = true; } else if (f.Outline.Val.Value) { Outline = true; } } if (f.Shadow != null) { if (f.Shadow.Val == null) { Shadow = true; } else if (f.Shadow.Val.Value) { Shadow = true; } } if (f.Condense != null) { if (f.Condense.Val == null) { Condense = true; } else if (f.Condense.Val.Value) { Condense = true; } } if (f.Extend != null) { if (f.Extend.Val == null) { Extend = true; } else if (f.Extend.Val.Value) { Extend = true; } } if (f.Color != null) { clrFontColor = new SLColor(listThemeColors, listIndexedColors); clrFontColor.FromSpreadsheetColor(f.Color); HasFontColor = !clrFontColor.IsEmpty(); } if ((f.FontSize != null) && (f.FontSize.Val != null)) { FontSize = f.FontSize.Val.Value; } if (f.Underline != null) { if (f.Underline.Val != null) { Underline = f.Underline.Val.Value; } else { Underline = UnderlineValues.Single; } } if ((f.VerticalTextAlignment != null) && (f.VerticalTextAlignment.Val != null)) { VerticalAlignment = f.VerticalTextAlignment.Val.Value; } if ((f.FontScheme != null) && (f.FontScheme.Val != null)) { FontScheme = f.FontScheme.Val.Value; } }