Examples of HSLFSlideShow


Examples of org.apache.poi.hslf.HSLFSlideShow

   }
   
   protected void parse(
         DirectoryNode root, XHTMLContentHandler xhtml)
         throws IOException, SAXException, TikaException {
      HSLFSlideShow ss = new HSLFSlideShow(root);
      SlideShow _show = new SlideShow(ss);
      Slide[] _slides = _show.getSlides();

      xhtml.startElement("div", "class", "slideShow");
View Full Code Here

Examples of org.apache.poi.hslf.HSLFSlideShow

  /**
   * Constructs a Powerpoint document from an input stream.
   */
  public SlideShow(InputStream inputStream) throws IOException {
    this(new HSLFSlideShow(inputStream));
  }
View Full Code Here

Examples of org.apache.poi.hslf.HSLFSlideShow

   * Creates a PowerPointExtractor, from an open POIFSFileSystem
   *
   * @param fs the POIFSFileSystem containing the PowerPoint document
   */
  public PowerPointExtractor(POIFSFileSystem fs) throws IOException {
    this(new HSLFSlideShow(fs));
  }
View Full Code Here

Examples of org.apache.poi.hslf.HSLFSlideShow

  public PowerPointExtractor(POIFSFileSystem fs) throws IOException {
    this(new HSLFSlideShow(fs));
  }

  public PowerPointExtractor(DirectoryNode dir, POIFSFileSystem fs) throws IOException {
    this(new HSLFSlideShow(dir, fs));
  }
View Full Code Here

Examples of org.apache.poi.hslf.HSLFSlideShow

    String dirnameHWPF = System.getProperty("HWPF.testdata.path");
    String filenameHWPF = dirnameHWPF + "/test2.doc";

    FileInputStream fisHSLF = new FileInputStream(filenameHSLF);
    pfs = new POIFSFileSystem(fisHSLF);
    doc = new HSLFSlideShow(pfs);

    FileInputStream fisHWPF = new FileInputStream(filenameHWPF);
    pfs2 = new POIFSFileSystem(fisHWPF);
    doc2 = new HWPFDocument(pfs2);
  }
View Full Code Here

Examples of org.apache.poi.hslf.HSLFSlideShow

  protected void setUp() throws Exception {
    String dirname = System.getProperty("HSLF.testdata.path");

    // Basic (non rich) test file
    String filename = dirname + "/basic_test_ppt_file.ppt";
    hss = new HSLFSlideShow(filename);
    ss = new SlideShow(hss);

    // Rich test file A
    filename = dirname + "/Single_Coloured_Page.ppt";
    hssRichA = new HSLFSlideShow(filename);
    ssRichA = new SlideShow(hssRichA);

    // Rich test file B
    filename = dirname + "/Single_Coloured_Page_With_Fonts_and_Alignments.ppt";
    hssRichB = new HSLFSlideShow(filename);
    ssRichB = new SlideShow(hssRichB);

    // Rich test file C - has paragraph styles that run out before
    //   the character ones do
    filenameC = dirname + "/ParagraphStylesShorterThanCharStyles.ppt";
    hssRichC = new HSLFSlideShow(filenameC);
    ssRichC = new SlideShow(hssRichC);
  }
View Full Code Here

Examples of org.apache.poi.hslf.HSLFSlideShow

      // Write out and back in
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      h[i].write(baos);
      ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());

      HSLFSlideShow readHSLF = new HSLFSlideShow(bais);
      SlideShow readS = new SlideShow(readHSLF);

      // Tweak existing one again, to ensure really worked
      rtr.setBold(false);
      rtr.setFontSize(17);
View Full Code Here

Examples of org.apache.poi.hslf.HSLFSlideShow

   *  contents.
   * @param s
   */
  private void assertMatchesSLTWC(SlideShow s) throws Exception {
    // Grab a new copy of slideshow C
    SlideShow refC = new SlideShow(new HSLFSlideShow(filenameC));

    // Write out the 2nd SLWT in the active document
    SlideListWithText refSLWT = refC.getDocumentRecord().getSlideListWithTexts()[1];
    byte[] raw_slwt = writeRecord(refSLWT);

View Full Code Here

Examples of org.apache.poi.hslf.HSLFSlideShow

    r.writeOut(baos);
    return baos.toByteArray();
  }

  public void testIndentationLevel() throws Exception {
    SlideShow ppt = new SlideShow(new HSLFSlideShow(new File(System.getProperty("HSLF.testdata.path"), "ParagraphStylesShorterThanCharStyles.ppt").getPath()));
    Slide[] sl = ppt.getSlides();
    for (int i = 0; i < sl.length; i++) {
      TextRun[] txt = sl[i].getTextRuns();
      for (int j = 0; j < txt.length; j++) {
        RichTextRun[] rt = txt[j].getRichTextRuns();
View Full Code Here

Examples of org.apache.poi.hslf.HSLFSlideShow

    protected void setUp() throws Exception {
    String dirname = System.getProperty("HSLF.testdata.path");

    // Basic (non rich) test file
    String filename = dirname + "/basic_test_ppt_file.ppt";
    hss = new HSLFSlideShow(filename);
    ss = new SlideShow(hss);

    // Rich test file
    filename = dirname + "/Single_Coloured_Page.ppt";
    hssRich = new HSLFSlideShow(filename);
    ssRich = new SlideShow(hssRich);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.