Package org.docx4j.wml

Examples of org.docx4j.wml.Tag


  }
 
  private void setTag(SdtBlock sdtList, BigInteger numId, BigInteger ilvl) {
   
    SdtPr sdtPr = new SdtPr();
    Tag tag = new Tag();
    sdtPr.setTag(tag);
   
    sdtList.setSdtPr(sdtPr);
   
    // Bullets = UL.  Work it out.
    ListNumberingDefinition lnd = ndp.getInstanceListDefinitions().get(numId.toString());
    if (lnd==null) {
      // Default to UL
      log.warn("Couldn't find instance list for numId " + numId);
      tag.setVal("HTML_ELEMENT=OL");
      return;
    }
   
    AbstractListNumberingDefinition ald = lnd.getAbstractListDefinition();
    if (ald==null) {
      // Default to UL
      log.warn("Couldn't find abstract list for instance list " + numId);
      tag.setVal("HTML_ELEMENT=OL");
      return;
    }
   
    ListLevel level = ald.getListLevels().get(ilvl.toString());
    if (level==null) {
      // Default to UL
      log.warn("Couldn't find level " + ilvl.toString() + " in instance list ");
      tag.setVal("HTML_ELEMENT=OL");
      return;     
    }
   
    if (level.IsBullet()) {
      tag.setVal("HTML_ELEMENT=UL");     
    } else {
      tag.setVal("HTML_ELEMENT=OL");           
    }
   
  }
View Full Code Here


    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();
    tag.setVal(tagVal);
   
    sdtPr.setTag(tag);
    if (rPr != null) {
      sdtPr.getRPrOrAliasOrLock().add((RPr)XmlUtils.deepCopy(rPr));
      /*
 
View Full Code Here

    private void handleSdt(Object o) {
     
      SdtElement sdt = (SdtElement)o;
      SdtPr sdtPr = sdt.getSdtPr();
     
      Tag tag = sdtPr.getTag();     
      HashMap<String, String> map = null;
      if (tag!=null) {
        map = QueryString.parseQueryString(
          tag.getVal(), true);
      }     
     
      SdtPr.Picture pic = getPicture(sdtPr);
      if (sdtPr.getDataBinding()!=null && pic!=null) {
       
View Full Code Here

            .getDataBinding());
        if (binding!=null) {
          System.out.println(callback.indent + "  binding: " + binding.getXpath() );         
        }
       
        Tag tag = sdtPr.getTag();
        if (tag == null)
          return;

        System.out.println(callback.indent + "  " + tag.getVal() );         
       
        HashMap<String, String> map = QueryString.parseQueryString(
            tag.getVal(), true);
       
        String conditionId = map.get(OpenDoPEHandler.BINDING_ROLE_CONDITIONAL);
        String repeatId = map.get(OpenDoPEHandler.BINDING_ROLE_REPEAT);
        String xp = map.get(OpenDoPEHandler.BINDING_ROLE_XPATH);
       
View Full Code Here

            public boolean apply(Object object) {
                if(!(object instanceof SdtElement)) {
                    return false;
                }
                SdtElement sdtBlock = (SdtElement) object;
                Tag tag = sdtBlock.getSdtPr().getTag();
                return tag != null;
            }
        };
    }
View Full Code Here

            public boolean apply(Object object) {
                if(!(object instanceof SdtElement)) {
                    return false;
                }
                SdtElement sdtBlock = (SdtElement) object;
                Tag tag = sdtBlock.getSdtPr().getTag();
                return tag != null && Objects.equal(tagVal, tag.getVal());
            }
           
        };
    }
View Full Code Here

            public boolean apply(Object object) {
                if(!(object instanceof SdtElement)) {
                    return false;
                }
                SdtElement sdtBlock = (SdtElement) object;
                Tag tag = sdtBlock.getSdtPr().getTag();
                return tag != null;
            }
        };
    }
View Full Code Here

            public boolean apply(Object object) {
                if(!(object instanceof SdtElement)) {
                    return false;
                }
                SdtElement sdtBlock = (SdtElement) object;
                Tag tag = sdtBlock.getSdtPr().getTag();
                return tag != null && Objects.equal(tagVal, tag.getVal());
            }
           
        };
    }
View Full Code Here

TOP

Related Classes of org.docx4j.wml.Tag

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.