aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGlen Mazza <gmazza@apache.org>2004-01-01 18:52:22 +0000
committerGlen Mazza <gmazza@apache.org>2004-01-01 18:52:22 +0000
commit2d927b99dd009fd4c919464a7309dac408885be2 (patch)
treebdbd35839053a682c46de40ca178532d4acc5a0f /src
parent7f12b63aea591727ca0bda63e90526d6a6944256 (diff)
downloadxmlgraphics-fop-2d927b99dd009fd4c919464a7309dac408885be2.tar.gz
xmlgraphics-fop-2d927b99dd009fd4c919464a7309dac408885be2.zip
Bug #25806 (Patch by Finn Bock)--NPE fixed in ExternalGraphic.java.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197086 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/java/org/apache/fop/fo/flow/ExternalGraphic.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/fo/flow/ExternalGraphic.java b/src/java/org/apache/fop/fo/flow/ExternalGraphic.java
index 82dec643b..fc498c46e 100644
--- a/src/java/org/apache/fop/fo/flow/ExternalGraphic.java
+++ b/src/java/org/apache/fop/fo/flow/ExternalGraphic.java
@@ -65,6 +65,7 @@ import org.apache.fop.fo.properties.Scaling;
import org.apache.fop.image.ImageFactory;
import org.apache.fop.image.FopImage;
import org.apache.fop.datatypes.Length;
+import org.apache.fop.datatypes.LengthRange;
// Java
import java.awt.geom.Rectangle2D;
@@ -108,8 +109,9 @@ public class ExternalGraphic extends FObj {
}
url = ImageFactory.getURL(url);
- // assume lr-tb for now
- Length ipd = propertyList.get(PR_INLINE_PROGRESSION_DIMENSION).getLength();
+ // assume lr-tb for now and just use the .optimum value of the range
+ Length ipd = propertyList.get(PR_INLINE_PROGRESSION_DIMENSION).
+ getLengthRange().getOptimum().getLength();
if (!ipd.isAuto()) {
viewWidth = ipd.getValue();
} else {