Ejemplo n.º 1
0
        private void Initialize(RtfTableCellStyle style)
        {
            _definition       = new RtfTableCellDefinition(this);
            _definition.Style = style;

            IsPartOfATable       = true;
            IsFormattingIncluded = style != null && style.DefaultParagraphFormatting != null;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Copies all properties of the current cell style to the specified RtfTableCellStyle object.
        /// </summary>
        /// <param name="cellStyle">Cell style object to copy to.</param>
        public void CopyTo(RtfTableCellStyle cellStyle)
        {
            cellStyle._verticalAlign = this._verticalAlign;

            this._borders.Top.CopyTo(cellStyle._borders.Top);
            this._borders.Left.CopyTo(cellStyle._borders.Left);
            this._borders.Bottom.CopyTo(cellStyle._borders.Bottom);
            this._borders.Right.CopyTo(cellStyle._borders.Right);

            cellStyle._textFlow = this._textFlow;
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of ESCommon.Rtf.RtfTableCell class.
        /// </summary>
        /// <param name="width">Cell width in centimeters.</param>
        /// <param name="text">Text displayed in the cell.</param>
        /// <param name="style">Style applied to the cell.</param>
        public RtfTableCell(float width, RtfParagraphContentBase text, RtfTableCellStyle style) : base(text, style.DefaultParagraphFormatting)
        {
            Initialize(style);

            _definition.Width = TwipConverter.ToTwip(width, MetricUnit.Centimeter);
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Initializes a new instance of ESCommon.Rtf.RtfTableCell class.
 /// </summary>
 /// <param name="text">Text displayed in the cell.</param>
 /// <param name="style">Style applied to the cell.</param>
 public RtfTableCell(RtfParagraphContentBase text, RtfTableCellStyle style) : base(text, style.DefaultParagraphFormatting)
 {
     Initialize(style);
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Initializes a new instance of ESCommon.Rtf.RtfTableCell class.
 /// </summary>
 /// <param name="text">Text displayed in the cell.</param>
 /// <param name="style">Style applied to the cell.</param>
 public RtfTableCell(string text, RtfTableCellStyle style) : base(text, style.DefaultParagraphFormatting)
 {
     Initialize(style);
 }
Ejemplo n.º 6
0
 internal RtfTableCellDefinition(RtfTableCell cell, RtfTableCellStyle style)
 {
     _cell  = cell;
     _style = style;
 }