]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Comment out unused properties. Patch by Richard Wheeldon
authorSimon Pepping <spepping@apache.org>
Wed, 20 Dec 2006 08:34:28 +0000 (08:34 +0000)
committerSimon Pepping <spepping@apache.org>
Wed, 20 Dec 2006 08:34:28 +0000 (08:34 +0000)
<richardw@geoquip-rnd.demon.co.uk>. ASF Bugzilla Bug 41044,
attachment 19177.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@488960 13f79535-47bb-0310-9956-ffa450edef68

41 files changed:
src/java/org/apache/fop/fo/FOPropertyMapping.java
src/java/org/apache/fop/fo/expr/RelativeNumericProperty.java
src/java/org/apache/fop/fo/flow/AbstractGraphics.java
src/java/org/apache/fop/fo/flow/AbstractListItemPart.java
src/java/org/apache/fop/fo/flow/BasicLink.java
src/java/org/apache/fop/fo/flow/BidiOverride.java
src/java/org/apache/fop/fo/flow/Block.java
src/java/org/apache/fop/fo/flow/BlockContainer.java
src/java/org/apache/fop/fo/flow/Character.java
src/java/org/apache/fop/fo/flow/Float.java
src/java/org/apache/fop/fo/flow/Footnote.java
src/java/org/apache/fop/fo/flow/FootnoteBody.java
src/java/org/apache/fop/fo/flow/InitialPropertySet.java
src/java/org/apache/fop/fo/flow/Inline.java
src/java/org/apache/fop/fo/flow/InlineContainer.java
src/java/org/apache/fop/fo/flow/Leader.java
src/java/org/apache/fop/fo/flow/ListBlock.java
src/java/org/apache/fop/fo/flow/ListItem.java
src/java/org/apache/fop/fo/flow/MultiCase.java
src/java/org/apache/fop/fo/flow/MultiProperties.java
src/java/org/apache/fop/fo/flow/MultiSwitch.java
src/java/org/apache/fop/fo/flow/MultiToggle.java
src/java/org/apache/fop/fo/flow/PageNumber.java
src/java/org/apache/fop/fo/flow/PageNumberCitation.java
src/java/org/apache/fop/fo/flow/Table.java
src/java/org/apache/fop/fo/flow/TableAndCaption.java
src/java/org/apache/fop/fo/flow/TableBody.java
src/java/org/apache/fop/fo/flow/TableCaption.java
src/java/org/apache/fop/fo/flow/TableCell.java
src/java/org/apache/fop/fo/flow/TableColumn.java
src/java/org/apache/fop/fo/flow/TableFObj.java
src/java/org/apache/fop/fo/flow/TableRow.java
src/java/org/apache/fop/fo/properties/EnumNumber.java
src/java/org/apache/fop/fo/properties/EnumProperty.java
src/java/org/apache/fop/fo/properties/LineHeightPropertyMaker.java
src/java/org/apache/fop/fo/properties/NumberProperty.java
src/java/org/apache/fop/fo/properties/PageBreakShorthandParser.java
src/java/org/apache/fop/fo/properties/PositionShorthandParser.java
src/java/org/apache/fop/fo/properties/SpacePropertyMaker.java
src/java/org/apache/fop/fo/properties/VerticalAlignShorthandParser.java
src/java/org/apache/fop/fo/properties/WhiteSpaceShorthandParser.java

index 48a58b94ad0ab04ec66f7ac1b44358c5087dcae8..84f524878337da8eb0c77ba23f28f997b017952d 100644 (file)
@@ -265,7 +265,7 @@ public final class FOPropertyMapping implements Constants {
             enums = new Property[ENUM_COUNT + 1];
         }
         if (enums[enumValue] == null) {
-            enums[enumValue] = new EnumProperty(enumValue, text);
+            enums[enumValue] = EnumProperty.getInstance(enumValue, text);
         }
         return enums[enumValue];
     }
