From: Glen Mazza Date: Wed, 7 Jan 2004 22:25:43 +0000 (+0000) Subject: More String->int conversions. X-Git-Tag: Root_Temp_KnuthStylePageBreaking~925 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5e8957f9b3c3c87fcbde9508705a9b54fe0c1877;p=xmlgraphics-fop.git More String->int conversions. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197146 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/codegen/properties.xsl b/src/codegen/properties.xsl index 5a4970963..a787e93e2 100644 --- a/src/codegen/properties.xsl +++ b/src/codegen/properties.xsl @@ -523,10 +523,12 @@ public class super(propId); - m_shorthandMaker= getSubpropMaker(" - - "); + m_shorthandMaker= getSubpropMaker(Constants.CP_ + + + + ); } @@ -544,7 +546,7 @@ public class return true; } - protected Property.Maker getSubpropMaker(String subprop) { + protected Property.Maker getSubpropMaker(int subpropId) { @@ -552,15 +554,17 @@ public class - if (subprop.equals(" - - ")) + if (subpropId == Constants.CP_ + + + + ) return s_ Maker; - return super.getSubpropMaker(subprop); + return super.getSubpropMaker(subpropId); } protected Property setSubprop(Property baseProp, int subpropId, @@ -624,9 +628,11 @@ public class // set default for subprop - subProp = getSubpropMaker(" - - ").make(pList, getDefaultFor + subProp = getSubpropMaker(Constants.CP_ + + + + ).make(pList, getDefaultFor (), fo); p.setComponent(Constants.CP_ diff --git a/src/java/org/apache/fop/fo/Property.java b/src/java/org/apache/fop/fo/Property.java index febf164a0..6559ffe6d 100644 --- a/src/java/org/apache/fop/fo/Property.java +++ b/src/java/org/apache/fop/fo/Property.java @@ -141,12 +141,12 @@ public class Property { * of compound property types, such as "space". * Overridden by property maker subclasses which handle * compound properties. - * @param subprop The name of the component for which a Maker is to - * returned, for example "optimum", if the FO attribute is + * @param subprop The Constants ID of the component for which a Maker is to + * returned, for example CP_OPTIMUM, if the FO attribute is * space.optimum='10pt'. * @return the Maker object specified */ - protected Maker getSubpropMaker(String subprop) { + protected Maker getSubpropMaker(int subpropId) { return null; } @@ -188,11 +188,11 @@ public class Property { if (baseProp == null) { baseProp = makeCompound(propertyList, fo); } - Maker spMaker = getSubpropMaker(partName); + int partId = FOPropertyMapping.getSubPropertyId(partName); + Maker spMaker = getSubpropMaker(partId); if (spMaker != null) { Property p = spMaker.make(propertyList, value, fo); if (p != null) { - int partId = FOPropertyMapping.getSubPropertyId(partName); return setSubprop(baseProp, partId, p); } } else {