diff options
author | Glen Mazza <gmazza@apache.org> | 2003-12-22 03:53:31 +0000 |
---|---|---|
committer | Glen Mazza <gmazza@apache.org> | 2003-12-22 03:53:31 +0000 |
commit | 65efc8ad67604e3fee2337a1066ac02299951817 (patch) | |
tree | cce064782472ce2c53507660876d84bfc8b3856a /src/codegen/fo-property-mapping.xsl | |
parent | 657644f5904c56555d5ffca15ff297343cfbbd61 (diff) | |
download | xmlgraphics-fop-65efc8ad67604e3fee2337a1066ac02299951817.tar.gz xmlgraphics-fop-65efc8ad67604e3fee2337a1066ac02299951817.zip |
----------------------------------------------------------------------
More of conversion of strings to integers: Makers now being created via int constants in fo.properties.Constants class.
Temporary string-int conversions currently in Property.java and PropertyList.java, which converts strings from callers into ints for subsequent use.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197047 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/codegen/fo-property-mapping.xsl')
-rw-r--r-- | src/codegen/fo-property-mapping.xsl | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/codegen/fo-property-mapping.xsl b/src/codegen/fo-property-mapping.xsl index ddcba5b1d..33e7e2f91 100644 --- a/src/codegen/fo-property-mapping.xsl +++ b/src/codegen/fo-property-mapping.xsl @@ -79,7 +79,7 @@ Software Foundation, please see <http://www.apache.org/>. <xsl:variable name="lcletters" select="'abcdefghijklmnopqrstuvwxyz-:'" /> <xsl:variable name="ucletters" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ__'" /> <xsl:variable name="enum" select="translate($prop/name, $lcletters, $ucletters)"/> -<xsl:text> </xsl:text><xsl:value-of select="$htname"/>[PR_<xsl:value-of select="$enum"/>] =<xsl:value-of select="$makerclass"/>.maker("<xsl:value-of select="$prop/name"/>"); +<xsl:text> </xsl:text><xsl:value-of select="$htname"/>[PR_<xsl:value-of select="$enum"/>] =<xsl:value-of select="$makerclass"/>.maker(PR_<xsl:value-of select="$enum"/>); <xsl:text> addPropertyName("</xsl:text><xsl:value-of select="$prop/name"/>", PR_<xsl:value-of select="$enum"/>); </xsl:template> @@ -154,8 +154,16 @@ public class <xsl:value-of select="@family"/>PropertyMapping implements Constant return i.intValue(); } + // returns a property, compound, or property.compound name public static String getPropertyName(int id) { - return (String) s_htPropIds.get(new Integer(id)); + if (((id & Constants.COMPOUND_MASK) == 0) + || ((id & Constants.PROPERTY_MASK) == 0)) { + return (String) s_htPropIds.get(new Integer(id)); + } else { + return (String) s_htPropIds.get(new Integer( + id & Constants.PROPERTY_MASK)) + "." + s_htPropIds.get( + new Integer(id & Constants.COMPOUND_MASK)); + } } static { |