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

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


        _rows.add(row);
        return row;
    }

    static CTGraphicalObjectFrame prototype(int shapeId){
        CTGraphicalObjectFrame frame = CTGraphicalObjectFrame.Factory.newInstance();
        CTGraphicalObjectFrameNonVisual nvGr = frame.addNewNvGraphicFramePr();

        CTNonVisualDrawingProps cnv = nvGr.addNewCNvPr();
        cnv.setName("Table " + shapeId);
        cnv.setId(shapeId + 1);
        nvGr.addNewCNvGraphicFramePr().addNewGraphicFrameLocks().setNoGrp(true);
        nvGr.addNewNvPr();
       
        frame.addNewXfrm();
        CTGraphicalObjectData gr = frame.addNewGraphic().addNewGraphicData();
        XmlCursor cursor = gr.newCursor();
        cursor.toNextToken();
        cursor.beginElement(new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "tbl"));
        cursor.beginElement(new QName("http://schemas.openxmlformats.org/drawingml/2006/main", "tblPr"));
        cursor.toNextToken();
View Full Code Here


        return row;
    }

    static CTGraphicalObjectFrame prototype(int shapeId){
        CTGraphicalObjectFrame frame = CTGraphicalObjectFrame.Factory.newInstance();
        CTGraphicalObjectFrameNonVisual nvGr = frame.addNewNvGraphicFramePr();

        CTNonVisualDrawingProps cnv = nvGr.addNewCNvPr();
        cnv.setName("Table " + shapeId);
        cnv.setId(shapeId + 1);
        nvGr.addNewCNvGraphicFramePr().addNewGraphicFrameLocks().setNoGrp(true);
        nvGr.addNewNvPr();
       
        frame.addNewXfrm();
        CTGraphicalObjectData gr = frame.addNewGraphic().addNewGraphicData();
        XmlCursor cursor = gr.newCursor();
        cursor.toNextToken();
View Full Code Here

     * @throws IllegalArgumentException if the type of the specified shape
     *         is incompatible with this sheet (optional)
     */
    public boolean removeShape(XSLFShape xShape) {
        XmlObject obj = xShape.getXmlObject();
        CTGroupShape spTree = getSpTree();
        if(obj instanceof CTShape){
            spTree.getSpList().remove(obj);
        } else if (obj instanceof CTGroupShape){
            spTree.getGrpSpList().remove(obj);
        } else if (obj instanceof CTConnector){
            spTree.getCxnSpList().remove(obj);
        } else {
            throw new IllegalArgumentException("Unsupported shape: " + xShape);
        }
        return getShapeList().remove(xShape);
    }
View Full Code Here

     *
     * @param src the source sheet
     * @return modified <code>this</code>.
     */
    public XSLFSheet appendContent(XSLFSheet src){
        CTGroupShape spTree = getSpTree();
        int numShapes = getShapeList().size();

        CTGroupShape srcTree = src.getSpTree();
        for(XmlObject ch : srcTree.selectPath("*")){
            if(ch instanceof CTShape){ // simple shape
                spTree.addNewSp().set(ch);
            } else if (ch instanceof CTGroupShape){
                spTree.addNewGrpSp().set(ch);
            } else if (ch instanceof CTConnector){
View Full Code Here

    /**
     * @param shapeId 1-based shapeId
     */
    static CTGroupShape prototype(int shapeId) {
        CTGroupShape ct = CTGroupShape.Factory.newInstance();
        CTGroupShapeNonVisual nvSpPr = ct.addNewNvGrpSpPr();
        CTNonVisualDrawingProps cnv = nvSpPr.addNewCNvPr();
        cnv.setName("Group " + shapeId);
        cnv.setId(shapeId + 1);

        nvSpPr.addNewCNvGrpSpPr();
        nvSpPr.addNewNvPr();
        ct.addNewGrpSpPr();
        return ct;
    }
View Full Code Here

     * @throws IllegalArgumentException if the type of the specified shape
     *         is incompatible with this sheet (optional)
     */
    public boolean removeShape(XSLFShape xShape) {
        XmlObject obj = xShape.getXmlObject();
        CTGroupShape spTree = getSpTree();
        if(obj instanceof CTShape){
            spTree.getSpList().remove(obj);
        } else if (obj instanceof CTGroupShape){
            spTree.getGrpSpList().remove(obj);
        } else if (obj instanceof CTConnector){
            spTree.getCxnSpList().remove(obj);
        } else {
            throw new IllegalArgumentException("Unsupported shape: " + xShape);
        }
        return getShapeList().remove(xShape);
    }
View Full Code Here

    /**
     * @param shapeId 1-based shapeId
     */
    static CTGroupShape prototype(int shapeId) {
        CTGroupShape ct = CTGroupShape.Factory.newInstance();
        CTGroupShapeNonVisual nvSpPr = ct.addNewNvGrpSpPr();
        CTNonVisualDrawingProps cnv = nvSpPr.addNewCNvPr();
        cnv.setName("Group " + shapeId);
        cnv.setId(shapeId + 1);

        nvSpPr.addNewCNvGrpSpPr();
        nvSpPr.addNewNvPr();
        ct.addNewGrpSpPr();
        return ct;
    }
View Full Code Here

    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(' ');
        }
      }

      if (notes != null) {
        extractShapeContent(buffy, notes.getCSld().getSpTree());
      }
    }
  }
View Full Code Here

        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());
                }
            }

            if (notes != null) {
                extractShapeContent(notes.getCSld().getSpTree(), xhtml);
            }
            xhtml.endElement("div");
        }
    }
View Full Code Here

      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) {
        throw new RuntimeException(e);
      }
    }
View Full Code Here

TOP

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

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.