From: Jeremias Maerki Date: Wed, 4 Jan 2006 15:52:07 +0000 (+0000) Subject: Bugzilla #38102: X-Git-Tag: fop-0_92-beta~227 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2821415e8cc83e563c69a0d35a60087a2255c768;p=xmlgraphics-fop.git Bugzilla #38102: Bugfix: Space was not adjusted if the space was on a nested block. This could lead to content overflowing the bottom of a page. I guess I will need to check if other addArea() methods suffer from the same defect. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@365928 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java b/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java index 631aacf32..0db92b30f 100644 --- a/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java @@ -1,5 +1,5 @@ /* - * Copyright 1999-2005 The Apache Software Foundation. + * Copyright 1999-2006 The Apache Software Foundation. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,7 +14,7 @@ * limitations under the License. */ -/* $Id: BlockLayoutManager.java,v 1.19 2004/05/26 04:22:39 gmazza Exp $ */ +/* $Id$ */ package org.apache.fop.layoutmgr; @@ -242,6 +242,7 @@ public class BlockLayoutManager extends BlockStackingLayoutManager LayoutManager childLM = null; LayoutManager lastLM = null; LayoutContext lc = new LayoutContext(0); + lc.setSpaceAdjust(layoutContext.getSpaceAdjust()); // set space after in the LayoutContext for children if (layoutContext.getSpaceAfter() > 0) { lc.setSpaceAfter(layoutContext.getSpaceAfter()); diff --git a/status.xml b/status.xml index 2c9bad19a..403c91bc2 100644 --- a/status.xml +++ b/status.xml @@ -27,6 +27,10 @@ + + Bugfix: Space was not adjusted if the space was on a nested block. This could + lead to content overflowing the bottom of a page. + Bugfix: TableCell did not properly report that it generates reference-areas which could lead to wrong inherited values for start-indent and end-indent. diff --git a/test/layoutengine/standard-testcases/block_space-before_space-after_bug38102.xml b/test/layoutengine/standard-testcases/block_space-before_space-after_bug38102.xml new file mode 100644 index 000000000..12f829afd --- /dev/null +++ b/test/layoutengine/standard-testcases/block_space-before_space-after_bug38102.xml @@ -0,0 +1,76 @@ + + + + + +

+ This test checks if the element list is generated correctly if space-before.optimum is used + instead of space-before directly in the case where a nested block needs to shrink. + This tests bug #38102. +

+
+ + + + + + + + + + + line1 + line2 + line3 + line4 + line5 + line6 + + + + + + + + + + + + + + + + + + + + + + + + + + + 3 + + + + + + + +