Beispiel #1
0
  private static CTSlide prototype() {
    CTSlide ctSlide = CTSlide.Factory.newInstance();
    CTCommonSlideData cSld = ctSlide.addNewCSld();
    CTGroupShape spTree = cSld.addNewSpTree();

    CTGroupShapeNonVisual nvGrpSpPr = spTree.addNewNvGrpSpPr();
    CTNonVisualDrawingProps cnvPr = nvGrpSpPr.addNewCNvPr();
    cnvPr.setId(1);
    cnvPr.setName("");
    nvGrpSpPr.addNewCNvGrpSpPr();
    nvGrpSpPr.addNewNvPr();

    CTGroupShapeProperties grpSpr = spTree.addNewGrpSpPr();
    CTGroupTransform2D xfrm = grpSpr.addNewXfrm();
    CTPoint2D off = xfrm.addNewOff();
    off.setX(0);
    off.setY(0);
    CTPositiveSize2D ext = xfrm.addNewExt();
    ext.setCx(0);
    ext.setCy(0);
    CTPoint2D choff = xfrm.addNewChOff();
    choff.setX(0);
    choff.setY(0);
    CTPositiveSize2D chExt = xfrm.addNewChExt();
    chExt.setCx(0);
    chExt.setCy(0);
    ctSlide.addNewClrMapOvr().addNewMasterClrMapping();
    return ctSlide;
  }
Beispiel #2
0
  /**
   * Construct a SpreadsheetML slide from a package part
   *
   * @param part the package part holding the slide data, the content type must be <code>
   *     application/vnd.openxmlformats-officedocument.slide+xml</code>
   * @param rel the package relationship holding this slide, the relationship type must be
   *     http://schemas.openxmlformats.org/officeDocument/2006/relationships/slide
   */
  XSLFSlide(PackagePart part, PackageRelationship rel) throws IOException, XmlException {
    super(part, rel);

    SldDocument doc = SldDocument.Factory.parse(getPackagePart().getInputStream());
    _slide = doc.getSld();
    setCommonSlideData(_slide.getCSld());
  }
Beispiel #3
0
 /** @return the information about background appearance of this slide */
 @Override
 public XSLFBackground getBackground() {
   CTBackground bg = _slide.getCSld().getBg();
   if (bg != null) {
     return new XSLFBackground(bg, this);
   } else {
     return getMasterSheet().getBackground();
   }
 }
Beispiel #4
0
 /** Create a new slide */
 XSLFSlide() {
   super();
   _slide = prototype();
   setCommonSlideData(_slide.getCSld());
 }
Beispiel #5
0
 /** @param value whether shapes on the master slide should be shown or not. */
 public void setFollowMasterGraphics(boolean value) {
   _slide.setShowMasterSp(value);
 }
Beispiel #6
0
 /** @return whether shapes on the master slide should be shown or not. */
 public boolean getFollowMasterGraphics() {
   return !_slide.isSetShowMasterSp() || _slide.getShowMasterSp();
 }
 public XSLFSlide(CTSlide slide, CTSlideIdListEntry slideId, SlideShow parent) {
   super(parent);
   this.slide = slide;
   this.slideId = slideId;
   this.data = new XSLFCommonSlideData(slide.getCSld());
 }