示例#1
0
        internal static RowCollection Create(SlideTable table, P.GraphicFrame pGraphicFrame)
        {
            IEnumerable <A.TableRow> aTableRows = pGraphicFrame.GetATable().Elements <A.TableRow>();
            var rowList  = new List <SCTableRow>(aTableRows.Count());
            int rowIndex = 0;

            rowList.AddRange(aTableRows.Select(aTblRow => new SCTableRow(table, aTblRow, rowIndex++)));

            return(new RowCollection(rowList));
        }
示例#2
0
        public override IShape Create(OpenXmlCompositeElement pShapeTreeChild, SCSlide slide)
        {
            if (pShapeTreeChild is P.GraphicFrame pGraphicFrame)
            {
                A.GraphicData graphicData = pShapeTreeChild.GetFirstChild <A.Graphic>().GetFirstChild <A.GraphicData>();
                if (graphicData.Uri.Value.Equals(Uri, StringComparison.Ordinal))
                {
                    ShapeContext spContext      = _shapeContextBuilder.Build(pShapeTreeChild);
                    ILocation    innerTransform = _transformFactory.FromComposite(pGraphicFrame);
                    var          table          = new SlideTable(pGraphicFrame, innerTransform, spContext, slide);

                    return(table);
                }
            }

            return(Successor?.Create(pShapeTreeChild, slide));
        }