diff options
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 { |