Package org.apache.poi.hslf.usermodel

Examples of org.apache.poi.hslf.usermodel.SlideShow.createSlide()


        Slide s2 = ppt.getSlides()[1];
        assertEquals(257, s2._getSheetNumber());
        assertEquals(6, s2._getSheetRefId());

        // Add another slide, goes in at the end
        Slide s3 = ppt.createSlide();
        assertTrue(ppt.getSlides().length == 3);
        assertEquals(258, s3._getSheetNumber());
        assertEquals(8, s3._getSheetRefId());

View Full Code Here


     * Test that ShapeFactory works properly and returns <code>Table</code>
     */
    public void testShapeFactory() throws Exception {
        SlideShow ppt = new SlideShow();

        Slide slide = ppt.createSlide();

        Table tbl = new Table(2, 5);
        slide.addShape(tbl);

        TableCell cell = tbl.getCell(0, 0);
View Full Code Here

    /**
     * Error constructing Table when rownum=1
     */
    public void test45889(){
        SlideShow ppt = new SlideShow();
        Slide slide = ppt.createSlide();
        Shape[] shapes;
        Table tbl1 = new Table(1, 5);
        assertEquals(5, tbl1.getNumberOfColumns());
        assertEquals(1, tbl1.getNumberOfRows());
        slide.addShape(tbl1);
View Full Code Here

    private static POIDataSamples _slTests = POIDataSamples.getSlideShowInstance();

    public void testCreate() throws Exception {
        SlideShow ppt = new SlideShow();

        Slide slide = ppt.createSlide();

        String path = "/test-movie.mpg";
        int movieIdx = ppt.addMovie(path, MovieShape.MOVIE_MPEG);
        int thumbnailIdx = ppt.addPicture(_slTests.readFile("tomcat.png"), Picture.PNG);
View Full Code Here

public final class TestLine extends TestCase {

    public void testCreateLines() {
        SlideShow ppt = new SlideShow();

        Slide slide = ppt.createSlide();

        slide.addTitle().setText("Lines tester");

        Line line;
View Full Code Here

  /**
   * Test creation of TextRun objects.
   */
  public void testAddTextRun() {
    SlideShow ppt = new SlideShow();
    Slide slide = ppt.createSlide();

    assertNull(slide.getTextRuns());

    TextBox shape1 = new TextBox();
    TextRun run1 = shape1.getTextRun();
View Full Code Here

    assertSame(run1, box1.getTextRun());
    TextBox box2 = (TextBox)sh[1];
    assertSame(run2, box2.getTextRun());

    //test Table - a complex group of shapes containing text objects
    Slide slide2 = ppt.createSlide();
    assertNull(slide2.getTextRuns());
    Table table = new Table(2, 2);
    slide2.addShape(table);
    runs = slide2.getTextRuns();
    assertNotNull(runs);
View Full Code Here

     * Test adding shapes to <code>ShapeGroup</code>
     */
    public void testShapeGroup() throws Exception {
        SlideShow ppt = new SlideShow();

        Slide slide = ppt.createSlide();
        Dimension pgsize = ppt.getPageSize();

        ShapeGroup group = new ShapeGroup();

        group.setAnchor(new Rectangle(0, 0, (int)pgsize.getWidth(), (int)pgsize.getHeight()));
View Full Code Here

        assertEquals(1.0, sh.getLineWidth());
    }

    public void testShapeId() {
        SlideShow ppt = new SlideShow();
        Slide slide = ppt.createSlide();
        Shape shape = null;

        //EscherDgg is a document-level record which keeps track of the drawing groups
        EscherDggRecord dgg = ppt.getDocumentRecord().getPPDrawingGroup().getEscherDggRecord();
        EscherDgRecord dg = slide.getSheetContainer().getPPDrawing().getEscherDgRecord();
View Full Code Here

     *
     */
    public void testMultiplePictures() throws Exception {
        SlideShow ppt = new SlideShow();

        Slide s = ppt.createSlide();
        Slide s2 = ppt.createSlide();
        Slide s3 = ppt.createSlide();

        int idx = ppt.addPicture(_slTests.readFile("clock.jpg"), Picture.JPEG);
        Picture pict = new Picture(idx);
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.