public byte[] ToByteArray()
        {
            int num = 0;

            byte[] array = new byte[this.SprmSize];
            num += Word97Writer.AddSprm(array, num, 54810, 0, this.m_borderColorsTop);
            num += Word97Writer.AddSprm(array, num, 54811, 0, this.m_borderColorsLeft);
            num += Word97Writer.AddSprm(array, num, 54812, 0, this.m_borderColorsBottom);
            num += Word97Writer.AddSprm(array, num, 54813, 0, this.m_borderColorsRight);
            return(array);
        }
        public byte[] ToByteArray()
        {
            byte[] array = new byte[this.SprmSize];
            int    num   = 0;

            num += Word97Writer.AddSprm(array, num, 54802, 0, this.m_cellShading);
            if (this.m_cellShading2 != null)
            {
                num += Word97Writer.AddSprm(array, num, 54806, 0, this.m_cellShading2);
                if (this.m_cellShading3 != null)
                {
                    num += Word97Writer.AddSprm(array, num, 54796, 0, this.m_cellShading3);
                }
            }
            return(array);
        }
Esempio n. 3
0
        public ListLevelOnFile(int level, RPLFormat.ListStyles listStyle, Word97Writer writer)
        {
            this.m_style   = listStyle;
            this._iStartAt = 1;
            int num = 0;

            this._grpprlPapx = new byte[0];
            this._dxaSpace   = 360;
            this._rgbxchNums = new byte[9];
            this._dxaIndent  = 0;
            this._ixchFollow = 0;
            string fontName = "Arial";

            switch (listStyle)
            {
            case RPLFormat.ListStyles.Numbered:
                this._rgbxchNums[0] = 1;
                this._bulletText    = new char[2]
                {
                    (char)(ushort)level,
                    '.'
                };
                switch (level % 3)
                {
                case 0:
                    this.setNumberFormatInternal(WordNumberFormat.Arabic);
                    break;

                case 1:
                    this.setNumberFormatInternal(WordNumberFormat.RomanLower);
                    break;

                case 2:
                    this.setNumberFormatInternal(WordNumberFormat.Lowercase);
                    break;
                }
                break;

            case RPLFormat.ListStyles.Bulleted:
                this.setNumberFormatInternal(WordNumberFormat.Bullet);
                switch (level % 3)
                {
                case 0:
                    this._bulletText = new char[1]
                    {
                        '·'
                    };
                    fontName = "Symbol";
                    break;

                case 1:
                    this._bulletText = new char[1]
                    {
                        'o'
                    };
                    fontName = "Courier New";
                    break;

                case 2:
                    this._bulletText = new char[1]
                    {
                        '§'
                    };
                    fontName = "Wingdings";
                    break;
                }
                break;

            default:
                this.setNumberFormatInternal(WordNumberFormat.Bullet);
                this._bulletText = new char[1]
                {
                    ' '
                };
                break;
            }
            this._grpprlChpx = new byte[20];
            num = 0;
            int param = writer.WriteFont(fontName);

            num += Word97Writer.AddSprm(this._grpprlChpx, num, 19023, param, null);
            num += Word97Writer.AddSprm(this._grpprlChpx, num, 19038, param, null);
            num += Word97Writer.AddSprm(this._grpprlChpx, num, 19024, param, null);
            num += Word97Writer.AddSprm(this._grpprlChpx, num, 19025, param, null);
            int param2 = 20;

            num += Word97Writer.AddSprm(this._grpprlChpx, num, 19011, param2, null);
        }