From 589fb02d05d68cd16e197972648265ac4dc82fed Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Wed, 4 Jan 2006 19:30:24 +0000 Subject: [PATCH] Bugzilla #38102: Bugfix: Space was not adjusted if the space was on a nested block inside an auto-height block-container. This could lead to content overflowing the bottom of a page. Note: Tables and lists currently don't offer space adjustments due to the current limits of the element list combination process. Once the stretch/shrink components are handled during element list combination, this will have to be rechecked. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@365971 13f79535-47bb-0310-9956-ffa450edef68 --- .../BlockContainerLayoutManager.java | 3 +- ...lock_space-before_space-after_bug38102.xml | 94 +++++++++++++++++-- 2 files changed, 89 insertions(+), 8 deletions(-) diff --git a/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java b/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java index e39500bef..455a7d8fc 100644 --- a/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.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. @@ -675,6 +675,7 @@ public class BlockContainerLayoutManager 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/test/layoutengine/standard-testcases/block_space-before_space-after_bug38102.xml b/test/layoutengine/standard-testcases/block_space-before_space-after_bug38102.xml index 12f829afd..b028c79e5 100644 --- a/test/layoutengine/standard-testcases/block_space-before_space-after_bug38102.xml +++ b/test/layoutengine/standard-testcases/block_space-before_space-after_bug38102.xml @@ -30,7 +30,7 @@ - + line1 @@ -38,14 +38,78 @@ line3 line4 line5 - line6 + line6 + + + + line1 + line2 + line3 + line4 + line5 + line6 + + + + + + + line1 + line2 + line3 + line4 + line5 + line6 + + + + + - + @@ -67,10 +131,26 @@ 3 - - + + + + + + + + + + + + + + + + + + - - + + -- 2.39.5