Package org.apache.poi.hslf.record

Examples of org.apache.poi.hslf.record.Document


     * @return the picture data for this picture.
     */
    public PictureData getPictureData(){
        SlideShow ppt = getSheet().getSlideShow();
        PictureData[] pict = ppt.getPictureData();
        Document doc = ppt.getDocumentRecord();
        EscherContainerRecord dggContainer = doc.getPPDrawingGroup().getDggContainer();
        EscherContainerRecord bstore = (EscherContainerRecord)Shape.getEscherChild(dggContainer, EscherContainerRecord.BSTORE_CONTAINER);

        List lst = bstore.getChildRecords();
        int idx = getPictureIndex();
        if (idx == 0){
View Full Code Here


     * @return the picture data for this picture.
     */
    public PictureData getPictureData(){
        SlideShow ppt = getSheet().getSlideShow();
        PictureData[] pict = ppt.getPictureData();
        Document doc = ppt.getDocumentRecord();
        EscherContainerRecord dggContainer = doc.getPPDrawingGroup().getDggContainer();
        EscherContainerRecord bstore = (EscherContainerRecord)Shape.getEscherChild(dggContainer, EscherContainerRecord.BSTORE_CONTAINER);

        List lst = bstore.getChildRecords();
        int idx = getPictureIndex()-1;
        EscherBSERecord bse = (EscherBSERecord)lst.get(idx);
View Full Code Here

        return null;
    }

    protected EscherBSERecord getEscherBSERecord(){
        SlideShow ppt = getSheet().getSlideShow();
        Document doc = ppt.getDocumentRecord();
        EscherContainerRecord dggContainer = doc.getPPDrawingGroup().getDggContainer();
        EscherContainerRecord bstore = (EscherContainerRecord)Shape.getEscherChild(dggContainer, EscherContainerRecord.BSTORE_CONTAINER);
        if(bstore == null) {
            logger.log(POILogger.DEBUG, "EscherContainerRecord.BSTORE_CONTAINER was not found ");
            return null;
        }
View Full Code Here

    public void test47261() throws Exception {
        POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
        SlideShow ppt = new SlideShow(slTests.openResourceAsStream("47261.ppt"));
        Slide[] slides = ppt.getSlides();
        Document doc = ppt.getDocumentRecord();
        assertNotNull(doc.getSlideSlideListWithText());
        assertEquals(14, ppt.getSlides().length);
        int notesId = slides[0].getSlideRecord().getSlideAtom().getNotesID();
        assertTrue(notesId > 0);
        assertNotNull(doc.getNotesSlideListWithText());
        assertEquals(14, doc.getNotesSlideListWithText().getSlideAtomsSets().length);

        //remove all slides, corresponding notes should be removed too
        for (int i = 0; i < slides.length; i++) {
            ppt.removeSlide(0);
        }
        assertEquals(0, ppt.getSlides().length);
        assertEquals(0, ppt.getNotes().length);
        assertNull(doc.getSlideSlideListWithText());
        assertNull(doc.getNotesSlideListWithText());

    }
View Full Code Here

        return null;
    }

    protected EscherBSERecord getEscherBSERecord(){
        SlideShow ppt = getSheet().getSlideShow();
        Document doc = ppt.getDocumentRecord();
        EscherContainerRecord dggContainer = doc.getPPDrawingGroup().getDggContainer();
        EscherContainerRecord bstore = (EscherContainerRecord)Shape.getEscherChild(dggContainer, EscherContainerRecord.BSTORE_CONTAINER);
        if(bstore == null) {
            logger.log(POILogger.DEBUG, "EscherContainerRecord.BSTORE_CONTAINER was not found ");
            return null;
        }
View Full Code Here

        if(p != null) {
            int idx = p.getPropertyValue();

            Sheet sheet = shape.getSheet();
            SlideShow ppt = sheet.getSlideShow();
            Document doc = ppt.getDocumentRecord();
            EscherContainerRecord dggContainer = doc.getPPDrawingGroup().getDggContainer();
            EscherContainerRecord bstore = (EscherContainerRecord)Shape.getEscherChild(dggContainer, EscherContainerRecord.BSTORE_CONTAINER);
            List lst = bstore.getChildRecords();
            return ((EscherBSERecord)lst.get(idx-1)).getRef();
        }
        return 0;
View Full Code Here

    public void test47261() throws Exception {
        POIDataSamples slTests = POIDataSamples.getSlideShowInstance();
        SlideShow ppt = new SlideShow(slTests.openResourceAsStream("47261.ppt"));
        Slide[] slides = ppt.getSlides();
        Document doc = ppt.getDocumentRecord();
        assertNotNull(doc.getSlideSlideListWithText());
        assertEquals(14, ppt.getSlides().length);
        int notesId = slides[0].getSlideRecord().getSlideAtom().getNotesID();
        assertTrue(notesId > 0);
        assertNotNull(doc.getNotesSlideListWithText());
        assertEquals(14, doc.getNotesSlideListWithText().getSlideAtomsSets().length);

        //remove all slides, corresponding notes should be removed too
        for (int i = 0; i < slides.length; i++) {
            ppt.removeSlide(0);
        }
        assertEquals(0, ppt.getSlides().length);
        assertEquals(0, ppt.getNotes().length);
        assertNull(doc.getSlideSlideListWithText());
        assertNull(doc.getNotesSlideListWithText());

    }
View Full Code Here

    // Find the documents, and then their SLWT
    Record[] records = ss.getRecords();
    for(int i=0; i<records.length; i++) {
      if(records[i] instanceof Document) {
        Document doc = (Document)records[i];
        SlideListWithText[] slwts = doc.getSlideListWithTexts();

        System.out.println("Document at " + i + " had " + slwts.length + " SlideListWithTexts");
        if(slwts.length == 0) {
          System.err.println("** Warning: Should have had at least 1! **");
        }
 
View Full Code Here

        return null;
    }

    protected EscherBSERecord getEscherBSERecord(){
        SlideShow ppt = getSheet().getSlideShow();
        Document doc = ppt.getDocumentRecord();
        EscherContainerRecord dggContainer = doc.getPPDrawingGroup().getDggContainer();
        EscherContainerRecord bstore = (EscherContainerRecord)Shape.getEscherChild(dggContainer, EscherContainerRecord.BSTORE_CONTAINER);

        List lst = bstore.getChildRecords();
        int idx = getPictureIndex();
        if (idx == 0){
View Full Code Here

        return null;
    }

    protected EscherBSERecord getEscherBSERecord(){
        SlideShow ppt = getSheet().getSlideShow();
        Document doc = ppt.getDocumentRecord();
        EscherContainerRecord dggContainer = doc.getPPDrawingGroup().getDggContainer();
        EscherContainerRecord bstore = (EscherContainerRecord)Shape.getEscherChild(dggContainer, EscherContainerRecord.BSTORE_CONTAINER);
        if(bstore == null) {
            logger.log(POILogger.DEBUG, "EscherContainerRecord.BSTORE_CONTAINER was not found ");
            return null;
        }
View Full Code Here

TOP

Related Classes of org.apache.poi.hslf.record.Document

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.