summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2005-08-10 11:56:35 +0000
committerJeremias Maerki <jeremias@apache.org>2005-08-10 11:56:35 +0000
commit652f06243185884e4c8188f98e402e94306d0bfe (patch)
tree5f4d309df8c54d3b3d84ae5433b9da1c810b8060
parent341e9084b34314f83b40013c79d6b7ed83e8223c (diff)
downloadxmlgraphics-fop-652f06243185884e4c8188f98e402e94306d0bfe.tar.gz
xmlgraphics-fop-652f06243185884e4c8188f98e402e94306d0bfe.zip
Bugzilla #36112
Fix for Java2DRenderer to paint regions other than region-body. Area tree was not properly cloned. Submitted by: Richard Wheeldon <richardw.at.geoquip-rnd.demon.co.uk> git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@231213 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--examples/fo/pagination/allregions.fo9
-rw-r--r--src/java/org/apache/fop/area/RegionReference.java8
2 files changed, 14 insertions, 3 deletions
diff --git a/examples/fo/pagination/allregions.fo b/examples/fo/pagination/allregions.fo
index 7fb325ce7..e620dbc64 100644
--- a/examples/fo/pagination/allregions.fo
+++ b/examples/fo/pagination/allregions.fo
@@ -39,6 +39,15 @@
</fo:block>
</fo:static-content>
+ <fo:static-content flow-name="xsl-region-after">
+ <fo:block text-align="center"
+ font-size="10pt"
+ font-family="serif"
+ line-height="14pt" >
+ After
+ </fo:block>
+ </fo:static-content>
+
<fo:static-content flow-name="xsl-region-start">
<fo:block-container border-color="black" border-style="solid" border-width="1pt"
height="22.2cm" width="1cm" top="0cm" left="0cm" position="absolute">
diff --git a/src/java/org/apache/fop/area/RegionReference.java b/src/java/org/apache/fop/area/RegionReference.java
index 86e8dd186..7fdbd183e 100644
--- a/src/java/org/apache/fop/area/RegionReference.java
+++ b/src/java/org/apache/fop/area/RegionReference.java
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 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.
@@ -29,12 +29,14 @@ import org.apache.fop.fo.pagination.Region;
* so the page master can make copies from the original page and regions.
*/
public class RegionReference extends Area implements Cloneable {
+
+ /** Reference to the region FO. */
protected Region regionFO;
private CTM ctm;
// the list of block areas from the static flow
- private List blocks = new ArrayList();
+ private ArrayList blocks = new ArrayList();
// the parent RegionViewport for this object
protected RegionViewport regionViewport;
@@ -109,7 +111,6 @@ public class RegionReference extends Area implements Cloneable {
/**
* Clone this region.
* This is used when cloning the page by the page master.
- * The blocks are not copied since the master will have no blocks.
*
* @return a copy of this region reference area
*/
@@ -117,6 +118,7 @@ public class RegionReference extends Area implements Cloneable {
RegionReference rr = new RegionReference(regionFO, regionViewport);
rr.ctm = ctm;
rr.setIPD(getIPD());
+ rr.blocks = (ArrayList)blocks.clone();
return rr;
}