org.apache.poi.xwpf.usermodel.XWPFDocument.getFooterList()方法的使用及代码示例

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

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

XWPFDocument.getFooterList介绍

暂无

代码示例

代码示例来源:origin: Sayi/poi-tl

@Override
public List<ElementTemplate> visitDocument(XWPFDocument doc) {
  if (null == doc)
    return null;
  this.eleTemplates = new ArrayList<ElementTemplate>();
  visitParagraphs(doc.getParagraphs());
  visitTables(doc.getTables());
  visitHeaders(doc.getHeaderList());
  visitFooters(doc.getFooterList());
  return eleTemplates;
}

代码示例来源:origin: stackoverflow.com

List<XWPFFooter> footers = doc.getFooterList();
for (XWPFFooter footer : footers) {
  sdts.addAll(extractSDTsFromBodyElements(footer.getBodyElements()));

代码示例来源:origin: com.github.livesense/org.liveSense.framework.xdocreport

/**
 * Returns the {@link XWPFFooter} of the given footer reference.
 * 
 * @param footerRef the footer reference.
 * @return
 * @throws XmlException
 * @throws IOException
 */
protected XWPFFooter getXWPFFooter( CTHdrFtrRef footerRef )
  throws XmlException, IOException
{
  PackagePart hdrPart = document.getPartById( footerRef.getId() );
  List<XWPFFooter> footers = document.getFooterList();
  for ( XWPFFooter footer : footers )
  {
    if ( footer.getPackagePart().equals( hdrPart ) )
    {
      // footer is aleady loaded, return it.
      return footer;
    }
  }
  // should never come, but load the footer if needed.
  FtrDocument hdrDoc = FtrDocument.Factory.parse( hdrPart.getInputStream() );
  CTHdrFtr hdrFtr = hdrDoc.getFtr();
  XWPFFooter ftr = new XWPFFooter( document, hdrFtr );
  return ftr;
}

代码示例来源:origin: fr.opensagres.xdocreport/org.apache.poi.xwpf.converter.core-gae

/**
 * Returns the {@link XWPFFooter} of the given footer reference.
 * 
 * @param footerRef the footer reference.
 * @return
 * @throws XmlException
 * @throws IOException
 */
protected XWPFFooter getXWPFFooter( CTHdrFtrRef footerRef )
  throws XmlException, IOException
{
  PackagePart hdrPart = document.getPartById( footerRef.getId() );
  List<XWPFFooter> footers = document.getFooterList();
  for ( XWPFFooter footer : footers )
  {
    if ( footer.getPackagePart().equals( hdrPart ) )
    {
      // footer is aleady loaded, return it.
      return footer;
    }
  }
  // should never come, but load the footer if needed.
  FtrDocument hdrDoc = FtrDocument.Factory.parse( hdrPart.getInputStream() );
  CTHdrFtr hdrFtr = hdrDoc.getFtr();
  XWPFFooter ftr = new XWPFFooter( document, hdrFtr );
  return ftr;
}

代码示例来源:origin: fr.opensagres.xdocreport/org.apache.poi.xwpf.converter.core

/**
 * Returns the {@link XWPFFooter} of the given footer reference.
 * 
 * @param footerRef the footer reference.
 * @return
 * @throws XmlException
 * @throws IOException
 */
protected XWPFFooter getXWPFFooter( CTHdrFtrRef footerRef )
  throws XmlException, IOException
{
  PackagePart hdrPart = document.getPartById( footerRef.getId() );
  List<XWPFFooter> footers = document.getFooterList();
  for ( XWPFFooter footer : footers )
  {
    if ( footer.getPackagePart().equals( hdrPart ) )
    {
      // footer is aleady loaded, return it.
      return footer;
    }
  }
  // should never come, but load the footer if needed.
  FtrDocument hdrDoc = FtrDocument.Factory.parse( hdrPart.getInputStream() );
  CTHdrFtr hdrFtr = hdrDoc.getFtr();
  XWPFFooter ftr = new XWPFFooter( document, hdrFtr );
  return ftr;
}

相关文章

XWPFDocument类方法