Package org.apache.poi

Examples of org.apache.poi.POIDataSamples


  // SlideShow primed on the test data
  private SlideShow ss;
  private HSLFSlideShow hss;

  public TestRecordSetup() throws Exception {
        POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
    hss = new HSLFSlideShow(slTests.openResourceAsStream("basic_test_ppt_file.ppt"));
    ss = new SlideShow(hss);
  }
View Full Code Here


     * <p>This test methods reads all property set streams from all POI
     * filesystems in the "data" directory.</p>
     */
    public void testReadAllFiles()
    {
        POIDataSamples _samples = POIDataSamples.getHPSFInstance();
        final File dataDir = _samples.getFile("");
        final File[] fileList = dataDir.listFiles(new FileFilter()
            {
                public boolean accept(final File f)
                {
                    return f.isFile();
View Full Code Here

  /**
   * Create/open the slideshows
   */
  public void setUp() throws Exception {
        POIDataSamples slTests = POIDataSamples.getSlideShowInstance();

    hss_one = new HSLFSlideShow(slTests.openResourceAsStream("Single_Coloured_Page.ppt"));
    ss_one = new SlideShow(hss_one);

    hss_two = new HSLFSlideShow(slTests.openResourceAsStream("basic_test_ppt_file.ppt"));
    ss_two = new SlideShow(hss_two);

    hss_three = new HSLFSlideShow(slTests.openResourceAsStream("incorrect_slide_order.ppt"));
    ss_three = new SlideShow(hss_three);
  }
View Full Code Here

public final class TestCounts extends TestCase {
  // SlideShow primed on the test data
  private SlideShow ss;

  public TestCounts() throws Exception {
        POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
    HSLFSlideShow hss = new HSLFSlideShow(slTests.openResourceAsStream("basic_test_ppt_file.ppt"));
    ss = new SlideShow(hss);
  }
View Full Code Here

public final class TestSheetText extends TestCase {
  // SlideShow primed on the test data
  private SlideShow ss;

  public TestSheetText() throws Exception {
        POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
    HSLFSlideShow hss = new HSLFSlideShow(slTests.openResourceAsStream("basic_test_ppt_file.ppt"));
    ss = new SlideShow(hss);
  }
View Full Code Here

   * Check we can still get the text from a file where the
   *  TextProps don't have enough data.
   * (Make sure we don't screw up / throw an exception etc)
   */
  public void testWithShortTextPropData() throws Exception {
        POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
    HSLFSlideShow hss = new HSLFSlideShow(slTests.openResourceAsStream("iisd_report.ppt"));
    SlideShow sss = new SlideShow(hss);

    // Should come out with 10 slides, no notes
    assertEquals(10, sss.getSlides().length);
    assertEquals(0, sss.getNotes().length);
View Full Code Here

public final class TestNotesText extends TestCase {
  // SlideShow primed on the test data
  private SlideShow ss;

  public TestNotesText() throws Exception {
        POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
    HSLFSlideShow hss = new HSLFSlideShow(slTests.openResourceAsStream("basic_test_ppt_file.ppt"));
    ss = new SlideShow(hss);
  }
View Full Code Here

public final class TestSlideChangeNotes extends TestCase {
  // SlideShow primed on the test data
  private SlideShow ss;

  public TestSlideChangeNotes() throws Exception {
        POIDataSamples _slTests = POIDataSamples.getSlideShowInstance();
    HSLFSlideShow hss = new HSLFSlideShow(_slTests.openResourceAsStream("basic_test_ppt_file.ppt"));
    ss = new SlideShow(hss);
  }
View Full Code Here

     * @exception FileNotFoundException if the file to be read does not exist.
     * @exception IOException if any other I/O exception occurs.
     */
    public void setUp() throws IOException
    {
        POIDataSamples samples = POIDataSamples.getHPSFInstance();
        final File data = samples.getFile(POI_FS);
        poiFiles = Util.readPOIFiles(data);
    }
View Full Code Here

  /**
   * Load up a test PPT file with rich data
   */
    public void setUp() throws Exception {
        POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
    String filename = "Single_Coloured_Page_With_Fonts_and_Alignments.ppt";
    pfs = new POIFSFileSystem(slTests.openResourceAsStream(filename));
    hss = new HSLFSlideShow(pfs);
    ss = new SlideShow(hss);
    }
View Full Code Here

TOP

Related Classes of org.apache.poi.POIDataSamples

Copyright © 2018 www.massapicom. 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.