Beispiel #1
0
        public static IEnumerable <Cell> InitializeCells(
            this Word.Table table,
            IImageAccessor imageAccessor,
            IStyleFactory styleFactory)
        {
            var spans = table.PrepareCellSpans();
            var cells = table
                        .Rows()
                        .SelectMany((row, index) =>
            {
                var rowCells = row.InitializeCells(index, spans, imageAccessor, styleFactory);
                return(rowCells);
            })
                        .Where(c => !c.GridPosition.IsRowMergedCell)
                        .ToArray();

            return(cells);
        }