Examples of PStyle


Examples of org.docx4j.wml.PPrBase.PStyle

   
    // Use our style!
    List<Object> xpathResults = wordMLPackage.getMainDocumentPart().getJAXBNodesViaXPath("//w:p", true);
    PPr ppr = Context.getWmlObjectFactory().createPPr();
    ((P)xpathResults.get(0)).setPPr(ppr);
    PStyle ps = Context.getWmlObjectFactory().createPPrBasePStyle();
    ps.setVal("testStyle");
    ppr.setPStyle(ps);
   
    setSetting(wordMLPackage, OVERRIDE);

    wordMLPackage.save(new File(System.getProperty("user.dir") + "/OUT_PStyleInTableTest.docx"));
View Full Code Here

Examples of org.docx4j.wml.PPrBase.PStyle

   
    // Use our style!
    List<Object> xpathResults = wordMLPackage.getMainDocumentPart().getJAXBNodesViaXPath("//w:p", true);
    PPr ppr = Context.getWmlObjectFactory().createPPr();
    ((P)xpathResults.get(0)).setPPr(ppr);
    PStyle ps = Context.getWmlObjectFactory().createPPrBasePStyle();
    ps.setVal("testStyle");
    ppr.setPStyle(ps);
   
    setSetting(wordMLPackage, OVERRIDE);

    wordMLPackage.save(new File(System.getProperty("user.dir") + "/OUT_PStyleInTableTest.docx"));
View Full Code Here

Examples of org.docx4j.wml.PPrBase.PStyle

    return null;
 
 
  void saveDocx(WordprocessingMLPackage wordMLPackage, String pStyle) throws Docx4JException, JAXBException {
   
    PStyle ps = null;
    if (pStyle!=null) {
      ps = Context.getWmlObjectFactory().createPPrBasePStyle();
      ps.setVal(pStyle);
    }
       
    List<Object> xpathResults = wordMLPackage.getMainDocumentPart().getJAXBNodesViaXPath("//w:p", true);
    ((P)xpathResults.get(0)).getPPr().setPStyle(ps);
   
View Full Code Here

Examples of org.docx4j.wml.PPrBase.PStyle

                p.getPPr().getPStyle().setVal(resultStyle);
              }
            }
          //}
        } else {       
          PStyle pstyle = p.getPPr().getPStyle();         
          String styleVal = pstyle.getVal();
          if (styleVal!=null) {
            if (tblStack.size()>0) {           
              log.debug("Fixing " + pstyle.getVal());
              String newStyle = getCellPStyle(styleVal,
                          styleVal.equals(defaultParagraphStyle));
              if (newStyle==null) {
                log.debug("getCellPStyle returned null, so leave as is");
              } else {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.