internal InstanceStyle(StyleContainer parent, StyleProperties props)
     : base(parent)
 {
     if (props.Ixfe != 0)
     {
         m_xf = (BIFF8Style)m_context.GetStyle(props.Ixfe).Clone();
         return;
     }
     m_xf           = new BIFF8Style(props);
     m_font         = new BIFF8Font(props);
     m_fontModified = true;
     m_format       = props.NumberFormat;
 }
 internal override void Finished()
 {
     if (m_font != null)
     {
         m_xf.Ifnt = m_context.AddFont(m_font);
         m_font    = null;
     }
     if (m_format != null)
     {
         m_xf.Ifmt = m_context.AddFormat(m_format);
         m_format  = null;
     }
     m_context.CellIxfe = m_context.AddStyle(m_xf);
 }
 public override void Finished()
 {
     if (this.m_font != null)
     {
         this.m_xf.Ifnt = base.m_context.AddFont(this.m_font);
         this.m_font    = null;
     }
     if (this.m_format != null)
     {
         this.m_xf.Ifmt = base.m_context.AddFormat(this.m_format);
         this.m_format  = null;
     }
     base.m_context.CellIxfe = base.m_context.AddStyle(this.m_xf);
 }
 private BIFF8Font GetFont()
 {
     if (m_font == null)
     {
         if (m_xf.Ifnt != 0)
         {
             m_font = m_context.GetFont(m_xf.Ifnt);
         }
         else
         {
             m_font = new BIFF8Font();
         }
     }
     return(m_font);
 }
 private BIFF8Font GetFont()
 {
     if (this.m_font == null)
     {
         if (this.m_xf.Ifnt != 0)
         {
             this.m_font = base.m_context.GetFont(this.m_xf.Ifnt);
         }
         else
         {
             this.m_font = new BIFF8Font();
         }
     }
     return(this.m_font);
 }
 public InstanceStyle(StyleContainer parent, StyleProperties props)
     : base(parent)
 {
     if (props.Ixfe != 0)
     {
         this.m_xf = (BIFF8Style)base.m_context.GetStyle(props.Ixfe).Clone();
     }
     else
     {
         this.m_xf           = new BIFF8Style(props);
         this.m_font         = new BIFF8Font(props);
         this.m_fontModified = true;
         this.m_format       = props.NumberFormat;
     }
 }
        public static long FONT(BinaryWriter output, BIFF8Font font)
        {
            long   position = output.BaseStream.Position;
            string text     = font.Name;

            if (text.Length > 256)
            {
                text = text.Substring(0, 256);
            }
            bool flag = true;

            byte[] buffer = StringUtil.DecodeTo1Byte(text);
            char[] array  = text.ToCharArray();
            for (int i = 0; i < text.Length; i++)
            {
                if (!flag)
                {
                    break;
                }
                if ((array[i] & 0xFF00) > 0)
                {
                    flag = false;
                }
            }
            int num = 0;

            if (flag)
            {
                num = text.Length;
            }
            else
            {
                num    = text.Length * 2;
                buffer = StringUtil.DecodeTo2ByteLE(text);
            }
            RecordFactory.WriteHeader(output, 49, 16 + num);
            output.Write(font.RecordData, 0, font.RecordData.Length);
            output.Write((byte)text.Length);
            output.Write(!flag);
            output.Write(buffer);
            return(output.BaseStream.Position - position);
        }
 private void CloneFont()
 {
     m_font         = (BIFF8Font)m_font.Clone();
     m_fontModified = true;
 }
 private void CloneFont()
 {
     this.m_font         = (BIFF8Font)this.m_font.Clone();
     this.m_fontModified = true;
 }