Package org.apache.poi.xslf.usermodel

Examples of org.apache.poi.xslf.usermodel.XSLFSlideLayout


      for (XSLFSlide slide : slides) {
         try {
            XSLFNotes notes = slide.getNotes();
            XSLFComments comments = slide.getComments();
            XSLFSlideLayout layout = slide.getSlideLayout();
            XSLFSlideMaster master = layout.getSlideMaster();

            // TODO Do the slide's name
            // (Stored in docProps/app.xml)

            // Do the slide's text if requested
            if (slideText) {
               extractText(slide.getCommonSlideData(), false, text);
              
               // If requested, get text from the master and it's layout
               if(masterText) {
                  if(layout != null) {
                     extractText(layout.getCommonSlideData(), true, text);
                  }
                  if(master != null) {
                     extractText(master.getCommonSlideData(), true, text);
                  }
               }
View Full Code Here


      for (XSLFSlide slide : slides) {
         try {
            XSLFNotes notes = slide.getNotes();
            XSLFComments comments = slide.getComments();
            XSLFSlideLayout layout = slide.getSlideLayout();
            XSLFSlideMaster master = layout.getSlideMaster();

            // TODO Do the slide's name
            // (Stored in docProps/app.xml)

            // Do the slide's text if requested
            if (slideText) {
               extractText(slide.getCommonSlideData(), false, text);
              
               // If requested, get text from the master and it's layout
               if(masterText) {
                  if(layout != null) {
                     extractText(layout.getCommonSlideData(), true, text);
                  }
                  if(master != null) {
                     extractText(master.getCommonSlideData(), true, text);
                  }
               }
View Full Code Here

        XSLFSlide blankSlide = ppt.createSlide();

        XSLFSlideMaster defaultMaster = ppt.getSlideMasters()[0];

        // title slide
        XSLFSlideLayout titleLayout = defaultMaster.getLayout(SlideLayout.TITLE);
        XSLFSlide slide1 = ppt.createSlide(titleLayout);
        XSLFTextShape title1 = slide1.getPlaceholder(0);
        title1.setText("First Title");

        // title and content
        XSLFSlideLayout titleBodyLayout = defaultMaster.getLayout(SlideLayout.TITLE_AND_CONTENT);
        XSLFSlide slide2 = ppt.createSlide(titleBodyLayout);

        XSLFTextShape title2 = slide2.getPlaceholder(0);
        title2.setText("Second Title");
View Full Code Here

      for (XSLFSlide slide : slides) {
         try {
            XSLFNotes notes = slide.getNotes();
            XSLFComments comments = slide.getComments();
            XSLFSlideLayout layout = slide.getSlideLayout();
            XSLFSlideMaster master = layout.getSlideMaster();

            // TODO Do the slide's name
            // (Stored in docProps/app.xml)

            // Do the slide's text if requested
            if (slideText) {
               extractText(slide.getCommonSlideData(), false, text);
              
               // If requested, get text from the master and it's layout
               if(masterText) {
                  if(layout != null) {
                     extractText(layout.getCommonSlideData(), true, text);
                  }
                  if(master != null) {
                     extractText(master.getCommonSlideData(), true, text);
                  }
               }
View Full Code Here

      // there can be multiple masters each referencing a number of layouts
      // for demonstration purposes we use the first (default) slide master
      XSLFSlideMaster defaultMaster = ppt.getSlideMasters()[0];

      // title slide
      XSLFSlideLayout titleLayout = defaultMaster.getLayout(SlideLayout.TITLE);
      // fill the placeholders
      XSLFSlide slide1 = ppt.createSlide(titleLayout);

      // title and content
      XSLFSlideLayout titleBodyLayout = defaultMaster.getLayout(SlideLayout.TITLE_AND_CONTENT);
      XSLFSlide slide2 = ppt.createSlide(titleBodyLayout);

      FileOutputStream out = new FileOutputStream("data/Apache_Layouts.pptx");
    ppt.write(out);
    out.close();
View Full Code Here

TOP

Related Classes of org.apache.poi.xslf.usermodel.XSLFSlideLayout

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.