Package org.docx4j.model.fields.docproperty

Examples of org.docx4j.model.fields.docproperty.DocPropertyResolver


    @Override
    public String toString(AbstractWmlConversionContext context, FldSimpleModel model) throws TransformerException {
     
      // First, get the value
      DocPropertyResolver dpr = new DocPropertyResolver(context.getWmlPackage());
      List<String> params = model.getFldParameters();
     
      //String key = params.get(0);
      String key = model.getFldParameterString();
     
      try {
        String value = dpr.getValue(key).toString();
        log.debug("= " + value);
        return FormattingSwitchHelper.applyFormattingSwitch(context.getWmlPackage(), model, value);
      } catch (FieldValueException e) {
       
        if (e.getMessage().contains("No value found for DOCPROPERTY PAGES")) {// TODO improve this
View Full Code Here


  StringBuilder report = null;
 
  public FieldUpdater(WordprocessingMLPackage wordMLPackage) {
    this.wordMLPackage = wordMLPackage;
//    docPropsCustomPart = wordMLPackage.getDocPropsCustomPart();
    docPropertyResolver = new DocPropertyResolver(wordMLPackage);
  }
View Full Code Here

TOP

Related Classes of org.docx4j.model.fields.docproperty.DocPropertyResolver

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.