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

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

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: trunk
    • Fix Version/s: None
    • Component/s: layout/unqualified
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: PC
    • External issue ID:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: