Beispiel #1
0
        internal int AddStyle(StyleProperties props)
        {
            BIFF8Style bIFF8Style = new BIFF8Style(props);
            BIFF8Font  font       = new BIFF8Font(props);

            bIFF8Style.Ifnt = AddFont(font);
            bIFF8Style.Ifmt = AddFormat(props.NumberFormat);
            return(AddStyle(bIFF8Style));
        }
 internal BIFF8Font(StyleProperties props)
     : this()
 {
     Bold = props.Bold;
     if (props.Color != null)
     {
         Color = ((BIFF8Color)props.Color).PaletteIndex;
     }
     Size   = props.Size;
     Italic = props.Italic;
     if (props.Name != null)
     {
         Name = props.Name;
     }
     CharSet       = props.CharSet;
     ScriptStyle   = props.ScriptStyle;
     Strikethrough = props.Strikethrough;
     Underline     = props.Underline;
 }
 internal BIFF8Style(StyleProperties props)
     : this()
 {
     if (props.BackgroundColor != null)
     {
         BackgroundColor = props.BackgroundColor;
     }
     if (props.BorderBottomColor != null)
     {
         BorderBottomColor = props.BorderBottomColor;
     }
     BorderBottomStyle = props.BorderBottomStyle;
     if (props.BorderDiagColor != null)
     {
         BorderDiagColor = props.BorderDiagColor;
     }
     BorderDiagStyle = props.BorderDiagStyle;
     BorderDiagPart  = props.BorderDiagPart;
     if (props.BorderLeftColor != null)
     {
         BorderLeftColor = props.BorderLeftColor;
     }
     BorderLeftStyle = props.BorderLeftStyle;
     if (props.BorderRightColor != null)
     {
         BorderRightColor = props.BorderRightColor;
     }
     BorderRightStyle = props.BorderRightStyle;
     if (props.BorderTopColor != null)
     {
         BorderTopColor = props.BorderTopColor;
     }
     BorderTopStyle      = props.BorderTopStyle;
     HorizontalAlignment = props.HorizontalAlignment;
     IndentLevel         = props.IndentLevel;
     Orientation         = props.Orientation;
     TextDirection       = props.TextDirection;
     VerticalAlignment   = props.VerticalAlignment;
     WrapText            = props.WrapText;
 }
Beispiel #4
0
 internal void AddSharedStyle(string id, StyleProperties style)
 {
     m_cache[id] = style;
 }