/// <summary> /// Gets the slide title if any. /// </summary> /// <returns>The title or an empty string.</returns> public string GetTitle() { string title = string.Empty; // Find the title if any Shape titleShape = this.slidePart.Slide.Descendants <Shape>().FirstOrDefault(sp => IsShapeATitle(sp)); if (titleShape != null) { title = string.Join(" ", titleShape.Descendants <A.Paragraph>().Select(p => PowerpointParagraph.GetTexts(p))); } return(title); }
/// <summary> /// Gets all the notes associated with the slide. /// </summary> /// <returns>All the notes.</returns> /// <remarks> /// <see href="http://msdn.microsoft.com/en-us/library/office/gg278319.aspx">Working with Notes Slides</see> /// </remarks> public IEnumerable <string> GetNotes() { var notes = new List <string>(); if (this.slidePart.NotesSlidePart != null) { notes.AddRange(this.slidePart.NotesSlidePart.NotesSlide.Descendants <A.Paragraph>().Select(p => PowerpointParagraph.GetTexts(p))); } return(notes); }
/// <summary> /// Gets all the texts found inside the slide. /// </summary> /// <returns>The list of texts detected into the slide.</returns> /// <remarks> /// Some strings inside the array can be empty, this happens when all A.Text from a paragraph are empty /// <see href="http://msdn.microsoft.com/en-us/library/office/cc850836">How to: Get All the Text in a Slide in a Presentation</see> /// </remarks> public IEnumerable <string> GetTexts() { return(this.slidePart.Slide.Descendants <A.Paragraph>().Select(p => PowerpointParagraph.GetTexts(p))); }