diff options
author | Glen Mazza <gmazza@apache.org> | 2004-01-07 22:25:43 +0000 |
---|---|---|
committer | Glen Mazza <gmazza@apache.org> | 2004-01-07 22:25:43 +0000 |
commit | 5e8957f9b3c3c87fcbde9508705a9b54fe0c1877 (patch) | |
tree | bb4c673e1ad7f8e51b4e7a8891ac5dca82d4a74f /src/codegen | |
parent | 10bdf16024a9d40e38fae0870e274768826497ce (diff) | |
download | xmlgraphics-fop-5e8957f9b3c3c87fcbde9508705a9b54fe0c1877.tar.gz xmlgraphics-fop-5e8957f9b3c3c87fcbde9508705a9b54fe0c1877.zip |
More String->int conversions.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197146 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/codegen')
-rw-r--r-- | src/codegen/properties.xsl | 30 |
1 files changed, 18 insertions, 12 deletions
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 </xsl:text> super(propId);</xsl:text> <xsl:if test="compound"> <xsl:text> - m_shorthandMaker= getSubpropMaker("</xsl:text> - <xsl:value-of select= - 'compound/subproperty[@set-by-shorthand="true"]/name'/> - <xsl:text>");</xsl:text> + m_shorthandMaker= getSubpropMaker(Constants.CP_</xsl:text> + <xsl:call-template name="makeEnumConstant"> + <xsl:with-param name="propstr" select= + 'compound/subproperty[@set-by-shorthand="true"]/name'/> + </xsl:call-template> + <xsl:text>);</xsl:text> </xsl:if> <xsl:text> } @@ -544,7 +546,7 @@ public class </xsl:text> return true; } - protected Property.Maker getSubpropMaker(String subprop) {</xsl:text> + protected Property.Maker getSubpropMaker(int subpropId) {</xsl:text> <xsl:for-each select="compound/subproperty"> <xsl:variable name="spname"> <xsl:call-template name="makeClassName"> @@ -552,15 +554,17 @@ public class </xsl:text> </xsl:call-template> </xsl:variable> <xsl:text> - if (subprop.equals("</xsl:text> - <xsl:value-of select='name'/> - <xsl:text>")) + if (subpropId == Constants.CP_</xsl:text> + <xsl:call-template name="makeEnumConstant"> + <xsl:with-param name="propstr" select="name"/> + </xsl:call-template> + <xsl:text>) return s_</xsl:text> <xsl:value-of select="$spname"/> <xsl:text>Maker;</xsl:text> </xsl:for-each> <xsl:text> - return super.getSubpropMaker(subprop); + return super.getSubpropMaker(subpropId); } protected Property setSubprop(Property baseProp, int subpropId, @@ -624,9 +628,11 @@ public class </xsl:text> // set default for subprop </xsl:text> <xsl:value-of select="."/> <xsl:text> - subProp = getSubpropMaker("</xsl:text> - <xsl:value-of select='.'/> - <xsl:text>").make(pList, getDefaultFor</xsl:text> + subProp = getSubpropMaker(Constants.CP_</xsl:text> + <xsl:call-template name="makeEnumConstant"> + <xsl:with-param name="propstr" select="."/> + </xsl:call-template> + <xsl:text>).make(pList, getDefaultFor</xsl:text> <xsl:value-of select='$spname'/> <xsl:text>(), fo); p.setComponent(Constants.CP_</xsl:text> |