Browse Source

Removed variables 'enum' for 1.5 compatibility


git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@198005 13f79535-47bb-0310-9956-ffa450edef68
tags/Defoe_export
Peter Bernard West 19 years ago
parent
commit
186be36f64

+ 15
- 15
src/java/org/apache/fop/datatypes/EnumType.java View File

@@ -60,13 +60,13 @@ public class EnumType extends AbstractPropertyValue {
/**
* @param property the <tt>int</tt> index of the property on which
* this value is being defined.
* @param enum the <tt>int</tt> enumeration constant.
* @param enumval the <tt>int</tt> enumeration constant.
* @exception PropertyException
*/
public EnumType(int property, int enum)
public EnumType(int property, int enumval)
throws PropertyException
{
this(property, enum, PropertyValue.ENUM);
this(property, enumval, PropertyValue.ENUM);
}

/**
@@ -86,14 +86,14 @@ public class EnumType extends AbstractPropertyValue {
/**
* @param propertyName the <tt>String</tt> name of the property on which
* this value is being defined.
* @param enum the <tt>int</tt> enumeration constant.
* @param enumval the <tt>int</tt> enumeration constant.
* @exception PropertyException
*/
public EnumType(String propertyName, int enum)
public EnumType(String propertyName, int enumval)
throws PropertyException
{
this(PropNames.getPropertyIndex(propertyName),
enum, PropertyValue.ENUM);
enumval, PropertyValue.ENUM);
}

/**
@@ -108,25 +108,25 @@ public class EnumType extends AbstractPropertyValue {
throws PropertyException
{
super(property, type);
// Get the enum integer or mapped enum integer
// Get the enumval integer or mapped enumval integer
enumValue = propertyConsts.getEnumIndex(property, enumText);
}

/**
* @param property the <tt>int</tt> index of the property on which
* this value is being defined.
* @param enum the <tt>int</tt> enumeration constant.
* @param enumval the <tt>int</tt> enumeration constant.
* @param type of this value
* @exception PropertyException
*/
public EnumType(int property, int enum, int type)
public EnumType(int property, int enumval, int type)
throws PropertyException
{
super(property, type);
enumValue = enum;
enumValue = enumval;
// Validate the text; getEnumText will throw a PropertyException
// if the enum integer is invalid
String enumText = propertyConsts.getEnumText(property, enum);
// if the enumval integer is invalid
String enumText = propertyConsts.getEnumText(property, enumval);
}

/**
@@ -146,14 +146,14 @@ public class EnumType extends AbstractPropertyValue {
/**
* @param propertyName the <tt>String</tt> name of the property on which
* this value is being defined.
* @param enum the <tt>int</tt> enumeration constant.
* @param enumval the <tt>int</tt> enumeration constant.
* @param type of this value
* @exception PropertyException
*/
public EnumType(String propertyName, int enum, int type)
public EnumType(String propertyName, int enumval, int type)
throws PropertyException
{
this(PropNames.getPropertyIndex(propertyName), enum, type);
this(PropNames.getPropertyIndex(propertyName), enumval, type);
}

/**

+ 7
- 7
src/java/org/apache/fop/fo/PropertyConsts.java View File

@@ -205,16 +205,16 @@ public class PropertyConsts {
* Get the <tt>Numeric</tt> value corresponding to an enumerated value.
* @param foNode the <tt>FONode</tt> being built
* @param propindex int index of the FO property
* @param enum - the integer equivalent of the enumeration keyword.
* @param enumval - the integer equivalent of the enumeration keyword.
* @return the <tt>Numeric</tt> result.
* @throws PropertyException
*/
public Numeric getMappedNumeric(FONode foNode, int propindex, int enum)
public Numeric getMappedNumeric(FONode foNode, int propindex, int enumval)
throws PropertyException
{
Property property = setupProperty(propindex);
if ((datatypes[propindex] & Property.MAPPED_LENGTH) != 0)
return property.getMappedLength(foNode, enum);
return property.getMappedLength(foNode, enumval);
else
throw new PropertyException
("MAPPED_LENGTH not valid in "
@@ -250,7 +250,7 @@ public class PropertyConsts {
}

/**
* Map the integer value of an enum into its mapped value.
* Map the integer value of an enumval into its mapped value.
* Only valid when the datatype of the property includes MAPPED_ENUM.
* <p>Generally, the path will be enumText->enumIndex->mappedEnumText.
* @param index <tt>int</tt> containing the enumeration index.
@@ -265,15 +265,15 @@ public class PropertyConsts {

/**
* @param propindex <tt>int</tt> property index.
* @param enum <tt>String</tt> containing the enumeration text.
* @param enumval <tt>String</tt> containing the enumeration text.
* @return <tt>int</tt> constant representing the enumeration value.
* @exception PropertyException
*/
public int getEnumIndex(int propindex, String enum)
public int getEnumIndex(int propindex, String enumval)
throws PropertyException
{
Property property = setupProperty(propindex);
return property.getEnumIndex(enum);
return property.getEnumIndex(enumval);
}

/**

+ 3
- 3
src/java/org/apache/fop/fonts/apps/PFMReader.java View File

@@ -345,9 +345,9 @@ public class PFMReader extends AbstractLogEnabled {


// Get kerning
Iterator enum = pfm.getKerning().keySet().iterator();
while (enum.hasNext()) {
Integer kpx1 = (Integer)enum.next();
Iterator iter = pfm.getKerning().keySet().iterator();
while (iter.hasNext()) {
Integer kpx1 = (Integer)iter.next();
el = doc.createElement("kerning");
el.setAttribute("kpx1", kpx1.toString());
root.appendChild(el);

+ 5
- 5
src/java/org/apache/fop/fonts/apps/TTFReader.java View File

@@ -443,15 +443,15 @@ public class TTFReader extends AbstractLogEnabled {
Document doc = parent.getOwnerDocument();
// Get kerning
Iterator enum;
Iterator iter;
if (isCid) {
enum = ttf.getKerning().keySet().iterator();
iter = ttf.getKerning().keySet().iterator();
} else {
enum = ttf.getAnsiKerning().keySet().iterator();
iter = ttf.getAnsiKerning().keySet().iterator();
}

while (enum.hasNext()) {
Integer kpx1 = (Integer)enum.next();
while (iter.hasNext()) {
Integer kpx1 = (Integer)iter.next();

el = doc.createElement("kerning");
el.setAttribute("kpx1", kpx1.toString());

Loading…
Cancel
Save