From 84d94659a64d3e5def55bf5413f10a2d12e4611e Mon Sep 17 00:00:00 2001 From: Finn Bock Date: Wed, 20 Oct 2004 17:51:11 +0000 Subject: [PATCH] Fourth phase of performance improvement. - Get rid of calls to FObj.getPropertyList() and its friends. Replace them with the property getters on the FO nodes. PR: 31699 git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198092 13f79535-47bb-0310-9956-ffa450edef68 --- .../fop/layoutmgr/ExternalGraphicLayoutManager.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/java/org/apache/fop/layoutmgr/ExternalGraphicLayoutManager.java b/src/java/org/apache/fop/layoutmgr/ExternalGraphicLayoutManager.java index 2ea2e56a1..41a1e62eb 100644 --- a/src/java/org/apache/fop/layoutmgr/ExternalGraphicLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/ExternalGraphicLayoutManager.java @@ -73,21 +73,20 @@ public class ExternalGraphicLayoutManager extends LeafNodeLayoutManager { url = ImageFactory.getURL(fobj.getSrc()); // assume lr-tb for now and just use the .optimum value of the range - Length ipd = fobj.getPropertyList().get(PR_INLINE_PROGRESSION_DIMENSION). - getLengthRange().getOptimum().getLength(); + Length ipd = fobj.getInlineProgressionDimension().getOptimum().getLength(); if (!ipd.isAuto()) { viewWidth = ipd.getValue(); } else { - ipd = fobj.getPropertyList().get(PR_WIDTH).getLength(); + ipd = fobj.getWidth(); if (!ipd.isAuto()) { viewWidth = ipd.getValue(); } } - Length bpd = fobj.getPropertyList().get(PR_BLOCK_PROGRESSION_DIMENSION).getLengthRange().getOptimum().getLength(); + Length bpd = fobj.getBlockProgressionDimension().getOptimum().getLength(); if (!bpd.isAuto()) { viewHeight = bpd.getValue(); } else { - bpd = fobj.getPropertyList().get(PR_HEIGHT).getLength(); + bpd = fobj.getHeight(); if (!bpd.isAuto()) { viewHeight = bpd.getValue(); } @@ -98,7 +97,7 @@ public class ExternalGraphicLayoutManager extends LeafNodeLayoutManager { int cwidth = -1; int cheight = -1; - Length ch = fobj.getPropertyList().get(PR_CONTENT_HEIGHT).getLength(); + Length ch = fobj.getContentHeight(); if (!ch.isAuto()) { /*if (ch.scaleToFit()) { if (viewHeight != -1) { @@ -107,7 +106,7 @@ public class ExternalGraphicLayoutManager extends LeafNodeLayoutManager { } else {*/ cheight = ch.getValue(); } - Length cw = fobj.getPropertyList().get(PR_CONTENT_WIDTH).getLength(); + Length cw = fobj.getContentWidth(); if (!cw.isAuto()) { /*if (cw.scaleToFit()) { if (viewWidth != -1) { -- 2.39.5