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

Incorrect refactoring in src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java (r1069154)

    XMLWordPrintableJSON

Details

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

    Description

      r1069154 refactored some code to the function BlockContainerLayoutManager.setupAreaDimensions()

      contentRectOffsetX and contentRectOffsetY are now only initialised to 0, when the class is instantiated. The previous version did this for every execution of this code.
      As setupAreaDimensions() can be executed multiple times, this yields to layout errors.

      — a/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
      +++ b/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
      @@ -346,6 +346,8 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager
      updateContentAreaIPDwithOverconstrainedAdjust(contentWidth);
      }

      + contentRectOffsetX = 0;
      + contentRectOffsetY = 0;
      contentRectOffsetX += fo.getCommonMarginBlock().startIndent.getValue(this);
      contentRectOffsetY += fo.getCommonBorderPaddingBackground().getBorderBeforeWidth(false);
      contentRectOffsetY += fo.getCommonBorderPaddingBackground().getPaddingBefore(false, this);

      Attachments

        Activity

          People

            fop-dev@xmlgraphics.apache.org fop-dev
            martin.koegler@brz.gv.at Martin K
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: