From 74de788d25c893ebf1bb9d4d284f9928b89b062e Mon Sep 17 00:00:00 2001
From: Jeremias Maerki
Date: Mon, 12 Mar 2007 21:49:37 +0000
Subject: [PATCH] Fixed an IllegalArgumentException for absolutely positioned
block-containers with a border and no height/bpd set.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@517415 13f79535-47bb-0310-9956-ffa450edef68
---
.../BlockContainerLayoutManager.java | 4 +-
status.xml | 4 ++
...-container_absolute-position_no-height.xml | 48 +++++++++++--------
3 files changed, 36 insertions(+), 20 deletions(-)
diff --git a/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java b/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
index e99b966ef..e63345f77 100644
--- a/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
@@ -431,6 +431,8 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager
}
}
} else {
+ int maxbpd = context.getStackLimit().opt;
+ allocBPD = maxbpd;
autoHeight = true;
}
} else {
@@ -503,7 +505,7 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager
MinOptMax range = new MinOptMax(relDims.ipd);
BlockContainerBreaker breaker = new BlockContainerBreaker(this, range);
- breaker.doLayout(relDims.bpd, autoHeight);
+ breaker.doLayout((autoHeight ? 0 : relDims.bpd), autoHeight);
boolean contentOverflows = breaker.isOverflow();
LinkedList returnList = new LinkedList();
if (!breaker.isEmpty()) {
diff --git a/status.xml b/status.xml
index 9e40ad4fd..2c662ef1f 100644
--- a/status.xml
+++ b/status.xml
@@ -28,6 +28,10 @@
+
+ Fixed an IllegalArgumentException for absolutely positioned block-containers with a
+ border and no height/bpd set.
+
Add support for a two-pass production for PostScript output to minimize file size. This
adds images only once and adds only the fonts that are really used.
diff --git a/test/layoutengine/standard-testcases/block-container_absolute-position_no-height.xml b/test/layoutengine/standard-testcases/block-container_absolute-position_no-height.xml
index bbdf38e10..d0ce36539 100644
--- a/test/layoutengine/standard-testcases/block-container_absolute-position_no-height.xml
+++ b/test/layoutengine/standard-testcases/block-container_absolute-position_no-height.xml
@@ -23,7 +23,7 @@
-
+
@@ -31,33 +31,43 @@
-
+
absolutely positioned width, no height specified
+
+ absolutely positioned width, no height specified, plus border
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
--
2.39.5