public int AddStyle(StyleProperties props)
        {
            BIFF8Style bIFF8Style = new BIFF8Style(props);
            BIFF8Font  font       = new BIFF8Font(props);

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