You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ke...@apache.org on 2002/08/20 09:03:20 UTC
cvs commit: xml-fop/src/org/apache/fop/fo/flow InstreamForeignObject.java ExternalGraphic.java
keiron 2002/08/20 00:03:20
Modified: src/org/apache/fop/fo/flow InstreamForeignObject.java
ExternalGraphic.java
Log:
handle errors better
Revision Changes Path
1.33 +10 -7 xml-fop/src/org/apache/fop/fo/flow/InstreamForeignObject.java
Index: InstreamForeignObject.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/InstreamForeignObject.java,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- InstreamForeignObject.java 16 Aug 2002 13:06:38 -0000 1.32
+++ InstreamForeignObject.java 20 Aug 2002 07:03:19 -0000 1.33
@@ -54,17 +54,20 @@
}
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;
}
1.28 +9 -6 xml-fop/src/org/apache/fop/fo/flow/ExternalGraphic.java
Index: ExternalGraphic.java
===================================================================
RCS file: /home/cvs/xml-fop/src/org/apache/fop/fo/flow/ExternalGraphic.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- ExternalGraphic.java 16 Aug 2002 13:06:38 -0000 1.27
+++ ExternalGraphic.java 20 Aug 2002 07:03:19 -0000 1.28
@@ -45,11 +45,14 @@
}
public void addLayoutManager(List list) {
- LeafNodeLayoutManager lm = new LeafNodeLayoutManager(this);
- lm.setCurrentArea(getInlineArea());
- lm.setAlignment(properties.get("vertical-align").getEnum());
- lm.setLead(viewHeight);
- list.add(lm);
+ InlineArea area = getInlineArea();
+ if(area != null) {
+ LeafNodeLayoutManager lm = new LeafNodeLayoutManager(this);
+ lm.setCurrentArea(area);
+ lm.setAlignment(properties.get("vertical-align").getEnum());
+ lm.setLead(viewHeight);
+ list.add(lm);
+ }
}
protected InlineArea getInlineArea() {
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org