using System; using System.Collections.Generic; using TheArtOfDev.HtmlRenderer.Core.Utils; namespace TheArtOfDev.HtmlRenderer.Core.Dom { /// /// Used to make space on vertical cell combination /// internal sealed class CssSpacingBox : CssBox { #region Fields and Consts private readonly CssBox _extendedBox; /// /// the index of the row where box starts /// private readonly int _startRow; /// /// the index of the row where box ends /// private readonly int _endRow; #endregion public CssSpacingBox(CssBox tableBox, ref CssBox extendedBox, int startRow) : base(tableBox, new HtmlTag("none", false, new Dictionary { { "colspan", "1" } })) { _extendedBox = extendedBox; Display = CssConstants.None; _startRow = startRow; _endRow = startRow + Int32.Parse(extendedBox.GetAttribute("rowspan", "1")) - 1; } public CssBox ExtendedBox { get { return _extendedBox; } } /// /// Gets the index of the row where box starts /// public int StartRow { get { return _startRow; } } /// /// Gets the index of the row where box ends /// public int EndRow { get { return _endRow; } } } }