Пример #1
0
        /// <summary>
        /// Renders a Table to RTF.
        /// </summary>
        internal override void Render()
        {
            DocumentElements elms = DocumentRelations.GetParent(_table) as DocumentElements;
            MergedCellList mrgdCellList = new MergedCellList(_table);

            foreach (Row row in _table.Rows)
            {
                RowRenderer rowRenderer = new RowRenderer(row, _docRenderer);
                rowRenderer.CellList = mrgdCellList;
                rowRenderer.Render();
            }
        }
Пример #2
0
        void InitRendering()
        {
            TableFormatInfo formatInfo = (TableFormatInfo)this.renderInfo.FormatInfo;
              this.bottomBorderMap = formatInfo.bottomBorderMap;
              this.connectedRowsMap = formatInfo.connectedRowsMap;
              this.formattedCells = formatInfo.formattedCells;

              this.currRow = formatInfo.startRow;
              this.startRow = formatInfo.startRow;
              this.endRow = formatInfo.endRow;

              this.mergedCells = formatInfo.mergedCells;
              this.lastHeaderRow = formatInfo.lastHeaderRow;
              this.startX = this.renderInfo.LayoutInfo.ContentArea.X;
              this.startY = this.renderInfo.LayoutInfo.ContentArea.Y;
        }
Пример #3
0
        void InitFormat(Area area, FormatInfo previousFormatInfo)
        {
            TableFormatInfo prevTableFormatInfo = (TableFormatInfo)previousFormatInfo;
              TableRenderInfo tblRenderInfo = new TableRenderInfo();
              tblRenderInfo.table = this.table;

              this.renderInfo = tblRenderInfo;

              if (prevTableFormatInfo != null)
              {
            this.mergedCells = prevTableFormatInfo.mergedCells;
            this.formattedCells = prevTableFormatInfo.formattedCells;
            this.bottomBorderMap = prevTableFormatInfo.bottomBorderMap;
            this.lastHeaderRow = prevTableFormatInfo.lastHeaderRow;
            this.connectedRowsMap = prevTableFormatInfo.connectedRowsMap;
            this.startRow = prevTableFormatInfo.endRow + 1;
              }
              else
              {
            this.mergedCells = new MergedCellList(this.table);
            FormatCells();
            CalcLastHeaderRow();
            CreateConnectedRows();
            CreateBottomBorderMap();
            if (this.doHorizontalBreak)
            {
              CalcLastHeaderColumn();
              CreateConnectedColumns();
            }
            this.startRow = this.lastHeaderRow + 1;
              }
              ((TableFormatInfo)tblRenderInfo.FormatInfo).mergedCells = this.mergedCells;
              ((TableFormatInfo)tblRenderInfo.FormatInfo).formattedCells = this.formattedCells;
              ((TableFormatInfo)tblRenderInfo.FormatInfo).bottomBorderMap = this.bottomBorderMap;
              ((TableFormatInfo)tblRenderInfo.FormatInfo).connectedRowsMap = this.connectedRowsMap;
              ((TableFormatInfo)tblRenderInfo.FormatInfo).lastHeaderRow = this.lastHeaderRow;
        }
Пример #4
0
        private void InitFormat(Area area, FormatInfo previousFormatInfo)
        {
            TableFormatInfo prevTableFormatInfo = (TableFormatInfo)previousFormatInfo;
            TableRenderInfo tblRenderInfo = new TableRenderInfo();
            tblRenderInfo.DocumentObject = _table;

            // Equalize the two borders, that are used to determine a rounded corner's border.
            // This way the innerWidth of the cell, which is got by the saved _formattedCells, is the same regardless of which corner relevant border is set.
            foreach (Row row in _table.Rows)
                foreach (Cell cell in row.Cells)
                    EqualizeRoundedCornerBorders(cell);

            _renderInfo = tblRenderInfo;

            if (prevTableFormatInfo != null)
            {
                _mergedCells = prevTableFormatInfo.MergedCells;
                _formattedCells = prevTableFormatInfo.FormattedCells;
                _bottomBorderMap = prevTableFormatInfo.BottomBorderMap;
                _lastHeaderRow = prevTableFormatInfo.LastHeaderRow;
                _connectedRowsMap = prevTableFormatInfo.ConnectedRowsMap;
                _startRow = prevTableFormatInfo.EndRow + 1;
            }
            else
            {
                _mergedCells = new MergedCellList(_table);
                FormatCells();
                CalcLastHeaderRow();
                CreateConnectedRows();
                CreateBottomBorderMap();
                if (_doHorizontalBreak)
                {
                    CalcLastHeaderColumn();
                    CreateConnectedColumns();
                }
                _startRow = _lastHeaderRow + 1;
            }
            ((TableFormatInfo)tblRenderInfo.FormatInfo).MergedCells = _mergedCells;
            ((TableFormatInfo)tblRenderInfo.FormatInfo).FormattedCells = _formattedCells;
            ((TableFormatInfo)tblRenderInfo.FormatInfo).BottomBorderMap = _bottomBorderMap;
            ((TableFormatInfo)tblRenderInfo.FormatInfo).ConnectedRowsMap = _connectedRowsMap;
            ((TableFormatInfo)tblRenderInfo.FormatInfo).LastHeaderRow = _lastHeaderRow;
        }
Пример #5
0
 internal Enumerator(MergedCellList list)
 {
     this.list = list;
 }
Пример #6
0
 internal Enumerator(MergedCellList list)
 {
     this.list = list;
 }