Exemplo n.º 1
0
        public static Table Create(Word.Table wordTable, IImageAccessor imageAccessor, IStyleFactory styleFactory)
        {
            var grid = wordTable.InitializeGrid();

            var cells = wordTable
                        .InitializeCells(imageAccessor, styleFactory.ForTable(wordTable.Properties()))
                        .OrderBy(c => c.GridPosition.Row)
                        .ThenBy(c => c.GridPosition.Column)
                        .ToArray();

            var tableBorder = wordTable
                              .Properties()
                              .TableBorders
                              .GetBorder();

            return(new Table(cells, grid, tableBorder));
        }