Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-1428

NullPointerException when min-height is specified for table-row

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • 2.5
    • None
    • layout/unqualified
    • None
    • Operating System: All
      Platform: All
    • 43591

    Description

      When specifying min-height for an fo:table-row, FOP aborts with a
      NullPointerException:

      java.lang.NullPointerException
      at
      org.apache.fop.layoutmgr.table.TableContentLayoutManager.createElementsForRowGroup(TableContentLayoutManager.java:465)
      at
      org.apache.fop.layoutmgr.table.TableContentLayoutManager.getKnuthElementsForRowIterator(TableContentLayoutManager.java:251)
      at
      org.apache.fop.layoutmgr.table.TableContentLayoutManager.getNextKnuthElements(TableContentLayoutManager.java:179)
      at
      org.apache.fop.layoutmgr.table.TableLayoutManager.getNextKnuthElements(TableLayoutManager.java:243)

      Example XSL-FO:

      <?xml version="1.0" encoding="UTF-8"?>
      <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
      <fo:layout-master-set>
      <fo:simple-page-master master-name="letter"
      page-height="11in"
      page-width="8.5in"
      margin-left="0.75in"
      margin-right="0.75in">
      <fo:region-body margin-bottom="1.0cm" margin-top="0.7cm"/>
      </fo:simple-page-master>
      </fo:layout-master-set>
      <fo:page-sequence master-reference="letter">
      <fo:flow flow-name="xsl-region-body">
      <fo:table table-layout="fixed" width="100%">
      <fo:table-column column-width="100%"/>
      <fo:table-body>
      <fo:table-row min-height="3.0em">
      <fo:table-cell>
      <fo:block>Hello</fo:block>
      </fo:table-cell>
      </fo:table-row>
      </fo:table-body>
      </fo:table>
      </fo:flow>
      </fo:page-sequence>
      </fo:root>

      Attachments

        Activity

          People

            fop-dev@xmlgraphics.apache.org fop-dev
            isaac_s Isaac Shabtay
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: