Package org.docx4j.wml

Examples of org.docx4j.wml.SdtContentBlock


    WordprocessingMLPackage wordMLPackage = createPkg();
   
    MainDocumentPart mdp = wordMLPackage.getMainDocumentPart();
   
    SdtBlock sdtBlock = new SdtBlock();
    SdtContentBlock sdtContentBlock = new SdtContentBlock();
   
    sdtBlock.setSdtContent(sdtContentBlock);
   
    mdp.getContent().add(sdtBlock);
   
View Full Code Here


          for (int i=0; i<=ilvl.intValue(); i++) {
            listSpec = new ListSpec(numId, BigInteger.valueOf(i));
            listSpec.sdtList = new SdtBlock();
            setTag(listSpec.sdtList, numId, ilvl);     

            listSpec.sdtList.setSdtContent(new SdtContentBlock());
           
            if (listStack.peek()==null) {
              resultElts.add(listSpec.sdtList);
            } else {
              listStack.peek().sdtList.getSdtContent().getContent().add(listSpec.sdtList);
            }
            listStack.push(listSpec);
          }
         
          listSpec.sdtList.getSdtContent().getContent().add(paragraph);
        } else if (numId==null) {
          log.error("TODO: encountered null numId!");
          closeAllLists();
          resultElts.add(o);
          continue
        } else // (numId.equals(listSpec.numId))
        {
          // same list
         
          if (ilvl.equals(listSpec.ilvl)) {
            // just add to it
          } else if (ilvl.compareTo(listSpec.ilvl)>0) {

            // deeper, so add levels
            for (int i=listSpec.ilvl.intValue(); i<ilvl.intValue(); i++) {
              listSpec = new ListSpec(numId, BigInteger.valueOf(i));
              listSpec.sdtList = new SdtBlock();
              setTag(listSpec.sdtList, numId, ilvl);     
             
              listSpec.sdtList.setSdtContent(new SdtContentBlock());
             
              if (listStack.peek()==null) {
                resultElts.add(listSpec.sdtList);
              } else {
                listStack.peek().sdtList.getSdtContent().getContent().add(listSpec.sdtList);
View Full Code Here

    SdtBlock sdtBlock = Context.getWmlObjectFactory().createSdtBlock();

    SdtPr sdtPr = Context.getWmlObjectFactory().createSdtPr();
    sdtBlock.setSdtPr(sdtPr);

    SdtContentBlock sdtContent = Context.getWmlObjectFactory().createSdtContentBlock();
    sdtBlock.setSdtContent(sdtContent);

    // For borders/shading, we'll use the values in this first paragraph.
    // We'll use a tag, so the XSLT can detect that its supposed to do something special.
    Tag tag = Context.getWmlObjectFactory().createTag();
View Full Code Here

TOP

Related Classes of org.docx4j.wml.SdtContentBlock

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.