Package org.docx4j.openpackaging.parts

Examples of org.docx4j.openpackaging.parts.ThemePart


    StyleDefinitionsPart sdp = mdp.getStyleDefinitionsPart();
    Styles styles = (Styles)XmlUtils.unmarshalString(stylesXML)
    sdp.setJaxbElement(styles);

    // Theme part
    ThemePart themePart = new ThemePart();   
    Theme theme = (Theme)XmlUtils.unmarshalString(themeXML);     
    themePart.setJaxbElement(theme);
    mdp.addTargetPart(themePart);
   
    // Settings
    DocumentSettingsPart dsp = new DocumentSettingsPart();
    dsp.setJaxbElement(createSettings());
View Full Code Here


    StyleDefinitionsPart sdp = mdp.getStyleDefinitionsPart();
    Styles styles = (Styles)XmlUtils.unmarshalString(stylesXML)
    sdp.setJaxbElement(styles);

    // Theme part
    ThemePart themePart = new ThemePart();   
    Theme theme = (Theme)XmlUtils.unmarshalString(themeXML);     
    themePart.setJaxbElement(theme);
    mdp.addTargetPart(themePart);
   
    // Settings
    DocumentSettingsPart dsp = new DocumentSettingsPart();
    dsp.setJaxbElement(createSettings());
View Full Code Here

    StyleDefinitionsPart sdp = mdp.getStyleDefinitionsPart();
    Styles styles = (Styles)XmlUtils.unmarshalString(stylesXML)
    sdp.setJaxbElement(styles);

    // Theme part
    ThemePart themePart = new ThemePart();   
    Theme theme = (Theme)XmlUtils.unmarshalString(themeXML);     
    themePart.setJaxbElement(theme);
    mdp.addTargetPart(themePart);
   
    // Settings
    DocumentSettingsPart dsp = new DocumentSettingsPart();
    dsp.setJaxbElement(createSettings());
View Full Code Here

    StyleDefinitionsPart sdp = mdp.getStyleDefinitionsPart();
    Styles styles = (Styles)XmlUtils.unmarshalString(stylesXML)
    sdp.setJaxbElement(styles);

    // Theme part
    ThemePart themePart = new ThemePart();   
    Theme theme = (Theme)XmlUtils.unmarshalString(themeXML);     
    themePart.setJaxbElement(theme);
    mdp.addTargetPart(themePart);
   
//    // Settings
//    DocumentSettingsPart dsp = new DocumentSettingsPart();
//    dsp.setJaxbElement(createSettings());
View Full Code Here

    StyleDefinitionsPart sdp = mdp.getStyleDefinitionsPart();
    Styles styles = (Styles)XmlUtils.unmarshalString(stylesXML)
    sdp.setJaxbElement(styles);

    // Theme part
    ThemePart themePart = new ThemePart();   
    Theme theme = (Theme)XmlUtils.unmarshalString(themeXML);     
    themePart.setJaxbElement(theme);
    mdp.addTargetPart(themePart);
   
//    // Settings
//    DocumentSettingsPart dsp = new DocumentSettingsPart();
//    dsp.setJaxbElement(createSettings());
View Full Code Here

    StyleDefinitionsPart sdp = mdp.getStyleDefinitionsPart();
    Styles styles = (Styles)XmlUtils.unmarshalString(stylesXML)
    sdp.setJaxbElement(styles);

    // Theme part
    ThemePart themePart = new ThemePart();   
    Theme theme = (Theme)XmlUtils.unmarshalString(themeXML);     
    themePart.setJaxbElement(theme);
    mdp.addTargetPart(themePart);
   
    // Settings
    DocumentSettingsPart dsp = new DocumentSettingsPart();
    dsp.setJaxbElement(createSettings());
View Full Code Here

    return new FontTablePart(new PartName(partName));
  }

  public Part CreateThemePartObject(String partName)
      throws InvalidFormatException {
    return new ThemePart(new PartName(partName));
  }
View Full Code Here

      masterPart.addSlideLayoutIdListEntry(layoutPart);
     
      layoutPart.addTargetPart(masterPart);
     
      // Theme part
      ThemePart themePart = new ThemePart(new PartName("/ppt/theme/theme1.xml"));
      java.io.InputStream is = ResourceUtils.getResourceViaProperty(
          "pptx4j.openpackaging.packages.PresentationMLPackage.DefaultTheme",
            "org/docx4j/openpackaging/parts/PresentationML/theme.xml");
      themePart.unmarshal(is);
     
      // .. add it in 2 places ..
      masterPart.addTargetPart(themePart);
      pp.addTargetPart(themePart);
     
View Full Code Here

    pp.getJaxbElement().setNotesMasterIdLst(createNotesMasterIdListPlusEntry(ppRelNmp.getId()));
   
    // .. NotesMasterPart typically has a rel to a theme
    // .. can we get away without it?
    // Nope .. read this in from a file
    ThemePart themePart = new ThemePart(new PartName("/ppt/theme/theme2.xml"));
      // TODO: read it from a string instead
    themePart.unmarshal(
        FileUtils.openInputStream(new File(System.getProperty("user.dir") + "/theme2.xml"))
      );   
    nmp.addTargetPart(themePart);
   
    // 2. Notes slide
View Full Code Here

   
   
  public static List<Style> generateStyles(PresentationMLPackage presentationMLPackage)
    throws InvalidFormatException {
   
    ThemePart tp = (ThemePart)presentationMLPackage.getParts().getParts().get(
        new PartName("/ppt/theme/theme1.xml"));
    FontScheme fontScheme = tp.getFontScheme();
    List<Style> styles = new ArrayList<Style>();
   
    // root
    styles.add(TextStyles.createVirtualStylesForDocDefaults(fontScheme));
   
View Full Code Here

TOP

Related Classes of org.docx4j.openpackaging.parts.ThemePart

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.