Ejemplo n.º 1
0
        private ITable CreateTable(nat.Table table)
        {
            var tableRange = table.Range;
            var cells      = tableRange
                             .Cells
                             .Cast <nat.Cell>()
                             .Select(CreateCell)
                             .ToList();

            var description = _descFactory.CreateFromRange(tableRange, TableDescriptionPrefix);

            return(new Table(cells, description));
        }
Ejemplo n.º 2
0
        public async Task <IReadOnlyCollection <IShape> > CreateAllAsync(nat.Document document)
        {
            return(await Task.Run(
                       () =>
            {
                var inlineShapes = document
                                   .InlineShapes
                                   .Cast <nat.InlineShape>()
                                   .ToList();

                var shapeDescriptions = inlineShapes.Select(f => _descFactory.CreateFromRange(f.Range, PictureDescriptionPrefix));
                var shapes = shapeDescriptions.Select(sd => new Shape(sd)).ToList();

                return shapes;
            }));
        }