From: Peter Bernard West Date: Tue, 18 Jun 2002 05:28:12 +0000 (+0000) Subject: Fixed blatant bugs X-Git-Tag: Alt-Design_pre_Properties_split~203 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=dcd9743586caee0bbe07eaf1ea090ae840834094;p=xmlgraphics-fop.git Fixed blatant bugs git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@194892 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/org/apache/fop/fo/PropertySets.java b/src/org/apache/fop/fo/PropertySets.java index d7688753f..204921a38 100644 --- a/src/org/apache/fop/fo/PropertySets.java +++ b/src/org/apache/fop/fo/PropertySets.java @@ -677,26 +677,29 @@ public class PropertySets { public static PropertyValueList expandAndCopySHand(PropertyValue value) throws PropertyException { - int property; + // The property associated with this PropertyValue + int property = value.getProperty(); // Is the property of the argument a shorthand? - Integer sHIndex = (Integer)shorthandMap.get - (Ints.consts.get(value.getProperty())); - if (sHIndex == null) + Integer sHIndex = + (Integer)(shorthandMap.get(Ints.consts.get(property))); + if (sHIndex == null) { + String propname = PropNames.getPropertyName(property); throw new PropertyException - ("" + value.getProperty() + " not a shorthand property"); - property = sHIndex.intValue(); - String sHPropertyName = PropNames.getPropertyName(property); + (propname + " not a shorthand property"); + } + + // Get the array of indices of the properties in the + // expansion of this shorthand ROIntArray expansion = shorthandExpansions[property]; PropertyValueList list = new PropertyValueList(property); for (int i = 0; i < expansion.length; i++) { int expandedProp = expansion.get(i); PropertyValue expandedPropValue; - + // The PropertyValue must be cloneable try { expandedPropValue = (PropertyValue)(value.clone()); } catch (CloneNotSupportedException e) { - throw new PropertyException - (sHPropertyName + ": " + e.getMessage()); + throw new PropertyException(e.getMessage()); } expandedPropValue.setProperty(expandedProp);