jeremias 2005/01/06 05:18:43
Modified: src/java/org/apache/fop/fo/properties
BoxPropShorthandParser.java
Log:
Removed unnecessary cast as per Finn's suggestion.
Revision Changes Path
1.4 +6 -7
xml-fop/src/java/org/apache/fop/fo/properties/BoxPropShorthandParser.java
Index: BoxPropShorthandParser.java
===================================================================
RCS file:
/home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/BoxPropShorthandParser.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- BoxPropShorthandParser.java 6 Jan 2005 11:09:03 -0000 1.3
+++ BoxPropShorthandParser.java 6 Jan 2005 13:18:43 -0000 1.4
@@ -45,18 +45,17 @@
PropertyMaker maker,
PropertyList propertyList)
throws PropertyException {
- ListProperty listProperty = (ListProperty)property;
String name = FOPropertyMapping.getPropertyName(propId);
Property p = null;
- int count = listProperty.getList().size();
+ int count = property.getList().size();
if (name.indexOf("-top") >= 0) {
- p = getElement(listProperty, 0);
+ p = getElement(property, 0);
} else if (name.indexOf("-right") >= 0) {
- p = getElement(listProperty, count > 1 ? 1 : 0);
+ p = getElement(property, count > 1 ? 1 : 0);
} else if (name.indexOf("-bottom") >= 0) {
- p = getElement(listProperty, count > 2 ? 2 : 0);
+ p = getElement(property, count > 2 ? 2 : 0);
} else if (name.indexOf("-left") >= 0) {
- p = getElement(listProperty, count > 3 ? 3 : (count > 1 ? 1 :
0));
+ p = getElement(property, count > 3 ? 3 : (count > 1 ? 1 : 0));
}
// if p not null, try to convert it to a value of the correct type
if (p != null) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]