aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2005-01-06 13:18:43 +0000
committerJeremias Maerki <jeremias@apache.org>2005-01-06 13:18:43 +0000
commit6d5008610ae582f269fb43f35bfb87465e386bc7 (patch)
tree47fd818ecd69686c5d845f88acc619eb12a52f4a
parentca2e971138db8efa5c11c05089fb23bf1ca46c85 (diff)
downloadxmlgraphics-fop-6d5008610ae582f269fb43f35bfb87465e386bc7.tar.gz
xmlgraphics-fop-6d5008610ae582f269fb43f35bfb87465e386bc7.zip
Removed unnecessary cast as per Finn's suggestion.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198238 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/java/org/apache/fop/fo/properties/BoxPropShorthandParser.java11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/java/org/apache/fop/fo/properties/BoxPropShorthandParser.java b/src/java/org/apache/fop/fo/properties/BoxPropShorthandParser.java
index 46cb225f7..83c4f46a4 100644
--- a/src/java/org/apache/fop/fo/properties/BoxPropShorthandParser.java
+++ b/src/java/org/apache/fop/fo/properties/BoxPropShorthandParser.java
@@ -45,18 +45,17 @@ public class BoxPropShorthandParser extends GenericShorthandParser {
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) {