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

[PATCH] Region-Body Column balancing incorrect if content is table with header

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Resolution: Fixed
    • 1.0
    • 2.2
    • layout/unqualified
    • None
    • Operating System: All
      Platform: PC
    • 49801

    Description

      To reproduce bug please do the following:
      Use:
      <fo:region-body region-name="PageBody" column-count="2" />

      Fill the region-body with content like :
      <fo:block span="none" > ...(content is table with header) ..
      <fo:block span="all"> ... (one line (summary)) ..

      If the content is made of normal blocks the columns are balanced before the span="all" summary line.
      like:
      123456 456789
      234567 567890
      345678 678901
      Summary: 1234567890

      If the content is a table without headers the columns are balanced correct.
      like:
      123456 456789
      234567 567890
      345678 678901
      Summary: 1234567890

      If the content is a table with header the columns are not balanced correct. (the right one is shorter.)
      Header Header
      123456 567890
      234567 678901
      345678
      456789
      Summary: 1234567890

      The "computeDemerits()" algorithm is wrong in class "BalancingColumnBreakingAlgorithm".
      The "fullLen" value is to short. Exactly the replicated header width is missing. In the "par" list the header is contained only once although the header is displayed in every column. (in the example twice)

      Solution could be to place the header as many times in the "par" list as many columns exist, or to count the existing one header as many times as needed.

      Attachments

        1. test-before.pdf
          5 kB
          Alexios Giotis
        2. test-after.pdf
          5 kB
          Alexios Giotis
        3. patch.diff
          48 kB
          Robert Meyer
        4. output-balance5.pdf
          10 kB
          Robert Meyer
        5. fo.xml
          4 kB
          a.kovacs
        6. fix.diff
          0.8 kB
          Robert Meyer
        7. balancing-fos.zip
          17 kB
          Robert Meyer
        8. balance-5.fo
          66 kB
          Alexios Giotis
        9. balance-4-none.fo.xml
          67 kB
          Luis Bernardo
        10. balance-4-edited.fo.xml
          65 kB
          Luis Bernardo
        11. balance-4.pdf
          10 kB
          Alexios Giotis
        12. balance-4.fo.xml
          67 kB
          Alexios Giotis
        13. balance-3.fo.xml
          233 kB
          Alexios Giotis
        14. balance-2-expected.pdf
          7 kB
          Alexios Giotis
        15. balance-2.pdf
          7 kB
          Alexios Giotis
        16. balance-2.fo
          45 kB
          Alexios Giotis
        17. b49801.fo
          4 kB
          Andreas L. Delmelle
        18. b49801_dirty_hack.patch
          1 kB
          Alexios Giotis

        Activity

          People

            fop-dev@xmlgraphics.apache.org fop-dev
            a.kovacs@i-docs.com a.kovacs
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: