Пример #1
0
        public static IParagraph GetParagraph(SCPresentation presentation, SlideElementQuery paragraphRequest)
        {
            IAutoShape autoShape = presentation.Slides[paragraphRequest.SlideIndex]
                                   .Shapes.First(sp => sp.Id == paragraphRequest.ShapeId) as IAutoShape;

            return(autoShape.TextBox.Paragraphs[paragraphRequest.ParagraphIndex]);
        }
Пример #2
0
        public static IParagraph GetParagraph(MemoryStream presentationStream, SlideElementQuery paragraphRequest)
        {
            SCPresentation presentation = SCPresentation.Open(presentationStream, false);
            IAutoShape     autoShape    = presentation.Slides[paragraphRequest.SlideIndex]
                                          .Shapes.First(sp => sp.Id == paragraphRequest.ShapeId) as IAutoShape;

            return(autoShape.TextBox.Paragraphs[paragraphRequest.ParagraphIndex]);
        }
Пример #3
0
        public static IPortion GetParagraphPortion(SCPresentation presentation, SlideElementQuery elementRequest)
        {
            IAutoShape autoShape = (IAutoShape)presentation.Slides[elementRequest.SlideIndex].Shapes.First(sp => sp.Id == elementRequest.ShapeId);

            return(autoShape.TextBox.Paragraphs[elementRequest.ParagraphIndex].Portions[elementRequest.PortionIndex]);
        }