https://issues.apache.org/bugzilla/show_bug.cgi?id=50965

           Summary: Incorrect refactoring in
                    src/java/org/apache/fop/layoutmgr/BlockContainerLayout
                    Manager.java (r1069154)
           Product: Fop
           Version: all
          Platform: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: page-master/layout
        AssignedTo: [email protected]
        ReportedBy: [email protected]


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);

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to