From 0e1550380ce69fca351307d5d90429c71790eb39 Mon Sep 17 00:00:00 2001 From: arved Date: Thu, 4 Jan 2001 03:27:51 +0000 Subject: [PATCH] Handle basic links in multi-column git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193948 13f79535-47bb-0310-9956-ffa450edef68 --- src/org/apache/fop/fo/flow/BasicLink.java | 8 ++++---- src/org/apache/fop/layout/BodyAreaContainer.java | 7 +++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/org/apache/fop/fo/flow/BasicLink.java b/src/org/apache/fop/fo/flow/BasicLink.java index aff4a0380..821dc8c0a 100644 --- a/src/org/apache/fop/fo/flow/BasicLink.java +++ b/src/org/apache/fop/fo/flow/BasicLink.java @@ -113,13 +113,13 @@ public class BasicLink extends FObjMixed { } // new LinkedArea to gather up inlines - LinkSet ls = new LinkSet(destination, area, linkType); + LinkSet ls = new LinkSet(destination, area, linkType); Page p = area.getPage(); - // assumption - AS - // should be able to retrieve this from somewhere - JT - AreaContainer ac = p.getBody().getMainReferenceArea(); + // this will only work if links are in region-body (AHS); + // need to handle links in all regions + AreaContainer ac = p.getBody().getCurrentColumnArea(); int numChildren = this.children.size(); for (int i = this.marker; i < numChildren; i++) { diff --git a/src/org/apache/fop/layout/BodyAreaContainer.java b/src/org/apache/fop/layout/BodyAreaContainer.java index fdf0291cd..798724db8 100644 --- a/src/org/apache/fop/layout/BodyAreaContainer.java +++ b/src/org/apache/fop/layout/BodyAreaContainer.java @@ -374,4 +374,11 @@ public class BodyAreaContainer extends Area { { return isNewSpanArea; } + + public AreaContainer getCurrentColumnArea() + { + Vector spanAreas = this.mainReferenceArea.getChildren(); + SpanArea spanArea = (SpanArea)spanAreas.elementAt(spanAreas.size()-1); + return spanArea.getCurrentColumnArea(); + } } -- 2.39.5