org.apache.poi.xwpf.model.XWPFHeaderFooterPolicy.<init>()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(124)

本文整理了Java中org.apache.poi.xwpf.model.XWPFHeaderFooterPolicy.<init>()方法的一些代码示例,展示了XWPFHeaderFooterPolicy.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XWPFHeaderFooterPolicy.<init>()方法的具体详情如下:
包路径:org.apache.poi.xwpf.model.XWPFHeaderFooterPolicy
类名称:XWPFHeaderFooterPolicy
方法名:<init>

XWPFHeaderFooterPolicy.<init>介绍

[英]Figures out the policy for the given document, and creates any header and footer objects as required.
[中]

代码示例

代码示例来源:origin: org.apache.poi/poi-ooxml

public XWPFHeaderFooterPolicy createHeaderFooterPolicy() {
  if (headerFooterPolicy == null) {
    //            if (! ctDocument.getBody().isSetSectPr()) {
    //                ctDocument.getBody().addNewSectPr();
    //            }
    headerFooterPolicy = new XWPFHeaderFooterPolicy(this);
  }
  return headerFooterPolicy;
}

代码示例来源:origin: org.apache.poi/poi-ooxml

headerFooterPolicy = new XWPFHeaderFooterPolicy(document, ctSectPr);
extractHeaders(text, headerFooterPolicy);

代码示例来源:origin: org.apache.poi/poi-ooxml

headerFooterPolicy = new XWPFHeaderFooterPolicy(this);

代码示例来源:origin: youseries/ureport

public void build(XWPFDocument document,CTSectPr sectPr,Report report){
  //HeaderFooterDefinition headerDef=report.getHeader();
  //HeaderFooterDefinition footerDef=report.getFooter();
  
  HeaderFooter header=new HeaderFooter();
  HeaderFooter footer=new HeaderFooter();
  XWPFHeaderFooterPolicy headerFooterPolicy=null;
  if(header!=null){
    List<XWPFParagraph> list=buildXWPFParagraph(header, document);
    XWPFParagraph[] newparagraphs = new XWPFParagraph[list.size()];
    list.toArray(newparagraphs);
    headerFooterPolicy = new XWPFHeaderFooterPolicy(document, sectPr);									
    headerFooterPolicy.createHeader(STHdrFtr.DEFAULT, newparagraphs);
  }
  if(footer!=null){
    List<XWPFParagraph> list=buildXWPFParagraph(footer, document);
    XWPFParagraph[] newparagraphs = new XWPFParagraph[list.size()];
    list.toArray(newparagraphs);
    /*if(headerFooterPolicy==null){
      headerFooterPolicy = new XWPFHeaderFooterPolicy(document, sectPr);
    }*/
    headerFooterPolicy.createFooter(STHdrFtr.DEFAULT, newparagraphs);
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

public XWPFHeaderFooterPolicy createHeaderFooterPolicy() {
  if (headerFooterPolicy == null) {
    //            if (! ctDocument.getBody().isSetSectPr()) {
    //                ctDocument.getBody().addNewSectPr();
    //            }
    headerFooterPolicy = new XWPFHeaderFooterPolicy(this);
  }
  return headerFooterPolicy;
}

代码示例来源:origin: apache/tika

if (ctSectPr != null && config.getIncludeHeadersAndFooters()) {
  headerFooterPolicy =
      new XWPFHeaderFooterPolicy(document, ctSectPr);
  extractHeaders(xhtml, headerFooterPolicy, listManager);

代码示例来源:origin: com.bstek.ureport/ureport2-core

public void build(XWPFDocument document,CTSectPr sectPr,Report report){
  //HeaderFooterDefinition headerDef=report.getHeader();
  //HeaderFooterDefinition footerDef=report.getFooter();
  
  HeaderFooter header=new HeaderFooter();
  HeaderFooter footer=new HeaderFooter();
  XWPFHeaderFooterPolicy headerFooterPolicy=null;
  if(header!=null){
    List<XWPFParagraph> list=buildXWPFParagraph(header, document);
    XWPFParagraph[] newparagraphs = new XWPFParagraph[list.size()];
    list.toArray(newparagraphs);
    headerFooterPolicy = new XWPFHeaderFooterPolicy(document, sectPr);									
    headerFooterPolicy.createHeader(STHdrFtr.DEFAULT, newparagraphs);
  }
  if(footer!=null){
    List<XWPFParagraph> list=buildXWPFParagraph(footer, document);
    XWPFParagraph[] newparagraphs = new XWPFParagraph[list.size()];
    list.toArray(newparagraphs);
    /*if(headerFooterPolicy==null){
      headerFooterPolicy = new XWPFHeaderFooterPolicy(document, sectPr);
    }*/
    headerFooterPolicy.createFooter(STHdrFtr.DEFAULT, newparagraphs);
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

headerFooterPolicy = new XWPFHeaderFooterPolicy(document, ctSectPr);
extractHeaders(text, headerFooterPolicy);

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

headerFooterPolicy = new XWPFHeaderFooterPolicy(document, ctSectPr);
extractHeaders(text, headerFooterPolicy);

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

headerFooterPolicy = new XWPFHeaderFooterPolicy(this);

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

headerFooterPolicy = new XWPFHeaderFooterPolicy(this);

代码示例来源:origin: com.github.lafa.tikaNoExternal/tika-parsers

if (ctSectPr != null) {
  headerFooterPolicy =
      new XWPFHeaderFooterPolicy(document, ctSectPr);
  extractHeaders(xhtml, headerFooterPolicy, listManager);

代码示例来源:origin: org.apache.tika/tika-parsers

if (ctSectPr != null && config.getIncludeHeadersAndFooters()) {
  headerFooterPolicy =
      new XWPFHeaderFooterPolicy(document, ctSectPr);
  extractHeaders(xhtml, headerFooterPolicy, listManager);

相关文章