aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/fo/flow/InstreamForeignObject.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/apache/fop/fo/flow/InstreamForeignObject.java')
-rw-r--r--src/org/apache/fop/fo/flow/InstreamForeignObject.java15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/org/apache/fop/fo/flow/InstreamForeignObject.java b/src/org/apache/fop/fo/flow/InstreamForeignObject.java
index e6da7233c..b39e8c0db 100644
--- a/src/org/apache/fop/fo/flow/InstreamForeignObject.java
+++ b/src/org/apache/fop/fo/flow/InstreamForeignObject.java
@@ -54,17 +54,20 @@ public class InstreamForeignObject extends FObj {
}
public void addLayoutManager(List list) {
- LeafNodeLayoutManager lm = new LeafNodeLayoutManager(this);
- lm.setCurrentArea(getInlineArea());
- lm.setAlignment(properties.get("vertical-align").getEnum());
- lm.setLead(areaCurrent.getHeight());
- list.add(lm);
+ areaCurrent = getInlineArea();
+ if(areaCurrent != null) {
+ LeafNodeLayoutManager lm = new LeafNodeLayoutManager(this);
+ lm.setCurrentArea(areaCurrent);
+ lm.setAlignment(properties.get("vertical-align").getEnum());
+ lm.setLead(areaCurrent.getHeight());
+ list.add(lm);
+ }
}
/**
* Get the inline area created by this element.
*/
- protected InlineArea getInlineArea() {
+ protected Viewport getInlineArea() {
if (children == null) {
return areaCurrent;
}