aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarved <arved@unknown>2001-01-04 03:27:51 +0000
committerarved <arved@unknown>2001-01-04 03:27:51 +0000
commit0e1550380ce69fca351307d5d90429c71790eb39 (patch)
tree4debf225d3cc4de9dee3390e486683b70c97aefa
parentb4eeb51721a296c89a4b3ef084c2b0eb6d0e57e1 (diff)
downloadxmlgraphics-fop-0e1550380ce69fca351307d5d90429c71790eb39.tar.gz
xmlgraphics-fop-0e1550380ce69fca351307d5d90429c71790eb39.zip
Handle basic links in multi-column
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193948 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/org/apache/fop/fo/flow/BasicLink.java8
-rw-r--r--src/org/apache/fop/layout/BodyAreaContainer.java7
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();
+ }
}