コード例 #1
0
        public void WriteListEnd(int level, RPLFormat.ListStyles listStyle, bool endParagraph)
        {
            int listIndex = this.m_listIndex;

            for (int i = level; i < this.m_currentMaxListLevel; i++)
            {
                this.m_levelData[i].Reset();
            }
            if (this.m_levelData[level - 1].Style == listStyle)
            {
                listIndex = this.m_levelData[level - 1].ListIndex;
            }
            else
            {
                if (this.m_currentList != null)
                {
                    this.WriteCurrentListData();
                }
                this.m_currentList = new ListData(++this.m_listIndex);
                listIndex          = this.m_listIndex;
                this.m_currentList.SetLevel(level - 1, new ListLevelOnFile(level - 1, listStyle, this));
                this.m_levelData[level - 1].Style     = listStyle;
                this.m_levelData[level - 1].ListIndex = listIndex;
                this.m_currentMaxListLevel            = level;
            }
            this.m_parFormat.AddSprm(17931, listIndex, null);
            this.m_parFormat.AddSprm(9738, level - 1, null);
            if (endParagraph)
            {
                this.WriteParagraphEnd("\r", false);
            }
        }
コード例 #2
0
 public void WriteListEnd(int level, RPLFormat.ListStyles listStyle, bool endParagraph)
 {
     if (listStyle != 0)
     {
         OpenXmlParagraphModel currentParagraph = this.GetCurrentParagraph();
         currentParagraph.Properties.ListLevel   = level - 1;
         currentParagraph.Properties.ListStyleId = ((listStyle == RPLFormat.ListStyles.Bulleted) ? 1 : this._numberedListId);
     }
     if (endParagraph)
     {
         this.WriteParagraphEnd();
     }
 }
コード例 #3
0
        internal ListLevel Push(IHtmlReportWriter renderer, int listLevel, RPLFormat.ListStyles style, bool writeNoVerticalMarginClass)
        {
            int       num        = listLevel - m_listLevels.Count;
            ListLevel listLevel2 = null;

            while (num > 0)
            {
                listLevel2 = new ListLevel(renderer, m_listLevels.Count + 1, style);
                m_listLevels.Add(listLevel2);
                listLevel2.Open(writeNoVerticalMarginClass);
                num--;
            }
            return(listLevel2);
        }
コード例 #4
0
 public void PushTo(IHtmlReportWriter renderer, int listLevel, RPLFormat.ListStyles style, bool writeNoVerticalMargin)
 {
     if (listLevel == 0)
     {
         this.PopAll();
     }
     else if (this.m_listLevels.Count == 0)
     {
         this.Push(renderer, listLevel, style, writeNoVerticalMargin);
     }
     else
     {
         ListLevel listLevel2 = this.m_listLevels[this.m_listLevels.Count - 1];
         if (listLevel == listLevel2.Level)
         {
             if (style != listLevel2.Style)
             {
                 this.Pop();
                 this.Push(renderer, listLevel, style, writeNoVerticalMargin);
             }
         }
         else if (listLevel > listLevel2.Level)
         {
             this.Push(renderer, listLevel, style, writeNoVerticalMargin);
         }
         else
         {
             while (listLevel < listLevel2.Level)
             {
                 this.Pop();
                 if (this.m_listLevels.Count == 0)
                 {
                     listLevel2 = null;
                     break;
                 }
                 listLevel2 = this.m_listLevels[this.m_listLevels.Count - 1];
             }
             if (listLevel2 != null && listLevel2.Style != style)
             {
                 this.Pop();
             }
             this.Push(renderer, listLevel, style, writeNoVerticalMargin);
         }
     }
 }
コード例 #5
0
        internal void PushTo(IHtmlReportWriter renderer, int listLevel, RPLFormat.ListStyles style, bool writeNoVerticalMargin)
        {
            if (listLevel == 0)
            {
                PopAll();
                return;
            }
            if (m_listLevels.Count == 0)
            {
                Push(renderer, listLevel, style, writeNoVerticalMargin);
                return;
            }
            ListLevel listLevel2 = m_listLevels[m_listLevels.Count - 1];

            if (listLevel == listLevel2.Level)
            {
                if (style != listLevel2.Style)
                {
                    Pop();
                    Push(renderer, listLevel, style, writeNoVerticalMargin);
                }
                return;
            }
            if (listLevel > listLevel2.Level)
            {
                Push(renderer, listLevel, style, writeNoVerticalMargin);
                return;
            }
            while (listLevel < listLevel2.Level)
            {
                Pop();
                if (m_listLevels.Count == 0)
                {
                    listLevel2 = null;
                    break;
                }
                listLevel2 = m_listLevels[m_listLevels.Count - 1];
            }
            if (listLevel2 != null && listLevel2.Style != style)
            {
                Pop();
            }
            Push(renderer, listLevel, style, writeNoVerticalMargin);
        }
コード例 #6
0
 public ListLevel(IHtmlReportWriter renderer, int listLevel, RPLFormat.ListStyles style)
 {
     this.m_renderer  = renderer;
     this.m_listLevel = listLevel;
     this.m_style     = style;
 }
コード例 #7
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);
        }
コード例 #8
0
ファイル: ListLevel.cs プロジェクト: yhh1234/reportviewercore
 internal ListLevel(IHtmlReportWriter renderer, int listLevel, RPLFormat.ListStyles style)
 {
     m_renderer  = renderer;
     m_listLevel = listLevel;
     m_style     = style;
 }