]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
BasicLink won't break in static-content; more work required for proper placement
authorarved <arved@unknown>
Sat, 10 Feb 2001 23:11:31 +0000 (23:11 +0000)
committerarved <arved@unknown>
Sat, 10 Feb 2001 23:11:31 +0000 (23:11 +0000)
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

index 821dc8c0a41d7aa9c94dcf4b05fe7dc3cef84423..2a2b5e346b87caa41e98ccdc92df5d0a6daf9b1f 100644 (file)
@@ -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);