Beispiel #1
0
            public SpacingBox(Box tableBox, ref Box extendedBox, int startRow)
                : base(tableBox, new Tag("<none colspan=" + extendedBox.GetAttribute("colspan", "1") + ">"))
            {
                ExtendedBox = extendedBox;
                Display = Constants.None;

                StartRow = startRow;
                EndRow = startRow + int.Parse(extendedBox.GetAttribute("rowspan", "1")) - 1;
            }
Beispiel #2
0
        /// <summary>
        ///     Gets the rowspan of the specified box
        /// </summary>
        /// <param name="b"></param>
        private int GetRowSpan(Box b)
        {
            var att = b.GetAttribute("rowspan", "1");
            int rowspan;

            if (!int.TryParse(att, out rowspan))
            {
                return 1;
            }

            return rowspan;
        }
Beispiel #3
0
        /// <summary>
        ///     Gets the span attribute of the tag of the specified box
        /// </summary>
        /// <param name="b"></param>
        private int GetSpan(Box b)
        {
            var f = Value.ParseNumber(b.GetAttribute("span"), 1);

            return Math.Max(1, Convert.ToInt32(f));
        }
Beispiel #4
0
        /// <summary>
        ///     Gets the colspan of the specified box
        /// </summary>
        /// <param name="b"></param>
        private int GetColSpan(Box b)
        {
            var att = b.GetAttribute("colspan", "1");
            int colspan;

            if (!int.TryParse(att, out colspan))
            {
                return 1;
            }

            return colspan;
        }