index 5c52ebe174eccfbf4c29bbed0a7c9d986032389b..b42cb11a72d768d2629fb575ca2490ebe32ff6b0 100755 (executable)
@@ -102,7 +102,6 @@ public class RelativeNumericProperty extends Property implements Numeric, Length
      * @throws PropertyException when an exception occur during evaluation.
      */
     private Numeric getResolved(PercentBaseContext context) throws PropertyException {
-        Numeric n;
         switch (operation) {
         case ADDITION:
             return NumericOp.addition2(op1, op2, context);
index d35b9692a190fc6591b0b52d64c68561b8c0f7a0..853e438fad9dcdb10e525fa262f59edcf416c125 100644 (file)
@@ -41,34 +41,37 @@ public abstract class AbstractGraphics extends FObj {
     
     // The value of properties relevant for fo:instream-foreign-object
     // and external-graphics.
-    private CommonAccessibility commonAccessibility;
-    private CommonAural commonAural;
     private CommonBorderPaddingBackground commonBorderPaddingBackground;
-    private CommonMarginInline commonMarginInline;
-    private CommonRelativePosition commonRelativePosition;
     private Length alignmentAdjust;
     private int alignmentBaseline;
     private Length baselineShift;
     private LengthRangeProperty blockProgressionDimension;
     // private ToBeImplementedProperty clip;
     private Length contentHeight;
-    private String contentType;
     private Length contentWidth;
     private int displayAlign;
     private int dominantBaseline;
     private Length height;
     private String id;
     private LengthRangeProperty inlineProgressionDimension;
-    private KeepProperty keepWithNext;
-    private KeepProperty keepWithPrevious;
     private SpaceProperty lineHeight;
     private int overflow;
     private int scaling;
-    private int scalingMethod;
     private int textAlign;
     private Length width;
+    // Unused but valid items, commented out for performance:
+    //     private CommonAccessibility commonAccessibility;
+    //     private CommonAural commonAural;
+    //     private CommonMarginInline commonMarginInline;
+    //     private CommonRelativePosition commonRelativePosition;
+    //     private String contentType;
+    //     private KeepProperty keepWithNext;
+    //     private KeepProperty keepWithPrevious;
+    //     private int scalingMethod;
     // End of property values
 
+
+
     /**
      * constructs an instream-foreign-object object (called by Maker).
      *
@@ -82,30 +85,22 @@ public abstract class AbstractGraphics extends FObj {
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
-        commonAccessibility = pList.getAccessibilityProps();
-        commonAural = pList.getAuralProps();
         commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
-        commonMarginInline = pList.getMarginInlineProps();
-        commonRelativePosition = pList.getRelativePositionProps();
         alignmentAdjust = pList.get(PR_ALIGNMENT_ADJUST).getLength();
         alignmentBaseline = pList.get(PR_ALIGNMENT_BASELINE).getEnum();
         baselineShift = pList.get(PR_BASELINE_SHIFT).getLength();
         blockProgressionDimension = pList.get(PR_BLOCK_PROGRESSION_DIMENSION).getLengthRange();
         // clip = pList.get(PR_CLIP);
         contentHeight = pList.get(PR_CONTENT_HEIGHT).getLength();
-        contentType = pList.get(PR_CONTENT_TYPE).getString();
         contentWidth = pList.get(PR_CONTENT_WIDTH).getLength();
         displayAlign = pList.get(PR_DISPLAY_ALIGN).getEnum();
         dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
         height = pList.get(PR_HEIGHT).getLength();
         id = pList.get(PR_ID).getString();
         inlineProgressionDimension = pList.get(PR_INLINE_PROGRESSION_DIMENSION).getLengthRange();
-        keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
-        keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
         lineHeight = pList.get(PR_LINE_HEIGHT).getSpace();
         overflow = pList.get(PR_OVERFLOW).getEnum();
         scaling = pList.get(PR_SCALING).getEnum();
-        scalingMethod = pList.get(PR_SCALING_METHOD).getEnum();
         textAlign = pList.get(PR_TEXT_ALIGN).getEnum();
         width = pList.get(PR_WIDTH).getLength();
     }
index 03b9e96a7861ed327e542e7f4c3094977808d226..c5277323ebe6b08c0cfefd81ea91ef77cc885b8b 100644 (file)
@@ -34,9 +34,10 @@ import org.apache.fop.fo.properties.KeepProperty;
  */
 public abstract class AbstractListItemPart extends FObj {
     // The value of properties relevant for fo:list-item-label and fo:list-item-body.
-    private CommonAccessibility commonAccessibility;
     private String id;
     private KeepProperty keepTogether;
+    // Valid properties, commented out for performance:
+    //   private CommonAccessibility commonAccessibility;
     // End of property values
 
     /** used for FO validation */
@@ -53,7 +54,6 @@ public abstract class AbstractListItemPart extends FObj {
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
-        commonAccessibility = pList.getAccessibilityProps();
         id = pList.get(PR_ID).getString();
         keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
     }
index 0b8bc4f5b630fb57c18fa48a4b98fbff6ac4e002..c487e54e3067177ddb78c5622172bb6e0763dd6a 100644 (file)
@@ -36,7 +36,6 @@ import org.apache.fop.fo.ValidationException;
 public class BasicLink extends Inline {
     // The value of properties relevant for fo:basic-link.
     // private ToBeImplementedProperty destinationPlacementOffset;
-    private int dominantBaseline;
     private String externalDestination;
     // private ToBeImplementedProperty indicateDestination;
     private String internalDestination;
@@ -44,6 +43,8 @@ public class BasicLink extends Inline {
     // private ToBeImplementedProperty targetProcessingContext;
     // private ToBeImplementedProperty targetPresentationContext;
     // private ToBeImplementedProperty targetStylesheet;
+    // Unused but valid items, commented out for performance:
+    //     private int dominantBaseline;
     // End of property values
 
     // used only for FO validation
@@ -62,7 +63,6 @@ public class BasicLink extends Inline {
     public void bind(PropertyList pList) throws FOPException {
         super.bind(pList);
         // destinationPlacementOffset = pList.get(PR_DESTINATION_PLACEMENT_OFFSET);
-        dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
         externalDestination = pList.get(PR_EXTERNAL_DESTINATION).getString();
         // indicateDestination = pList.get(PR_INDICATE_DESTINATION);
         internalDestination = pList.get(PR_INTERNAL_DESTINATION).getString();
index 3df774be951635f97b8628055f4df808b30e947d..3a63b96cf584e29618fb51c7d1679cd186dc18c7 100644 (file)
@@ -40,18 +40,19 @@ public class BidiOverride extends FObjMixed {
     // used for FO validation
     private boolean blockOrInlineItemFound = false;
     private boolean canHaveBlockLevelChildren = true;
-
     // The value of properties relevant for fo:bidi-override.
-    private CommonAural commonAural;
-    private CommonFont commonFont;
-    private CommonRelativePosition commonRelativePosition;
-    private Color prColor;
     // private ToBeImplementedProperty prDirection;
     // private ToBeImplementedProperty prLetterSpacing;
     private SpaceProperty lineHeight;
     // private ToBeImplementedProperty prScoreSpaces;
     // private ToBeImplementedProperty prUnicodeBidi;
-    private SpaceProperty prWordSpacing;
+
+    // Unused but valid items, commented out for performance:
+    //     private CommonAural commonAural;
+    //     private CommonFont commonFont;
+    //     private CommonRelativePosition commonRelativePosition;
+    //     private Color prColor;
+    //     private SpaceProperty prWordSpacing;
     // End of property values
 
     /**
@@ -84,16 +85,11 @@ public class BidiOverride extends FObjMixed {
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
-        commonAural = pList.getAuralProps();
-        commonFont = pList.getFontProps();
-        commonRelativePosition = pList.getRelativePositionProps();
-        prColor = pList.get(PR_COLOR).getColor(getUserAgent());
         // prDirection = pList.get(PR_DIRECTION);
         // prLetterSpacing = pList.get(PR_LETTER_SPACING);
         lineHeight = pList.get(PR_LINE_HEIGHT).getSpace();
         // prScoreSpaces = pList.get(PR_SCORE_SPACES);
         // prUnicodeBidi = pList.get(PR_UNICODE_BIDI);
-        prWordSpacing = pList.get(PR_WORD_SPACING).getSpace();
     }
 
     /**
index f52ad36b2afdfe12a66617742ad96267c7527154..48a8d3bdf9a02c5b5278169262d69bb611752cd5 100644 (file)
@@ -62,8 +62,6 @@ public class Block extends FObjMixed {
     private int breakAfter;
     private int breakBefore;
     private Color color;
-    private Length textDepth;
-    private Length textAltitude;
     private int hyphenationKeep;
     private Numeric hyphenationLadderCount;
     private String id;
@@ -82,10 +80,13 @@ public class Block extends FObjMixed {
     private int textAlign;
     private int textAlignLast;
     private Length textIndent;
-    private int visibility;
     private int whiteSpaceCollapse;
     private Numeric widows;
     private int wrapOption;
+    // Unused but valid items, commented out for performance:
+    //     private Length textDepth;
+    //     private Length textAltitude;
+    //     private int visibility;
     // End of property values
     
     /**
@@ -111,8 +112,6 @@ public class Block extends FObjMixed {
         breakAfter = pList.get(PR_BREAK_AFTER).getEnum();
         breakBefore = pList.get(PR_BREAK_BEFORE).getEnum();
         color = pList.get(PR_COLOR).getColor(getUserAgent());
-        textDepth = pList.get(PR_TEXT_DEPTH).getLength();
-        textAltitude = pList.get(PR_TEXT_ALTITUDE).getLength();
         hyphenationKeep = pList.get(PR_HYPHENATION_KEEP).getEnum();
         hyphenationLadderCount = pList.get(PR_HYPHENATION_LADDER_COUNT).getNumeric();
         id = pList.get(PR_ID).getString();
@@ -131,7 +130,6 @@ public class Block extends FObjMixed {
         textAlign = pList.get(PR_TEXT_ALIGN).getEnum();
         textAlignLast = pList.get(PR_TEXT_ALIGN_LAST).getEnum();
         textIndent = pList.get(PR_TEXT_INDENT).getLength();
-        visibility = pList.get(PR_VISIBILITY).getEnum();
         whiteSpaceCollapse = pList.get(PR_WHITE_SPACE_COLLAPSE).getEnum();
         widows = pList.get(PR_WIDOWS).getNumeric();
         wrapOption = pList.get(PR_WRAP_OPTION).getEnum();
index 0bcee2b32855065ffe95c1c203a3e24005ce7edf..ea5aee51fd6329ed3fec122ec5f0532aa39abeaa 100644 (file)
@@ -50,7 +50,6 @@ public class BlockContainer extends FObj {
     private Length height;
     private String id;
     private LengthRangeProperty inlineProgressionDimension;
-    private int intrusionDisplace;
     private KeepProperty keepTogether;
     private KeepProperty keepWithNext;
     private KeepProperty keepWithPrevious;
@@ -59,7 +58,9 @@ public class BlockContainer extends FObj {
     private int span;
     private Length width;
     private int writingMode;
-    private Numeric zIndex;
+    // Unused but valid items, commented out for performance:
+    //     private int intrusionDisplace;
+    //     private Numeric zIndex;
     // End of property values
 
     /** used for FO validation */
@@ -87,7 +88,6 @@ public class BlockContainer extends FObj {
         height = pList.get(PR_HEIGHT).getLength();
         id = pList.get(PR_ID).getString();
         inlineProgressionDimension = pList.get(PR_INLINE_PROGRESSION_DIMENSION).getLengthRange();
-        intrusionDisplace = pList.get(PR_INTRUSION_DISPLACE).getEnum();
         keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
         keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
         keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
@@ -96,7 +96,6 @@ public class BlockContainer extends FObj {
         span = pList.get(PR_SPAN).getEnum();
         width = pList.get(PR_WIDTH).getLength();
         writingMode = pList.get(PR_WRITING_MODE).getEnum();
-        zIndex = pList.get(PR_Z_INDEX).getNumeric();
     }
 
     /**
index cb32c9a49134b1d4c06a96f8dea1be0b2bf9c491..e83e3711999efacf2c42cf5444495f7d738ce44f 100644 (file)
@@ -57,36 +57,37 @@ import org.xml.sax.Locator;
  */
 public class Character extends FObj {
     // The value of properties relevant for fo:character.
-    private CommonAural commonAural;
     private CommonBorderPaddingBackground commonBorderPaddingBackground;
     private CommonFont commonFont;
     private CommonHyphenation commonHyphenation;
-    private CommonMarginInline commonMarginInline;
-    private CommonRelativePosition commonRelativePosition;
     private Length alignmentAdjust;
-    private int treatAsWordSpace;
     private int alignmentBaseline;
     private Length baselineShift;
     private char character;
     private Color color;
     private int dominantBaseline;
-    private Length textDepth;
-    private Length textAltitude;
     // private ToBeImplementedProperty glyphOrientationHorizontal;
     // private ToBeImplementedProperty glyphOrientationVertical;
     private String id;
-    private KeepProperty keepWithNext;
-    private KeepProperty keepWithPrevious;
     private Property letterSpacing;
     private SpaceProperty lineHeight;
-    private int scoreSpaces;
-    private int suppressAtLineBreak;
     /** Holds the text decoration values. May be null */
     private CommonTextDecoration textDecoration;
     // private ToBeImplementedProperty textShadow;
-    private int textTransform;
-    private int visibility;
     private Property wordSpacing;
+    // Unused but valid items, commented out for performance:
+    //     private CommonAural commonAural;
+    //     private CommonMarginInline commonMarginInline;
+    //     private CommonRelativePosition commonRelativePosition;
+    //     private int treatAsWordSpace;
+    //     private Length textDepth;
+    //     private Length textAltitude;
+    //     private KeepProperty keepWithNext;
+    //     private KeepProperty keepWithPrevious;
+    //     private int scoreSpaces;
+    //     private int suppressAtLineBreak;
+    //     private int textTransform;
+    //     private int visibility;
     // End of property values
 
     /** constant indicating that the character is OK */
@@ -105,35 +106,23 @@ public class Character extends FObj {
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
-        commonAural = pList.getAuralProps();
         commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
         commonFont = pList.getFontProps();
         commonHyphenation = pList.getHyphenationProps();
-        commonMarginInline = pList.getMarginInlineProps();
-        commonRelativePosition = pList.getRelativePositionProps();
 
         alignmentAdjust = pList.get(PR_ALIGNMENT_ADJUST).getLength();
-        treatAsWordSpace = pList.get(PR_TREAT_AS_WORD_SPACE).getEnum();
         alignmentBaseline = pList.get(PR_ALIGNMENT_BASELINE).getEnum();
         baselineShift = pList.get(PR_BASELINE_SHIFT).getLength();
         character = pList.get(PR_CHARACTER).getCharacter();
         color = pList.get(PR_COLOR).getColor(getUserAgent());
         dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
-        textDepth = pList.get(PR_TEXT_DEPTH).getLength();
-        textAltitude = pList.get(PR_TEXT_ALTITUDE).getLength();
         // glyphOrientationHorizontal = pList.get(PR_GLYPH_ORIENTATION_HORIZONTAL);
         // glyphOrientationVertical = pList.get(PR_GLYPH_ORIENTATION_VERTICAL);
         id = pList.get(PR_ID).getString();
-        keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
-        keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
         letterSpacing = pList.get(PR_LETTER_SPACING);
         lineHeight = pList.get(PR_LINE_HEIGHT).getSpace();
-        scoreSpaces = pList.get(PR_SCORE_SPACES).getEnum();
-        suppressAtLineBreak = pList.get(PR_SUPPRESS_AT_LINE_BREAK).getEnum();
         textDecoration = pList.getTextDecorationProps();
         // textShadow = pList.get(PR_TEXT_SHADOW);
-        textTransform = pList.get(PR_TEXT_TRANSFORM).getEnum();
-        visibility = pList.get(PR_VISIBILITY).getEnum();
         wordSpacing = pList.get(PR_WORD_SPACING);
     }
 
index 3e720cb47be8e18198de78e7c5cd446836d158cb..48ae864711ca019737fc3093b40dc011d3f3a209 100644 (file)
@@ -32,9 +32,9 @@ import org.apache.fop.fo.ValidationException;
  * fo:float element.
  */
 public class Float extends FObj {
-    // The value of properties relevant for fo:float.
-    private int float_;
-    private int clear;
+    // The value of properties relevant for fo:float (commented out for performance.
+    //     private int float_;
+    //     private int clear;
     // End of property values
 
     static boolean notImplementedWarningGiven = false;
@@ -55,8 +55,7 @@ public class Float extends FObj {
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
-        float_ = pList.get(PR_FLOAT).getEnum();
-        clear = pList.get(PR_CLEAR).getEnum();
+        // No active properties -> Nothing to do.
     }
 
     /**
index 73cfe19bc867912516890e23038f6a139cd42548..0f22b441ea1b760ba4b1cca08a068dbae355e79e 100644 (file)
@@ -32,8 +32,8 @@ import org.apache.fop.fo.properties.CommonAccessibility;
  * Class modelling the fo:footnote object.
  */
 public class Footnote extends FObj {
-    // The value of properties relevant for fo:footnote.
-    private CommonAccessibility commonAccessibility;
+    // The value of properties relevant for fo:footnote (commented out for performance).
+    //     private CommonAccessibility commonAccessibility;
     // End of property values
 
     private Inline footnoteCitation = null;
@@ -50,7 +50,7 @@ public class Footnote extends FObj {
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
-        commonAccessibility = pList.getAccessibilityProps();
+        // No active properties -> do nothing.
     }
     
     /**
index 4e7ddbad143b8a0c49817990f051e8f68e670625..35f44dff61afbf60f4386a4544ea1c5c5d8b3563 100644 (file)
@@ -33,8 +33,8 @@ import org.apache.fop.fo.properties.CommonAccessibility;
  * Class modelling the fo:footnote-body object.
  */
 public class FootnoteBody extends FObj {
-    // The value of properties relevant for fo:footnote-body.
-    private CommonAccessibility commonAccessibility;
+    // The value of properties relevant for fo:footnote-body (commented out for perforance).
+    //     private CommonAccessibility commonAccessibility;
     // End of property values
 
     /**
@@ -48,7 +48,6 @@ public class FootnoteBody extends FObj {
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
-        commonAccessibility = pList.getAccessibilityProps();
     }
 
     /**
index 4fd1eae08a599bda3518b9f6fe9b72885ae5df23..9c28d57fb7bf3485c8fa843c3615403309b4fda4 100644 (file)
@@ -41,20 +41,21 @@ import org.apache.fop.fo.properties.SpaceProperty;
  */
 public class InitialPropertySet extends FObj {
     // The value of properties relevant for fo:initial-property-set.
-    private CommonAccessibility commonAccessibility;
-    private CommonAural commonAural;
-    private CommonBorderPaddingBackground commonBorderPaddingBackground;
-    private CommonFont commonFont;
-    private CommonRelativePosition commonRelativePosition;
-    private Color color;
     private String id;
     // private ToBeImplementedProperty letterSpacing;
     private SpaceProperty lineHeight;
-    private int scoreSpaces;
-    private int textDecoration;
     // private ToBeImplementedProperty textShadow;
-    private int textTransform;
-    private SpaceProperty wordSpacing;
+    // Unused but valid items, commented out for performance:
+    //     private CommonAccessibility commonAccessibility;
+    //     private CommonAural commonAural;
+    //     private CommonBorderPaddingBackground commonBorderPaddingBackground;
+    //     private CommonFont commonFont;
+    //     private CommonRelativePosition commonRelativePosition;
+    //     private Color color;
+    //     private int scoreSpaces;
+    //     private int textDecoration;
+    //     private int textTransform;
+    //     private SpaceProperty wordSpacing;
     // End of property values
 
     /**
@@ -68,20 +69,10 @@ public class InitialPropertySet extends FObj {
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
-        commonAccessibility = pList.getAccessibilityProps();
-        commonAural = pList.getAuralProps();
-        commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
-        commonFont = pList.getFontProps();
-        commonRelativePosition = pList.getRelativePositionProps();
-        color = pList.get(PR_COLOR).getColor(getUserAgent());
         id = pList.get(PR_ID).getString();
         // letterSpacing = pList.get(PR_LETTER_SPACING);
         lineHeight = pList.get(PR_LINE_HEIGHT).getSpace();
-        scoreSpaces = pList.get(PR_SCORE_SPACES).getEnum();
-        textDecoration = pList.get(PR_TEXT_DECORATION).getEnum();
         // textShadow = pList.get(PR_TEXT_SHADOW);
-        textTransform = pList.get(PR_TEXT_TRANSFORM).getEnum();
-        wordSpacing = pList.get(PR_WORD_SPACING).getSpace();
     }
 
     /**
index 27506ba306b0e36823a5e3bdef717d733caf51e9..f4c29508a9bba3503c9e007ae52786278c52caf8 100644 (file)
@@ -38,22 +38,22 @@ import org.apache.fop.fo.properties.LengthRangeProperty;
 public class Inline extends InlineLevel {
     // The value of properties relevant for fo:inline.
     // See also superclass InlineLevel
-    private CommonRelativePosition commonRelativePosition;
     private Length alignmentAdjust;
     private int alignmentBaseline;
     private Length baselineShift;
-    private LengthRangeProperty blockProgressionDimension;
     private int dominantBaseline;
-    private Length height;
     private String id;
-    private LengthRangeProperty inlineProgressionDimension;
-    private KeepProperty keepTogether;
-    private KeepProperty keepWithNext;
-    private KeepProperty keepWithPrevious;
-    private Length width;
-    private int wrapOption;
+    // Unused but valid items, commented out for performance:
+    //     private CommonRelativePosition commonRelativePosition;
+    //     private LengthRangeProperty blockProgressionDimension;
+    //     private Length height;
+    //     private LengthRangeProperty inlineProgressionDimension;
+    //     private KeepProperty keepTogether;
+    //     private KeepProperty keepWithNext;
+    //     private KeepProperty keepWithPrevious;
+    //     private Length width;
+    //     private int wrapOption;
     // End of property values
-
     // used for FO validation
     private boolean blockOrInlineItemFound = false;
     private boolean canHaveBlockLevelChildren = true;
@@ -70,20 +70,11 @@ public class Inline extends InlineLevel {
      */
     public void bind(PropertyList pList) throws FOPException {
         super.bind(pList);
-        commonRelativePosition = pList.getRelativePositionProps();
         alignmentAdjust = pList.get(PR_ALIGNMENT_ADJUST).getLength();
         alignmentBaseline = pList.get(PR_ALIGNMENT_BASELINE).getEnum();
         baselineShift = pList.get(PR_BASELINE_SHIFT).getLength();
-        blockProgressionDimension = pList.get(PR_BLOCK_PROGRESSION_DIMENSION).getLengthRange();
         dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
-        height = pList.get(PR_HEIGHT).getLength();
         id = pList.get(PR_ID).getString();
-        inlineProgressionDimension = pList.get(PR_INLINE_PROGRESSION_DIMENSION).getLengthRange();
-        keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
-        keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
-        keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
-        width = pList.get(PR_WIDTH).getLength();
-        wrapOption = pList.get(PR_WRAP_OPTION).getEnum();
     }
 
     /**
index 5551861c8166a6d4b3277da9376f8b68e25bf35d..85a91c27f11c569f76dbf11070ecf6ada2f54ed1 100644 (file)
@@ -41,27 +41,28 @@ import org.apache.fop.fo.properties.SpaceProperty;
 public class InlineContainer extends FObj {
     
     // The value of properties relevant for fo:inline-container.
-    private CommonBorderPaddingBackground commonBorderPaddingBackground;
-    private CommonMarginInline commonMarginInline;
-    private CommonRelativePosition commonRelativePosition;
     private Length alignmentAdjust;
     private int alignmentBaseline;
     private Length baselineShift;
-    private LengthRangeProperty blockProgressionDimension;
     // private ToBeImplementedProperty clip;
-    private int displayAlign;
     private int dominantBaseline;
-    private Length height;
     private String id;
-    private LengthRangeProperty inlineProgressionDimension;
-    private KeepProperty keepTogether;
-    private KeepProperty keepWithNext;
-    private KeepProperty keepWithPrevious;
     private SpaceProperty lineHeight;
-    private int overflow;
-    private Numeric referenceOrientation;
-    private Length width;
-    private int writingMode;
+    // Unused but valid items, commented out for performance:
+    //     private CommonBorderPaddingBackground commonBorderPaddingBackground;
+    //     private CommonMarginInline commonMarginInline;
+    //     private CommonRelativePosition commonRelativePosition;
+    //     private LengthRangeProperty blockProgressionDimension;
+    //     private int displayAlign;
+    //     private Length height;
+    //     private LengthRangeProperty inlineProgressionDimension;
+    //     private KeepProperty keepTogether;
+    //     private KeepProperty keepWithNext;
+    //     private KeepProperty keepWithPrevious;
+    //     private int overflow;
+    //     private Numeric referenceOrientation;
+    //     private Length width;
+    //     private int writingMode;
     // End of property values
 
     /** used for FO validation */
@@ -78,27 +79,13 @@ public class InlineContainer extends FObj {
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
-        commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
-        commonMarginInline = pList.getMarginInlineProps();
-        commonRelativePosition = pList.getRelativePositionProps();
         alignmentAdjust = pList.get(PR_ALIGNMENT_ADJUST).getLength();
         alignmentBaseline = pList.get(PR_ALIGNMENT_BASELINE).getEnum();
         baselineShift = pList.get(PR_BASELINE_SHIFT).getLength();
-        blockProgressionDimension = pList.get(PR_BLOCK_PROGRESSION_DIMENSION).getLengthRange();
         // clip = pList.get(PR_CLIP);
-        displayAlign = pList.get(PR_DISPLAY_ALIGN).getEnum();
         dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
-        height = pList.get(PR_HEIGHT).getLength();
         id = pList.get(PR_ID).getString();
-        inlineProgressionDimension = pList.get(PR_INLINE_PROGRESSION_DIMENSION).getLengthRange();
-        keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
-        keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
-        keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
         lineHeight = pList.get(PR_LINE_HEIGHT).getSpace();
-        overflow = pList.get(PR_OVERFLOW).getEnum();
-        referenceOrientation = pList.get(PR_REFERENCE_ORIENTATION).getNumeric();
-        width = pList.get(PR_WIDTH).getLength();
-        writingMode = pList.get(PR_WRITING_MODE).getEnum();
     }
 
     /**
index cad2c237620c000d869ec1671712bcf80f49c2cb..cfc971256a754de72d03f2f143a237e2b186719d 100644 (file)
@@ -37,16 +37,11 @@ import org.apache.fop.fo.properties.SpaceProperty;
 public class Leader extends InlineLevel {
     // The value of properties relevant for fo:leader.
     // See also superclass InlineLevel
-    private CommonRelativePosition commonRelativePosition;
     private Length alignmentAdjust;
     private int alignmentBaseline;
     private Length baselineShift;
     private int dominantBaseline;
-    private Length textDepth;
-    private Length textAltitude;
     private String id;
-    private KeepProperty keepWithNext;
-    private KeepProperty keepWithPrevious;
     private int leaderAlignment;
     private LengthRangeProperty leaderLength;
     private int leaderPattern;
@@ -55,7 +50,13 @@ public class Leader extends InlineLevel {
     private Length ruleThickness;
     // private ToBeImplementedProperty letterSpacing;
     // private ToBeImplementedProperty textShadow;
-    private SpaceProperty wordSpacing;
+    // Unused but valid items, commented out for performance:
+    //     private CommonRelativePosition commonRelativePosition;
+    //     private Length textDepth;
+    //     private Length textAltitude;
+    //     private KeepProperty keepWithNext;
+    //     private KeepProperty keepWithPrevious;
+    //     private SpaceProperty wordSpacing;
     // End of property values
 
     /**
@@ -70,16 +71,11 @@ public class Leader extends InlineLevel {
      */
     public void bind(PropertyList pList) throws FOPException {
         super.bind(pList);
-        commonRelativePosition = pList.getRelativePositionProps();
         alignmentAdjust = pList.get(PR_ALIGNMENT_ADJUST).getLength();
         alignmentBaseline = pList.get(PR_ALIGNMENT_BASELINE).getEnum();
         baselineShift = pList.get(PR_BASELINE_SHIFT).getLength();
         dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
-        textDepth = pList.get(PR_TEXT_DEPTH).getLength();
-        textAltitude = pList.get(PR_TEXT_ALTITUDE).getLength();
         id = pList.get(PR_ID).getString();
-        keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
-        keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
         leaderAlignment = pList.get(PR_LEADER_ALIGNMENT).getEnum();
         leaderLength = pList.get(PR_LEADER_LENGTH).getLengthRange();
         leaderPattern = pList.get(PR_LEADER_PATTERN).getEnum();
@@ -105,7 +101,6 @@ public class Leader extends InlineLevel {
         }
         // letterSpacing = pList.get(PR_LETTER_SPACING);
         // textShadow = pList.get(PR_TEXT_SHADOW);
-        wordSpacing = pList.get(PR_WORD_SPACING).getSpace();
     }
 
     /**
index 2cbbb58ced70955512c5ed10dc2ed2dc16736fba..9e0ad1cb9d037ee5b963eb3bfef26bc590c375f1 100644 (file)
@@ -39,20 +39,21 @@ import org.apache.fop.fo.properties.KeepProperty;
  */
 public class ListBlock extends FObj {
     // The value of properties relevant for fo:list-block.
-    private CommonAccessibility commonAccessibility;
-    private CommonAural commonAural;
     private CommonBorderPaddingBackground commonBorderPaddingBackground;
     private CommonMarginBlock commonMarginBlock;
-    private CommonRelativePosition commonRelativePosition;
     private int breakAfter;
     private int breakBefore;
     private String id;
-    private int intrusionDisplace;
     private KeepProperty keepTogether;
     private KeepProperty keepWithNext;
     private KeepProperty keepWithPrevious;
-    private Length provisionalDistanceBetweenStarts;
-    private Length provisionalLabelSeparation;
+    // Unused but valid items, commented out for performance:
+    //     private CommonAccessibility commonAccessibility;
+    //     private CommonAural commonAural;
+    //     private CommonRelativePosition commonRelativePosition;
+    //     private int intrusionDisplace;
+    //     private Length provisionalDistanceBetweenStarts;
+    //     private Length provisionalLabelSeparation;
     // End of property values
 
     /** extension properties */
@@ -73,23 +74,14 @@ public class ListBlock extends FObj {
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
-        commonAccessibility = pList.getAccessibilityProps();
-        commonAural = pList.getAuralProps();
         commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
         commonMarginBlock = pList.getMarginBlockProps();
-        commonRelativePosition = pList.getRelativePositionProps();
         breakAfter = pList.get(PR_BREAK_AFTER).getEnum();
         breakBefore = pList.get(PR_BREAK_BEFORE).getEnum();
         id = pList.get(PR_ID).getString();
-        intrusionDisplace = pList.get(PR_INTRUSION_DISPLACE).getEnum();
         keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
         keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
         keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
-        provisionalDistanceBetweenStarts = pList.get(
-                PR_PROVISIONAL_DISTANCE_BETWEEN_STARTS).getLength();
-        provisionalLabelSeparation = pList.get(
-                PR_PROVISIONAL_LABEL_SEPARATION).getLength();
-
         //Bind extension properties
         widowContentLimit = pList.get(PR_X_WIDOW_CONTENT_LIMIT).getLength();
         orphanContentLimit = pList.get(PR_X_ORPHAN_CONTENT_LIMIT).getLength();
index 3d9e9c624d7ead08c4ad48af0a8344b55edb2a43..524ec1b7aa94d8cbcd8b0063d513f58c75bd42ff 100644 (file)
@@ -38,19 +38,20 @@ import org.apache.fop.fo.properties.KeepProperty;
  */
 public class ListItem extends FObj {
     // The value of properties relevant for fo:list-item.
-    private CommonAccessibility commonAccessibility;
-    private CommonAural commonAural;
     private CommonBorderPaddingBackground commonBorderPaddingBackground;
     private CommonMarginBlock commonMarginBlock;
-    private CommonRelativePosition commonRelativePosition;
     private int breakAfter;
     private int breakBefore;
     private String id;
-    private int intrusionDisplace;
     private KeepProperty keepTogether;
     private KeepProperty keepWithNext;
     private KeepProperty keepWithPrevious;
-    private int relativeAlign;
+    // Unused but valid items, commented out for performance:
+    //     private CommonAccessibility commonAccessibility;
+    //     private CommonAural commonAural;
+    //     private CommonRelativePosition commonRelativePosition;
+    //     private int intrusionDisplace;
+    //     private int relativeAlign;
     // End of property values
 
     private ListItemLabel label = null;
@@ -67,19 +68,14 @@ public class ListItem extends FObj {
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
-        commonAccessibility = pList.getAccessibilityProps();
-        commonAural = pList.getAuralProps();
         commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
         commonMarginBlock = pList.getMarginBlockProps();
-        commonRelativePosition = pList.getRelativePositionProps();
         breakAfter = pList.get(PR_BREAK_AFTER).getEnum();
         breakBefore = pList.get(PR_BREAK_BEFORE).getEnum();
         id = pList.get(PR_ID).getString();
-        intrusionDisplace = pList.get(PR_INTRUSION_DISPLACE).getEnum();
         keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
         keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
         keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
-        relativeAlign = pList.get(PR_RELATIVE_ALIGN).getEnum();
     }
 
     /**
index 63ab48aeb6301ffaf49c3341e5c42c4c5c9986be..898cf370abefae25504181be944f70c20f6667bf 100644 (file)
@@ -31,11 +31,12 @@ import org.apache.fop.fo.properties.CommonAccessibility;
  */
 public class MultiCase extends FObj {
     // The value of properties relevant for fo:multi-case.
-    private CommonAccessibility commonAccessibility;
     private String id;
     private int startingState;
     // private ToBeImplementedProperty caseName;
     // private ToBeImplementedProperty caseTitle;
+    // Unused but valid items, commented out for performance:
+    //     private CommonAccessibility commonAccessibility;
     // End of property values
 
     static boolean notImplementedWarningGiven = false;
@@ -56,7 +57,6 @@ public class MultiCase extends FObj {
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
-        commonAccessibility = pList.getAccessibilityProps();
         id = pList.get(PR_ID).getString();
         startingState = pList.get(PR_STARTING_STATE).getEnum();
         // caseName = pList.get(PR_CASE_NAME);
index 4a589b8983f2a829944221f44dd63c6cbafdc1ef..2d94154cdfd47fd12a94e25a73278764cc7b54dc 100644 (file)
@@ -34,8 +34,9 @@ import org.apache.fop.fo.properties.CommonAccessibility;
  */
 public class MultiProperties extends FObj {
     // The value of properties relevant for fo:multi-properties.
-    private CommonAccessibility commonAccessibility;
     private String id;
+    // Unused but valid items, commented out for performance:
+    //     private CommonAccessibility commonAccessibility;
     // End of property values
 
     static boolean notImplementedWarningGiven = false;
@@ -60,7 +61,6 @@ public class MultiProperties extends FObj {
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
-        commonAccessibility = pList.getAccessibilityProps();
         id = pList.get(PR_ID).getString();
     }
 
index 409fe71d91c5ce2791992a9319ffa9fb1ad52477..96600daa7abc0f8e83864b662ef3c0ddc5486239 100644 (file)
@@ -35,9 +35,10 @@ import org.apache.fop.fo.properties.CommonAccessibility;
  */
 public class MultiSwitch extends FObj {
     // The value of properties relevant for fo:multi-switch.
-    private CommonAccessibility commonAccessibility;
     // private ToBeImplementedProperty autoRestore;
     private String id;
+    // Unused but valid items, commented out for performance:
+    //     private CommonAccessibility commonAccessibility;
     // End of property values
 
     static boolean notImplementedWarningGiven = false;
@@ -58,7 +59,6 @@ public class MultiSwitch extends FObj {
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
-        commonAccessibility = pList.getAccessibilityProps();
         // autoRestore = pList.get(PR_AUTO_RESTORE);
         id = pList.get(PR_ID).getString();
     }
index 0ac1d8af6a70c3635788e32ab85fb3e3e7668659..971e2754d2a9c1506194d256b5522f76c94b4734 100644 (file)
@@ -34,8 +34,8 @@ import org.apache.fop.fo.properties.CommonAccessibility;
  * Class modelling the fo:multi-toggle property.
  */
 public class MultiToggle extends FObj {
-    // The value of properties relevant for fo:multi-toggle.
-    private CommonAccessibility commonAccessibility;
+    // The value of properties relevant for fo:multi-toggle (commented out for performance).
+    //     private CommonAccessibility commonAccessibility;
     // public ToBeImplementedProperty prSwitchTo;
     // End of property values
     
@@ -57,7 +57,6 @@ public class MultiToggle extends FObj {
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
-        commonAccessibility = pList.getAccessibilityProps();
         // prSwitchTo = pList.get(PR_SWITCH_TO);
 
     }
index aee4a9afb80ac107c6d910bb1e2dac976d46fe12..49b145871d291be7f7f7c0dd5fb01b12452f948d 100644 (file)
@@ -45,31 +45,32 @@ import org.apache.fop.fo.properties.SpaceProperty;
  */
 public class PageNumber extends FObj {
     // The value of properties relevant for fo:page-number.
-    private CommonAccessibility commonAccessibility;
-    private CommonAural commonAural;
     private CommonBorderPaddingBackground commonBorderPaddingBackground;
     private CommonFont commonFont;
-    private CommonMarginInline commonMarginInline;
-    private CommonRelativePosition commonRelativePosition;
     private Length alignmentAdjust;
     private int alignmentBaseline;
     private Length baselineShift;
     private int dominantBaseline;
     private String id;
-    private KeepProperty keepWithNext;
-    private KeepProperty keepWithPrevious;
     // private ToBeImplementedProperty letterSpacing;
     private SpaceProperty lineHeight;
-    private int scoreSpaces;
-    private Length textAltitude;
     /** Holds the text decoration values. May be null */
     private CommonTextDecoration textDecoration;
-    private Length textDepth;
     // private ToBeImplementedProperty textShadow;
-    private int textTransform;
-    private int visibility;
-    private SpaceProperty wordSpacing;
-    private int wrapOption;
+    // Unused but valid items, commented out for performance:
+    //     private CommonAccessibility commonAccessibility;
+    //     private CommonAural commonAural;
+    //     private CommonMarginInline commonMarginInline;
+    //     private CommonRelativePosition commonRelativePosition;
+    //     private KeepProperty keepWithNext;
+    //     private KeepProperty keepWithPrevious;
+    //     private int scoreSpaces;
+    //     private Length textAltitude;
+    //     private Length textDepth;
+    //     private int textTransform;
+    //     private int visibility;
+    //     private SpaceProperty wordSpacing;
+    //     private int wrapOption;
     //  End of property values
 
     // Properties which are not explicitely listed but are still applicable 
@@ -86,30 +87,17 @@ public class PageNumber extends FObj {
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
-        commonAccessibility = pList.getAccessibilityProps();
-        commonAural = pList.getAuralProps();
         commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
         commonFont = pList.getFontProps();
-        commonMarginInline = pList.getMarginInlineProps();
-        commonRelativePosition = pList.getRelativePositionProps();
         alignmentAdjust = pList.get(PR_ALIGNMENT_ADJUST).getLength();
         alignmentBaseline = pList.get(PR_ALIGNMENT_BASELINE).getEnum();
         baselineShift = pList.get(PR_BASELINE_SHIFT).getLength();
         dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
         id = pList.get(PR_ID).getString();
-        keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
-        keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
         // letterSpacing = pList.get(PR_LETTER_SPACING);
         lineHeight = pList.get(PR_LINE_HEIGHT).getSpace();
-        scoreSpaces = pList.get(PR_SCORE_SPACES).getEnum();
-        textAltitude = pList.get(PR_TEXT_ALTITUDE).getLength();
         textDecoration = pList.getTextDecorationProps();
-        textDepth = pList.get(PR_TEXT_DEPTH).getLength();
         // textShadow = pList.get(PR_TEXT_SHADOW);
-        textTransform = pList.get(PR_TEXT_TRANSFORM).getEnum();
-        visibility = pList.get(PR_VISIBILITY).getEnum();
-        wordSpacing = pList.get(PR_WORD_SPACING).getSpace();
-        wrapOption = pList.get(PR_WRAP_OPTION).getEnum();
 
         // implicit properties
         color = pList.get(Constants.PR_COLOR).getColor(getUserAgent());
index d6f0b940cdaa89d4184dac69600c3d491b3bfd66..7a0d2ae9dfb700809af5517228757ec77f4c595a 100644 (file)
@@ -48,32 +48,33 @@ import org.apache.fop.fo.properties.SpaceProperty;
  */
 public class PageNumberCitation extends FObj {
     // The value of properties relevant for fo:page-number-citation.
-    private CommonAccessibility commonAccessibility;
-    private CommonAural commonAural;
     private CommonBorderPaddingBackground commonBorderPaddingBackground;
     private CommonFont commonFont;
-    private CommonMarginInline commonMarginInline;
-    private CommonRelativePosition commonRelativePosition;
     private Length alignmentAdjust;
     private int alignmentBaseline;
     private Length baselineShift;
     private int dominantBaseline;
     private String id;
-    private KeepProperty keepWithNext;
-    private KeepProperty keepWithPrevious;
     // private ToBeImplementedProperty letterSpacing;
     private SpaceProperty lineHeight;
     private String refId;
-    private int scoreSpaces;
-    private Length textAltitude;
     /** Holds the text decoration values. May be null */
     private CommonTextDecoration textDecoration;
-    private Length textDepth;
     // private ToBeImplementedProperty textShadow;
-    private int textTransform;
-    private int visibility;
-    private SpaceProperty wordSpacing;
-    private int wrapOption;
+    // Unused but valid items, commented out for performance:
+    //     private CommonAccessibility commonAccessibility;
+    //     private CommonAural commonAural;
+    //     private CommonMarginInline commonMarginInline;
+    //     private CommonRelativePosition commonRelativePosition;
+    //     private KeepProperty keepWithNext;
+    //     private KeepProperty keepWithPrevious;
+    //     private int scoreSpaces;
+    //     private Length textAltitude;
+    //     private Length textDepth;
+    //     private int textTransform;
+    //     private int visibility;
+    //     private SpaceProperty wordSpacing;
+    //     private int wrapOption;
     // End of property values
 
     // Properties which are not explicitely listed but are still applicable 
@@ -90,31 +91,18 @@ public class PageNumberCitation extends FObj {
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
-        commonAccessibility = pList.getAccessibilityProps();
-        commonAural = pList.getAuralProps();
         commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
         commonFont = pList.getFontProps();
-        commonMarginInline = pList.getMarginInlineProps();
-        commonRelativePosition = pList.getRelativePositionProps();
         alignmentAdjust = pList.get(PR_ALIGNMENT_ADJUST).getLength();
         alignmentBaseline = pList.get(PR_ALIGNMENT_BASELINE).getEnum();
         baselineShift = pList.get(PR_BASELINE_SHIFT).getLength();
         dominantBaseline = pList.get(PR_DOMINANT_BASELINE).getEnum();
         id = pList.get(PR_ID).getString();
-        keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
-        keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
         // letterSpacing = pList.get(PR_LETTER_SPACING);
         lineHeight = pList.get(PR_LINE_HEIGHT).getSpace();
         refId = pList.get(PR_REF_ID).getString();
-        scoreSpaces = pList.get(PR_SCORE_SPACES).getEnum();
-        textAltitude = pList.get(PR_TEXT_ALTITUDE).getLength();
         textDecoration = pList.getTextDecorationProps();
-        textDepth = pList.get(PR_TEXT_DEPTH).getLength();
         // textShadow = pList.get(PR_TEXT_SHADOW);
-        textTransform = pList.get(PR_TEXT_TRANSFORM).getEnum();
-        visibility = pList.get(PR_VISIBILITY).getEnum();
-        wordSpacing = pList.get(PR_WORD_SPACING).getSpace();
-        wrapOption = pList.get(PR_WRAP_OPTION).getEnum();
         
         // implicit properties
         color = pList.get(Constants.PR_COLOR).getColor(getUserAgent());
index 079909c7312993e64759c049a0ffb8701675cdc9..fa68eb10fed6fa366f09ea235d2d650c961e6348 100644 (file)
@@ -47,11 +47,8 @@ import org.apache.fop.fo.properties.LengthRangeProperty;
 public class Table extends TableFObj {
     
     /** properties */
-    private CommonAccessibility commonAccessibility;
-    private CommonAural commonAural;
     private CommonBorderPaddingBackground commonBorderPaddingBackground;
     private CommonMarginBlock commonMarginBlock;
-    private CommonRelativePosition commonRelativePosition;
     private LengthRangeProperty blockProgressionDimension;
     private int borderCollapse;
     private LengthPairProperty borderSeparation;
@@ -59,14 +56,18 @@ public class Table extends TableFObj {
     private int breakBefore;
     private String id;
     private LengthRangeProperty inlineProgressionDimension;
-    private int intrusionDisplace;
     private KeepProperty keepTogether;
     private KeepProperty keepWithNext;
     private KeepProperty keepWithPrevious;
     private int tableLayout;
     private int tableOmitFooterAtBreak;
     private int tableOmitHeaderAtBreak;
-    private int writingMode;
+    // Unused but valid items, commented out for performance:
+    //     private CommonAccessibility commonAccessibility;
+    //     private CommonAural commonAural;
+    //     private CommonRelativePosition commonRelativePosition;
+    //     private int intrusionDisplace;
+    //     private int writingMode;
     
     /** extension properties */
     private Length widowContentLimit;
@@ -109,11 +110,8 @@ public class Table extends TableFObj {
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
-        commonAccessibility = pList.getAccessibilityProps();
-        commonAural = pList.getAuralProps();
         commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
         commonMarginBlock = pList.getMarginBlockProps();
-        commonRelativePosition = pList.getRelativePositionProps();
         blockProgressionDimension = pList.get(PR_BLOCK_PROGRESSION_DIMENSION).getLengthRange();
         borderCollapse = pList.get(PR_BORDER_COLLAPSE).getEnum();
         borderSeparation = pList.get(PR_BORDER_SEPARATION).getLengthPair();
@@ -121,14 +119,12 @@ public class Table extends TableFObj {
         breakBefore = pList.get(PR_BREAK_BEFORE).getEnum();
         id = pList.get(PR_ID).getString();
         inlineProgressionDimension = pList.get(PR_INLINE_PROGRESSION_DIMENSION).getLengthRange();
-        intrusionDisplace = pList.get(PR_INTRUSION_DISPLACE).getEnum();
         keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
         keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
         keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
         tableLayout = pList.get(PR_TABLE_LAYOUT).getEnum();
         tableOmitFooterAtBreak = pList.get(PR_TABLE_OMIT_FOOTER_AT_BREAK).getEnum();
         tableOmitHeaderAtBreak = pList.get(PR_TABLE_OMIT_HEADER_AT_BREAK).getEnum();
-        writingMode = pList.get(PR_WRITING_MODE).getEnum();
         super.bind(pList);
 
         //Bind extension properties
index dbcadd792afaa608241dc14d4162542fa1e96476..4e74de8a0c89287402a317705950308b85dd3fd2 100644 (file)
@@ -40,20 +40,21 @@ import org.apache.fop.fo.properties.KeepProperty;
  */
 public class TableAndCaption extends FObj {
     // The value of properties relevant for fo:table-and-caption.
-    private CommonAccessibility commonAccessibility;
-    private CommonAural commonAural;
-    private CommonBorderPaddingBackground commonBorderPaddingBackground;
-    private CommonMarginBlock commonMarginBlock;
-    private CommonRelativePosition commonRelativePosition;
-    private int breakAfter;
-    private int breakBefore;
-    private int captionSide;
     private String id;
-    private int intrusionDisplace;
-    private KeepProperty keepTogether;
-    private KeepProperty keepWithNext;
-    private KeepProperty keepWithPrevious;
-    private int textAlign;
+    // Unused but valid items, commented out for performance:
+    //     private CommonAccessibility commonAccessibility;
+    //     private CommonAural commonAural;
+    //     private CommonBorderPaddingBackground commonBorderPaddingBackground;
+    //     private CommonMarginBlock commonMarginBlock;
+    //     private CommonRelativePosition commonRelativePosition;
+    //     private int breakAfter;
+    //     private int breakBefore;
+    //     private int captionSide;
+    //     private int intrusionDisplace;
+    //     private KeepProperty keepTogether;
+    //     private KeepProperty keepWithNext;
+    //     private KeepProperty keepWithPrevious;
+    //     private int textAlign;
     // End of property values
     
     static boolean notImplementedWarningGiven = false;
@@ -78,20 +79,7 @@ public class TableAndCaption extends FObj {
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
-        commonAccessibility = pList.getAccessibilityProps();
-        commonAural = pList.getAuralProps();
-        commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
-        commonMarginBlock = pList.getMarginBlockProps();
-        commonRelativePosition = pList.getRelativePositionProps();
-        breakAfter = pList.get(PR_BREAK_AFTER).getEnum();
-        breakBefore = pList.get(PR_BREAK_BEFORE).getEnum();
-        captionSide = pList.get(PR_CAPTION_SIDE).getEnum();
         id = pList.get(PR_ID).getString();
-        intrusionDisplace = pList.get(PR_INTRUSION_DISPLACE).getEnum();
-        keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
-        keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
-        keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
-        textAlign = pList.get(PR_TEXT_ALIGN).getEnum();
     }
 
     /**
index 20b60df957ec49e69789fb89fda6169d10815302..57090104661a1df29aa3b60c2d64b77d4e9cda75 100644 (file)
@@ -46,11 +46,12 @@ import org.apache.fop.fo.properties.CommonRelativePosition;
  */
 public class TableBody extends TableFObj {
     // The value of properties relevant for fo:table-body.
-    private CommonAccessibility commonAccessibility;
-    private CommonAural commonAural;
     private CommonBorderPaddingBackground commonBorderPaddingBackground;
-    private CommonRelativePosition commonRelativePosition;
-    private int visibility;
+    // Unused but valid items, commented out for performance:
+    //     private CommonAccessibility commonAccessibility;
+    //     private CommonAural commonAural;
+    //     private CommonRelativePosition commonRelativePosition;
+    //    private int visibility;
     // End of property values
     
     private PropertyList savedPropertyList;
@@ -80,11 +81,7 @@ public class TableBody extends TableFObj {
      * @see FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
-        commonAccessibility = pList.getAccessibilityProps();
-        commonAural = pList.getAuralProps();
         commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
-        commonRelativePosition = pList.getRelativePositionProps();
-        visibility = pList.get(PR_VISIBILITY).getEnum();
         super.bind(pList);
         //Used by convertCellsToRows()
         savedPropertyList = pList;
@@ -240,6 +237,7 @@ public class TableBody extends TableFObj {
      * @throws FOPException if there's a problem binding the TableRow's 
      *         properties.
      */
+    // TODO: This is currently unused. Why is it here?
     private void convertCellsToRows() throws FOPException {
         //getLogger().debug("Converting cells to rows...");
         List cells = new java.util.ArrayList(childNodes);
index 21ea0492f7be6763d9b36afcf379950b3f6ef249..bb6978bb25abbafd52629851041800e944c1d36e 100644 (file)
@@ -43,16 +43,17 @@ import org.apache.fop.fo.properties.LengthRangeProperty;
 public class TableCaption extends FObj {
     // The value of properties relevant for fo:table-caption.
     private CommonAccessibility commonAccessibility;
-    private CommonAural commonAural;
     private CommonBorderPaddingBackground commonBorderPaddingBackground;
-    private CommonRelativePosition commonRelativePosition;
-    private LengthRangeProperty blockProgressionDimension;
-    private Length height;
     private String id;
-    private LengthRangeProperty inlineProgressionDimension;
-    private int intrusionDisplace;
-    private KeepProperty keepTogether;
-    private Length width;
+    // Unused but valid items, commented out for performance:
+    //     private CommonAural commonAural;
+    //     private CommonRelativePosition commonRelativePosition;
+    //     private LengthRangeProperty blockProgressionDimension;
+    //     private Length height;
+    //     private LengthRangeProperty inlineProgressionDimension;
+    //     private int intrusionDisplace;
+    //     private KeepProperty keepTogether;
+    //     private Length width;
     // End of property values
 
     /** used for FO validation */
@@ -77,16 +78,8 @@ public class TableCaption extends FObj {
      */
     public void bind(PropertyList pList) throws FOPException {
         commonAccessibility = pList.getAccessibilityProps();
-        commonAural = pList.getAuralProps();
         commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
-        commonRelativePosition = pList.getRelativePositionProps();
-        blockProgressionDimension = pList.get(PR_BLOCK_PROGRESSION_DIMENSION).getLengthRange();
-        height = pList.get(PR_HEIGHT).getLength();
         id = pList.get(PR_ID).getString();
-        inlineProgressionDimension = pList.get(PR_INLINE_PROGRESSION_DIMENSION).getLengthRange();
-        intrusionDisplace = pList.get(PR_INTRUSION_DISPLACE).getEnum();
-        keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
-        width = pList.get(PR_WIDTH).getLength();
     }
 
     /**
index b349a8bded59b94bf2adb7e27c500b05b1f77ce0..b5d42135fd1587fb4edcd6abcfb2d4ed2697a8fd 100644 (file)
@@ -40,28 +40,29 @@ import org.apache.fop.fo.properties.LengthRangeProperty;
  */
 public class TableCell extends TableFObj {
     // The value of properties relevant for fo:table-cell.
-    private CommonAccessibility commonAccessibility;
-    private CommonAural commonAural;
     private CommonBorderPaddingBackground commonBorderPaddingBackground;
-    private CommonRelativePosition commonRelativePosition;
     private LengthRangeProperty blockProgressionDimension;
     private int columnNumber;
     private int displayAlign;
-    private int relativeAlign;
     private int emptyCells;
     private int endsRow;
-    private Length height;
     private String id;
-    private LengthRangeProperty inlineProgressionDimension;
     private int numberColumnsSpanned;
     private int numberRowsSpanned;
     private int startsRow;
     private Length width;
-    private KeepProperty keepTogether;
-    private KeepProperty keepWithNext;
-    private KeepProperty keepWithPrevious;
+    // Unused but valid items, commented out for performance:
+    //     private CommonAccessibility commonAccessibility;
+    //     private CommonAural commonAural;
+    //     private CommonRelativePosition commonRelativePosition;
+    //     private int relativeAlign;
+    //     private Length height;
+    //     private LengthRangeProperty inlineProgressionDimension;
+    //     private KeepProperty keepTogether;
+    //     private KeepProperty keepWithNext;
+    //     private KeepProperty keepWithPrevious;
     // End of property values
-
+  
     /** used for FO validation */
     private boolean blockItemFound = false;
 
@@ -106,26 +107,17 @@ public class TableCell extends TableFObj {
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
-        commonAccessibility = pList.getAccessibilityProps();
-        commonAural = pList.getAuralProps();
         commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
-        commonRelativePosition = pList.getRelativePositionProps();
         blockProgressionDimension = pList.get(PR_BLOCK_PROGRESSION_DIMENSION).getLengthRange();
         displayAlign = pList.get(PR_DISPLAY_ALIGN).getEnum();
-        relativeAlign = pList.get(PR_RELATIVE_ALIGN).getEnum();
         emptyCells = pList.get(PR_EMPTY_CELLS).getEnum();
         endsRow = pList.get(PR_ENDS_ROW).getEnum();
-        height = pList.get(PR_HEIGHT).getLength();
         id = pList.get(PR_ID).getString();
-        inlineProgressionDimension = pList.get(PR_INLINE_PROGRESSION_DIMENSION).getLengthRange();
         columnNumber = pList.get(PR_COLUMN_NUMBER).getNumeric().getValue();
         numberColumnsSpanned = pList.get(PR_NUMBER_COLUMNS_SPANNED).getNumeric().getValue();
         numberRowsSpanned = pList.get(PR_NUMBER_ROWS_SPANNED).getNumeric().getValue();
         startsRow = pList.get(PR_STARTS_ROW).getEnum();
         width = pList.get(PR_WIDTH).getLength();
-        keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
-        keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
-        keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
         
         super.bind(pList);
     }
index 61c68fd0372ddace953195dfa1b95ea8092717ae..d6868e0d6ee63118f5e92c085187886e0748838b 100644 (file)
@@ -42,7 +42,8 @@ public class TableColumn extends TableFObj {
     private Length columnWidth;
     private int numberColumnsRepeated;
     private int numberColumnsSpanned;
-    private int visibility;
+    // Unused but valid items, commented out for performance:
+    //     private int visibility;
     // End of property values
     
     private boolean defaultColumn;
@@ -76,7 +77,6 @@ public class TableColumn extends TableFObj {
                                     .getNumeric().getValue();
         numberColumnsSpanned = pList.get(PR_NUMBER_COLUMNS_SPANNED)
                                     .getNumeric().getValue();
-        visibility = pList.get(PR_VISIBILITY).getEnum();
         super.bind(pList);
         
         if (numberColumnsRepeated <= 0) {
@@ -238,4 +238,4 @@ public class TableColumn extends TableFObj {
     protected void releasePropertyList() {
         this.pList = null;
     }    
-}
\ No newline at end of file
+}
index c72e4da9d48669db8b3ad0cdcabf0aad15164322..05877bbf22583960aac0714b14beedad25665d1d 100644 (file)
@@ -147,7 +147,6 @@ public abstract class TableFObj extends FObj {
         if (getNameId() == FO_TABLE_ROW) {
             
             TableRow row = (TableRow) this;
-            TableBody body = (TableBody) parent;
             
             for (i = colSpan; --i >= 0;) {
                 row.pendingSpans.add(null);
index 09310afad6f56b4227c2d026f13161be99baf57f..81d71e08b58fa15d2e3e8f84cf63fd9a88db3dcb 100644 (file)
@@ -42,11 +42,8 @@ import org.apache.fop.fo.properties.LengthRangeProperty;
  */
 public class TableRow extends TableFObj {
     // The value of properties relevant for fo:table-row.
-    private CommonAccessibility commonAccessibility;
     private LengthRangeProperty blockProgressionDimension;
-    private CommonAural commonAural;
     private CommonBorderPaddingBackground commonBorderPaddingBackground;
-    private CommonRelativePosition commonRelativePosition;
     private int breakAfter;
     private int breakBefore;
     private Length height;
@@ -54,7 +51,11 @@ public class TableRow extends TableFObj {
     private KeepProperty keepTogether;
     private KeepProperty keepWithNext;
     private KeepProperty keepWithPrevious;
-    private int visibility;
+    // Unused but valid items, commented out for performance:
+    //     private CommonAccessibility commonAccessibility;
+    //     private CommonAural commonAural;
+    //     private CommonRelativePosition commonRelativePosition;
+    //     private int visibility;
     // End of property values
 
     private boolean setup = false;
@@ -74,12 +75,9 @@ public class TableRow extends TableFObj {
      * @see org.apache.fop.fo.FObj#bind(PropertyList)
      */
     public void bind(PropertyList pList) throws FOPException {
-        commonAccessibility = pList.getAccessibilityProps();
         blockProgressionDimension 
             = pList.get(PR_BLOCK_PROGRESSION_DIMENSION).getLengthRange();
-        commonAural = pList.getAuralProps();
         commonBorderPaddingBackground = pList.getBorderPaddingBackgroundProps();
-        commonRelativePosition = pList.getRelativePositionProps();
         breakAfter = pList.get(PR_BREAK_AFTER).getEnum();
         breakBefore = pList.get(PR_BREAK_BEFORE).getEnum();
         id = pList.get(PR_ID).getString();
@@ -87,7 +85,6 @@ public class TableRow extends TableFObj {
         keepTogether = pList.get(PR_KEEP_TOGETHER).getKeep();
         keepWithNext = pList.get(PR_KEEP_WITH_NEXT).getKeep();
         keepWithPrevious = pList.get(PR_KEEP_WITH_PREVIOUS).getKeep();
-        visibility = pList.get(PR_VISIBILITY).getEnum();
         super.bind(pList);
     }
 
index 032aaeb60e0c915e358b312d8d08360eca0a9a6b..a5679cbcc794b82ac70c62c8cf69a46cbc39d0bf 100755 (executable)
  
 package org.apache.fop.fo.properties;
 
+import java.util.Map;
+import java.util.WeakHashMap;
+
 /**
  * A number quantity in XSL which is specified as an enum, such as "no-limit".
  */
 public class EnumNumber extends NumberProperty {
-    private Property enumProperty;
+
+    private static final Map cache = new WeakHashMap();
+
+    private final EnumProperty enumProperty;
     
-    public EnumNumber(Property enumProperty) {
+    private EnumNumber(EnumProperty enumProperty) {
         super(null);
         this.enumProperty = enumProperty;
     }
 
+    public static EnumNumber getInstance(Property enumProperty) {
+        EnumNumber en = (EnumNumber)cache.get(enumProperty);
+        if (en == null) {
+            en = new EnumNumber((EnumProperty)enumProperty);
+            cache.put(enumProperty, en);
+        }
+        return en;
+    }
+
     public int getEnum() {
         return enumProperty.getEnum();
     }
index 9919e6df8bd0a5145ece6c4a6431f1132acd47cb..93dab72e2afea04f3e641e996c97b496a2bf3ac1 100644 (file)
@@ -23,6 +23,9 @@ import org.apache.fop.fo.FObj;
 import org.apache.fop.fo.PropertyList;
 import org.apache.fop.fo.expr.PropertyException;
 
+import java.util.Map;
+import java.util.WeakHashMap;
+
 /**
  * Superclass for properties that wrap an enumeration value
  */
@@ -62,18 +65,31 @@ public class EnumProperty extends Property {
         }
     }
 
-    private int value;
-    private String text;
+    private static final Map propertyCache = new WeakHashMap();
+
+    private final int value;
+    private final String text;
 
     /**
      * @param explicitValue enumerated value to be set for this property
      * @param text the string value of the enum.
      */
-    public EnumProperty(int explicitValue, String text) {
+    private EnumProperty(int explicitValue, String text) {
         this.value = explicitValue;
         this.text = text;
     }
 
+    public static EnumProperty getInstance(int explicitValue, String text) {
+        EnumProperty ep = new EnumProperty(explicitValue, text);
+        EnumProperty cacheEntry = (EnumProperty)propertyCache.get(ep);
+        if (cacheEntry == null) {
+            propertyCache.put(ep, ep);
+            return ep;
+        } else {
+            return cacheEntry;
+        }
+    }
+
     /**
      * @return this.value
      */
@@ -88,5 +104,19 @@ public class EnumProperty extends Property {
         return text;
     }
 
+    public boolean equals(Object obj) {
+        if (obj instanceof EnumProperty) {
+            EnumProperty ep = (EnumProperty)obj;
+            return ep.value == this.value &&
+                ((ep.text == null && this.text == null)
+                 || ep.text.equals(this.text));
+        } else {
+            return false;
+        }
+    }
+
+    public int hashCode() {
+        return value + text.hashCode();
+    }
 }
 
index 86472b81a4ca22ce295cfef69608dcda10e0c95c..e6f4ec3936ec3faa2d35d85b7e31bcfc51be93cc 100644 (file)
@@ -54,9 +54,9 @@ public class LineHeightPropertyMaker extends SpaceProperty.Maker {
          */
         Property p = super.make(propertyList, value, fo);
         p.getSpace().setConditionality(
-                new EnumProperty(Constants.EN_RETAIN, "RETAIN"), true);
+                EnumProperty.getInstance(Constants.EN_RETAIN, "RETAIN"), true);
         p.getSpace().setPrecedence(
-                new EnumProperty(Constants.EN_FORCE, "FORCE"), true);
+                EnumProperty.getInstance(Constants.EN_FORCE, "FORCE"), true);
         return p;
     }
     
index c8d44e41724613239d23aad7f1598b696a782239..21ffd32e7c8aa0dd4e34168ca6a1230d63be342e 100644 (file)
@@ -58,7 +58,7 @@ public class NumberProperty extends Property implements Numeric {
                 return p;
             }
             if (p instanceof EnumProperty) {
-                return new EnumNumber(p);
+                return EnumNumber.getInstance(p);
             }
             Number val = p.getNumber();
             if (val != null) {
index 95ba938b0555fc95ca4cfd488ac0cec46c5438ca..c2bf559a2c4828cbb9a9b3e11ae5f8bf58b3a6a3 100644 (file)
@@ -49,11 +49,11 @@ public class PageBreakShorthandParser implements ShorthandParser {
                 || propId == Constants.PR_BREAK_AFTER) {
             switch (property.getEnum()) {
             case Constants.EN_ALWAYS:
-                return new EnumProperty(Constants.EN_PAGE, "PAGE");
+                return EnumProperty.getInstance(Constants.EN_PAGE, "PAGE");
             case Constants.EN_LEFT:
-                return new EnumProperty(Constants.EN_EVEN_PAGE, "EVEN_PAGE");
+                return EnumProperty.getInstance(Constants.EN_EVEN_PAGE, "EVEN_PAGE");
             case Constants.EN_RIGHT:
-                return new EnumProperty(Constants.EN_ODD_PAGE, "ODD_PAGE");
+                return EnumProperty.getInstance(Constants.EN_ODD_PAGE, "ODD_PAGE");
             case Constants.EN_AVOID:
             default:
                 //nop;
index d26f35bd509bc98a3f88ff2a460c6a0f5b9d7036..a6a9671da6f6547a5783df55fb8377156c8947a6 100755 (executable)
@@ -41,11 +41,11 @@ public class PositionShorthandParser implements ShorthandParser {
             switch (propVal) {
             case Constants.EN_STATIC:
             case Constants.EN_RELATIVE:
-                return new EnumProperty(Constants.EN_AUTO, "AUTO");
+                return EnumProperty.getInstance(Constants.EN_AUTO, "AUTO");
             case Constants.EN_ABSOLUTE:
-                return new EnumProperty(Constants.EN_ABSOLUTE, "ABSOLUTE");
+                return EnumProperty.getInstance(Constants.EN_ABSOLUTE, "ABSOLUTE");
             case Constants.EN_FIXED:
-                return new EnumProperty(Constants.EN_FIXED, "FIXED");
+                return EnumProperty.getInstance(Constants.EN_FIXED, "FIXED");
             default:
                 //nop
             }
@@ -53,13 +53,13 @@ public class PositionShorthandParser implements ShorthandParser {
         if (propId == Constants.PR_RELATIVE_POSITION) {
             switch (propVal) {
             case Constants.EN_STATIC:
-                return new EnumProperty(Constants.EN_STATIC, "STATIC");
+                return EnumProperty.getInstance(Constants.EN_STATIC, "STATIC");
             case Constants.EN_RELATIVE:
-                return new EnumProperty(Constants.EN_RELATIVE, "RELATIVE");
+                return EnumProperty.getInstance(Constants.EN_RELATIVE, "RELATIVE");
             case Constants.EN_ABSOLUTE:
-                return new EnumProperty(Constants.EN_STATIC, "STATIC");
+                return EnumProperty.getInstance(Constants.EN_STATIC, "STATIC");
             case Constants.EN_FIXED:
-                return new EnumProperty(Constants.EN_STATIC, "STATIC");
+                return EnumProperty.getInstance(Constants.EN_STATIC, "STATIC");
             default:
                 //nop
             }
index c7de88341ba1b7ec02bc1366a08e6653fec2ff0e..e5c572952e6f09304835fda3d38a745acc021d6f 100644 (file)
@@ -43,7 +43,7 @@ public class SpacePropertyMaker extends CorrespondingPropertyMaker {
         Property prop = super.compute(propertyList);
         if (prop != null && prop instanceof SpaceProperty) {
             ((SpaceProperty)prop).setConditionality(
-                    new EnumProperty(Constants.EN_RETAIN, "RETAIN"), false);
+                    EnumProperty.getInstance(Constants.EN_RETAIN, "RETAIN"), false);
         }
         return prop;
     }
index 86330948de325f864b12fcae2b792f4f0d8e6518..92d6095ca6dc22f6ea8e7ae132015db2a49ade58 100644 (file)
@@ -40,101 +40,101 @@ public class VerticalAlignShorthandParser implements ShorthandParser, Constants
             case EN_BASELINE:
                 switch (propId) {
                     case PR_ALIGNMENT_BASELINE:
-                        return new EnumProperty(EN_BASELINE, "BASELINE");
+                        return EnumProperty.getInstance(EN_BASELINE, "BASELINE");
                     case PR_ALIGNMENT_ADJUST:
-                        return new EnumLength(new EnumProperty(EN_AUTO, "AUTO"));
+                        return new EnumLength(EnumProperty.getInstance(EN_AUTO, "AUTO"));
                     case PR_BASELINE_SHIFT:
-                        return new EnumLength(new EnumProperty(EN_BASELINE, "BASELINE"));
+                        return new EnumLength(EnumProperty.getInstance(EN_BASELINE, "BASELINE"));
                     case PR_DOMINANT_BASELINE:
-                        return new EnumProperty(EN_AUTO, "AUTO");
+                        return EnumProperty.getInstance(EN_AUTO, "AUTO");
                 }
             case EN_TOP:
                 switch (propId) {
                     case PR_ALIGNMENT_BASELINE:
-                        return new EnumProperty(EN_BEFORE_EDGE, "BEFORE_EDGE");
+                        return EnumProperty.getInstance(EN_BEFORE_EDGE, "BEFORE_EDGE");
                     case PR_ALIGNMENT_ADJUST:
-                        return new EnumLength(new EnumProperty(EN_AUTO, "AUTO"));
+                        return new EnumLength(EnumProperty.getInstance(EN_AUTO, "AUTO"));
                     case PR_BASELINE_SHIFT:
-                        return new EnumLength(new EnumProperty(EN_BASELINE, "BASELINE"));
+                        return new EnumLength(EnumProperty.getInstance(EN_BASELINE, "BASELINE"));
                     case PR_DOMINANT_BASELINE:
-                        return new EnumProperty(EN_AUTO, "AUTO");
+                        return EnumProperty.getInstance(EN_AUTO, "AUTO");
                 }
             case EN_TEXT_TOP:
                 switch (propId) {
                     case PR_ALIGNMENT_BASELINE:
-                        return new EnumProperty(EN_TEXT_BEFORE_EDGE, "TEXT_BEFORE_EDGE");
+                        return EnumProperty.getInstance(EN_TEXT_BEFORE_EDGE, "TEXT_BEFORE_EDGE");
                     case PR_ALIGNMENT_ADJUST:
-                        return new EnumLength(new EnumProperty(EN_AUTO, "AUTO"));
+                        return new EnumLength(EnumProperty.getInstance(EN_AUTO, "AUTO"));
                     case PR_BASELINE_SHIFT:
-                        return new EnumLength(new EnumProperty(EN_BASELINE, "BASELINE"));
+                        return new EnumLength(EnumProperty.getInstance(EN_BASELINE, "BASELINE"));
                     case PR_DOMINANT_BASELINE:
-                        return new EnumProperty(EN_AUTO, "AUTO");
+                        return EnumProperty.getInstance(EN_AUTO, "AUTO");
                 }
             case EN_MIDDLE:
                 switch (propId) {
                     case PR_ALIGNMENT_BASELINE:
-                        return new EnumProperty(EN_MIDDLE, "MIDDLE");
+                        return EnumProperty.getInstance(EN_MIDDLE, "MIDDLE");
                     case PR_ALIGNMENT_ADJUST:
-                        return new EnumLength(new EnumProperty(EN_AUTO, "AUTO"));
+                        return new EnumLength(EnumProperty.getInstance(EN_AUTO, "AUTO"));
                     case PR_BASELINE_SHIFT:
-                        return new EnumLength(new EnumProperty(EN_BASELINE, "BASELINE"));
+                        return new EnumLength(EnumProperty.getInstance(EN_BASELINE, "BASELINE"));
                     case PR_DOMINANT_BASELINE:
-                        return new EnumProperty(EN_AUTO, "AUTO");
+                        return EnumProperty.getInstance(EN_AUTO, "AUTO");
                 }
             case EN_BOTTOM:
                 switch (propId) {
                     case PR_ALIGNMENT_BASELINE:
-                        return new EnumProperty(EN_AFTER_EDGE, "AFTER_EDGE");
+                        return EnumProperty.getInstance(EN_AFTER_EDGE, "AFTER_EDGE");
                     case PR_ALIGNMENT_ADJUST:
-                        return new EnumLength(new EnumProperty(EN_AUTO, "AUTO"));
+                        return new EnumLength(EnumProperty.getInstance(EN_AUTO, "AUTO"));
                     case PR_BASELINE_SHIFT:
-                        return new EnumLength(new EnumProperty(EN_BASELINE, "BASELINE"));
+                        return new EnumLength(EnumProperty.getInstance(EN_BASELINE, "BASELINE"));
                     case PR_DOMINANT_BASELINE:
-                        return new EnumProperty(EN_AUTO, "AUTO");
+                        return EnumProperty.getInstance(EN_AUTO, "AUTO");
                 }
             case EN_TEXT_BOTTOM:
                 switch (propId) {
                     case PR_ALIGNMENT_BASELINE:
-                        return new EnumProperty(EN_TEXT_AFTER_EDGE, "TEXT_AFTER_EDGE");
+                        return EnumProperty.getInstance(EN_TEXT_AFTER_EDGE, "TEXT_AFTER_EDGE");
                     case PR_ALIGNMENT_ADJUST:
-                        return new EnumLength(new EnumProperty(EN_AUTO, "AUTO"));
+                        return new EnumLength(EnumProperty.getInstance(EN_AUTO, "AUTO"));
                     case PR_BASELINE_SHIFT:
-                        return new EnumLength(new EnumProperty(EN_BASELINE, "BASELINE"));
+                        return new EnumLength(EnumProperty.getInstance(EN_BASELINE, "BASELINE"));
                     case PR_DOMINANT_BASELINE:
-                        return new EnumProperty(EN_AUTO, "AUTO");
+                        return EnumProperty.getInstance(EN_AUTO, "AUTO");
                 }
             case EN_SUB:
                 switch (propId) {
                     case PR_ALIGNMENT_BASELINE:
-                        return new EnumProperty(EN_BASELINE, "BASELINE");
+                        return EnumProperty.getInstance(EN_BASELINE, "BASELINE");
                     case PR_ALIGNMENT_ADJUST:
-                        return new EnumLength(new EnumProperty(EN_AUTO, "AUTO"));
+                        return new EnumLength(EnumProperty.getInstance(EN_AUTO, "AUTO"));
                     case PR_BASELINE_SHIFT:
-                        return new EnumLength(new EnumProperty(EN_SUB, "SUB"));
+                        return new EnumLength(EnumProperty.getInstance(EN_SUB, "SUB"));
                     case PR_DOMINANT_BASELINE:
-                        return new EnumProperty(EN_AUTO, "AUTO");
+                        return EnumProperty.getInstance(EN_AUTO, "AUTO");
                 }
             case EN_SUPER:
                 switch (propId) {
                     case PR_ALIGNMENT_BASELINE:
-                        return new EnumProperty(EN_BASELINE, "BASELINE");
+                        return EnumProperty.getInstance(EN_BASELINE, "BASELINE");
                     case PR_ALIGNMENT_ADJUST:
-                        return new EnumLength(new EnumProperty(EN_AUTO, "AUTO"));
+                        return new EnumLength(EnumProperty.getInstance(EN_AUTO, "AUTO"));
                     case PR_BASELINE_SHIFT:
-                        return new EnumLength(new EnumProperty(EN_SUPER, "SUPER"));
+                        return new EnumLength(EnumProperty.getInstance(EN_SUPER, "SUPER"));
                     case PR_DOMINANT_BASELINE:
-                        return new EnumProperty(EN_AUTO, "AUTO");
+                        return EnumProperty.getInstance(EN_AUTO, "AUTO");
                 }
             default:
                 switch (propId) {
                     case PR_ALIGNMENT_BASELINE:
-                        return new EnumProperty(EN_BASELINE, "BASELINE");
+                        return EnumProperty.getInstance(EN_BASELINE, "BASELINE");
                     case PR_ALIGNMENT_ADJUST:
                         return property;
                     case PR_BASELINE_SHIFT:
-                        return new EnumLength(new EnumProperty(EN_BASELINE, "BASELINE"));
+                        return new EnumLength(EnumProperty.getInstance(EN_BASELINE, "BASELINE"));
                     case PR_DOMINANT_BASELINE:
-                        return new EnumProperty(EN_AUTO, "AUTO");
+                        return EnumProperty.getInstance(EN_AUTO, "AUTO");
                 }
         }
         return null;
index 10fc75e93cb7d10c2d33a9363e79d95986441e09..d7b13b540827552edefa2d1b180c7319c8394602 100644 (file)
@@ -42,17 +42,17 @@ public class WhiteSpaceShorthandParser implements ShorthandParser {
             switch (propId) {
             case Constants.PR_LINEFEED_TREATMENT:
             case Constants.PR_WHITE_SPACE_TREATMENT:
-                return new EnumProperty(Constants.EN_PRESERVE, "PRESERVE");
+                return EnumProperty.getInstance(Constants.EN_PRESERVE, "PRESERVE");
             case Constants.PR_WHITE_SPACE_COLLAPSE:
-                return new EnumProperty(Constants.EN_FALSE, "FALSE");
+                return EnumProperty.getInstance(Constants.EN_FALSE, "FALSE");
             case Constants.PR_WRAP_OPTION:
-                return new EnumProperty(Constants.EN_NO_WRAP, "NO_WRAP");
+                return EnumProperty.getInstance(Constants.EN_NO_WRAP, "NO_WRAP");
             default:
                 //nop
             }
         case Constants.EN_NO_WRAP:
             if (propId == Constants.PR_WRAP_OPTION) {
-                return new EnumProperty(Constants.EN_NO_WRAP, "NO_WRAP");
+                return EnumProperty.getInstance(Constants.EN_NO_WRAP, "NO_WRAP");
             }
         case Constants.EN_NORMAL:
         default: