From 652f06243185884e4c8188f98e402e94306d0bfe Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Wed, 10 Aug 2005 11:56:35 +0000 Subject: Bugzilla #36112 Fix for Java2DRenderer to paint regions other than region-body. Area tree was not properly cloned. Submitted by: Richard Wheeldon git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@231213 13f79535-47bb-0310-9956-ffa450edef68 --- examples/fo/pagination/allregions.fo | 9 +++++++++ src/java/org/apache/fop/area/RegionReference.java | 8 +++++--- 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 @@ + + + After + + + 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; } -- cgit v1.2.3