From d068cdc2dd11f05115ec824ab311c5f015016b76 Mon Sep 17 00:00:00 2001 From: arved Date: Sat, 10 Feb 2001 23:11:31 +0000 Subject: [PATCH] BasicLink won't break in static-content; more work required for proper placement git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194043 13f79535-47bb-0310-9956-ffa450edef68 --- src/org/apache/fop/fo/flow/BasicLink.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/org/apache/fop/fo/flow/BasicLink.java b/src/org/apache/fop/fo/flow/BasicLink.java index 821dc8c0a..2a2b5e346 100644 --- a/src/org/apache/fop/fo/flow/BasicLink.java +++ b/src/org/apache/fop/fo/flow/BasicLink.java @@ -117,10 +117,12 @@ public class BasicLink extends FObjMixed { Page p = area.getPage(); - // this will only work if links are in region-body (AHS); - // need to handle links in all regions - AreaContainer ac = p.getBody().getCurrentColumnArea(); - + AreaContainer ac = area.getNearestAncestorAreaContainer(); + if (ac == null) + { + throw new FOPException("Couldn't get ancestor AreaContainer when processing basic-link"); + } + int numChildren = this.children.size(); for (int i = this.marker; i < numChildren; i++) { FONode fo = (FONode) children.elementAt(i); -- 2.39.5