Fop
  1. Fop
  2. FOP-1908

[PATCH] Percental table column width not calculated from table

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 1.0
    • Fix Version/s: None
    • Component/s: renderer/rtf
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: Other
    • External issue ID:
      50901

      Description

      The width of table columns is not correctly calculated for RTF output. A percental width should be calculated from the enclosing table's width.

      org.apache.fop.layoutmgr.table.TableLayoutManager actually does this for PDF output (see getBaseLength() implementation), but org.apache.fop.render.rtf.rtflib.tools.PercentContext doesn't.

      The result is that the last column gets the entire space.

      I'll attach a small example demonstrating the problem as well as a patch that fixes that problem for me.

      1. test.pdf
        5 kB
        Carsten Pfeiffer
      2. test-after-patch.rtf
        4 kB
        Carsten Pfeiffer
      3. test-before-patch.rtf
        4 kB
        Carsten Pfeiffer
      4. fop-rtf-table-column-width.patch
        1 kB
        Carsten Pfeiffer
      5. test.fo
        2 kB
        Carsten Pfeiffer

        Activity

        Hide
        Carsten Pfeiffer added a comment -

        Attachment test.fo has been added with description: Example fo file, a table with 3 columns

        Show
        Carsten Pfeiffer added a comment - Attachment test.fo has been added with description: Example fo file, a table with 3 columns
        Hide
        Carsten Pfeiffer added a comment -

        Attachment fop-rtf-table-column-width.patch has been added with description: Patch that fixes the problem for me.

        Show
        Carsten Pfeiffer added a comment - Attachment fop-rtf-table-column-width.patch has been added with description: Patch that fixes the problem for me.
        Hide
        Carsten Pfeiffer added a comment -

        Attachment test-before-patch.rtf has been added with description: The RTF output without the patch applied, only 1 column is visible

        Show
        Carsten Pfeiffer added a comment - Attachment test-before-patch.rtf has been added with description: The RTF output without the patch applied, only 1 column is visible
        Hide
        Carsten Pfeiffer added a comment -

        Attachment test-after-patch.rtf has been added with description: The RTF output without the patch applied, all column are visible

        Show
        Carsten Pfeiffer added a comment - Attachment test-after-patch.rtf has been added with description: The RTF output without the patch applied, all column are visible
        Hide
        Carsten Pfeiffer added a comment -

        Attachment test.pdf has been added with description: For comparison, the PDF output (unaffected by the patch)

        Show
        Carsten Pfeiffer added a comment - Attachment test.pdf has been added with description: For comparison, the PDF output (unaffected by the patch)
        Hide
        Carsten Pfeiffer added a comment -

        ping

        Show
        Carsten Pfeiffer added a comment - ping
        Hide
        Glenn Adams added a comment -

        resetting P2 open bugs to P3 pending further review

        Show
        Glenn Adams added a comment - resetting P2 open bugs to P3 pending further review
        Hide
        Glenn Adams added a comment -

        increase priority due to presence of a patch

        Show
        Glenn Adams added a comment - increase priority due to presence of a patch
        Hide
        Glenn Adams added a comment -
        Show
        Glenn Adams added a comment - patch landed at http://svn.apache.org/viewvc?view=revision&revision=1311081 thanks carsten!

          People

          • Assignee:
            fop-dev
            Reporter:
            Carsten Pfeiffer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development