Package org.openxmlformats.schemas.presentationml.x2006.main

Examples of org.openxmlformats.schemas.presentationml.x2006.main.CTCommentList


            _placeholderByTypeMap = new HashMap<Integer, XSLFSimpleShape>();

            for(XSLFShape sh : getShapes()){
                if(sh instanceof XSLFTextShape){
                    XSLFTextShape sShape = (XSLFTextShape)sh;
                    CTPlaceholder ph = sShape.getCTPlaceholder();
                    if(ph != null) {
                        _placeholders.add(sShape);
                        if(ph.isSetIdx()) {
                            int idx = (int)ph.getIdx();
                            _placeholderByIdMap.put(idx, sShape);
                        }
                        if(ph.isSetType()){
                            _placeholderByTypeMap.put(ph.getType().intValue(), sShape);
                        }
                    }
                }
            }
        }
View Full Code Here


     * type attribute for this element
     *
     * @param placeholder
     */
    public void setPlaceholder(Placeholder placeholder){
        CTShape sh =  (CTShape)getXmlObject();
        CTApplicationNonVisualDrawingProps nv = sh.getNvSpPr().getNvPr();
        if(placeholder == null) {
            if(nv.isSetPh()) nv.unsetPh();
        } else {
            nv.addNewPh().setType(STPlaceholderType.Enum.forInt(placeholder.ordinal() + 1));
        }
View Full Code Here

    /**
     * @param shapeId 1-based shapeId
     */
    static CTShape prototype(int shapeId) {
        CTShape ct = CTShape.Factory.newInstance();
        CTShapeNonVisual nvSpPr = ct.addNewNvSpPr();
        CTNonVisualDrawingProps cnv = nvSpPr.addNewCNvPr();
        cnv.setName("AutoShape " + shapeId);
        cnv.setId(shapeId + 1);
        nvSpPr.addNewCNvSpPr();
        nvSpPr.addNewNvPr();
        CTShapeProperties spPr = ct.addNewSpPr();
        CTPresetGeometry2D prst = spPr.addNewPrstGeom();
        prst.setPrst(STShapeType.RECT);
        prst.addNewAvLst();
        return ct;
    }
View Full Code Here

        prst.addNewAvLst();
        return ct;
    }

    protected CTTextBody getTextBody(boolean create){
        CTShape shape = (CTShape) getXmlObject();
        CTTextBody txBody = shape.getTxBody();
        if (txBody == null && create) {
            txBody = shape.addNewTxBody();
            txBody.addNewBodyPr();
            txBody.addNewLstStyle();
        }
        return txBody;
    }
View Full Code Here

  }

  private void extractContent(StringBuilder buffy, XMLSlideShow xmlSlideShow) throws IOException, XmlException {
    XSLFSlide[] slides = xmlSlideShow.getSlides();
    for (XSLFSlide slide : slides) {
      CTSlide rawSlide = slide._getCTSlide();
      CTSlideIdListEntry slideId = slide._getCTSlideId();

      CTNotesSlide notes = xmlSlideShow._getXSLFSlideShow().getNotes(slideId);
      CTCommentList comments = xmlSlideShow._getXSLFSlideShow().getSlideComments(slideId);

      extractShapeContent(buffy, rawSlide.getCSld().getSpTree());

      if (comments != null) {
        for (CTComment comment : comments.getCmArray()) {
          buffy.append(comment.getText()).append(' ');
        }
View Full Code Here

    // Build the slides list
    CTSlideIdList slideIds = slideShow.getSlideReferences();
    slides = new XSLFSlide[slideIds.getSldIdList().size()];
    for(int i=0; i<slides.length; i++) {
      CTSlideIdListEntry slideId = slideIds.getSldIdArray(i);
      CTSlide slide = slideShow.getSlide(slideId);
      slides[i] = new XSLFSlide(slide, slideId, this);
    }
   
    // Build the notes list - TODO
  }
View Full Code Here

        XSLFSlideShow slideShow = (XSLFSlideShow) extractor.getDocument();
        XMLSlideShow xmlSlideShow = new XMLSlideShow(slideShow);

        XSLFSlide[] slides = xmlSlideShow.getSlides();
        for (XSLFSlide slide : slides) {
            CTSlide rawSlide = slide._getCTSlide();
            CTSlideIdListEntry slideId = slide._getCTSlideId();

            CTNotesSlide notes = xmlSlideShow._getXSLFSlideShow().getNotes(
                    slideId);
            CTCommentList comments = xmlSlideShow._getXSLFSlideShow()
                    .getSlideComments(slideId);

            xhtml.startElement("div");
            extractShapeContent(rawSlide.getCSld().getSpTree(), xhtml);

            if (comments != null) {
                for (CTComment comment : comments.getCmArray()) {
                    xhtml.element("p", comment.getText());
                }
View Full Code Here

   
    CTSlideIdListEntry[] slideRefs =
      slideshow._getHSLFXML().getSlideReferences().getSldIdArray();
    for (int i = 0; i < slideRefs.length; i++) {
      try {
        CTSlide slide =
          slideshow._getHSLFXML().getSlide(slideRefs[i]);
        CTNotesSlide notes =
          slideshow._getHSLFXML().getNotes(slideRefs[i]);
       
        if(slideText) {
          extractText(slide.getCSld().getSpTree(), text);
        }
        if(notesText && notes != null) {
          extractText(notes.getCSld().getSpTree(), text);
        }
      } catch(Exception e) {
View Full Code Here

   
    // Build the main masters list - TODO
    CTSlideMasterIdList masterIds = slideShow.getSlideMasterReferences();
   
    // Build the slides list
    CTSlideIdList slideIds = slideShow.getSlideReferences();
    slides = new XSLFSlide[slideIds.getSldIdList().size()];
    for(int i=0; i<slides.length; i++) {
      CTSlideIdListEntry slideId = slideIds.getSldIdArray(i);
      CTSlide slide = slideShow.getSlide(slideId);
      slides[i] = new XSLFSlide(slide, slideId, this);
    }
   
    // Build the notes list - TODO
View Full Code Here

     * @param layout
     * @return created slide
     */
    public XSLFSlide createSlide(XSLFSlideLayout layout) {
        int slideNumber = 256, cnt = 1;
        CTSlideIdList slideList;
        if (!_presentation.isSetSldIdLst()) slideList = _presentation.addNewSldIdLst();
        else {
            slideList = _presentation.getSldIdLst();
            for(CTSlideIdListEntry slideId : slideList.getSldIdList()){
                slideNumber = (int)Math.max(slideId.getId() + 1, slideNumber);
                cnt++;
            }
        }

        XSLFSlide slide = (XSLFSlide)createRelationship(
                XSLFRelation.SLIDE, XSLFFactory.getInstance(), cnt);

        CTSlideIdListEntry slideId = slideList.addNewSldId();
        slideId.setId(slideNumber);
        slideId.setId2(slide.getPackageRelationship().getId());

        layout.copyLayout(slide);
        slide.addRelation(layout.getPackageRelationship().getId(), layout);
View Full Code Here

TOP

Related Classes of org.openxmlformats.schemas.presentationml.x2006.main.CTCommentList

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.