From ab87e7ae5c2e2fc56fd64197b03d0d766013c861 Mon Sep 17 00:00:00 2001 From: Peter Bernard West Date: Mon, 21 Oct 2002 16:31:31 +0000 Subject: [PATCH] Methods converted from class to instance. Property index argument added to refineParsing() and refineExpansionList(). git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@195351 13f79535-47bb-0310-9956-ffa450edef68 --- .../fop/fo/properties/AbsolutePosition.java | 4 +- .../apache/fop/fo/properties/ActiveState.java | 4 +- .../fop/fo/properties/AlignmentAdjust.java | 4 +- .../fop/fo/properties/AlignmentBaseline.java | 4 +- .../apache/fop/fo/properties/AutoRestore.java | 2 +- .../apache/fop/fo/properties/Background.java | 71 +++++++----- .../fo/properties/BackgroundAttachment.java | 6 +- .../fop/fo/properties/BackgroundColor.java | 2 +- .../fop/fo/properties/BackgroundPosition.java | 40 ++++--- .../BackgroundPositionHorizontal.java | 6 +- .../BackgroundPositionVertical.java | 6 +- .../fop/fo/properties/BackgroundRepeat.java | 6 +- .../fop/fo/properties/BaselineShift.java | 6 +- .../fop/fo/properties/BlankOrNotBlank.java | 6 +- src/org/apache/fop/fo/properties/Border.java | 21 ++-- .../fop/fo/properties/BorderAfterColor.java | 2 +- .../fop/fo/properties/BorderAfterWidth.java | 4 +- .../BorderAfterWidthConditionality.java | 2 +- .../fo/properties/BorderAfterWidthLength.java | 10 +- .../fop/fo/properties/BorderBeforeColor.java | 2 +- .../fop/fo/properties/BorderBeforeWidth.java | 4 +- .../BorderBeforeWidthConditionality.java | 2 +- .../properties/BorderBeforeWidthLength.java | 10 +- .../fop/fo/properties/BorderBottom.java | 11 +- .../fop/fo/properties/BorderBottomColor.java | 2 +- .../fop/fo/properties/BorderBottomWidth.java | 4 +- .../fop/fo/properties/BorderCollapse.java | 6 +- .../apache/fop/fo/properties/BorderColor.java | 24 ++-- .../fop/fo/properties/BorderCommonStyle.java | 4 +- .../fop/fo/properties/BorderCommonWidth.java | 6 +- .../fop/fo/properties/BorderEndColor.java | 2 +- .../fop/fo/properties/BorderEndWidth.java | 4 +- .../BorderEndWidthConditionality.java | 2 +- .../fo/properties/BorderEndWidthLength.java | 10 +- .../apache/fop/fo/properties/BorderLeft.java | 11 +- .../fop/fo/properties/BorderLeftColor.java | 2 +- .../fop/fo/properties/BorderLeftWidth.java | 4 +- .../apache/fop/fo/properties/BorderRight.java | 11 +- .../fop/fo/properties/BorderRightColor.java | 2 +- .../fop/fo/properties/BorderRightWidth.java | 4 +- ...erSeparationBlockProgressionDirection.java | 2 +- ...rSeparationInlineProgressionDirection.java | 2 +- .../fop/fo/properties/BorderSpacing.java | 13 ++- .../fop/fo/properties/BorderStartColor.java | 2 +- .../fop/fo/properties/BorderStartWidth.java | 4 +- .../BorderStartWidthConditionality.java | 2 +- .../fo/properties/BorderStartWidthLength.java | 10 +- .../apache/fop/fo/properties/BorderStyle.java | 20 ++-- .../apache/fop/fo/properties/BorderTop.java | 11 +- .../fop/fo/properties/BorderTopColor.java | 2 +- .../fop/fo/properties/BorderTopWidth.java | 4 +- .../apache/fop/fo/properties/BorderWidth.java | 18 +-- .../apache/fop/fo/properties/BreakCommon.java | 4 +- .../apache/fop/fo/properties/CaptionSide.java | 6 +- src/org/apache/fop/fo/properties/Clear.java | 4 +- src/org/apache/fop/fo/properties/Clip.java | 5 +- src/org/apache/fop/fo/properties/Color.java | 2 +- .../fo/properties/ColorNonTransparent.java | 4 +- .../fop/fo/properties/ColorTransparent.java | 4 +- .../apache/fop/fo/properties/ColumnCount.java | 2 +- .../apache/fop/fo/properties/ColumnGap.java | 2 +- .../fop/fo/properties/Conditionality.java | 4 +- .../fop/fo/properties/ContentDimension.java | 4 +- src/org/apache/fop/fo/properties/Cue.java | 9 +- .../DestinationPlacementOffset.java | 2 +- .../apache/fop/fo/properties/Direction.java | 6 +- .../fop/fo/properties/DisplayAlign.java | 4 +- .../fop/fo/properties/DominantBaseline.java | 4 +- .../apache/fop/fo/properties/EmptyCells.java | 6 +- .../apache/fop/fo/properties/EndIndent.java | 2 +- src/org/apache/fop/fo/properties/EndsRow.java | 2 +- src/org/apache/fop/fo/properties/Extent.java | 2 +- .../fo/properties/ExternalDestination.java | 2 +- src/org/apache/fop/fo/properties/Float.java | 4 +- .../apache/fop/fo/properties/FlowName.java | 2 +- src/org/apache/fop/fo/properties/Font.java | 48 ++++---- .../apache/fop/fo/properties/FontFamily.java | 12 +- .../fo/properties/FontSelectionStrategy.java | 4 +- .../apache/fop/fo/properties/FontSize.java | 7 +- .../apache/fop/fo/properties/FontStretch.java | 6 +- .../apache/fop/fo/properties/FontStyle.java | 6 +- .../apache/fop/fo/properties/FontVariant.java | 6 +- .../apache/fop/fo/properties/FontWeight.java | 23 ++-- .../fop/fo/properties/ForcePageCount.java | 4 +- src/org/apache/fop/fo/properties/Format.java | 2 +- .../GlyphOrientationHorizontal.java | 2 +- .../apache/fop/fo/properties/Hyphenate.java | 2 +- .../fo/properties/HyphenationCharacter.java | 2 +- .../fop/fo/properties/HyphenationKeep.java | 4 +- .../fo/properties/HyphenationLadderCount.java | 6 +- .../HyphenationPushCharacterCount.java | 2 +- .../HyphenationRemainCharacterCount.java | 2 +- .../fo/properties/IndicateDestination.java | 2 +- .../fop/fo/properties/InitialPageNumber.java | 4 +- .../fo/properties/InternalDestination.java | 2 +- .../fop/fo/properties/IntrusionDisplace.java | 4 +- src/org/apache/fop/fo/properties/Keep.java | 4 +- .../fop/fo/properties/LastLineEndIndent.java | 2 +- .../fop/fo/properties/LeaderAlignment.java | 4 +- .../fo/properties/LeaderLengthMaximum.java | 2 +- .../fo/properties/LeaderLengthMinimum.java | 2 +- .../fo/properties/LeaderLengthOptimum.java | 2 +- .../fop/fo/properties/LeaderPattern.java | 6 +- .../fop/fo/properties/LeaderPatternWidth.java | 6 +- .../fop/fo/properties/LetterSpacing.java | 6 +- .../LetterSpacingConditionality.java | 2 +- .../fo/properties/LetterSpacingMaximum.java | 2 +- .../fo/properties/LetterSpacingMinimum.java | 2 +- .../fo/properties/LetterSpacingOptimum.java | 2 +- .../properties/LetterSpacingPrecedence.java | 2 +- .../apache/fop/fo/properties/LetterValue.java | 4 +- .../apache/fop/fo/properties/LineHeight.java | 2 +- .../properties/LineHeightConditionality.java | 2 +- .../fop/fo/properties/LineHeightMaximum.java | 2 +- .../fop/fo/properties/LineHeightMinimum.java | 2 +- .../fop/fo/properties/LineHeightOptimum.java | 2 +- .../fo/properties/LineHeightPrecedence.java | 2 +- .../properties/LineHeightShiftAdjustment.java | 6 +- .../fo/properties/LineStackingStrategy.java | 6 +- .../fop/fo/properties/LinefeedTreatment.java | 6 +- src/org/apache/fop/fo/properties/Margin.java | 13 ++- .../fop/fo/properties/MarginBottom.java | 2 +- .../apache/fop/fo/properties/MarginLeft.java | 2 +- .../apache/fop/fo/properties/MarginRight.java | 2 +- .../apache/fop/fo/properties/MarginTop.java | 2 +- .../fop/fo/properties/MarkerClassName.java | 2 +- .../apache/fop/fo/properties/MasterName.java | 2 +- .../fop/fo/properties/MasterReference.java | 2 +- .../apache/fop/fo/properties/MaxHeight.java | 2 +- .../fop/fo/properties/MaximumRepeats.java | 6 +- .../apache/fop/fo/properties/MediaUsage.java | 4 +- .../apache/fop/fo/properties/MinHeight.java | 2 +- .../fo/properties/NumberColumnsRepeated.java | 2 +- .../fo/properties/NumberColumnsSpanned.java | 2 +- .../fop/fo/properties/NumberRowsSpanned.java | 2 +- .../apache/fop/fo/properties/OddOrEven.java | 6 +- src/org/apache/fop/fo/properties/Orphans.java | 2 +- .../apache/fop/fo/properties/Overflow.java | 4 +- src/org/apache/fop/fo/properties/Padding.java | 9 +- .../fop/fo/properties/PaddingAfter.java | 2 +- .../PaddingAfterConditionality.java | 2 +- .../fop/fo/properties/PaddingAfterLength.java | 2 +- .../fop/fo/properties/PaddingBefore.java | 2 +- .../PaddingBeforeConditionality.java | 2 +- .../fo/properties/PaddingBeforeLength.java | 2 +- .../fop/fo/properties/PaddingBottom.java | 2 +- .../apache/fop/fo/properties/PaddingEnd.java | 2 +- .../properties/PaddingEndConditionality.java | 2 +- .../fop/fo/properties/PaddingEndLength.java | 2 +- .../apache/fop/fo/properties/PaddingLeft.java | 2 +- .../fop/fo/properties/PaddingRight.java | 2 +- .../fop/fo/properties/PaddingStart.java | 2 +- .../PaddingStartConditionality.java | 2 +- .../fop/fo/properties/PaddingStartLength.java | 2 +- .../apache/fop/fo/properties/PaddingTop.java | 2 +- .../fop/fo/properties/PageBreakCommon.java | 15 ++- .../fop/fo/properties/PageBreakInside.java | 33 +++--- .../fop/fo/properties/PageHeightWidth.java | 4 +- .../fop/fo/properties/PagePosition.java | 6 +- .../apache/fop/fo/properties/Position.java | 15 +-- .../apache/fop/fo/properties/Precedence.java | 2 +- .../fop/fo/properties/PrecedenceCommon.java | 4 +- .../apache/fop/fo/properties/Property.java | 109 ++++++++++-------- .../ProvisionalDistanceBetweenStarts.java | 2 +- .../ProvisionalLabelSeparation.java | 2 +- .../fo/properties/ReferenceOrientation.java | 2 +- .../apache/fop/fo/properties/RegionName.java | 4 +- .../fop/fo/properties/RelativeAlign.java | 6 +- .../fop/fo/properties/RelativePosition.java | 6 +- .../fop/fo/properties/RenderingIntent.java | 4 +- .../fop/fo/properties/RetrieveBoundary.java | 6 +- .../fop/fo/properties/RetrievePosition.java | 6 +- .../apache/fop/fo/properties/RuleStyle.java | 6 +- .../fop/fo/properties/RuleThickness.java | 2 +- src/org/apache/fop/fo/properties/Scaling.java | 6 +- .../fop/fo/properties/ScalingMethod.java | 4 +- .../apache/fop/fo/properties/ScoreSpaces.java | 2 +- .../fop/fo/properties/ShowDestination.java | 6 +- src/org/apache/fop/fo/properties/Size.java | 4 +- .../fop/fo/properties/SourceDocument.java | 9 +- .../apache/fop/fo/properties/SpaceAfter.java | 2 +- .../properties/SpaceAfterConditionality.java | 2 +- .../fop/fo/properties/SpaceAfterMaximum.java | 2 +- .../fop/fo/properties/SpaceAfterMinimum.java | 2 +- .../fop/fo/properties/SpaceAfterOptimum.java | 2 +- .../fo/properties/SpaceAfterPrecedence.java | 2 +- .../apache/fop/fo/properties/SpaceBefore.java | 2 +- .../properties/SpaceBeforeConditionality.java | 2 +- .../fop/fo/properties/SpaceBeforeMaximum.java | 2 +- .../fop/fo/properties/SpaceBeforeMinimum.java | 2 +- .../fop/fo/properties/SpaceBeforeOptimum.java | 2 +- .../fo/properties/SpaceBeforePrecedence.java | 2 +- .../apache/fop/fo/properties/SpaceEnd.java | 2 +- .../fo/properties/SpaceEndConditionality.java | 2 +- .../fop/fo/properties/SpaceEndMaximum.java | 2 +- .../fop/fo/properties/SpaceEndMinimum.java | 2 +- .../fop/fo/properties/SpaceEndOptimum.java | 2 +- .../fop/fo/properties/SpaceEndPrecedence.java | 2 +- .../apache/fop/fo/properties/SpaceStart.java | 2 +- .../properties/SpaceStartConditionality.java | 2 +- .../fop/fo/properties/SpaceStartMaximum.java | 2 +- .../fop/fo/properties/SpaceStartMinimum.java | 2 +- .../fop/fo/properties/SpaceStartOptimum.java | 2 +- .../fo/properties/SpaceStartPrecedence.java | 2 +- src/org/apache/fop/fo/properties/Span.java | 4 +- .../apache/fop/fo/properties/StartIndent.java | 2 +- .../fop/fo/properties/StartingState.java | 6 +- .../apache/fop/fo/properties/StartsRow.java | 2 +- .../fo/properties/SuppressAtLineBreak.java | 4 +- .../apache/fop/fo/properties/SwitchTo.java | 13 +-- .../apache/fop/fo/properties/TableLayout.java | 4 +- .../fo/properties/TableOmitFooterAtBreak.java | 2 +- .../fo/properties/TableOmitHeaderAtBreak.java | 2 +- .../properties/TargetPresentationContext.java | 6 +- .../properties/TargetProcessingContext.java | 6 +- .../fop/fo/properties/TargetStylesheet.java | 6 +- .../apache/fop/fo/properties/TextAlign.java | 6 +- .../fop/fo/properties/TextAlignLast.java | 6 +- .../fop/fo/properties/TextAltitude.java | 6 +- .../fop/fo/properties/TextDecoration.java | 6 +- .../apache/fop/fo/properties/TextDepth.java | 6 +- .../apache/fop/fo/properties/TextIndent.java | 2 +- .../apache/fop/fo/properties/TextShadow.java | 9 +- .../fop/fo/properties/TextTransform.java | 4 +- .../apache/fop/fo/properties/UnicodeBidi.java | 6 +- .../fop/fo/properties/VerticalAlign.java | 6 +- .../apache/fop/fo/properties/Visibility.java | 6 +- .../apache/fop/fo/properties/WhiteSpace.java | 6 +- .../fop/fo/properties/WhiteSpaceCollapse.java | 2 +- .../fo/properties/WhiteSpaceTreatment.java | 6 +- src/org/apache/fop/fo/properties/Widows.java | 2 +- .../apache/fop/fo/properties/WordSpacing.java | 14 +-- .../fop/fo/properties/WordSpacingCommon.java | 14 +++ .../properties/WordSpacingConditionality.java | 2 +- .../fop/fo/properties/WordSpacingMaximum.java | 22 +++- .../fop/fo/properties/WordSpacingMinimum.java | 22 +++- .../fop/fo/properties/WordSpacingOptimum.java | 22 +++- .../fo/properties/WordSpacingPrecedence.java | 2 +- .../apache/fop/fo/properties/WrapOption.java | 6 +- .../apache/fop/fo/properties/WritingMode.java | 6 +- 240 files changed, 761 insertions(+), 635 deletions(-) create mode 100644 src/org/apache/fop/fo/properties/WordSpacingCommon.java diff --git a/src/org/apache/fop/fo/properties/AbsolutePosition.java b/src/org/apache/fop/fo/properties/AbsolutePosition.java index 61115a220..4a49093e7 100644 --- a/src/org/apache/fop/fo/properties/AbsolutePosition.java +++ b/src/org/apache/fop/fo/properties/AbsolutePosition.java @@ -18,10 +18,10 @@ public class AbsolutePosition extends Property { ,"absolute" ,"fixed" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/ActiveState.java b/src/org/apache/fop/fo/properties/ActiveState.java index 22f3031df..edf91ac0f 100644 --- a/src/org/apache/fop/fo/properties/ActiveState.java +++ b/src/org/apache/fop/fo/properties/ActiveState.java @@ -38,10 +38,10 @@ public class ActiveState extends Property { } } - public /**/static/**/ int getEnumIndex(String enum) { + public /*static*/ int getEnumIndex(String enum) { return ((Integer)(rwEnumHash.get(enum))).intValue(); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } diff --git a/src/org/apache/fop/fo/properties/AlignmentAdjust.java b/src/org/apache/fop/fo/properties/AlignmentAdjust.java index 0a8f3ec24..a105d6370 100644 --- a/src/org/apache/fop/fo/properties/AlignmentAdjust.java +++ b/src/org/apache/fop/fo/properties/AlignmentAdjust.java @@ -51,10 +51,10 @@ public class AlignmentAdjust extends Property { } } - public /**/static/**/ int getEnumIndex(String enum) { + public /*static*/ int getEnumIndex(String enum) { return ((Integer)(rwEnumHash.get(enum))).intValue(); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } diff --git a/src/org/apache/fop/fo/properties/AlignmentBaseline.java b/src/org/apache/fop/fo/properties/AlignmentBaseline.java index 75d632df4..2bbb635d1 100644 --- a/src/org/apache/fop/fo/properties/AlignmentBaseline.java +++ b/src/org/apache/fop/fo/properties/AlignmentBaseline.java @@ -50,10 +50,10 @@ public class AlignmentBaseline extends Property { } } - public /**/static/**/ int getEnumIndex(String enum) { + public /*static*/ int getEnumIndex(String enum) { return ((Integer)(rwEnumHash.get(enum))).intValue(); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } diff --git a/src/org/apache/fop/fo/properties/AutoRestore.java b/src/org/apache/fop/fo/properties/AutoRestore.java index 9d40c1d02..031a05130 100644 --- a/src/org/apache/fop/fo/properties/AutoRestore.java +++ b/src/org/apache/fop/fo/properties/AutoRestore.java @@ -10,7 +10,7 @@ public class AutoRestore extends Property { public static final int dataTypes = BOOL; public static final int traitMapping = ACTION; public static final int initialValueType = BOOL_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new Bool(PropNames.AUTO_RESTORE, true); diff --git a/src/org/apache/fop/fo/properties/Background.java b/src/org/apache/fop/fo/properties/Background.java index 0a5ecdc61..615997c43 100644 --- a/src/org/apache/fop/fo/properties/Background.java +++ b/src/org/apache/fop/fo/properties/Background.java @@ -54,21 +54,30 @@ public class Background extends Property { * a BackgroundAttachment EnumType or Inherit value * a BackgroundPositionHorizontal Numeric or Inherit value * a BackgroundPositionVertical Numeric or Inherit value + * + * @param propindex - the int property index. + * @param foNode - the FONode on which this expression is being + * parsed. + * @value - the PropertyValue passed from + * PropertyParser.parse(). + * @return the refined PropertyValue. + * @throws PropertyException. */ - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue value) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue value) throws PropertyException { if ( ! (value instanceof PropertyValueList)) { - return processValue(foNode, value); + return processValue(propindex, foNode, value); } else { - return processList - (foNode, spaceSeparatedList((PropertyValueList)value)); + return processList(propindex, + foNode, spaceSeparatedList((PropertyValueList)value)); } } - private /**/static/**/ PropertyValueList processValue - (FONode foNode, PropertyValue value) throws PropertyException + private /*static*/ PropertyValueList processValue + (int propindex, FONode foNode, PropertyValue value) + throws PropertyException { // Can be Inherit, ColorType, UriType, None, Numeric, or an // NCName (i.e. enum token) @@ -78,22 +87,23 @@ public class Background extends Property { type == PropertyValue.FROM_NEAREST_SPECIFIED) { // Copy the value to each member of the shorthand expansion - return refineExpansionList - (foNode, ShorthandPropSets.expandAndCopySHand(value)); + return refineExpansionList(PropNames.BACKGROUND, foNode, + ShorthandPropSets.expandAndCopySHand(value)); } else { // Make a list and pass to processList PropertyValueList tmpList - = new PropertyValueList(value.getProperty()); + = new PropertyValueList(propindex); + //= new PropertyValueList(value.getProperty()); tmpList.add(value); - return processList(foNode, tmpList); + return processList(propindex, foNode, tmpList); } } - private /**/static/**/ PropertyValueList processList - (FONode foNode, PropertyValueList value) + private /*static*/ PropertyValueList processList + (int property, FONode foNode, PropertyValueList value) throws PropertyException { - int property = value.getProperty(); + //int property = value.getProperty(); PropertyValue color= null, image = null, repeat = null, @@ -155,19 +165,17 @@ public class Background extends Property { MessageHandler.log("background: duplicate" + "position overrides previous position"); if (tmpval == null) - // Only for testing the effect of statics on speed - // FIXME NOW - position = (new BackgroundPosition()).refineParsing - (foNode, pval, IS_NESTED); + position = PropertyConsts.pconsts.refineParsing + (PropNames.BACKGROUND_POSITION, + foNode, pval, IS_NESTED); else { // 2 elements // make a space-separated list PropertyValueList ssList = new PropertyValueList (PropNames.BACKGROUND_POSITION); ssList.add(posnList); - // Only for testing the effect of statics on speed - // FIXME NOW - position = (new BackgroundPosition()).refineParsing - (foNode, ssList, IS_NESTED); + position = PropertyConsts.pconsts.refineParsing + (PropNames.BACKGROUND_POSITION, + foNode, ssList, IS_NESTED); } continue scanning_elements; } // end of case NUMERIC @@ -219,13 +227,15 @@ public class Background extends Property { // Is the current NCName a position token? boolean pos1ok = false, pos2ok = false; try { - BackgroundPosition.getEnumIndex(ncname); + PropertyConsts.pconsts.getEnumIndex + (PropNames.BACKGROUND_POSITION, ncname); pos1ok = true; if (elements.hasNext()) { tmpval = (PropertyValue)(elements.next()); if (tmpval instanceof NCName) { String ncname2 = ((NCName)tmpval).getString(); - BackgroundPosition.getEnumIndex(ncname2); + PropertyConsts.pconsts.getEnumIndex + (PropNames.BACKGROUND_POSITION, ncname2); pos2ok = true; } else { // Restore the listIterator cursor @@ -247,15 +257,14 @@ public class Background extends Property { PropertyValueList ssList = new PropertyValueList (PropNames.BACKGROUND_POSITION); ssList.add(posnList); - position = BackgroundPosition.refineParsing - (foNode, ssList, IS_NESTED); + position = PropertyConsts.pconsts.refineParsing + (PropNames.BACKGROUND_POSITION, + foNode, ssList, IS_NESTED); } else { // one only // Now send one NCName to BackgroundPosition - // Only for testing the effect of statics on - // constructor speed. - // FIXME NOW!!!!!! - position = BackgroundPosition.refineParsing - (foNode, pval, IS_NESTED); + position = PropertyConsts.pconsts.refineParsing + (PropNames.BACKGROUND_POSITION, + foNode, pval, IS_NESTED); } continue scanning_elements; } diff --git a/src/org/apache/fop/fo/properties/BackgroundAttachment.java b/src/org/apache/fop/fo/properties/BackgroundAttachment.java index 2d770e78d..f9c671719 100644 --- a/src/org/apache/fop/fo/properties/BackgroundAttachment.java +++ b/src/org/apache/fop/fo/properties/BackgroundAttachment.java @@ -13,7 +13,7 @@ public class BackgroundAttachment extends Property { public static final int initialValueType = ENUM_IT; public static final int SCROLL = 1; public static final int FIXED = 2; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType (PropNames.BACKGROUND_ATTACHMENT, SCROLL); @@ -26,10 +26,10 @@ public class BackgroundAttachment extends Property { ,"scroll" ,"fixed" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/BackgroundColor.java b/src/org/apache/fop/fo/properties/BackgroundColor.java index 893653c59..650779839 100644 --- a/src/org/apache/fop/fo/properties/BackgroundColor.java +++ b/src/org/apache/fop/fo/properties/BackgroundColor.java @@ -9,7 +9,7 @@ public class BackgroundColor extends ColorTransparent { public static final int dataTypes = COLOR_TRANS | INHERIT; public static final int traitMapping = RENDERING; public static final int initialValueType = COLOR_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new ColorType (PropNames.BACKGROUND_COLOR, "transparent"); diff --git a/src/org/apache/fop/fo/properties/BackgroundPosition.java b/src/org/apache/fop/fo/properties/BackgroundPosition.java index 68681aeec..3f75330f7 100644 --- a/src/org/apache/fop/fo/properties/BackgroundPosition.java +++ b/src/org/apache/fop/fo/properties/BackgroundPosition.java @@ -66,19 +66,21 @@ public class BackgroundPosition extends Property { * containing the expansion of the shorthand. I.e. the first * element is a value for BackgroundPositionHorizontal, and the * second is for BackgroundPositionVertical. + * @param propindex - the int property index. * @param foNode - the FONode being built * @param value PropertyValue returned by the parser * @return PropertyValue the verified value */ - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue value) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue value) throws PropertyException { - return refineParsing(foNode, value, NOT_NESTED); + return refineParsing(propindex, foNode, value, NOT_NESTED); } /** - * Do the work for the two argument refineParsing method. + * Do the work for the three argument refineParsing method. + * @param propindex - the int property index. * @param foNode - the FONode being built * @param value PropertyValue returned by the parser * @param nested boolean indicating whether this method is @@ -87,24 +89,24 @@ public class BackgroundPosition extends Property { * @return PropertyValue the verified value * @see #refineParsing(FOTree,PropertyValue) */ - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue value, boolean nested) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue value, boolean nested) throws PropertyException { if ( ! (value instanceof PropertyValueList)) { return processValue(foNode, value, nested); } else { return processList - (spaceSeparatedList((PropertyValueList)value)); + (spaceSeparatedList((PropertyValueList)value)); } } - private /**/static/**/ PropertyValueList processValue - (FONode foNode, PropertyValue value, boolean nested) + private /*static*/ PropertyValueList processValue + (FONode foNode, PropertyValue value, boolean nested) throws PropertyException { - PropertyValueList newlist - = new PropertyValueList(value.getProperty()); + int property = value.getProperty(); + PropertyValueList newlist = new PropertyValueList(property); // Can only be Inherit, NCName (i.e. enum token) // or Numeric (i.e. Length or Percentage) int type = value.getType(); @@ -114,7 +116,8 @@ public class BackgroundPosition extends Property { type == PropertyValue.FROM_NEAREST_SPECIFIED) { // Copy the value to each member of the shorthand newlist = refineExpansionList - (foNode, ShorthandPropSets.expandAndCopySHand(value)); + (PropNames.BACKGROUND_POSITION, foNode, + ShorthandPropSets.expandAndCopySHand(value)); } } @@ -236,11 +239,13 @@ public class BackgroundPosition extends Property { String enumval2 = ((NCName)posn2).getNCName(); double percent1 = 50.0d, percent2 = 50.0d; try { - enum1 = BackgroundPositionHorizontal.getEnumIndex(enumval1); + enum1 = PropertyConsts.pconsts.getEnumIndex + (PropNames.BACKGROUND_POSITION_HORIZONTAL, enumval1); } catch (PropertyException e) { // Not a horizontal element - try vertical try { - enum1 = BackgroundPositionVertical.getEnumIndex(enumval1); + enum1 = PropertyConsts.pconsts.getEnumIndex + (PropNames.BACKGROUND_POSITION_VERTICAL, enumval1); enum1 += RIGHT; } catch (PropertyException e2) { throw new PropertyException @@ -249,12 +254,13 @@ public class BackgroundPosition extends Property { } } try { - enum2 = BackgroundPositionVertical.getEnumIndex(enumval2); + enum2 = PropertyConsts.pconsts.getEnumIndex + (PropNames.BACKGROUND_POSITION_VERTICAL, enumval2); enum2 += RIGHT; } catch (PropertyException e) { try { - enum2 = - BackgroundPositionHorizontal.getEnumIndex(enumval2); + enum2 = PropertyConsts.pconsts.getEnumIndex + (PropNames.BACKGROUND_POSITION_HORIZONTAL, enumval2); } catch (PropertyException e2) { throw new PropertyException ("Unrecognised value for BackgroundPosition: " diff --git a/src/org/apache/fop/fo/properties/BackgroundPositionHorizontal.java b/src/org/apache/fop/fo/properties/BackgroundPositionHorizontal.java index 9358ef8f5..0de60d1ab 100644 --- a/src/org/apache/fop/fo/properties/BackgroundPositionHorizontal.java +++ b/src/org/apache/fop/fo/properties/BackgroundPositionHorizontal.java @@ -15,7 +15,7 @@ public class BackgroundPositionHorizontal extends Property { public static final int LEFT = 1; public static final int CENTER = 2; public static final int RIGHT = 3; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Percentage.makePercentage @@ -30,10 +30,10 @@ public class BackgroundPositionHorizontal extends Property { ,"right" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/BackgroundPositionVertical.java b/src/org/apache/fop/fo/properties/BackgroundPositionVertical.java index b12266bf1..4675277fe 100644 --- a/src/org/apache/fop/fo/properties/BackgroundPositionVertical.java +++ b/src/org/apache/fop/fo/properties/BackgroundPositionVertical.java @@ -15,7 +15,7 @@ public class BackgroundPositionVertical extends Property { public static final int TOP = 1; public static final int CENTER = 2; public static final int BOTTOM = 3; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Percentage.makePercentage @@ -29,10 +29,10 @@ public class BackgroundPositionVertical extends Property { ,"center" ,"bottom" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/BackgroundRepeat.java b/src/org/apache/fop/fo/properties/BackgroundRepeat.java index 9c1df3401..9f4691024 100644 --- a/src/org/apache/fop/fo/properties/BackgroundRepeat.java +++ b/src/org/apache/fop/fo/properties/BackgroundRepeat.java @@ -15,7 +15,7 @@ public class BackgroundRepeat extends Property { public static final int REPEAT_X = 2; public static final int REPEAT_Y = 3; public static final int NO_REPEAT = 4; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType (PropNames.BACKGROUND_REPEAT, REPEAT); @@ -30,10 +30,10 @@ public class BackgroundRepeat extends Property { ,"repeat-y" ,"no-repeat" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/BaselineShift.java b/src/org/apache/fop/fo/properties/BaselineShift.java index 63f867f60..130c50717 100644 --- a/src/org/apache/fop/fo/properties/BaselineShift.java +++ b/src/org/apache/fop/fo/properties/BaselineShift.java @@ -15,7 +15,7 @@ public class BaselineShift extends Property { public static final int BASELINE = 1; public static final int SUB = 2; public static final int SUPER = 3; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType (PropNames.BASELINE_SHIFT, BASELINE); @@ -29,10 +29,10 @@ public class BaselineShift extends Property { ,"sub" ,"super" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/BlankOrNotBlank.java b/src/org/apache/fop/fo/properties/BlankOrNotBlank.java index a36f74b4e..8762e4a22 100644 --- a/src/org/apache/fop/fo/properties/BlankOrNotBlank.java +++ b/src/org/apache/fop/fo/properties/BlankOrNotBlank.java @@ -14,7 +14,7 @@ public class BlankOrNotBlank extends Property { public static final int BLANK = 1; public static final int NOT_BLANK = 2; public static final int ANY = 3; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType (PropNames.BLANK_OR_NOT_BLANK, ANY); @@ -28,10 +28,10 @@ public class BlankOrNotBlank extends Property { ,"not-blank" ,"any" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/Border.java b/src/org/apache/fop/fo/properties/Border.java index 3faf59a57..d49f16cb8 100644 --- a/src/org/apache/fop/fo/properties/Border.java +++ b/src/org/apache/fop/fo/properties/Border.java @@ -6,6 +6,7 @@ import org.apache.fop.datatypes.PropertyValue; import org.apache.fop.datatypes.Ints; import org.apache.fop.datatypes.ColorType; import org.apache.fop.fo.PropNames; +import org.apache.fop.fo.PropertyConsts; import org.apache.fop.fo.FONode; import org.apache.fop.fo.ShorthandPropSets; import org.apache.fop.fo.properties.Property; @@ -21,8 +22,8 @@ public class Border extends Property { public static final int initialValueType = NOTYPE_IT; public static final int inherited = NO; - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue value) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue value) throws PropertyException { int type = value.getType(); @@ -30,8 +31,8 @@ public class Border extends Property { type == PropertyValue.FROM_PARENT || type == PropertyValue.FROM_NEAREST_SPECIFIED) // Copy the value to each member of the shorthand expansion - return refineExpansionList - (foNode, ShorthandPropSets.expandAndCopySHand(value)); + return refineExpansionList(PropNames.BORDER, foNode, + ShorthandPropSets.expandAndCopySHand(value)); PropertyValueList ssList = null; // Must be a space-separated list or a single value from the @@ -58,8 +59,8 @@ public class Border extends Property { PropertyValue val = (PropertyValue)(values.next()); PropertyValue pv = null; try { - // FIXME NOW - pv = (new BorderWidth()).refineParsing(foNode, val, IS_NESTED); + pv = PropertyConsts.pconsts.refineParsing + (PropNames.BORDER_WIDTH, foNode, val, IS_NESTED); if (width != null) MessageHandler.log("border: duplicate" + "width overrides previous width"); @@ -67,8 +68,8 @@ public class Border extends Property { continue; } catch (PropertyException e) {} try { - // FIXME NOW - pv = (new BorderStyle()).refineParsing(foNode, val, IS_NESTED); + pv = PropertyConsts.pconsts.refineParsing + (PropNames.BORDER_STYLE, foNode, val, IS_NESTED); if (style != null) MessageHandler.log("border: duplicate" + "style overrides previous style"); @@ -76,8 +77,8 @@ public class Border extends Property { continue; } catch (PropertyException e) {} try { - // FIXME NOW - pv = (new BorderColor()).refineParsing(foNode, val, IS_NESTED); + pv = PropertyConsts.pconsts.refineParsing + (PropNames.BORDER_COLOR, foNode, val, IS_NESTED); if (color != null) MessageHandler.log("border: duplicate" + "color overrides previous color"); diff --git a/src/org/apache/fop/fo/properties/BorderAfterColor.java b/src/org/apache/fop/fo/properties/BorderAfterColor.java index c94550a18..c318f0375 100644 --- a/src/org/apache/fop/fo/properties/BorderAfterColor.java +++ b/src/org/apache/fop/fo/properties/BorderAfterColor.java @@ -10,7 +10,7 @@ public class BorderAfterColor extends ColorTransparent { public static final int traitMapping = RENDERING; public static final int initialValueType = COLOR_IT; public static final int inherited = NO; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new ColorType (PropNames.BACKGROUND_COLOR, BLACK); diff --git a/src/org/apache/fop/fo/properties/BorderAfterWidth.java b/src/org/apache/fop/fo/properties/BorderAfterWidth.java index b1d91005e..2920de386 100644 --- a/src/org/apache/fop/fo/properties/BorderAfterWidth.java +++ b/src/org/apache/fop/fo/properties/BorderAfterWidth.java @@ -18,13 +18,13 @@ public class BorderAfterWidth extends BorderCommonWidth { // automatically update the following initial Length PropertyValue // if the mapping changes. - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return getMappedLength(MEDIUM); } - public static Numeric getMappedLength(int enum) + public /*static*/ Numeric getMappedLength(int enum) throws PropertyException { return getMappedLength (PropNames.BORDER_AFTER_WIDTH, enum); diff --git a/src/org/apache/fop/fo/properties/BorderAfterWidthConditionality.java b/src/org/apache/fop/fo/properties/BorderAfterWidthConditionality.java index dc13da957..4203541c4 100644 --- a/src/org/apache/fop/fo/properties/BorderAfterWidthConditionality.java +++ b/src/org/apache/fop/fo/properties/BorderAfterWidthConditionality.java @@ -10,7 +10,7 @@ public class BorderAfterWidthConditionality extends Conditionality { public static final int dataTypes = ENUM; public static final int traitMapping = FORMATTING | RENDERING; public static final int initialValueType = ENUM_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return diff --git a/src/org/apache/fop/fo/properties/BorderAfterWidthLength.java b/src/org/apache/fop/fo/properties/BorderAfterWidthLength.java index fb2f11c15..877e16a7c 100644 --- a/src/org/apache/fop/fo/properties/BorderAfterWidthLength.java +++ b/src/org/apache/fop/fo/properties/BorderAfterWidthLength.java @@ -3,17 +3,17 @@ package org.apache.fop.fo.properties; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.datatypes.PropertyValue; import org.apache.fop.fo.PropNames; -import org.apache.fop.fo.properties.Property; +import org.apache.fop.fo.properties.BorderCommonWidth; -public class BorderAfterWidthLength extends Property { +public class BorderAfterWidthLength extends BorderCommonWidth { public static final int dataTypes = LENGTH; public static final int traitMapping = FORMATTING | RENDERING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { - return BorderCommonWidth.getMappedLength - (PropNames.BORDER_AFTER_WIDTH_LENGTH, BorderCommonWidth.MEDIUM); + return getMappedLength + (PropNames.BORDER_AFTER_WIDTH_LENGTH, MEDIUM); } public static final int inherited = NO; diff --git a/src/org/apache/fop/fo/properties/BorderBeforeColor.java b/src/org/apache/fop/fo/properties/BorderBeforeColor.java index 0d03e7cc9..1be56e68b 100644 --- a/src/org/apache/fop/fo/properties/BorderBeforeColor.java +++ b/src/org/apache/fop/fo/properties/BorderBeforeColor.java @@ -10,7 +10,7 @@ public class BorderBeforeColor extends ColorTransparent { public static final int traitMapping = RENDERING; public static final int initialValueType = COLOR_IT; public static final int inherited = NO; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new ColorType(PropNames.BACKGROUND_COLOR, BLACK); diff --git a/src/org/apache/fop/fo/properties/BorderBeforeWidth.java b/src/org/apache/fop/fo/properties/BorderBeforeWidth.java index 93b789be1..3d73c99de 100644 --- a/src/org/apache/fop/fo/properties/BorderBeforeWidth.java +++ b/src/org/apache/fop/fo/properties/BorderBeforeWidth.java @@ -11,13 +11,13 @@ public class BorderBeforeWidth extends BorderCommonWidth { COMPOUND | MAPPED_LENGTH | LENGTH | INHERIT; public static final int traitMapping = FORMATTING | RENDERING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return getMappedLength(MEDIUM); } - public static Numeric getMappedLength(int enum) + public /*static*/ Numeric getMappedLength(int enum) throws PropertyException { return getMappedLength(PropNames.BORDER_BEFORE_WIDTH, enum); diff --git a/src/org/apache/fop/fo/properties/BorderBeforeWidthConditionality.java b/src/org/apache/fop/fo/properties/BorderBeforeWidthConditionality.java index 5a36d90df..ee7dc722c 100644 --- a/src/org/apache/fop/fo/properties/BorderBeforeWidthConditionality.java +++ b/src/org/apache/fop/fo/properties/BorderBeforeWidthConditionality.java @@ -10,7 +10,7 @@ public class BorderBeforeWidthConditionality extends Conditionality { public static final int dataTypes = ENUM; public static final int traitMapping = FORMATTING | RENDERING; public static final int initialValueType = ENUM_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType diff --git a/src/org/apache/fop/fo/properties/BorderBeforeWidthLength.java b/src/org/apache/fop/fo/properties/BorderBeforeWidthLength.java index 69c812cde..508af8e6a 100644 --- a/src/org/apache/fop/fo/properties/BorderBeforeWidthLength.java +++ b/src/org/apache/fop/fo/properties/BorderBeforeWidthLength.java @@ -3,17 +3,17 @@ package org.apache.fop.fo.properties; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.datatypes.PropertyValue; import org.apache.fop.fo.PropNames; -import org.apache.fop.fo.properties.Property; +import org.apache.fop.fo.properties.BorderCommonWidth; -public class BorderBeforeWidthLength extends Property { +public class BorderBeforeWidthLength extends BorderCommonWidth { public static final int dataTypes = LENGTH; public static final int traitMapping = FORMATTING | RENDERING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { - return BorderCommonWidth.getMappedLength - (PropNames.BORDER_BEFORE_WIDTH_LENGTH, BorderCommonWidth.MEDIUM); + return getMappedLength + (PropNames.BORDER_BEFORE_WIDTH_LENGTH, MEDIUM); } public static final int inherited = NO; diff --git a/src/org/apache/fop/fo/properties/BorderBottom.java b/src/org/apache/fop/fo/properties/BorderBottom.java index e2f2b7b34..708425123 100644 --- a/src/org/apache/fop/fo/properties/BorderBottom.java +++ b/src/org/apache/fop/fo/properties/BorderBottom.java @@ -30,15 +30,20 @@ public class BorderBottom extends Property { * N.B. this is the order of elements defined in * ShorthandPropSets.borderRightExpansion * + * @param propindex - the int proeprty index. * @param foNode - the FONode being built * @param value PropertyValue returned by the parser * @return PropertyValue the verified value */ - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue value) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue value) throws PropertyException { - return borderEdge(foNode, value, + int property = PropNames.BORDER_BOTTOM; + if (property != propindex) // DEBUG + throw new PropertyException + ("Mismatch between propindex and BORDER_BOTTOM."); + return borderEdge(property, foNode, value, PropNames.BORDER_BOTTOM_STYLE, PropNames.BORDER_BOTTOM_COLOR, PropNames.BORDER_BOTTOM_WIDTH diff --git a/src/org/apache/fop/fo/properties/BorderBottomColor.java b/src/org/apache/fop/fo/properties/BorderBottomColor.java index fbdbdeef1..f7f97a6ff 100644 --- a/src/org/apache/fop/fo/properties/BorderBottomColor.java +++ b/src/org/apache/fop/fo/properties/BorderBottomColor.java @@ -10,7 +10,7 @@ public class BorderBottomColor extends ColorTransparent { public static final int traitMapping = DISAPPEARS; public static final int initialValueType = COLOR_IT; public static final int inherited = NO; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new ColorType(PropNames.BACKGROUND_COLOR, BLACK); diff --git a/src/org/apache/fop/fo/properties/BorderBottomWidth.java b/src/org/apache/fop/fo/properties/BorderBottomWidth.java index 2a1768c04..e42b79879 100644 --- a/src/org/apache/fop/fo/properties/BorderBottomWidth.java +++ b/src/org/apache/fop/fo/properties/BorderBottomWidth.java @@ -10,13 +10,13 @@ public class BorderBottomWidth extends BorderCommonWidth { public static final int dataTypes = MAPPED_LENGTH | INHERIT; public static final int traitMapping = DISAPPEARS; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return getMappedLength(MEDIUM); } - public static Numeric getMappedLength(int enum) + public /*static*/ Numeric getMappedLength(int enum) throws PropertyException { return getMappedLength(PropNames.BORDER_BOTTOM_WIDTH, enum); diff --git a/src/org/apache/fop/fo/properties/BorderCollapse.java b/src/org/apache/fop/fo/properties/BorderCollapse.java index 35978f46e..c9e1bb4db 100644 --- a/src/org/apache/fop/fo/properties/BorderCollapse.java +++ b/src/org/apache/fop/fo/properties/BorderCollapse.java @@ -13,7 +13,7 @@ public class BorderCollapse extends Property { public static final int initialValueType = ENUM_IT; public static final int COLLAPSE = 1; public static final int SEPARATE = 2; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType (PropNames.BORDER_COLLAPSE, COLLAPSE); @@ -26,10 +26,10 @@ public class BorderCollapse extends Property { ,"collapse" ,"separate" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/BorderColor.java b/src/org/apache/fop/fo/properties/BorderColor.java index 11e7a4b48..fb3db335a 100644 --- a/src/org/apache/fop/fo/properties/BorderColor.java +++ b/src/org/apache/fop/fo/properties/BorderColor.java @@ -42,19 +42,21 @@ public class BorderColor extends Property { * the third element is a value for border-bottom-color, * the fourth element is a value for border-left-color. * + * @param propindex - the int property index. * @param foNode - the FONode being built * @param value PropertyValue returned by the parser * @return PropertyValue the verified value */ - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue value) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue value) throws PropertyException { - return refineParsing(foNode, value, NOT_NESTED); + return refineParsing(propindex, foNode, value, NOT_NESTED); } /** - * Do the work for the two argument refineParsing method. + * Do the work for the three argument refineParsing method. + * @param propindex - the int property index. * @param foNode - the FONode being built * @param value PropertyValue returned by the parser * @param nested boolean indicating whether this method is @@ -63,8 +65,8 @@ public class BorderColor extends Property { * @return PropertyValue the verified value * @see #refineParsing(FONode,PropertyValue) */ - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue value, boolean nested) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue value, boolean nested) throws PropertyException { int type = value.getType(); @@ -73,12 +75,12 @@ public class BorderColor extends Property { if (type == PropertyValue.INHERIT || type == PropertyValue.FROM_PARENT || type == PropertyValue.FROM_NEAREST_SPECIFIED) - return refineExpansionList(foNode, + return refineExpansionList(PropNames.BORDER_COLOR, foNode, ShorthandPropSets.expandAndCopySHand(value)); } if (type == PropertyValue.COLOR_TYPE) - return refineExpansionList - (foNode, ShorthandPropSets.expandAndCopySHand(value)); + return refineExpansionList(PropNames.BORDER_COLOR, foNode, + ShorthandPropSets.expandAndCopySHand(value)); if (type == PropertyValue.NCNAME) { // Must be a standard color ColorType color; @@ -90,8 +92,8 @@ public class BorderColor extends Property { (((NCName)value).getNCName() + " not a standard color for border-color"); } - return refineExpansionList - (foNode, ShorthandPropSets.expandAndCopySHand(color)); + return refineExpansionList(PropNames.BORDER_COLOR, foNode, + ShorthandPropSets.expandAndCopySHand(color)); } else throw new PropertyException ("Invalid " + value.getClass().getName() + diff --git a/src/org/apache/fop/fo/properties/BorderCommonStyle.java b/src/org/apache/fop/fo/properties/BorderCommonStyle.java index cfe7bf676..b4c9b086b 100644 --- a/src/org/apache/fop/fo/properties/BorderCommonStyle.java +++ b/src/org/apache/fop/fo/properties/BorderCommonStyle.java @@ -43,10 +43,10 @@ public class BorderCommonStyle extends Property { } } - public /**/static/**/ int getEnumIndex(String enum) { + public /*static*/ int getEnumIndex(String enum) { return ((Integer)(rwEnumHash.get(enum))).intValue(); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } diff --git a/src/org/apache/fop/fo/properties/BorderCommonWidth.java b/src/org/apache/fop/fo/properties/BorderCommonWidth.java index ac4e96bf1..f2700d91e 100644 --- a/src/org/apache/fop/fo/properties/BorderCommonWidth.java +++ b/src/org/apache/fop/fo/properties/BorderCommonWidth.java @@ -37,17 +37,17 @@ public class BorderCommonWidth extends Property { * @return Numeric[] containing the values corresponding * to the MappedNumeric enumeration constants for border width */ - public static Numeric getMappedLength(int property, int enum) + public /*static*/ Numeric getMappedLength(int property, int enum) throws PropertyException { return Length.makeLength(property, mappedPoints[enum], Length.PT); } - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } diff --git a/src/org/apache/fop/fo/properties/BorderEndColor.java b/src/org/apache/fop/fo/properties/BorderEndColor.java index 982ae013c..995d137a1 100644 --- a/src/org/apache/fop/fo/properties/BorderEndColor.java +++ b/src/org/apache/fop/fo/properties/BorderEndColor.java @@ -10,7 +10,7 @@ public class BorderEndColor extends ColorTransparent { public static final int traitMapping = RENDERING; public static final int initialValueType = COLOR_IT; public static final int inherited = NO; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new ColorType (PropNames.BACKGROUND_COLOR, BLACK); diff --git a/src/org/apache/fop/fo/properties/BorderEndWidth.java b/src/org/apache/fop/fo/properties/BorderEndWidth.java index c48f1b072..4c8c198b2 100644 --- a/src/org/apache/fop/fo/properties/BorderEndWidth.java +++ b/src/org/apache/fop/fo/properties/BorderEndWidth.java @@ -11,13 +11,13 @@ public class BorderEndWidth extends BorderCommonWidth { COMPOUND | MAPPED_LENGTH | LENGTH | INHERIT; public static final int traitMapping = FORMATTING | RENDERING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return getMappedLength(MEDIUM); } - public static Numeric getMappedLength(int enum) + public /*static*/ Numeric getMappedLength(int enum) throws PropertyException { return getMappedLength(PropNames.BORDER_END_WIDTH, enum); diff --git a/src/org/apache/fop/fo/properties/BorderEndWidthConditionality.java b/src/org/apache/fop/fo/properties/BorderEndWidthConditionality.java index eb0542951..54ebe25dd 100644 --- a/src/org/apache/fop/fo/properties/BorderEndWidthConditionality.java +++ b/src/org/apache/fop/fo/properties/BorderEndWidthConditionality.java @@ -10,7 +10,7 @@ public class BorderEndWidthConditionality extends Conditionality { public static final int dataTypes = ENUM; public static final int traitMapping = FORMATTING | RENDERING; public static final int initialValueType = ENUM_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType diff --git a/src/org/apache/fop/fo/properties/BorderEndWidthLength.java b/src/org/apache/fop/fo/properties/BorderEndWidthLength.java index 661c517d5..fadaff843 100644 --- a/src/org/apache/fop/fo/properties/BorderEndWidthLength.java +++ b/src/org/apache/fop/fo/properties/BorderEndWidthLength.java @@ -3,17 +3,17 @@ package org.apache.fop.fo.properties; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.datatypes.PropertyValue; import org.apache.fop.fo.PropNames; -import org.apache.fop.fo.properties.Property; +import org.apache.fop.fo.properties.BorderCommonWidth; -public class BorderEndWidthLength extends Property { +public class BorderEndWidthLength extends BorderCommonWidth { public static final int dataTypes = LENGTH; public static final int traitMapping = FORMATTING | RENDERING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { - return BorderCommonWidth.getMappedLength - (PropNames.BORDER_END_WIDTH_LENGTH, BorderCommonWidth.MEDIUM); + return getMappedLength + (PropNames.BORDER_END_WIDTH_LENGTH, MEDIUM); } public static final int inherited = NO; diff --git a/src/org/apache/fop/fo/properties/BorderLeft.java b/src/org/apache/fop/fo/properties/BorderLeft.java index 797a806de..93f0e19c6 100644 --- a/src/org/apache/fop/fo/properties/BorderLeft.java +++ b/src/org/apache/fop/fo/properties/BorderLeft.java @@ -30,15 +30,20 @@ public class BorderLeft extends Property { * N.B. this is the order of elements defined in * ShorthandPropSets.borderRightExpansion * + * @param propindex - the int property index. * @param foNode - the FONode being built * @param value PropertyValue returned by the parser * @return PropertyValue the verified value */ - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue value) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue value) throws PropertyException { - return borderEdge(foNode, value, + int property = PropNames.BORDER_LEFT; + if (property != propindex) // DEBUG + throw new PropertyException + ("Mismatch between propindex and BORDER_LEFT."); + return borderEdge(property, foNode, value, PropNames.BORDER_LEFT_STYLE, PropNames.BORDER_LEFT_COLOR, PropNames.BORDER_LEFT_WIDTH diff --git a/src/org/apache/fop/fo/properties/BorderLeftColor.java b/src/org/apache/fop/fo/properties/BorderLeftColor.java index 195c4d485..e3c2efa13 100644 --- a/src/org/apache/fop/fo/properties/BorderLeftColor.java +++ b/src/org/apache/fop/fo/properties/BorderLeftColor.java @@ -11,7 +11,7 @@ public class BorderLeftColor extends ColorTransparent { public static final int traitMapping = DISAPPEARS; public static final int initialValueType = COLOR_IT; public static final int inherited = NO; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new ColorType (PropNames.BACKGROUND_COLOR, BLACK); diff --git a/src/org/apache/fop/fo/properties/BorderLeftWidth.java b/src/org/apache/fop/fo/properties/BorderLeftWidth.java index 71e0d6d94..fa8be2236 100644 --- a/src/org/apache/fop/fo/properties/BorderLeftWidth.java +++ b/src/org/apache/fop/fo/properties/BorderLeftWidth.java @@ -10,13 +10,13 @@ public class BorderLeftWidth extends BorderCommonWidth { public static final int dataTypes = MAPPED_LENGTH | INHERIT; public static final int traitMapping = DISAPPEARS; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return getMappedLength(MEDIUM); } - public static Numeric getMappedLength(int enum) + public /*static*/ Numeric getMappedLength(int enum) throws PropertyException { return getMappedLength(PropNames.BORDER_LEFT_WIDTH, enum); diff --git a/src/org/apache/fop/fo/properties/BorderRight.java b/src/org/apache/fop/fo/properties/BorderRight.java index 954e553df..8b2720709 100644 --- a/src/org/apache/fop/fo/properties/BorderRight.java +++ b/src/org/apache/fop/fo/properties/BorderRight.java @@ -30,15 +30,20 @@ public class BorderRight extends Property { * N.B. this is the order of elements defined in * ShorthandPropSets.borderRightExpansion * + * @param propindex - the int property index. * @param foNode - the FONode being built * @param value PropertyValue returned by the parser * @return PropertyValue the verified value */ - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue value) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue value) throws PropertyException { - return borderEdge(foNode, value, + int property = PropNames.BORDER_RIGHT; + if (property != propindex) // DEBUG + throw new PropertyException + ("Mismatch between propindex and BORDER_RIGHT."); + return borderEdge(property, foNode, value, PropNames.BORDER_RIGHT_STYLE, PropNames.BORDER_RIGHT_COLOR, PropNames.BORDER_RIGHT_WIDTH diff --git a/src/org/apache/fop/fo/properties/BorderRightColor.java b/src/org/apache/fop/fo/properties/BorderRightColor.java index 3e13070b0..b1b8e2fb5 100644 --- a/src/org/apache/fop/fo/properties/BorderRightColor.java +++ b/src/org/apache/fop/fo/properties/BorderRightColor.java @@ -11,7 +11,7 @@ public class BorderRightColor extends ColorTransparent { public static final int traitMapping = DISAPPEARS; public static final int initialValueType = COLOR_IT; public static final int inherited = NO; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new ColorType (PropNames.BACKGROUND_COLOR, BLACK); diff --git a/src/org/apache/fop/fo/properties/BorderRightWidth.java b/src/org/apache/fop/fo/properties/BorderRightWidth.java index e5f3069a7..e4bb0aeb7 100644 --- a/src/org/apache/fop/fo/properties/BorderRightWidth.java +++ b/src/org/apache/fop/fo/properties/BorderRightWidth.java @@ -10,13 +10,13 @@ public class BorderRightWidth extends BorderCommonWidth { public static final int dataTypes = MAPPED_LENGTH | INHERIT; public static final int traitMapping = DISAPPEARS; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return getMappedLength(MEDIUM); } - public static Numeric getMappedLength(int enum) + public /*static*/ Numeric getMappedLength(int enum) throws PropertyException { return getMappedLength(PropNames.BORDER_RIGHT_WIDTH, enum); diff --git a/src/org/apache/fop/fo/properties/BorderSeparationBlockProgressionDirection.java b/src/org/apache/fop/fo/properties/BorderSeparationBlockProgressionDirection.java index b13b9670f..4ef10bb51 100644 --- a/src/org/apache/fop/fo/properties/BorderSeparationBlockProgressionDirection.java +++ b/src/org/apache/fop/fo/properties/BorderSeparationBlockProgressionDirection.java @@ -11,7 +11,7 @@ public class BorderSeparationBlockProgressionDirection public static final int dataTypes = LENGTH; public static final int traitMapping = FORMATTING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength diff --git a/src/org/apache/fop/fo/properties/BorderSeparationInlineProgressionDirection.java b/src/org/apache/fop/fo/properties/BorderSeparationInlineProgressionDirection.java index eabe3cc45..ea474251b 100644 --- a/src/org/apache/fop/fo/properties/BorderSeparationInlineProgressionDirection.java +++ b/src/org/apache/fop/fo/properties/BorderSeparationInlineProgressionDirection.java @@ -11,7 +11,7 @@ public class BorderSeparationInlineProgressionDirection public static final int dataTypes = LENGTH; public static final int traitMapping = FORMATTING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength diff --git a/src/org/apache/fop/fo/properties/BorderSpacing.java b/src/org/apache/fop/fo/properties/BorderSpacing.java index 648548edd..99b3ad220 100644 --- a/src/org/apache/fop/fo/properties/BorderSpacing.java +++ b/src/org/apache/fop/fo/properties/BorderSpacing.java @@ -28,12 +28,13 @@ public class BorderSpacing extends Property { * Note: the Lengths cannot be percentages (what about relative * lengths?) * + * @param propindex - the int property index. * @param foNode - the FONode being built * @param value PropertyValue returned by the parser * @return PropertyValue the verified value */ - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue value) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue value) throws PropertyException { int type = value.getType(); @@ -41,13 +42,13 @@ public class BorderSpacing extends Property { if (type == PropertyValue.INHERIT || type == PropertyValue.FROM_PARENT || type == PropertyValue.FROM_NEAREST_SPECIFIED) - return refineExpansionList - (foNode, ShorthandPropSets.expandAndCopySHand(value)); + return refineExpansionList(PropNames.BORDER_SPACING, foNode, + ShorthandPropSets.expandAndCopySHand(value)); if (type == PropertyValue.NUMERIC && ((Numeric)value).isLength()) - return refineExpansionList - (foNode, ShorthandPropSets.expandAndCopySHand(value)); + return refineExpansionList(PropNames.BORDER_SPACING, foNode, + ShorthandPropSets.expandAndCopySHand(value)); throw new PropertyException ("Invalid " + value.getClass().getName() + diff --git a/src/org/apache/fop/fo/properties/BorderStartColor.java b/src/org/apache/fop/fo/properties/BorderStartColor.java index 678e20fdb..e599e6e74 100644 --- a/src/org/apache/fop/fo/properties/BorderStartColor.java +++ b/src/org/apache/fop/fo/properties/BorderStartColor.java @@ -11,7 +11,7 @@ public class BorderStartColor extends ColorTransparent { public static final int traitMapping = RENDERING; public static final int initialValueType = COLOR_IT; public static final int inherited = NO; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return diff --git a/src/org/apache/fop/fo/properties/BorderStartWidth.java b/src/org/apache/fop/fo/properties/BorderStartWidth.java index 1c8783514..2c1ecdc61 100644 --- a/src/org/apache/fop/fo/properties/BorderStartWidth.java +++ b/src/org/apache/fop/fo/properties/BorderStartWidth.java @@ -11,13 +11,13 @@ public class BorderStartWidth extends BorderCommonWidth { COMPOUND | MAPPED_LENGTH | LENGTH | INHERIT; public static final int traitMapping = FORMATTING | RENDERING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return getMappedLength(MEDIUM); } - public static Numeric getMappedLength(int enum) + public /*static*/ Numeric getMappedLength(int enum) throws PropertyException { return getMappedLength(PropNames.BORDER_START_WIDTH, enum); diff --git a/src/org/apache/fop/fo/properties/BorderStartWidthConditionality.java b/src/org/apache/fop/fo/properties/BorderStartWidthConditionality.java index 16c02c752..3b27e4b59 100644 --- a/src/org/apache/fop/fo/properties/BorderStartWidthConditionality.java +++ b/src/org/apache/fop/fo/properties/BorderStartWidthConditionality.java @@ -10,7 +10,7 @@ public class BorderStartWidthConditionality extends Conditionality { public static final int dataTypes = ENUM; public static final int traitMapping = FORMATTING | RENDERING; public static final int initialValueType = ENUM_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType diff --git a/src/org/apache/fop/fo/properties/BorderStartWidthLength.java b/src/org/apache/fop/fo/properties/BorderStartWidthLength.java index 5e20f4d7a..5933c6f59 100644 --- a/src/org/apache/fop/fo/properties/BorderStartWidthLength.java +++ b/src/org/apache/fop/fo/properties/BorderStartWidthLength.java @@ -3,17 +3,17 @@ package org.apache.fop.fo.properties; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.datatypes.PropertyValue; import org.apache.fop.fo.PropNames; -import org.apache.fop.fo.properties.Property; +import org.apache.fop.fo.properties.BorderCommonWidth; -public class BorderStartWidthLength extends Property { +public class BorderStartWidthLength extends BorderCommonWidth { public static final int dataTypes = LENGTH; public static final int traitMapping = FORMATTING | RENDERING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { - return BorderCommonWidth.getMappedLength - (PropNames.BORDER_START_WIDTH_LENGTH, BorderCommonWidth.MEDIUM); + return getMappedLength + (PropNames.BORDER_START_WIDTH_LENGTH, MEDIUM); } public static final int inherited = NO; diff --git a/src/org/apache/fop/fo/properties/BorderStyle.java b/src/org/apache/fop/fo/properties/BorderStyle.java index 965d75f4b..6d9531c2f 100644 --- a/src/org/apache/fop/fo/properties/BorderStyle.java +++ b/src/org/apache/fop/fo/properties/BorderStyle.java @@ -40,19 +40,21 @@ public class BorderStyle extends Property { * the third element is a value for border-bottom-style, * the fourth element is a value for border-left-style. * + * @param propindex - the int property index. * @param foNode - the FONode being built * @param value PropertyValue returned by the parser * @return PropertyValue the verified value */ - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue value) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue value) throws PropertyException { - return refineParsing(foNode, value, NOT_NESTED); + return refineParsing(propindex, foNode, value, NOT_NESTED); } /** - * Do the work for the two argument refineParsing method. + * Do the work for the three argument refineParsing method. + * @param propindex - the int property index. * @param foNode - the FONode being built * @param value PropertyValue returned by the parser * @param nested boolean indicating whether this method is @@ -61,8 +63,8 @@ public class BorderStyle extends Property { * @return PropertyValue the verified value * @see #refineParsing(FONode,PropertyValue) */ - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue value, boolean nested) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue value, boolean nested) throws PropertyException { int type = value.getType(); @@ -71,7 +73,7 @@ public class BorderStyle extends Property { if (type == PropertyValue.INHERIT || type == PropertyValue.FROM_PARENT || type == PropertyValue.FROM_NEAREST_SPECIFIED) - return refineExpansionList(foNode, + return refineExpansionList(PropNames.BORDER_STYLE, foNode, ShorthandPropSets.expandAndCopySHand(value)); } if (type == PropertyValue.NCNAME) { @@ -85,8 +87,8 @@ public class BorderStyle extends Property { (((NCName)value).getNCName() + " not a border-style"); } - return refineExpansionList - (foNode, ShorthandPropSets.expandAndCopySHand(enum)); + return refineExpansionList(PropNames.BORDER_STYLE, foNode, + ShorthandPropSets.expandAndCopySHand(enum)); } else throw new PropertyException ("Invalid " + value.getClass().getName() + diff --git a/src/org/apache/fop/fo/properties/BorderTop.java b/src/org/apache/fop/fo/properties/BorderTop.java index 307249131..bcee52f98 100644 --- a/src/org/apache/fop/fo/properties/BorderTop.java +++ b/src/org/apache/fop/fo/properties/BorderTop.java @@ -30,15 +30,20 @@ public class BorderTop extends Property { * N.B. this is the order of elements defined in * ShorthandPropSets.borderRightExpansion * + * @param propindex - the int property index. * @param foNode - the FONode being built * @param value PropertyValue returned by the parser * @return PropertyValue the verified value */ - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue value) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue value) throws PropertyException { - return borderEdge(foNode, value, + int property = PropNames.BORDER_TOP; + if (property != propindex) // DEBUG + throw new PropertyException + ("Mismatch between propindex and BORDER_TOP."); + return borderEdge(property, foNode, value, PropNames.BORDER_TOP_STYLE, PropNames.BORDER_TOP_COLOR, PropNames.BORDER_TOP_WIDTH diff --git a/src/org/apache/fop/fo/properties/BorderTopColor.java b/src/org/apache/fop/fo/properties/BorderTopColor.java index a8ad7b2e0..2a878acf1 100644 --- a/src/org/apache/fop/fo/properties/BorderTopColor.java +++ b/src/org/apache/fop/fo/properties/BorderTopColor.java @@ -11,7 +11,7 @@ public class BorderTopColor extends ColorTransparent { public static final int traitMapping = DISAPPEARS; public static final int initialValueType = COLOR_IT; public static final int inherited = NO; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new ColorType (PropNames.BACKGROUND_COLOR, BLACK); diff --git a/src/org/apache/fop/fo/properties/BorderTopWidth.java b/src/org/apache/fop/fo/properties/BorderTopWidth.java index 47f91f01d..3002ce539 100644 --- a/src/org/apache/fop/fo/properties/BorderTopWidth.java +++ b/src/org/apache/fop/fo/properties/BorderTopWidth.java @@ -10,13 +10,13 @@ public class BorderTopWidth extends BorderCommonWidth { public static final int dataTypes = MAPPED_LENGTH | INHERIT; public static final int traitMapping = DISAPPEARS; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return getMappedLength(MEDIUM); } - public static Numeric getMappedLength(int enum) + public /*static*/ Numeric getMappedLength(int enum) throws PropertyException { return getMappedLength(PropNames.BORDER_TOP_WIDTH, enum); diff --git a/src/org/apache/fop/fo/properties/BorderWidth.java b/src/org/apache/fop/fo/properties/BorderWidth.java index 2126bceef..715f36b07 100644 --- a/src/org/apache/fop/fo/properties/BorderWidth.java +++ b/src/org/apache/fop/fo/properties/BorderWidth.java @@ -40,19 +40,21 @@ public class BorderWidth extends BorderCommonWidth { * the third element is a value for border-bottom-width, * the fourth element is a value for border-left-width. * + * @param propindex - the int property index. * @param foNode - the FONode being built * @param value PropertyValue returned by the parser * @return PropertyValue the verified value */ - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue value) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue value) throws PropertyException { - return refineParsing(foNode, value, NOT_NESTED); + return refineParsing(propindex, foNode, value, NOT_NESTED); } /** * Do the work for the two argument refineParsing method. + * @param propindex - the int property index. * @param foNode - the FONode being built * @param value PropertyValue returned by the parser * @param nested boolean indicating whether this method is @@ -61,8 +63,8 @@ public class BorderWidth extends BorderCommonWidth { * @return PropertyValue the verified value * @see #refineParsing(FONode,PropertyValue) */ - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue value, boolean nested) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue value, boolean nested) throws PropertyException { int type = value.getType(); @@ -71,7 +73,7 @@ public class BorderWidth extends BorderCommonWidth { if (type == PropertyValue.INHERIT || type == PropertyValue.FROM_PARENT || type == PropertyValue.FROM_NEAREST_SPECIFIED) - return refineExpansionList(foNode, + return refineExpansionList(PropNames.BORDER_WIDTH, foNode, ShorthandPropSets.expandAndCopySHand(value)); } if (type == PropertyValue.NCNAME) { @@ -92,8 +94,8 @@ public class BorderWidth extends BorderCommonWidth { } // Correct the property in the mapped Numeric mapped.setProperty(PropNames.BORDER_WIDTH); - return refineExpansionList - (foNode, ShorthandPropSets.expandAndCopySHand(mapped)); + return refineExpansionList(PropNames.BORDER_WIDTH, foNode, + ShorthandPropSets.expandAndCopySHand(mapped)); } else throw new PropertyException ("Invalid " + value.getClass().getName() + diff --git a/src/org/apache/fop/fo/properties/BreakCommon.java b/src/org/apache/fop/fo/properties/BreakCommon.java index fc5897d17..730da7e43 100644 --- a/src/org/apache/fop/fo/properties/BreakCommon.java +++ b/src/org/apache/fop/fo/properties/BreakCommon.java @@ -29,10 +29,10 @@ public class BreakCommon extends Property { } } - public /**/static/**/ int getEnumIndex(String enum) { + public /*static*/ int getEnumIndex(String enum) { return ((Integer)(rwEnumHash.get(enum))).intValue(); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } diff --git a/src/org/apache/fop/fo/properties/CaptionSide.java b/src/org/apache/fop/fo/properties/CaptionSide.java index 089c21ae4..6902e95b4 100644 --- a/src/org/apache/fop/fo/properties/CaptionSide.java +++ b/src/org/apache/fop/fo/properties/CaptionSide.java @@ -25,7 +25,7 @@ public class CaptionSide extends Property { public static final int LEFT = 7; public static final int RIGHT = 8; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType (PropNames.CAPTION_SIDE, BEFORE); @@ -53,10 +53,10 @@ public class CaptionSide extends Property { (Object) Ints.consts.get(i)); } } - public /**/static/**/ int getEnumIndex(String enum) { + public /*static*/ int getEnumIndex(String enum) { return ((Integer)(rwEnumHash.get(enum))).intValue(); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/Clear.java b/src/org/apache/fop/fo/properties/Clear.java index 13470220d..2e934f6d8 100644 --- a/src/org/apache/fop/fo/properties/Clear.java +++ b/src/org/apache/fop/fo/properties/Clear.java @@ -38,10 +38,10 @@ public class Clear extends Property { (Object) Ints.consts.get(i)); } } - public /**/static/**/ int getEnumIndex(String enum) { + public /*static*/ int getEnumIndex(String enum) { return ((Integer)(rwEnumHash.get(enum))).intValue(); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/Clip.java b/src/org/apache/fop/fo/properties/Clip.java index 17f6e82a2..1f47cedab 100644 --- a/src/org/apache/fop/fo/properties/Clip.java +++ b/src/org/apache/fop/fo/properties/Clip.java @@ -17,12 +17,13 @@ public class Clip extends Property { public static final int inherited = NO; /* + * @param propindex - the int property index. * @param foNode - the FONode being built * @param value PropertyValue returned by the parser * @return PropertyValue the verified value */ - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue value) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue value) throws PropertyException { int type = value.getType(); diff --git a/src/org/apache/fop/fo/properties/Color.java b/src/org/apache/fop/fo/properties/Color.java index 9188fc600..2cce60d69 100644 --- a/src/org/apache/fop/fo/properties/Color.java +++ b/src/org/apache/fop/fo/properties/Color.java @@ -11,7 +11,7 @@ public class Color extends ColorNonTransparent { public static final int traitMapping = RENDERING; public static final int initialValueType = COLOR_IT; public static final int inherited = COMPUTED; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new ColorType(PropNames.BACKGROUND_COLOR, BLACK); diff --git a/src/org/apache/fop/fo/properties/ColorNonTransparent.java b/src/org/apache/fop/fo/properties/ColorNonTransparent.java index 5f368d636..69e9ff449 100644 --- a/src/org/apache/fop/fo/properties/ColorNonTransparent.java +++ b/src/org/apache/fop/fo/properties/ColorNonTransparent.java @@ -25,10 +25,10 @@ public class ColorNonTransparent extends ColorCommon { } } - public /**/static/**/ int getEnumIndex(String enum) { + public /*static*/ int getEnumIndex(String enum) { return ((Integer)(rwEnumHash.get(enum))).intValue(); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } diff --git a/src/org/apache/fop/fo/properties/ColorTransparent.java b/src/org/apache/fop/fo/properties/ColorTransparent.java index afcc4d534..019b3759b 100644 --- a/src/org/apache/fop/fo/properties/ColorTransparent.java +++ b/src/org/apache/fop/fo/properties/ColorTransparent.java @@ -25,10 +25,10 @@ public class ColorTransparent extends ColorCommon { } } - public /**/static/**/ int getEnumIndex(String enum) { + public /*static*/ int getEnumIndex(String enum) { return ((Integer)(rwEnumHash.get(enum))).intValue(); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } diff --git a/src/org/apache/fop/fo/properties/ColumnCount.java b/src/org/apache/fop/fo/properties/ColumnCount.java index e93f8e6a2..cc9bb5ce2 100644 --- a/src/org/apache/fop/fo/properties/ColumnCount.java +++ b/src/org/apache/fop/fo/properties/ColumnCount.java @@ -10,7 +10,7 @@ public class ColumnCount extends Property { public static final int dataTypes = NUMBER | INHERIT; public static final int traitMapping = SPECIFICATION; public static final int initialValueType = NUMBER_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new Numeric(PropNames.COLUMN_COUNT, 1d); diff --git a/src/org/apache/fop/fo/properties/ColumnGap.java b/src/org/apache/fop/fo/properties/ColumnGap.java index c37f8fee6..5a750b51f 100644 --- a/src/org/apache/fop/fo/properties/ColumnGap.java +++ b/src/org/apache/fop/fo/properties/ColumnGap.java @@ -10,7 +10,7 @@ public class ColumnGap extends Property { public static final int dataTypes = PERCENTAGE | LENGTH | INHERIT; public static final int traitMapping = SPECIFICATION; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength (PropNames.COLUMN_GAP, 12.0d, Length.PT); diff --git a/src/org/apache/fop/fo/properties/Conditionality.java b/src/org/apache/fop/fo/properties/Conditionality.java index 3a4b86c7c..6b59cd626 100644 --- a/src/org/apache/fop/fo/properties/Conditionality.java +++ b/src/org/apache/fop/fo/properties/Conditionality.java @@ -14,10 +14,10 @@ public class Conditionality extends Property { ,"retain" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } diff --git a/src/org/apache/fop/fo/properties/ContentDimension.java b/src/org/apache/fop/fo/properties/ContentDimension.java index dc1122f8f..94e0eac0e 100644 --- a/src/org/apache/fop/fo/properties/ContentDimension.java +++ b/src/org/apache/fop/fo/properties/ContentDimension.java @@ -11,10 +11,10 @@ public class ContentDimension extends Property { ,"scale-to-fit" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } diff --git a/src/org/apache/fop/fo/properties/Cue.java b/src/org/apache/fop/fo/properties/Cue.java index 1b0901543..4fc09e1fd 100644 --- a/src/org/apache/fop/fo/properties/Cue.java +++ b/src/org/apache/fop/fo/properties/Cue.java @@ -32,12 +32,13 @@ public class Cue extends Property { * The first element is a value for cue-before, * the second element is a value for cue-after. * + * @param propindex - the int property index. * @param foNode - the FONode being built * @param value PropertyValue returned by the parser * @return PropertyValue the verified value */ - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue value) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue value) throws PropertyException { int type = value.getType(); @@ -46,8 +47,8 @@ public class Cue extends Property { type == PropertyValue.FROM_PARENT || type == PropertyValue.FROM_NEAREST_SPECIFIED || type == PropertyValue.URI_TYPE) - return refineExpansionList - (foNode, ShorthandPropSets.expandAndCopySHand(value)); + return refineExpansionList(PropNames.CUE, foNode, + ShorthandPropSets.expandAndCopySHand(value)); throw new PropertyException ("Invalid " + value.getClass().getName() + " object for cue"); diff --git a/src/org/apache/fop/fo/properties/DestinationPlacementOffset.java b/src/org/apache/fop/fo/properties/DestinationPlacementOffset.java index 5bad05344..2621a217a 100644 --- a/src/org/apache/fop/fo/properties/DestinationPlacementOffset.java +++ b/src/org/apache/fop/fo/properties/DestinationPlacementOffset.java @@ -10,7 +10,7 @@ public class DestinationPlacementOffset extends Property { public static final int dataTypes = LENGTH; public static final int traitMapping = ACTION; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength diff --git a/src/org/apache/fop/fo/properties/Direction.java b/src/org/apache/fop/fo/properties/Direction.java index 3f39dbaa1..73bda5403 100644 --- a/src/org/apache/fop/fo/properties/Direction.java +++ b/src/org/apache/fop/fo/properties/Direction.java @@ -13,7 +13,7 @@ public class Direction extends Property { public static final int initialValueType = ENUM_IT; public static final int LTR = 1; public static final int RTL = 2; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType(PropNames.DIRECTION, LTR); @@ -25,10 +25,10 @@ public class Direction extends Property { ,"ltr" ,"rtl" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/DisplayAlign.java b/src/org/apache/fop/fo/properties/DisplayAlign.java index de561f57d..2ad134992 100644 --- a/src/org/apache/fop/fo/properties/DisplayAlign.java +++ b/src/org/apache/fop/fo/properties/DisplayAlign.java @@ -19,10 +19,10 @@ public class DisplayAlign extends Property { ,"center" ,"after" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/DominantBaseline.java b/src/org/apache/fop/fo/properties/DominantBaseline.java index 97f7d7dc1..76afdf9ec 100644 --- a/src/org/apache/fop/fo/properties/DominantBaseline.java +++ b/src/org/apache/fop/fo/properties/DominantBaseline.java @@ -47,10 +47,10 @@ public class DominantBaseline extends Property { (Object) Ints.consts.get(i)); } } - public /**/static/**/ int getEnumIndex(String enum) { + public /*static*/ int getEnumIndex(String enum) { return ((Integer)(rwEnumHash.get(enum))).intValue(); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/EmptyCells.java b/src/org/apache/fop/fo/properties/EmptyCells.java index aa360ffc1..1e337a1c5 100644 --- a/src/org/apache/fop/fo/properties/EmptyCells.java +++ b/src/org/apache/fop/fo/properties/EmptyCells.java @@ -13,7 +13,7 @@ public class EmptyCells extends Property { public static final int initialValueType = ENUM_IT; public static final int SHOW = 1; public static final int HIDE = 2; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType (PropNames.EMPTY_CELLS, SHOW); @@ -25,10 +25,10 @@ public class EmptyCells extends Property { ,"show" ,"hide" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/EndIndent.java b/src/org/apache/fop/fo/properties/EndIndent.java index d7e5e3565..674894840 100644 --- a/src/org/apache/fop/fo/properties/EndIndent.java +++ b/src/org/apache/fop/fo/properties/EndIndent.java @@ -10,7 +10,7 @@ public class EndIndent extends Property { public static final int dataTypes = LENGTH | INHERIT; public static final int traitMapping = FORMATTING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength (PropNames.END_INDENT, 0.0d, Length.PT); diff --git a/src/org/apache/fop/fo/properties/EndsRow.java b/src/org/apache/fop/fo/properties/EndsRow.java index 85519e0f8..362faba2c 100644 --- a/src/org/apache/fop/fo/properties/EndsRow.java +++ b/src/org/apache/fop/fo/properties/EndsRow.java @@ -10,7 +10,7 @@ public class EndsRow extends Property { public static final int dataTypes = BOOL; public static final int traitMapping = FORMATTING; public static final int initialValueType = BOOL_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new Bool(PropNames.ENDS_ROW, false); diff --git a/src/org/apache/fop/fo/properties/Extent.java b/src/org/apache/fop/fo/properties/Extent.java index 98c3eafcf..65fa8ecf2 100644 --- a/src/org/apache/fop/fo/properties/Extent.java +++ b/src/org/apache/fop/fo/properties/Extent.java @@ -10,7 +10,7 @@ public class Extent extends Property { public static final int dataTypes = PERCENTAGE | LENGTH | INHERIT; public static final int traitMapping = SPECIFICATION; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength (PropNames.EXTENT, 0.0d, Length.PT); diff --git a/src/org/apache/fop/fo/properties/ExternalDestination.java b/src/org/apache/fop/fo/properties/ExternalDestination.java index 670f2204b..3ddce1a11 100644 --- a/src/org/apache/fop/fo/properties/ExternalDestination.java +++ b/src/org/apache/fop/fo/properties/ExternalDestination.java @@ -10,7 +10,7 @@ public class ExternalDestination extends Property { public static final int dataTypes = URI_SPECIFICATION; public static final int traitMapping = ACTION; public static final int initialValueType = URI_SPECIFICATION_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new UriType(PropNames.EXTERNAL_DESTINATION, ""); diff --git a/src/org/apache/fop/fo/properties/Float.java b/src/org/apache/fop/fo/properties/Float.java index 076c6b02b..a3db2b810 100644 --- a/src/org/apache/fop/fo/properties/Float.java +++ b/src/org/apache/fop/fo/properties/Float.java @@ -36,10 +36,10 @@ public class Float extends Property { (Object) Ints.consts.get(i)); } } - public /**/static/**/ int getEnumIndex(String enum) { + public /*static*/ int getEnumIndex(String enum) { return ((Integer)(rwEnumHash.get(enum))).intValue(); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/FlowName.java b/src/org/apache/fop/fo/properties/FlowName.java index f03b118fd..189a909e7 100644 --- a/src/org/apache/fop/fo/properties/FlowName.java +++ b/src/org/apache/fop/fo/properties/FlowName.java @@ -10,7 +10,7 @@ public class FlowName extends Property { public static final int dataTypes = NCNAME; public static final int traitMapping = REFERENCE; public static final int initialValueType = NCNAME_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new NCName(PropNames.FLOW_NAME, ""); diff --git a/src/org/apache/fop/fo/properties/Font.java b/src/org/apache/fop/fo/properties/Font.java index 5a5affc5f..5ea321897 100644 --- a/src/org/apache/fop/fo/properties/Font.java +++ b/src/org/apache/fop/fo/properties/Font.java @@ -16,6 +16,7 @@ import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.fo.expr.SystemFontFunction; import org.apache.fop.datatypes.PropertyValue; import org.apache.fop.fo.PropNames; +import org.apache.fop.fo.PropertyConsts; import org.apache.fop.fo.FONode; import org.apache.fop.fo.ShorthandPropSets; import org.apache.fop.fo.properties.Property; @@ -167,12 +168,13 @@ public class Font extends Property { *

The setup of the shorthand expansion list is determined by the * above considerations. * + * @param propindex - the int property index. * @param foNode - the FONode being built * @param value PropertyValue returned by the parser * @return PropertyValue the verified value */ - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue value) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue value) throws PropertyException { PropertyValueList startList = null; @@ -215,7 +217,7 @@ public class Font extends Property { } } - private /**/static/**/ PropertyValueList processValue + private /*static*/ PropertyValueList processValue (FONode foNode, PropertyValue value) throws PropertyException { @@ -226,8 +228,8 @@ public class Font extends Property { type == PropertyValue.FROM_PARENT || type == PropertyValue.FROM_NEAREST_SPECIFIED) { - return refineExpansionList - (foNode, ShorthandPropSets.expandAndCopySHand(value)); + return refineExpansionList(PropNames.FONT, foNode, + ShorthandPropSets.expandAndCopySHand(value)); } // else not Inherit/From../From.. FontFamilySet family = null; @@ -327,14 +329,13 @@ public class Font extends Property { // font-family begins at slash + 2 familyStart = slash + 2; fontsize = slash - 1; - // FIXME NOW !!!!!!! - size = (new FontSize()).refineParsing - (foNode, propvals[fontsize], IS_NESTED); + size = PropertyConsts.pconsts.refineParsing + (PropNames.FONT_SIZE, foNode, propvals[fontsize], IS_NESTED); // derive the line-height // line-height is at slash + 1 - // FIXME NOW !!!!!!! - height = (new LineHeight()).refineParsing - (foNode, propvals[slash + 1], IS_NESTED); + height = PropertyConsts.pconsts.refineParsing + (PropNames.LINE_HEIGHT, + foNode, propvals[slash + 1], IS_NESTED); } else { // Don''t know where slash is. If anything precedes the // font-family, it must be a font-size. Look for that. @@ -389,8 +390,9 @@ public class Font extends Property { // and that list is prepended to fontList. if (fontList.size() == 0 && familyStart == (propvals.length - 1)) { - fontset = (new FontFamily()).refineParsing - (foNode, propvals[familyStart], IS_NESTED); + fontset = PropertyConsts.pconsts.refineParsing + (PropNames.FONT_FAMILY, foNode, + propvals[familyStart], IS_NESTED); } else { // Must develop a list to prepend to fontList PropertyValueList tmpList = @@ -399,16 +401,18 @@ public class Font extends Property { tmpList.add(propvals[i]); fontList.addFirst(tmpList); // Get a FontFamilySet - fontset = (new FontFamily()).refineParsing - (foNode, fontList, IS_NESTED); + fontset = PropertyConsts.pconsts.refineParsing + (PropNames.FONT_FAMILY, foNode, + fontList, IS_NESTED); } // Only font-style font-variant and font-weight, in any order // remain as possibilities at the front of the expression for (int i = 0; i < fontsize; i++) { PropertyValue pv = null; try { - pv = (new FontStyle()).refineParsing - (foNode, propvals[i], IS_NESTED); + pv = PropertyConsts.pconsts.refineParsing + (PropNames.FONT_STYLE, foNode, + propvals[i], IS_NESTED); if (style != null) MessageHandler.log("font: duplicate" + "style overrides previous style"); @@ -417,8 +421,9 @@ public class Font extends Property { } catch(PropertyException e) {} try { - pv = (new FontVariant()).refineParsing - (foNode, propvals[i], IS_NESTED); + pv = PropertyConsts.pconsts.refineParsing + (PropNames.FONT_VARIANT, foNode, + propvals[i], IS_NESTED); if (variant != null) MessageHandler.log("font: duplicate" + "variant overrides previous variant"); @@ -427,8 +432,9 @@ public class Font extends Property { } catch(PropertyException e) {} try { - pv = (new FontWeight()).refineParsing - (foNode, propvals[i], IS_NESTED); + pv = PropertyConsts.pconsts.refineParsing + (PropNames.FONT_WEIGHT, foNode, + propvals[i], IS_NESTED); if (weight != null) MessageHandler.log("font: duplicate" + "weight overrides previous weight"); diff --git a/src/org/apache/fop/fo/properties/FontFamily.java b/src/org/apache/fop/fo/properties/FontFamily.java index 031018944..ab7ac0b71 100644 --- a/src/org/apache/fop/fo/properties/FontFamily.java +++ b/src/org/apache/fop/fo/properties/FontFamily.java @@ -44,8 +44,8 @@ public class FontFamily extends Property { } } - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue value) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue value) throws PropertyException { // There is no point in attempting to validate the enumeration @@ -61,14 +61,14 @@ public class FontFamily extends Property { // be at the top level, and any font family names // that contained spaces will be in PropertyValueLists. - return refineParsing(foNode, value, NOT_NESTED); + return refineParsing(propindex, foNode, value, NOT_NESTED); } - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue value, boolean nested) + public /*static*/ PropertyValue refineParsing + (int property, FONode foNode, PropertyValue value, boolean nested) throws PropertyException { - int property = value.getProperty(); + //int property = value.getProperty(); int type = value.getType(); // First, check that we have a list if (type != PropertyValue.LIST) { diff --git a/src/org/apache/fop/fo/properties/FontSelectionStrategy.java b/src/org/apache/fop/fo/properties/FontSelectionStrategy.java index 0fd7ba636..83e0038f4 100644 --- a/src/org/apache/fop/fo/properties/FontSelectionStrategy.java +++ b/src/org/apache/fop/fo/properties/FontSelectionStrategy.java @@ -15,10 +15,10 @@ public class FontSelectionStrategy extends Property { null ,"character-by-character" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/FontSize.java b/src/org/apache/fop/fo/properties/FontSize.java index 929c1fa25..51c8c6f33 100644 --- a/src/org/apache/fop/fo/properties/FontSize.java +++ b/src/org/apache/fop/fo/properties/FontSize.java @@ -31,9 +31,10 @@ public class FontSize extends Property { public static final int SMALLER = 9; // N.B. This foundational value MUST be an absolute length - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { + System.out.println("font-size initial size"); //DEBUG return getMappedLength(MEDIUM); } @@ -66,9 +67,11 @@ public class FontSize extends Property { ,0.83d // smaller }; - public static Numeric getMappedLength(int enum) + public /*static*/ Numeric getMappedLength(int enum) throws PropertyException { + System.out.println("font-size getMappedLength " + enum + " " + + mappedLengths[enum]); if (enum == LARGER || enum == SMALLER) return Ems.makeEms(PropNames.FONT_SIZE, mappedLengths[enum]); return diff --git a/src/org/apache/fop/fo/properties/FontStretch.java b/src/org/apache/fop/fo/properties/FontStretch.java index a8470a16e..e5ca712dd 100644 --- a/src/org/apache/fop/fo/properties/FontStretch.java +++ b/src/org/apache/fop/fo/properties/FontStretch.java @@ -28,7 +28,7 @@ public class FontStretch extends Property { public static final int EXTRA_EXPANDED = 10; public static final int ULTRA_EXPANDED = 11; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType (PropNames.FONT_STRETCH, NORMAL); @@ -58,10 +58,10 @@ public class FontStretch extends Property { (Object) Ints.consts.get(i)); } } - public /**/static/**/ int getEnumIndex(String enum) { + public /*static*/ int getEnumIndex(String enum) { return ((Integer)(rwEnumHash.get(enum))).intValue(); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/FontStyle.java b/src/org/apache/fop/fo/properties/FontStyle.java index 8f2c7775c..e44de8c15 100644 --- a/src/org/apache/fop/fo/properties/FontStyle.java +++ b/src/org/apache/fop/fo/properties/FontStyle.java @@ -15,7 +15,7 @@ public class FontStyle extends Property { public static final int ITALIC = 2; public static final int OBLIQUE = 3; public static final int BACKSLANT = 4; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType (PropNames.FONT_STYLE, NORMAL); @@ -30,10 +30,10 @@ public class FontStyle extends Property { ,"oblique" ,"backslant" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/FontVariant.java b/src/org/apache/fop/fo/properties/FontVariant.java index 4be6780a1..3bce390c2 100644 --- a/src/org/apache/fop/fo/properties/FontVariant.java +++ b/src/org/apache/fop/fo/properties/FontVariant.java @@ -13,7 +13,7 @@ public class FontVariant extends Property { public static final int initialValueType = ENUM_IT; public static final int NORMAL = 1; public static final int SMALL_CAPS = 2; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType (PropNames.FONT_VARIANT, NORMAL); @@ -25,10 +25,10 @@ public class FontVariant extends Property { ,"normal" ,"small-caps" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/FontWeight.java b/src/org/apache/fop/fo/properties/FontWeight.java index 1d3ee6df9..b1f5ffb3c 100644 --- a/src/org/apache/fop/fo/properties/FontWeight.java +++ b/src/org/apache/fop/fo/properties/FontWeight.java @@ -17,7 +17,7 @@ public class FontWeight extends Property { public static final int BOLDER = 3; public static final int LIGHTER = 4; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new IntegerType(PropNames.FONT_WEIGHT, 400); @@ -34,19 +34,21 @@ public class FontWeight extends Property { }; /* + * @param propindex - the int property index. * @param foNode - the FONode being built * @param value PropertyValue returned by the parser * @return PropertyValue the verified value */ - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue value) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue value) throws PropertyException { - return refineParsing(foNode, value, NOT_NESTED); + return refineParsing(propindex, foNode, value, NOT_NESTED); } /** - * Do the work for the two argument refineParsing method. + * Do the work for the three argument refineParsing method. + * @param propindex - the int property index. * @param foNode - the FONode being built * @param value PropertyValue returned by the parser * @param nested boolean indicating whether this method is @@ -55,13 +57,14 @@ public class FontWeight extends Property { * @return PropertyValue the verified value * @see #refineParsing(FONode,PropertyValue) */ - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue value, boolean nested) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue value, boolean nested) throws PropertyException { // Override the shadowed method to ensure that Integer values // are limited to the valid numbers - PropertyValue fw = Property.refineParsing(foNode, value, nested); + PropertyValue fw = + super.refineParsing(propindex, foNode, value, nested); // If the result is an IntegerType, restrict the values if (fw instanceof IntegerType) { int weight = ((IntegerType)fw).getInt(); @@ -71,10 +74,10 @@ public class FontWeight extends Property { } return fw; } - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/ForcePageCount.java b/src/org/apache/fop/fo/properties/ForcePageCount.java index 40c1c334c..5b7b565fd 100644 --- a/src/org/apache/fop/fo/properties/ForcePageCount.java +++ b/src/org/apache/fop/fo/properties/ForcePageCount.java @@ -37,10 +37,10 @@ public class ForcePageCount extends Property { (Object) Ints.consts.get(i)); } } - public /**/static/**/ int getEnumIndex(String enum) { + public /*static*/ int getEnumIndex(String enum) { return ((Integer)(rwEnumHash.get(enum))).intValue(); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/Format.java b/src/org/apache/fop/fo/properties/Format.java index a35281b9c..ea6a4938a 100644 --- a/src/org/apache/fop/fo/properties/Format.java +++ b/src/org/apache/fop/fo/properties/Format.java @@ -10,7 +10,7 @@ public class Format extends Property { public static final int dataTypes = STRING; public static final int traitMapping = FORMATTING; public static final int initialValueType = LITERAL_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new Literal(PropNames.FORMAT, "1"); diff --git a/src/org/apache/fop/fo/properties/GlyphOrientationHorizontal.java b/src/org/apache/fop/fo/properties/GlyphOrientationHorizontal.java index a65695781..d0525fe67 100644 --- a/src/org/apache/fop/fo/properties/GlyphOrientationHorizontal.java +++ b/src/org/apache/fop/fo/properties/GlyphOrientationHorizontal.java @@ -10,7 +10,7 @@ public class GlyphOrientationHorizontal extends Property { public static final int dataTypes = ANGLE | INHERIT; public static final int traitMapping = FORMATTING; public static final int initialValueType = ANGLE_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new Angle diff --git a/src/org/apache/fop/fo/properties/Hyphenate.java b/src/org/apache/fop/fo/properties/Hyphenate.java index 3f5204a1b..db9dcd900 100644 --- a/src/org/apache/fop/fo/properties/Hyphenate.java +++ b/src/org/apache/fop/fo/properties/Hyphenate.java @@ -10,7 +10,7 @@ public class Hyphenate extends Property { public static final int dataTypes = BOOL | INHERIT; public static final int traitMapping = FORMATTING; public static final int initialValueType = BOOL_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new Bool(PropNames.HYPHENATE, false); diff --git a/src/org/apache/fop/fo/properties/HyphenationCharacter.java b/src/org/apache/fop/fo/properties/HyphenationCharacter.java index 1444ed5ae..b6a9fa44d 100644 --- a/src/org/apache/fop/fo/properties/HyphenationCharacter.java +++ b/src/org/apache/fop/fo/properties/HyphenationCharacter.java @@ -10,7 +10,7 @@ public class HyphenationCharacter extends Property { public static final int dataTypes = CHARACTER_T | INHERIT; public static final int traitMapping = FORMATTING; public static final int initialValueType = LITERAL_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new Literal(PropNames.HYPHENATION_CHARACTER, "\u2010"); diff --git a/src/org/apache/fop/fo/properties/HyphenationKeep.java b/src/org/apache/fop/fo/properties/HyphenationKeep.java index 5eac123b7..91dd8a2a4 100644 --- a/src/org/apache/fop/fo/properties/HyphenationKeep.java +++ b/src/org/apache/fop/fo/properties/HyphenationKeep.java @@ -17,10 +17,10 @@ public class HyphenationKeep extends Property { ,"column" ,"page" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/HyphenationLadderCount.java b/src/org/apache/fop/fo/properties/HyphenationLadderCount.java index 4decfc673..882a3e726 100644 --- a/src/org/apache/fop/fo/properties/HyphenationLadderCount.java +++ b/src/org/apache/fop/fo/properties/HyphenationLadderCount.java @@ -12,7 +12,7 @@ public class HyphenationLadderCount extends Property { public static final int traitMapping = FORMATTING; public static final int initialValueType = ENUM_IT; public static final int NO_LIMIT = 1; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType (PropNames.HYPHENATION_LADDER_COUNT, NO_LIMIT); @@ -23,10 +23,10 @@ public class HyphenationLadderCount extends Property { null ,"no-limit" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/HyphenationPushCharacterCount.java b/src/org/apache/fop/fo/properties/HyphenationPushCharacterCount.java index 87373729a..8633b056f 100644 --- a/src/org/apache/fop/fo/properties/HyphenationPushCharacterCount.java +++ b/src/org/apache/fop/fo/properties/HyphenationPushCharacterCount.java @@ -10,7 +10,7 @@ public class HyphenationPushCharacterCount extends Property { public static final int dataTypes = NUMBER | INHERIT; public static final int traitMapping = FORMATTING; public static final int initialValueType = NUMBER_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new Numeric (PropNames.HYPHENATION_PUSH_CHARACTER_COUNT, 2d); diff --git a/src/org/apache/fop/fo/properties/HyphenationRemainCharacterCount.java b/src/org/apache/fop/fo/properties/HyphenationRemainCharacterCount.java index a0f5c0710..0bcf1571d 100644 --- a/src/org/apache/fop/fo/properties/HyphenationRemainCharacterCount.java +++ b/src/org/apache/fop/fo/properties/HyphenationRemainCharacterCount.java @@ -10,7 +10,7 @@ public class HyphenationRemainCharacterCount extends Property { public static final int dataTypes = NUMBER | INHERIT; public static final int traitMapping = FORMATTING; public static final int initialValueType = NUMBER_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new Numeric (PropNames.HYPHENATION_REMAIN_CHARACTER_COUNT, 2d); diff --git a/src/org/apache/fop/fo/properties/IndicateDestination.java b/src/org/apache/fop/fo/properties/IndicateDestination.java index e82a3f39a..807a042ec 100644 --- a/src/org/apache/fop/fo/properties/IndicateDestination.java +++ b/src/org/apache/fop/fo/properties/IndicateDestination.java @@ -10,7 +10,7 @@ public class IndicateDestination extends Property { public static final int dataTypes = BOOL; public static final int traitMapping = ACTION; public static final int initialValueType = BOOL_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new Bool(PropNames.INDICATE_DESTINATION, false); diff --git a/src/org/apache/fop/fo/properties/InitialPageNumber.java b/src/org/apache/fop/fo/properties/InitialPageNumber.java index 7874dd08e..02fd17aee 100644 --- a/src/org/apache/fop/fo/properties/InitialPageNumber.java +++ b/src/org/apache/fop/fo/properties/InitialPageNumber.java @@ -17,10 +17,10 @@ public class InitialPageNumber extends Property { ,"auto-odd" ,"auto-even" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/InternalDestination.java b/src/org/apache/fop/fo/properties/InternalDestination.java index 989915c1e..0af129ed8 100644 --- a/src/org/apache/fop/fo/properties/InternalDestination.java +++ b/src/org/apache/fop/fo/properties/InternalDestination.java @@ -10,7 +10,7 @@ public class InternalDestination extends Property { public static final int dataTypes = LITERAL | NCNAME; public static final int traitMapping = ACTION; public static final int initialValueType = LITERAL_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new Literal(PropNames.INTERNAL_DESTINATION, ""); diff --git a/src/org/apache/fop/fo/properties/IntrusionDisplace.java b/src/org/apache/fop/fo/properties/IntrusionDisplace.java index 5cc575626..317d2a17a 100644 --- a/src/org/apache/fop/fo/properties/IntrusionDisplace.java +++ b/src/org/apache/fop/fo/properties/IntrusionDisplace.java @@ -19,10 +19,10 @@ public class IntrusionDisplace extends Property { ,"indent" ,"block" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/Keep.java b/src/org/apache/fop/fo/properties/Keep.java index 21478eda5..1cf2bf819 100644 --- a/src/org/apache/fop/fo/properties/Keep.java +++ b/src/org/apache/fop/fo/properties/Keep.java @@ -10,10 +10,10 @@ public class Keep extends Property { ,"always" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/LastLineEndIndent.java b/src/org/apache/fop/fo/properties/LastLineEndIndent.java index 51b9fadf3..eeebce1ec 100644 --- a/src/org/apache/fop/fo/properties/LastLineEndIndent.java +++ b/src/org/apache/fop/fo/properties/LastLineEndIndent.java @@ -10,7 +10,7 @@ public class LastLineEndIndent extends Property { public static final int dataTypes = PERCENTAGE | LENGTH | INHERIT; public static final int traitMapping = FORMATTING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength diff --git a/src/org/apache/fop/fo/properties/LeaderAlignment.java b/src/org/apache/fop/fo/properties/LeaderAlignment.java index 7542a3ec7..d5f896b87 100644 --- a/src/org/apache/fop/fo/properties/LeaderAlignment.java +++ b/src/org/apache/fop/fo/properties/LeaderAlignment.java @@ -17,10 +17,10 @@ public class LeaderAlignment extends Property { ,"reference-area" ,"page" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/LeaderLengthMaximum.java b/src/org/apache/fop/fo/properties/LeaderLengthMaximum.java index 464ac0696..70b149d14 100644 --- a/src/org/apache/fop/fo/properties/LeaderLengthMaximum.java +++ b/src/org/apache/fop/fo/properties/LeaderLengthMaximum.java @@ -10,7 +10,7 @@ public class LeaderLengthMaximum extends Property { public static final int dataTypes = LENGTH | PERCENTAGE; public static final int traitMapping = FORMATTING; public static final int initialValueType = PERCENTAGE_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Percentage.makePercentage diff --git a/src/org/apache/fop/fo/properties/LeaderLengthMinimum.java b/src/org/apache/fop/fo/properties/LeaderLengthMinimum.java index 2ec00d73b..dad16fee9 100644 --- a/src/org/apache/fop/fo/properties/LeaderLengthMinimum.java +++ b/src/org/apache/fop/fo/properties/LeaderLengthMinimum.java @@ -10,7 +10,7 @@ public class LeaderLengthMinimum extends Property { public static final int dataTypes = LENGTH | PERCENTAGE; public static final int traitMapping = FORMATTING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength(PropNames.LEADER_LENGTH_MINIMUM, diff --git a/src/org/apache/fop/fo/properties/LeaderLengthOptimum.java b/src/org/apache/fop/fo/properties/LeaderLengthOptimum.java index b0ac48893..eae5e16c0 100644 --- a/src/org/apache/fop/fo/properties/LeaderLengthOptimum.java +++ b/src/org/apache/fop/fo/properties/LeaderLengthOptimum.java @@ -10,7 +10,7 @@ public class LeaderLengthOptimum extends Property { public static final int dataTypes = LENGTH | PERCENTAGE; public static final int traitMapping = FORMATTING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength(PropNames.LEADER_LENGTH_OPTIMUM, diff --git a/src/org/apache/fop/fo/properties/LeaderPattern.java b/src/org/apache/fop/fo/properties/LeaderPattern.java index 232b1a958..ba0bb7180 100644 --- a/src/org/apache/fop/fo/properties/LeaderPattern.java +++ b/src/org/apache/fop/fo/properties/LeaderPattern.java @@ -15,7 +15,7 @@ public class LeaderPattern extends Property { public static final int RULE = 2; public static final int DOTS = 3; public static final int USE_CONTENT = 4; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType (PropNames.LEADER_PATTERN, SPACE); @@ -29,10 +29,10 @@ public class LeaderPattern extends Property { ,"dots" ,"use-content" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/LeaderPatternWidth.java b/src/org/apache/fop/fo/properties/LeaderPatternWidth.java index 04ce747cc..3920d6b3a 100644 --- a/src/org/apache/fop/fo/properties/LeaderPatternWidth.java +++ b/src/org/apache/fop/fo/properties/LeaderPatternWidth.java @@ -12,7 +12,7 @@ public class LeaderPatternWidth extends Property { public static final int traitMapping = FORMATTING; public static final int initialValueType = ENUM_IT; public static final int USE_FONT_METRICS = 1; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType @@ -24,10 +24,10 @@ public class LeaderPatternWidth extends Property { null ,"use-font-metrics" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/LetterSpacing.java b/src/org/apache/fop/fo/properties/LetterSpacing.java index ed333bd17..1e7e1c990 100644 --- a/src/org/apache/fop/fo/properties/LetterSpacing.java +++ b/src/org/apache/fop/fo/properties/LetterSpacing.java @@ -12,7 +12,7 @@ public class LetterSpacing extends Property { public static final int traitMapping = DISAPPEARS; public static final int initialValueType = LENGTH_IT; public static final int NORMAL = 1; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength(PropNames.LETTER_SPACING, 0d, Length.PT); @@ -23,10 +23,10 @@ public class LetterSpacing extends Property { null ,"normal" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/LetterSpacingConditionality.java b/src/org/apache/fop/fo/properties/LetterSpacingConditionality.java index b2a728c2b..6d9e0128c 100644 --- a/src/org/apache/fop/fo/properties/LetterSpacingConditionality.java +++ b/src/org/apache/fop/fo/properties/LetterSpacingConditionality.java @@ -10,7 +10,7 @@ public class LetterSpacingConditionality extends Conditionality { public static final int dataTypes = ENUM; public static final int traitMapping = FORMATTING; public static final int initialValueType = ENUM_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType(PropNames.LETTER_SPACING_CONDITIONALITY, DISCARD); diff --git a/src/org/apache/fop/fo/properties/LetterSpacingMaximum.java b/src/org/apache/fop/fo/properties/LetterSpacingMaximum.java index 4b8921e7d..cd1224218 100644 --- a/src/org/apache/fop/fo/properties/LetterSpacingMaximum.java +++ b/src/org/apache/fop/fo/properties/LetterSpacingMaximum.java @@ -11,7 +11,7 @@ public class LetterSpacingMaximum extends Property { public static final int traitMapping = DISAPPEARS; public static final int initialValueType = LENGTH_IT; public static final int NORMAL = 1; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength diff --git a/src/org/apache/fop/fo/properties/LetterSpacingMinimum.java b/src/org/apache/fop/fo/properties/LetterSpacingMinimum.java index eac665cc6..c775fe662 100644 --- a/src/org/apache/fop/fo/properties/LetterSpacingMinimum.java +++ b/src/org/apache/fop/fo/properties/LetterSpacingMinimum.java @@ -11,7 +11,7 @@ public class LetterSpacingMinimum extends Property { public static final int traitMapping = DISAPPEARS; public static final int initialValueType = LENGTH_IT; public static final int NORMAL = 1; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength diff --git a/src/org/apache/fop/fo/properties/LetterSpacingOptimum.java b/src/org/apache/fop/fo/properties/LetterSpacingOptimum.java index aa2cee603..e00d77e69 100644 --- a/src/org/apache/fop/fo/properties/LetterSpacingOptimum.java +++ b/src/org/apache/fop/fo/properties/LetterSpacingOptimum.java @@ -11,7 +11,7 @@ public class LetterSpacingOptimum extends Property { public static final int traitMapping = DISAPPEARS; public static final int initialValueType = LENGTH_IT; public static final int NORMAL = 1; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength diff --git a/src/org/apache/fop/fo/properties/LetterSpacingPrecedence.java b/src/org/apache/fop/fo/properties/LetterSpacingPrecedence.java index afd37bac6..fb4c17050 100644 --- a/src/org/apache/fop/fo/properties/LetterSpacingPrecedence.java +++ b/src/org/apache/fop/fo/properties/LetterSpacingPrecedence.java @@ -10,7 +10,7 @@ public class LetterSpacingPrecedence extends PrecedenceCommon { public static final int dataTypes = INTEGER | ENUM; public static final int traitMapping = FORMATTING; public static final int initialValueType = ENUM_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType diff --git a/src/org/apache/fop/fo/properties/LetterValue.java b/src/org/apache/fop/fo/properties/LetterValue.java index 7292b26d1..e3312edeb 100644 --- a/src/org/apache/fop/fo/properties/LetterValue.java +++ b/src/org/apache/fop/fo/properties/LetterValue.java @@ -17,10 +17,10 @@ public class LetterValue extends Property { ,"alphabetic" ,"traditional" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/LineHeight.java b/src/org/apache/fop/fo/properties/LineHeight.java index 7734ab8b2..e3d8f81b5 100644 --- a/src/org/apache/fop/fo/properties/LineHeight.java +++ b/src/org/apache/fop/fo/properties/LineHeight.java @@ -20,7 +20,7 @@ public class LineHeight extends Property { ,"normal" }; - public static Numeric getMappedLength(int enum) + public /*static*/ Numeric getMappedLength(int enum) throws PropertyException { if (enum != NORMAL) diff --git a/src/org/apache/fop/fo/properties/LineHeightConditionality.java b/src/org/apache/fop/fo/properties/LineHeightConditionality.java index 101eb2555..41f0a55ef 100644 --- a/src/org/apache/fop/fo/properties/LineHeightConditionality.java +++ b/src/org/apache/fop/fo/properties/LineHeightConditionality.java @@ -10,7 +10,7 @@ public class LineHeightConditionality extends Conditionality { public static final int dataTypes = ENUM; public static final int traitMapping = FORMATTING; public static final int initialValueType = ENUM_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType(PropNames.LINE_HEIGHT_CONDITIONALITY, DISCARD); diff --git a/src/org/apache/fop/fo/properties/LineHeightMaximum.java b/src/org/apache/fop/fo/properties/LineHeightMaximum.java index d1fe1d9d0..b6915dcb5 100644 --- a/src/org/apache/fop/fo/properties/LineHeightMaximum.java +++ b/src/org/apache/fop/fo/properties/LineHeightMaximum.java @@ -10,7 +10,7 @@ public class LineHeightMaximum extends Property { public static final int dataTypes = LENGTH | PERCENTAGE; public static final int traitMapping = FORMATTING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Ems.makeEms(PropNames.LINE_HEIGHT_MAXIMUM, 1.2d); diff --git a/src/org/apache/fop/fo/properties/LineHeightMinimum.java b/src/org/apache/fop/fo/properties/LineHeightMinimum.java index 6820fc319..eb08507dc 100644 --- a/src/org/apache/fop/fo/properties/LineHeightMinimum.java +++ b/src/org/apache/fop/fo/properties/LineHeightMinimum.java @@ -10,7 +10,7 @@ public class LineHeightMinimum extends Property { public static final int dataTypes = LENGTH | PERCENTAGE; public static final int traitMapping = FORMATTING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Ems.makeEms(PropNames.LINE_HEIGHT_MINIMUM, 1.2d); diff --git a/src/org/apache/fop/fo/properties/LineHeightOptimum.java b/src/org/apache/fop/fo/properties/LineHeightOptimum.java index 26fa8a1f0..eeb888908 100644 --- a/src/org/apache/fop/fo/properties/LineHeightOptimum.java +++ b/src/org/apache/fop/fo/properties/LineHeightOptimum.java @@ -10,7 +10,7 @@ public class LineHeightOptimum extends Property { public static final int dataTypes = LENGTH | PERCENTAGE; public static final int traitMapping = FORMATTING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Ems.makeEms(PropNames.LINE_HEIGHT_OPTIMUM, 1.2d); diff --git a/src/org/apache/fop/fo/properties/LineHeightPrecedence.java b/src/org/apache/fop/fo/properties/LineHeightPrecedence.java index a9cb1db7a..d7330a739 100644 --- a/src/org/apache/fop/fo/properties/LineHeightPrecedence.java +++ b/src/org/apache/fop/fo/properties/LineHeightPrecedence.java @@ -10,7 +10,7 @@ public class LineHeightPrecedence extends PrecedenceCommon { public static final int dataTypes = INTEGER | ENUM; public static final int traitMapping = FORMATTING; public static final int initialValueType = ENUM_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType diff --git a/src/org/apache/fop/fo/properties/LineHeightShiftAdjustment.java b/src/org/apache/fop/fo/properties/LineHeightShiftAdjustment.java index 8cf30c44c..8898378f8 100644 --- a/src/org/apache/fop/fo/properties/LineHeightShiftAdjustment.java +++ b/src/org/apache/fop/fo/properties/LineHeightShiftAdjustment.java @@ -13,7 +13,7 @@ public class LineHeightShiftAdjustment extends Property { public static final int initialValueType = ENUM_IT; public static final int CONSIDER_SHIFTS = 1; public static final int DISREGARD_SHIFTS = 2; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType @@ -26,10 +26,10 @@ public class LineHeightShiftAdjustment extends Property { ,"consider-shifts" ,"disregard-shifts" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/LineStackingStrategy.java b/src/org/apache/fop/fo/properties/LineStackingStrategy.java index ebfb414b7..4105e635b 100644 --- a/src/org/apache/fop/fo/properties/LineStackingStrategy.java +++ b/src/org/apache/fop/fo/properties/LineStackingStrategy.java @@ -14,7 +14,7 @@ public class LineStackingStrategy extends Property { public static final int LINE_HEIGHT = 1; public static final int FONT_HEIGHT = 2; public static final int MAX_HEIGHT = 3; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType @@ -28,10 +28,10 @@ public class LineStackingStrategy extends Property { ,"font-height" ,"max-height" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/LinefeedTreatment.java b/src/org/apache/fop/fo/properties/LinefeedTreatment.java index d6d8699c7..88070caef 100644 --- a/src/org/apache/fop/fo/properties/LinefeedTreatment.java +++ b/src/org/apache/fop/fo/properties/LinefeedTreatment.java @@ -15,7 +15,7 @@ public class LinefeedTreatment extends Property { public static final int PRESERVE = 2; public static final int TREAT_AS_SPACE = 3; public static final int TREAT_AS_ZERO_WIDTH_SPACE = 4; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType(PropNames.LINEFEED_TREATMENT, TREAT_AS_SPACE); @@ -29,10 +29,10 @@ public class LinefeedTreatment extends Property { ,"treat-as-space" ,"treat-as-zero-width-space" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/Margin.java b/src/org/apache/fop/fo/properties/Margin.java index b01f16a2a..cb7557a49 100644 --- a/src/org/apache/fop/fo/properties/Margin.java +++ b/src/org/apache/fop/fo/properties/Margin.java @@ -43,12 +43,13 @@ public class Margin extends Property { * the third element is a value for margin-bottom, * the fourth element is a value for margin-left. * + * @param propindex - the int property index. * @param foNode - the FONode being built * @param value PropertyValue returned by the parser * @return PropertyValue the verified value */ - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue value) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue value) throws PropertyException { if ( ! (value instanceof PropertyValueList)) { @@ -56,12 +57,12 @@ public class Margin extends Property { || value instanceof FromParent || value instanceof FromNearestSpecified ) - return refineExpansionList - (foNode, ShorthandPropSets.expandAndCopySHand(value)); + return refineExpansionList(PropNames.MARGIN, foNode, + ShorthandPropSets.expandAndCopySHand(value)); // N.B. Does this require further refinement? // Where is Auto expanded? - return refineExpansionList - (foNode, ShorthandPropSets.expandAndCopySHand + return refineExpansionList(PropNames.MARGIN, foNode, + ShorthandPropSets.expandAndCopySHand (autoOrDistance(value))); } else { PropertyValueList list = diff --git a/src/org/apache/fop/fo/properties/MarginBottom.java b/src/org/apache/fop/fo/properties/MarginBottom.java index 4c5ee50db..4c0dd7764 100644 --- a/src/org/apache/fop/fo/properties/MarginBottom.java +++ b/src/org/apache/fop/fo/properties/MarginBottom.java @@ -11,7 +11,7 @@ public class MarginBottom extends Property { PERCENTAGE | LENGTH | AUTO | INHERIT; public static final int traitMapping = DISAPPEARS; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength(PropNames.MARGIN_BOTTOM, 0.0d, Length.PT); diff --git a/src/org/apache/fop/fo/properties/MarginLeft.java b/src/org/apache/fop/fo/properties/MarginLeft.java index 990e73181..06e7905ce 100644 --- a/src/org/apache/fop/fo/properties/MarginLeft.java +++ b/src/org/apache/fop/fo/properties/MarginLeft.java @@ -11,7 +11,7 @@ public class MarginLeft extends Property { PERCENTAGE | LENGTH | AUTO | INHERIT; public static final int traitMapping = DISAPPEARS; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength (PropNames.MARGIN_LEFT, 0.0d, Length.PT); diff --git a/src/org/apache/fop/fo/properties/MarginRight.java b/src/org/apache/fop/fo/properties/MarginRight.java index a6e858409..f58215cdb 100644 --- a/src/org/apache/fop/fo/properties/MarginRight.java +++ b/src/org/apache/fop/fo/properties/MarginRight.java @@ -11,7 +11,7 @@ public class MarginRight extends Property { PERCENTAGE | LENGTH | AUTO | INHERIT; public static final int traitMapping = DISAPPEARS; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength (PropNames.MARGIN_RIGHT, 0.0d, Length.PT); diff --git a/src/org/apache/fop/fo/properties/MarginTop.java b/src/org/apache/fop/fo/properties/MarginTop.java index ccb488ef6..b6389142e 100644 --- a/src/org/apache/fop/fo/properties/MarginTop.java +++ b/src/org/apache/fop/fo/properties/MarginTop.java @@ -11,7 +11,7 @@ public class MarginTop extends Property { PERCENTAGE | LENGTH | AUTO | INHERIT; public static final int traitMapping = DISAPPEARS; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength (PropNames.MARGIN_TOP, 0.0d, Length.PT); diff --git a/src/org/apache/fop/fo/properties/MarkerClassName.java b/src/org/apache/fop/fo/properties/MarkerClassName.java index 561529584..73968234a 100644 --- a/src/org/apache/fop/fo/properties/MarkerClassName.java +++ b/src/org/apache/fop/fo/properties/MarkerClassName.java @@ -10,7 +10,7 @@ public class MarkerClassName extends Property { public static final int dataTypes = NCNAME; public static final int traitMapping = FORMATTING; public static final int initialValueType = NCNAME_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new NCName(PropNames.MARKER_CLASS_NAME, ""); diff --git a/src/org/apache/fop/fo/properties/MasterName.java b/src/org/apache/fop/fo/properties/MasterName.java index 84dfdcefa..037315873 100644 --- a/src/org/apache/fop/fo/properties/MasterName.java +++ b/src/org/apache/fop/fo/properties/MasterName.java @@ -10,7 +10,7 @@ public class MasterName extends Property { public static final int dataTypes = NCNAME; public static final int traitMapping = SPECIFICATION; public static final int initialValueType = NCNAME_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new NCName(PropNames.MASTER_NAME, ""); diff --git a/src/org/apache/fop/fo/properties/MasterReference.java b/src/org/apache/fop/fo/properties/MasterReference.java index 27f6c8e4e..adf09bb84 100644 --- a/src/org/apache/fop/fo/properties/MasterReference.java +++ b/src/org/apache/fop/fo/properties/MasterReference.java @@ -10,7 +10,7 @@ public class MasterReference extends Property { public static final int dataTypes = NCNAME; public static final int traitMapping = SPECIFICATION; public static final int initialValueType = NCNAME_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new NCName(PropNames.MASTER_REFERENCE, ""); diff --git a/src/org/apache/fop/fo/properties/MaxHeight.java b/src/org/apache/fop/fo/properties/MaxHeight.java index 2136f0801..f06f3e68b 100644 --- a/src/org/apache/fop/fo/properties/MaxHeight.java +++ b/src/org/apache/fop/fo/properties/MaxHeight.java @@ -11,7 +11,7 @@ public class MaxHeight extends Property { PERCENTAGE | LENGTH | NONE | INHERIT; public static final int traitMapping = SHORTHAND_MAP; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength (PropNames.MAX_HEIGHT, 0.0d, Length.PT); diff --git a/src/org/apache/fop/fo/properties/MaximumRepeats.java b/src/org/apache/fop/fo/properties/MaximumRepeats.java index 627974346..253e43a95 100644 --- a/src/org/apache/fop/fo/properties/MaximumRepeats.java +++ b/src/org/apache/fop/fo/properties/MaximumRepeats.java @@ -12,7 +12,7 @@ public class MaximumRepeats extends Property { public static final int traitMapping = SPECIFICATION; public static final int initialValueType = ENUM_IT; public static final int NO_LIMIT = 1; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType (PropNames.MAXIMUM_REPEATS, NO_LIMIT); @@ -23,10 +23,10 @@ public class MaximumRepeats extends Property { null ,"no-limit" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/MediaUsage.java b/src/org/apache/fop/fo/properties/MediaUsage.java index d23168cdc..860173330 100644 --- a/src/org/apache/fop/fo/properties/MediaUsage.java +++ b/src/org/apache/fop/fo/properties/MediaUsage.java @@ -19,10 +19,10 @@ public class MediaUsage extends Property { ,"bounded-in-one-dimension" ,"unbounded" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/MinHeight.java b/src/org/apache/fop/fo/properties/MinHeight.java index 3e13cb0fb..18a887bef 100644 --- a/src/org/apache/fop/fo/properties/MinHeight.java +++ b/src/org/apache/fop/fo/properties/MinHeight.java @@ -10,7 +10,7 @@ public class MinHeight extends Property { public static final int dataTypes = PERCENTAGE | LENGTH | INHERIT; public static final int traitMapping = SHORTHAND_MAP; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength (PropNames.MIN_HEIGHT, 0.0d, Length.PT); diff --git a/src/org/apache/fop/fo/properties/NumberColumnsRepeated.java b/src/org/apache/fop/fo/properties/NumberColumnsRepeated.java index 0c09f6167..24dbb222d 100644 --- a/src/org/apache/fop/fo/properties/NumberColumnsRepeated.java +++ b/src/org/apache/fop/fo/properties/NumberColumnsRepeated.java @@ -10,7 +10,7 @@ public class NumberColumnsRepeated extends Property { public static final int dataTypes = NUMBER; public static final int traitMapping = SPECIFICATION; public static final int initialValueType = NUMBER_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new Numeric (PropNames.NUMBER_COLUMNS_REPEATED, 1d); diff --git a/src/org/apache/fop/fo/properties/NumberColumnsSpanned.java b/src/org/apache/fop/fo/properties/NumberColumnsSpanned.java index f27a093e6..443aa1fa1 100644 --- a/src/org/apache/fop/fo/properties/NumberColumnsSpanned.java +++ b/src/org/apache/fop/fo/properties/NumberColumnsSpanned.java @@ -10,7 +10,7 @@ public class NumberColumnsSpanned extends Property { public static final int dataTypes = NUMBER; public static final int traitMapping = FORMATTING; public static final int initialValueType = NUMBER_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new Numeric (PropNames.NUMBER_COLUMNS_SPANNED, 1d); diff --git a/src/org/apache/fop/fo/properties/NumberRowsSpanned.java b/src/org/apache/fop/fo/properties/NumberRowsSpanned.java index d8adac9c2..1cb5d82f1 100644 --- a/src/org/apache/fop/fo/properties/NumberRowsSpanned.java +++ b/src/org/apache/fop/fo/properties/NumberRowsSpanned.java @@ -10,7 +10,7 @@ public class NumberRowsSpanned extends Property { public static final int dataTypes = NUMBER; public static final int traitMapping = FORMATTING; public static final int initialValueType = INTEGER_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new IntegerType(PropNames.NUMBER_ROWS_SPANNED, 1); diff --git a/src/org/apache/fop/fo/properties/OddOrEven.java b/src/org/apache/fop/fo/properties/OddOrEven.java index ed4fed31a..d04a5fd2a 100644 --- a/src/org/apache/fop/fo/properties/OddOrEven.java +++ b/src/org/apache/fop/fo/properties/OddOrEven.java @@ -14,7 +14,7 @@ public class OddOrEven extends Property { public static final int ODD = 1; public static final int EVEN = 2; public static final int ANY = 3; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType(PropNames.ODD_OR_EVEN, ANY); @@ -27,10 +27,10 @@ public class OddOrEven extends Property { ,"even" ,"any" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/Orphans.java b/src/org/apache/fop/fo/properties/Orphans.java index f4ce05191..1005489eb 100644 --- a/src/org/apache/fop/fo/properties/Orphans.java +++ b/src/org/apache/fop/fo/properties/Orphans.java @@ -10,7 +10,7 @@ public class Orphans extends Property { public static final int dataTypes = INTEGER | INHERIT; public static final int traitMapping = FORMATTING; public static final int initialValueType = INTEGER_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new IntegerType(PropNames.ORPHANS, 2); diff --git a/src/org/apache/fop/fo/properties/Overflow.java b/src/org/apache/fop/fo/properties/Overflow.java index 2ab95798c..c1b4fbbcc 100644 --- a/src/org/apache/fop/fo/properties/Overflow.java +++ b/src/org/apache/fop/fo/properties/Overflow.java @@ -21,10 +21,10 @@ public class Overflow extends Property { ,"scroll" ,"error-if-overflow" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/Padding.java b/src/org/apache/fop/fo/properties/Padding.java index d5b1d2b72..7c77ede9e 100644 --- a/src/org/apache/fop/fo/properties/Padding.java +++ b/src/org/apache/fop/fo/properties/Padding.java @@ -41,12 +41,13 @@ public class Padding extends Property { * the third element is a value for padding-bottom, * the fourth element is a value for padding-left. * + * @param propindex - the int property index. * @param foNode - the FONode being built * @param value PropertyValue returned by the parser * @return PropertyValue the verified value */ - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue value) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue value) throws PropertyException { if ( ! (value instanceof PropertyValueList)) { @@ -56,8 +57,8 @@ public class Padding extends Property { || (value instanceof Numeric && ((Numeric)value).isDistance()) ) - return refineExpansionList - (foNode, ShorthandPropSets.expandAndCopySHand(value)); + return refineExpansionList(PropNames.PADDING, foNode, + ShorthandPropSets.expandAndCopySHand(value)); throw new PropertyException ("Invalid property value for 'padding': " + value.getClass().getName()); diff --git a/src/org/apache/fop/fo/properties/PaddingAfter.java b/src/org/apache/fop/fo/properties/PaddingAfter.java index 8f54ba05f..92b19d989 100644 --- a/src/org/apache/fop/fo/properties/PaddingAfter.java +++ b/src/org/apache/fop/fo/properties/PaddingAfter.java @@ -11,7 +11,7 @@ public class PaddingAfter extends Property { COMPOUND | PERCENTAGE | LENGTH | INHERIT; public static final int traitMapping = FORMATTING | RENDERING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength(PropNames.PADDING_AFTER, 0.0d, Length.PT); diff --git a/src/org/apache/fop/fo/properties/PaddingAfterConditionality.java b/src/org/apache/fop/fo/properties/PaddingAfterConditionality.java index 77aa711ab..caa3fdd85 100644 --- a/src/org/apache/fop/fo/properties/PaddingAfterConditionality.java +++ b/src/org/apache/fop/fo/properties/PaddingAfterConditionality.java @@ -10,7 +10,7 @@ public class PaddingAfterConditionality extends Conditionality { public static final int dataTypes = ENUM; public static final int traitMapping = FORMATTING | RENDERING; public static final int initialValueType = ENUM_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType(PropNames.PADDING_AFTER_CONDITIONALITY, DISCARD); diff --git a/src/org/apache/fop/fo/properties/PaddingAfterLength.java b/src/org/apache/fop/fo/properties/PaddingAfterLength.java index 8bd8100ab..2ac02c53c 100644 --- a/src/org/apache/fop/fo/properties/PaddingAfterLength.java +++ b/src/org/apache/fop/fo/properties/PaddingAfterLength.java @@ -10,7 +10,7 @@ public class PaddingAfterLength extends Property { public static final int dataTypes = PERCENTAGE | LENGTH; public static final int traitMapping = FORMATTING | RENDERING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength(PropNames.PADDING_AFTER_LENGTH, diff --git a/src/org/apache/fop/fo/properties/PaddingBefore.java b/src/org/apache/fop/fo/properties/PaddingBefore.java index 5a7a4b7c9..610fe269a 100644 --- a/src/org/apache/fop/fo/properties/PaddingBefore.java +++ b/src/org/apache/fop/fo/properties/PaddingBefore.java @@ -11,7 +11,7 @@ public class PaddingBefore extends Property { COMPOUND |PERCENTAGE | LENGTH | INHERIT; public static final int traitMapping = FORMATTING | RENDERING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength(PropNames.PADDING_BEFORE, diff --git a/src/org/apache/fop/fo/properties/PaddingBeforeConditionality.java b/src/org/apache/fop/fo/properties/PaddingBeforeConditionality.java index 917965a99..05e4b6bfb 100644 --- a/src/org/apache/fop/fo/properties/PaddingBeforeConditionality.java +++ b/src/org/apache/fop/fo/properties/PaddingBeforeConditionality.java @@ -10,7 +10,7 @@ public class PaddingBeforeConditionality extends Conditionality { public static final int dataTypes = ENUM; public static final int traitMapping = FORMATTING | RENDERING; public static final int initialValueType = ENUM_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType(PropNames.PADDING_BEFORE_CONDITIONALITY, DISCARD); diff --git a/src/org/apache/fop/fo/properties/PaddingBeforeLength.java b/src/org/apache/fop/fo/properties/PaddingBeforeLength.java index 42b8768f1..df0e5333d 100644 --- a/src/org/apache/fop/fo/properties/PaddingBeforeLength.java +++ b/src/org/apache/fop/fo/properties/PaddingBeforeLength.java @@ -10,7 +10,7 @@ public class PaddingBeforeLength extends Property { public static final int dataTypes = LENGTH; public static final int traitMapping = FORMATTING | RENDERING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength(PropNames.PADDING_BEFORE_LENGTH, diff --git a/src/org/apache/fop/fo/properties/PaddingBottom.java b/src/org/apache/fop/fo/properties/PaddingBottom.java index bb33d583a..e3d5b73c9 100644 --- a/src/org/apache/fop/fo/properties/PaddingBottom.java +++ b/src/org/apache/fop/fo/properties/PaddingBottom.java @@ -10,7 +10,7 @@ public class PaddingBottom extends Property { public static final int dataTypes = PERCENTAGE | LENGTH | INHERIT; public static final int traitMapping = DISAPPEARS; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength diff --git a/src/org/apache/fop/fo/properties/PaddingEnd.java b/src/org/apache/fop/fo/properties/PaddingEnd.java index 380b461dd..46491c8e4 100644 --- a/src/org/apache/fop/fo/properties/PaddingEnd.java +++ b/src/org/apache/fop/fo/properties/PaddingEnd.java @@ -11,7 +11,7 @@ public class PaddingEnd extends Property { COMPOUND | PERCENTAGE | LENGTH | INHERIT; public static final int traitMapping = FORMATTING | RENDERING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength (PropNames.PADDING_END, 0.0d, Length.PT); diff --git a/src/org/apache/fop/fo/properties/PaddingEndConditionality.java b/src/org/apache/fop/fo/properties/PaddingEndConditionality.java index cc2ca5e76..b4be0ab64 100644 --- a/src/org/apache/fop/fo/properties/PaddingEndConditionality.java +++ b/src/org/apache/fop/fo/properties/PaddingEndConditionality.java @@ -10,7 +10,7 @@ public class PaddingEndConditionality extends Conditionality { public static final int dataTypes = ENUM; public static final int traitMapping = FORMATTING | RENDERING; public static final int initialValueType = ENUM_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType(PropNames.PADDING_END_CONDITIONALITY, DISCARD); diff --git a/src/org/apache/fop/fo/properties/PaddingEndLength.java b/src/org/apache/fop/fo/properties/PaddingEndLength.java index 96bca0d9f..2d4cc53c6 100644 --- a/src/org/apache/fop/fo/properties/PaddingEndLength.java +++ b/src/org/apache/fop/fo/properties/PaddingEndLength.java @@ -10,7 +10,7 @@ public class PaddingEndLength extends Property { public static final int dataTypes = PERCENTAGE | LENGTH; public static final int traitMapping = FORMATTING | RENDERING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength(PropNames.PADDING_END_LENGTH, diff --git a/src/org/apache/fop/fo/properties/PaddingLeft.java b/src/org/apache/fop/fo/properties/PaddingLeft.java index 80b91d379..65499313c 100644 --- a/src/org/apache/fop/fo/properties/PaddingLeft.java +++ b/src/org/apache/fop/fo/properties/PaddingLeft.java @@ -10,7 +10,7 @@ public class PaddingLeft extends Property { public static final int dataTypes = PERCENTAGE | LENGTH | INHERIT; public static final int traitMapping = DISAPPEARS; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength (PropNames.PADDING_LEFT, 0.0d, Length.PT); diff --git a/src/org/apache/fop/fo/properties/PaddingRight.java b/src/org/apache/fop/fo/properties/PaddingRight.java index dab088dba..02b1d528a 100644 --- a/src/org/apache/fop/fo/properties/PaddingRight.java +++ b/src/org/apache/fop/fo/properties/PaddingRight.java @@ -10,7 +10,7 @@ public class PaddingRight extends Property { public static final int dataTypes = PERCENTAGE | LENGTH | INHERIT; public static final int traitMapping = DISAPPEARS; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength (PropNames.PADDING_RIGHT, 0.0d, Length.PT); diff --git a/src/org/apache/fop/fo/properties/PaddingStart.java b/src/org/apache/fop/fo/properties/PaddingStart.java index 2e78570d6..aa39443fb 100644 --- a/src/org/apache/fop/fo/properties/PaddingStart.java +++ b/src/org/apache/fop/fo/properties/PaddingStart.java @@ -11,7 +11,7 @@ public class PaddingStart extends Property { COMPOUND | PERCENTAGE | LENGTH | INHERIT; public static final int traitMapping = FORMATTING | RENDERING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength(PropNames.PADDING_START, 0.0d, Length.PT); diff --git a/src/org/apache/fop/fo/properties/PaddingStartConditionality.java b/src/org/apache/fop/fo/properties/PaddingStartConditionality.java index 3061cff7e..69fc8b4bc 100644 --- a/src/org/apache/fop/fo/properties/PaddingStartConditionality.java +++ b/src/org/apache/fop/fo/properties/PaddingStartConditionality.java @@ -10,7 +10,7 @@ public class PaddingStartConditionality extends Conditionality { public static final int dataTypes = ENUM; public static final int traitMapping = FORMATTING | RENDERING; public static final int initialValueType = ENUM_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType(PropNames.PADDING_START_CONDITIONALITY, DISCARD); diff --git a/src/org/apache/fop/fo/properties/PaddingStartLength.java b/src/org/apache/fop/fo/properties/PaddingStartLength.java index c1a3e9ff6..2fa635fb8 100644 --- a/src/org/apache/fop/fo/properties/PaddingStartLength.java +++ b/src/org/apache/fop/fo/properties/PaddingStartLength.java @@ -10,7 +10,7 @@ public class PaddingStartLength extends Property { public static final int dataTypes = PERCENTAGE | LENGTH; public static final int traitMapping = FORMATTING | RENDERING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength(PropNames.PADDING_START_LENGTH, diff --git a/src/org/apache/fop/fo/properties/PaddingTop.java b/src/org/apache/fop/fo/properties/PaddingTop.java index 9ca6fcee4..17254fd8d 100644 --- a/src/org/apache/fop/fo/properties/PaddingTop.java +++ b/src/org/apache/fop/fo/properties/PaddingTop.java @@ -10,7 +10,7 @@ public class PaddingTop extends Property { public static final int dataTypes = PERCENTAGE | LENGTH | INHERIT; public static final int traitMapping = DISAPPEARS; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength (PropNames.PADDING_TOP, 0.0d, Length.PT); diff --git a/src/org/apache/fop/fo/properties/PageBreakCommon.java b/src/org/apache/fop/fo/properties/PageBreakCommon.java index 2b331c7d5..58349dd74 100644 --- a/src/org/apache/fop/fo/properties/PageBreakCommon.java +++ b/src/org/apache/fop/fo/properties/PageBreakCommon.java @@ -42,22 +42,25 @@ public class PageBreakCommon extends Property { (Object) Ints.consts.get(i)); } } - public /**/static/**/ int getEnumIndex(String enum) { + public /*static*/ int getEnumIndex(String enum) { return ((Integer)(rwEnumHash.get(enum))).intValue(); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } /* + * @param propindex - the int property index. * @param foNode - the FONode being built * @param value PropertyValue returned by the parser * @return PropertyValue the verified value */ - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue value) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue value) throws PropertyException { + // Ignore the argument value - always assume the PropertyValue + // is set up with the property index from the correct subclass int property = value.getProperty(); int beforeAfter, previousNext; switch (property) { @@ -79,8 +82,8 @@ public class PageBreakCommon extends Property { value instanceof FromNearestSpecified | value instanceof Auto) { - return refineExpansionList - (foNode, ShorthandPropSets.expandAndCopySHand(value)); + return refineExpansionList(property , foNode, + ShorthandPropSets.expandAndCopySHand(value)); } if (value instanceof NCName) { EnumType enum = null; diff --git a/src/org/apache/fop/fo/properties/PageBreakInside.java b/src/org/apache/fop/fo/properties/PageBreakInside.java index a59e1e1f4..da66c336f 100644 --- a/src/org/apache/fop/fo/properties/PageBreakInside.java +++ b/src/org/apache/fop/fo/properties/PageBreakInside.java @@ -28,12 +28,13 @@ public class PageBreakInside extends Property { }; /* + * @param propindex - the int property index. * @param foNode - the FONode being built * @param value PropertyValue returned by the parser * @return PropertyValue the verified value */ - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue value) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue value) throws PropertyException { if (value instanceof Inherit | @@ -41,26 +42,22 @@ public class PageBreakInside extends Property { value instanceof FromNearestSpecified | value instanceof Auto) { - return refineExpansionList - (foNode, ShorthandPropSets.expandAndCopySHand(value)); + return refineExpansionList(PropNames.PAGE_BREAK_INSIDE, foNode, + ShorthandPropSets.expandAndCopySHand(value)); } if (value instanceof NCName) { EnumType enum = null; String ncname = ((NCName)value).getNCName(); - try { - enum = new EnumType(value.getProperty(), ncname); - } catch (PropertyException e) { + //PropertyValueList list = + //new PropertyValueList(PropNames.PAGE_BREAK_INSIDE); + if (ncname.equals("avoid")) { + //list.add + //(new EnumType(PropNames.KEEP_TOGETHER, "always")); + //return list; + return new EnumType(PropNames.KEEP_TOGETHER, "always"); + } else throw new PropertyException ("Unrecognized NCName in page-break-inside: " + ncname); - } - PropertyValueList list = - new PropertyValueList(PropNames.PAGE_BREAK_INSIDE); - switch (enum.getEnumValue()) { - case AVOID: - list.add - (new EnumType(PropNames.KEEP_TOGETHER, "always")); - return list; - } } throw new PropertyException @@ -68,10 +65,10 @@ public class PageBreakInside extends Property { + value.getClass().getName()); } - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/PageHeightWidth.java b/src/org/apache/fop/fo/properties/PageHeightWidth.java index f3c76605a..cd89d591c 100644 --- a/src/org/apache/fop/fo/properties/PageHeightWidth.java +++ b/src/org/apache/fop/fo/properties/PageHeightWidth.java @@ -10,10 +10,10 @@ public class PageHeightWidth extends Property { ,"indefinite" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/PagePosition.java b/src/org/apache/fop/fo/properties/PagePosition.java index cba2d588f..d7ee11560 100644 --- a/src/org/apache/fop/fo/properties/PagePosition.java +++ b/src/org/apache/fop/fo/properties/PagePosition.java @@ -15,7 +15,7 @@ public class PagePosition extends Property { public static final int LAST = 2; public static final int REST = 3; public static final int ANY = 4; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType (PropNames.PAGE_POSITION, ANY); @@ -29,10 +29,10 @@ public class PagePosition extends Property { ,"rest" ,"any" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/Position.java b/src/org/apache/fop/fo/properties/Position.java index 61d8a0db3..4966ce952 100644 --- a/src/org/apache/fop/fo/properties/Position.java +++ b/src/org/apache/fop/fo/properties/Position.java @@ -23,7 +23,7 @@ public class Position extends Property { public static final int RELATIVE = 2; public static final int ABSOLUTE = 3; public static final int FIXED = 4; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType(PropNames.POSITION, STATIC); @@ -39,20 +39,21 @@ public class Position extends Property { }; /* + * @param propindex - the int property index. * @param foNode - the FONode being built * @param value PropertyValue returned by the parser * @return PropertyValue the verified value */ - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue value) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue value) throws PropertyException { if (value instanceof Inherit | value instanceof FromParent | value instanceof FromNearestSpecified) { - return refineExpansionList - (foNode, ShorthandPropSets.expandAndCopySHand(value)); + return refineExpansionList(PropNames.POSITION, foNode, + ShorthandPropSets.expandAndCopySHand(value)); } if (value instanceof NCName) { EnumType enum = null; @@ -95,10 +96,10 @@ public class Position extends Property { ("Invalid value for 'position': " + value.getClass().getName()); } - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/Precedence.java b/src/org/apache/fop/fo/properties/Precedence.java index 0adf0a814..036c5a69f 100644 --- a/src/org/apache/fop/fo/properties/Precedence.java +++ b/src/org/apache/fop/fo/properties/Precedence.java @@ -10,7 +10,7 @@ public class Precedence extends Property { public static final int dataTypes = BOOL | INHERIT; public static final int traitMapping = SPECIFICATION; public static final int initialValueType = BOOL_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new Bool(PropNames.PRECEDENCE, false); diff --git a/src/org/apache/fop/fo/properties/PrecedenceCommon.java b/src/org/apache/fop/fo/properties/PrecedenceCommon.java index 6d90f12d9..6c2cf3594 100644 --- a/src/org/apache/fop/fo/properties/PrecedenceCommon.java +++ b/src/org/apache/fop/fo/properties/PrecedenceCommon.java @@ -12,10 +12,10 @@ public class PrecedenceCommon extends Property { ,"force" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } diff --git a/src/org/apache/fop/fo/properties/Property.java b/src/org/apache/fop/fo/properties/Property.java index dc320d4b0..e15827bd9 100644 --- a/src/org/apache/fop/fo/properties/Property.java +++ b/src/org/apache/fop/fo/properties/Property.java @@ -331,32 +331,38 @@ public /*abstract*/ class Property { * *

This method is overriden by individual property classes which * require specific processing. + * @param propindex - the int property index. * @param foNode - the FONode being built * @param value - PropertyValue returned by the parser */ - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue value) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue value) throws PropertyException { - return refineParsing(foNode, value, NOT_NESTED); + return refineParsing(propindex, foNode, value, NOT_NESTED); } /** - * Do the work for the two argument refineParsing method. + * Do the work for the three argument refineParsing method. + * @param property - the int property index. * @param foNode - the FONode being built * @param value - PropertyValue returned by the parser * @param nested - boolean indicating whether this method is * called normally (false), or as part of another refineParsing * method. - * @see #refineParsing(FOTree,PropertyValue) + * @see #refineParsing(int,FOTree,PropertyValue) */ - protected /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue value, boolean nested) + public /*static*/ PropertyValue refineParsing(int property, + FONode foNode, PropertyValue value, boolean nested) throws PropertyException { - int property = value.getProperty(); + //int property = value.getProperty(); + if (property != value.getProperty()) // DEBUG + throw new PropertyException + ("Mismatched property and value.property."); String propName = PropNames.getPropertyName(property); int proptype = value.getType(); + int dataTypes = PropertyConsts.pconsts.getDataTypes(property); PropertyValue pv; if ((dataTypes & AURAL) != 0) throw new PropertyNotImplementedException @@ -368,6 +374,8 @@ public /*abstract*/ class Property { if ((dataTypes & (INTEGER | FLOAT | LENGTH | PERCENTAGE | ANGLE | FREQUENCY | TIME)) != 0) return value; + throw new PropertyException + ("Numeric value invalid for " + propName); case PropertyValue.NCNAME: String ncname = ((NCName)value).getNCName(); // Can by any of @@ -387,6 +395,8 @@ public /*abstract*/ class Property { return (new MappedNumeric (property, ncname, foNode.getFOTree())) .getMappedNumValue(); + throw new PropertyException + ("NCName value invalid for " + propName); case PropertyValue.LITERAL: // Can be LITERAL or CHARACTER_T if ((dataTypes & (LITERAL | CHARACTER_T)) != 0) return value; @@ -464,27 +474,31 @@ public /*abstract*/ class Property { * The set of properties will, in general, be different from the * generating property, which will be the one associated with the list * itself. + * @param propindex - the int property index. * @param foNode - the FONode for which the properties are * being processed. * @param list - the list of PropertyValues to be refined. * @return a PropertyValueList>/tt> containing the refined property * values. */ - public /**/static/**/ PropertyValueList refineExpansionList - (FONode foNode, PropertyValueList list) + public /*static*/ PropertyValueList refineExpansionList + (int propindex, FONode foNode, PropertyValueList list) throws PropertyException { + if (propindex != list.getProperty()) // DEBUG + throw new PropertyException + ("Mismatch between propindex and list property."); PropertyValueList newlist = new PropertyValueList(list.getProperty()); Iterator properties = list.iterator(); while (properties.hasNext()) { // refine the next element - PropertyValue pv = - foNode.propertyConsts.refineParsing - (foNode, (PropertyValue)(properties.next())); + PropertyValue pv = (PropertyValue)(properties.next()); + pv = PropertyConsts.pconsts.refineParsing + (pv.getProperty(), foNode, pv); // if it's a list, recursively refine. This will return a list if (pv.getType() == PropertyValue.LIST) { - PropertyValueList pvl = - refineExpansionList(foNode, (PropertyValueList)pv); + PropertyValueList pvl = refineExpansionList + (pv.getProperty(), foNode, (PropertyValueList)pv); newlist.addAll(pvl); } else { // single element newlist.add(pv); @@ -504,7 +518,7 @@ public /*abstract*/ class Property { * @throws PropertyException if list contains more than * one element or if the contained element is not a list. */ - protected /**/static/**/ PropertyValueList spaceSeparatedList + protected /*static*/ PropertyValueList spaceSeparatedList (PropertyValueList list) throws PropertyException { @@ -531,7 +545,7 @@ public /*abstract*/ class Property { * @return EnumValue equivalent of the argument * @exception PropertyException */ - protected /**/static/**/ EnumType getEnum(PropertyValue value, + protected /*static*/ EnumType getEnum(PropertyValue value, int property, String type) throws PropertyException { @@ -559,7 +573,7 @@ public /*abstract*/ class Property { * @return int constant representing the enumeration value. * @exception PropertyException */ - public /**/static/**/ int getEnumIndex(String enum) + public /*static*/ int getEnumIndex(String enum) throws PropertyException { throw new PropertyException("ENUM not supported."); @@ -570,7 +584,7 @@ public /*abstract*/ class Property { * @return String containing the enumeration text. * @exception PropertyException */ - public /**/static/**/ String getEnumText(int enumIndex) + public /*static*/ String getEnumText(int enumIndex) throws PropertyException { throw new PropertyException("ENUM not supported."); @@ -584,7 +598,7 @@ public /*abstract*/ class Property { * @return the integer equivalent of the enum text * @exception PropertyException if the enum text is not valid. */ - public /**/static/**/ int enumValueToIndex(String value, String[] values) + public /*static*/ int enumValueToIndex(String value, String[] values) throws PropertyException { for (int i = 1; i < values.length; i++) { @@ -604,11 +618,11 @@ public /*abstract*/ class Property { * @return a Numeric. This implementation never returns. * @throws PropertyException. */ - public /**/static/**/ Numeric getMappedLength(int enum) + public /*static*/ Numeric getMappedLength(int enum) throws PropertyException { throw new PropertyException - ("No MAPPED_LENGTH not supported."); + ("MAPPED_LENGTH not supported."); } /** @@ -621,10 +635,13 @@ public /*abstract*/ class Property { * @exception PropertyException * @exception PropertyNotImplementedException */ - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { - Method method = null; + int initialValueType = + PropertyConsts.pconsts.getInitialValueType(property); + //System.out.println("In Property getInitialValue property " + //+ property); if ((initialValueType & Property.USE_GET_IT_FUNCTION) != 0) throw new PropertyException ("Property.getInitialValue() called for property with " @@ -675,31 +692,32 @@ public /*abstract*/ class Property { * N.B. this is the order of elements defined in * ShorthandPropSets.borderRightExpansion */ - protected /**/static/**/ PropertyValue borderEdge(FONode foNode, - PropertyValue value, int styleProp, int colorProp, int widthProp) + protected /*static*/ PropertyValue borderEdge + (int propindex, FONode foNode, PropertyValue value, + int styleProp, int colorProp, int widthProp) throws PropertyException { - return borderEdge - (foNode, value, styleProp, colorProp, widthProp, NOT_NESTED); + return borderEdge(propindex, foNode, value, styleProp, + colorProp, widthProp, NOT_NESTED); } - protected /**/static/**/ PropertyValue borderEdge - (FONode foNode, PropertyValue value, int styleProp, - int colorProp, int widthProp, boolean nested) + protected /*static*/ PropertyValue borderEdge + (int propindex, FONode foNode, PropertyValue value, int styleProp, + int colorProp, int widthProp, boolean nested) throws PropertyException { if (value.getType() != PropertyValue.LIST) { - return processEdgeValue - (foNode, value, styleProp, colorProp, widthProp, nested); + return processEdgeValue(propindex, foNode, value, + styleProp, colorProp, widthProp, nested); } else { - return processEdgeList - (foNode, spaceSeparatedList((PropertyValueList)value), + return processEdgeList(propindex, foNode, + spaceSeparatedList((PropertyValueList)value), styleProp, colorProp, widthProp); } } - private /**/static/**/ PropertyValueList processEdgeValue - (FONode foNode, PropertyValue value, int styleProp, + private /*static*/ PropertyValueList processEdgeValue + (int propindex, FONode foNode, PropertyValue value, int styleProp, int colorProp, int widthProp, boolean nested) throws PropertyException { @@ -710,23 +728,23 @@ public /*abstract*/ class Property { type == PropertyValue.FROM_NEAREST_SPECIFIED) { // Copy the value to each member of the shorthand expansion - return refineExpansionList - (foNode, ShorthandPropSets.expandAndCopySHand(value)); + return refineExpansionList(propindex, foNode, + ShorthandPropSets.expandAndCopySHand(value)); } } // Make a list and pass to processList - PropertyValueList tmpList - = new PropertyValueList(value.getProperty()); + PropertyValueList tmpList = new PropertyValueList(propindex); tmpList.add(value); return processEdgeList - (foNode, tmpList, styleProp, colorProp, widthProp); + (propindex, foNode, tmpList, styleProp, colorProp, widthProp); } - private /**/static/**/ PropertyValueList processEdgeList(FONode foNode, - PropertyValueList value, int styleProp, int colorProp, int widthProp) + private /*static*/ PropertyValueList processEdgeList + (int property, FONode foNode, PropertyValueList value, + int styleProp, int colorProp, int widthProp) throws PropertyException { - int property = value.getProperty(); + //int property = value.getProperty(); String propName = PropNames.getPropertyName(property); PropertyValue color= null, style = null, @@ -747,6 +765,7 @@ public /*abstract*/ class Property { if (color != null) MessageHandler.log(propName + ": duplicate color overrides previous color"); color = pval; + color.setProperty(colorProp); continue scanning_elements; case PropertyValue.NCNAME: // Could be standard color, style Enum or width MappedNumeric diff --git a/src/org/apache/fop/fo/properties/ProvisionalDistanceBetweenStarts.java b/src/org/apache/fop/fo/properties/ProvisionalDistanceBetweenStarts.java index 1471a5a08..a46a7a197 100644 --- a/src/org/apache/fop/fo/properties/ProvisionalDistanceBetweenStarts.java +++ b/src/org/apache/fop/fo/properties/ProvisionalDistanceBetweenStarts.java @@ -10,7 +10,7 @@ public class ProvisionalDistanceBetweenStarts extends Property { public static final int dataTypes = LENGTH | INHERIT; public static final int traitMapping = SPECIFICATION; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength diff --git a/src/org/apache/fop/fo/properties/ProvisionalLabelSeparation.java b/src/org/apache/fop/fo/properties/ProvisionalLabelSeparation.java index cc6b79fc0..f8244d6d6 100644 --- a/src/org/apache/fop/fo/properties/ProvisionalLabelSeparation.java +++ b/src/org/apache/fop/fo/properties/ProvisionalLabelSeparation.java @@ -10,7 +10,7 @@ public class ProvisionalLabelSeparation extends Property { public static final int dataTypes = LENGTH | INHERIT; public static final int traitMapping = SPECIFICATION; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength diff --git a/src/org/apache/fop/fo/properties/ReferenceOrientation.java b/src/org/apache/fop/fo/properties/ReferenceOrientation.java index d210ab4e9..1a89ae1e8 100644 --- a/src/org/apache/fop/fo/properties/ReferenceOrientation.java +++ b/src/org/apache/fop/fo/properties/ReferenceOrientation.java @@ -10,7 +10,7 @@ public class ReferenceOrientation extends Property { public static final int dataTypes = INTEGER | INHERIT; public static final int traitMapping = NEW_TRAIT; public static final int initialValueType = INTEGER_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new IntegerType(PropNames.REFERENCE_ORIENTATION, 0); diff --git a/src/org/apache/fop/fo/properties/RegionName.java b/src/org/apache/fop/fo/properties/RegionName.java index 2f8b3356b..481a586e1 100644 --- a/src/org/apache/fop/fo/properties/RegionName.java +++ b/src/org/apache/fop/fo/properties/RegionName.java @@ -40,10 +40,10 @@ public class RegionName extends Property { (Object) Ints.consts.get(i)); } } - public /**/static/**/ int getEnumIndex(String enum) { + public /*static*/ int getEnumIndex(String enum) { return ((Integer)(rwEnumHash.get(enum))).intValue(); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/RelativeAlign.java b/src/org/apache/fop/fo/properties/RelativeAlign.java index 7d99c82d3..962152070 100644 --- a/src/org/apache/fop/fo/properties/RelativeAlign.java +++ b/src/org/apache/fop/fo/properties/RelativeAlign.java @@ -13,7 +13,7 @@ public class RelativeAlign extends Property { public static final int initialValueType = ENUM_IT; public static final int BEFORE = 1; public static final int BASELINE = 2; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType (PropNames.RELATIVE_ALIGN, BEFORE); @@ -25,10 +25,10 @@ public class RelativeAlign extends Property { ,"before" ,"baseline" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/RelativePosition.java b/src/org/apache/fop/fo/properties/RelativePosition.java index da5d8f9f9..dbbdb76ee 100644 --- a/src/org/apache/fop/fo/properties/RelativePosition.java +++ b/src/org/apache/fop/fo/properties/RelativePosition.java @@ -13,7 +13,7 @@ public class RelativePosition extends Property { public static final int initialValueType = ENUM_IT; public static final int STATIC = 1; public static final int RELATIVE = 2; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType (PropNames.RELATIVE_POSITION, STATIC); @@ -25,10 +25,10 @@ public class RelativePosition extends Property { ,"static" ,"relative" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/RenderingIntent.java b/src/org/apache/fop/fo/properties/RenderingIntent.java index 8e95c36e0..3377ff0b3 100644 --- a/src/org/apache/fop/fo/properties/RenderingIntent.java +++ b/src/org/apache/fop/fo/properties/RenderingIntent.java @@ -34,10 +34,10 @@ public class RenderingIntent extends Property { (Object) Ints.consts.get(i)); } } - public /**/static/**/ int getEnumIndex(String enum) { + public /*static*/ int getEnumIndex(String enum) { return ((Integer)(rwEnumHash.get(enum))).intValue(); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/RetrieveBoundary.java b/src/org/apache/fop/fo/properties/RetrieveBoundary.java index 2cbf3e0c4..40894a625 100644 --- a/src/org/apache/fop/fo/properties/RetrieveBoundary.java +++ b/src/org/apache/fop/fo/properties/RetrieveBoundary.java @@ -14,7 +14,7 @@ public class RetrieveBoundary extends Property { public static final int PAGE = 1; public static final int PAGE_SEQUENCE = 2; public static final int DOCUMENT = 3; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType (PropNames.RETRIEVE_BOUNDARY, PAGE_SEQUENCE); @@ -27,10 +27,10 @@ public class RetrieveBoundary extends Property { ,"page-sequence" ,"document" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/RetrievePosition.java b/src/org/apache/fop/fo/properties/RetrievePosition.java index f75287251..5d1882db1 100644 --- a/src/org/apache/fop/fo/properties/RetrievePosition.java +++ b/src/org/apache/fop/fo/properties/RetrievePosition.java @@ -15,7 +15,7 @@ public class RetrievePosition extends Property { public static final int FIRST_INCLUDING_CARRYOVER = 2; public static final int LAST_STARTING_WITHIN_PAGE = 3; public static final int LAST_ENDING_WITHIN_PAGE = 4; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType @@ -30,10 +30,10 @@ public class RetrievePosition extends Property { ,"last-starting-within-page" ,"last-ending-within-page" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/RuleStyle.java b/src/org/apache/fop/fo/properties/RuleStyle.java index c8ef28993..fbd7147b0 100644 --- a/src/org/apache/fop/fo/properties/RuleStyle.java +++ b/src/org/apache/fop/fo/properties/RuleStyle.java @@ -22,7 +22,7 @@ public class RuleStyle extends Property { public static final int DOUBLE = 4; public static final int GROOVE = 5; public static final int RIDGE = 6; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType(PropNames.RULE_STYLE, SOLID); @@ -46,10 +46,10 @@ public class RuleStyle extends Property { (Object) Ints.consts.get(i)); } } - public /**/static/**/ int getEnumIndex(String enum) { + public /*static*/ int getEnumIndex(String enum) { return ((Integer)(rwEnumHash.get(enum))).intValue(); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/RuleThickness.java b/src/org/apache/fop/fo/properties/RuleThickness.java index 96aa86eb1..4c21940ab 100644 --- a/src/org/apache/fop/fo/properties/RuleThickness.java +++ b/src/org/apache/fop/fo/properties/RuleThickness.java @@ -10,7 +10,7 @@ public class RuleThickness extends Property { public static final int dataTypes = LENGTH; public static final int traitMapping = RENDERING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength diff --git a/src/org/apache/fop/fo/properties/Scaling.java b/src/org/apache/fop/fo/properties/Scaling.java index c07e0ffbd..aa18ff2cc 100644 --- a/src/org/apache/fop/fo/properties/Scaling.java +++ b/src/org/apache/fop/fo/properties/Scaling.java @@ -13,7 +13,7 @@ public class Scaling extends Property { public static final int initialValueType = ENUM_IT; public static final int UNIFORM = 1; public static final int NON_UNIFORM = 2; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType(PropNames.SCALING, UNIFORM); @@ -25,10 +25,10 @@ public class Scaling extends Property { ,"uniform" ,"non-uniform" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/ScalingMethod.java b/src/org/apache/fop/fo/properties/ScalingMethod.java index 1421ab52c..f49dd5059 100644 --- a/src/org/apache/fop/fo/properties/ScalingMethod.java +++ b/src/org/apache/fop/fo/properties/ScalingMethod.java @@ -17,10 +17,10 @@ public class ScalingMethod extends Property { ,"integer-pixels" ,"resample-any-method" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/ScoreSpaces.java b/src/org/apache/fop/fo/properties/ScoreSpaces.java index 3cfbaeec8..06f821de6 100644 --- a/src/org/apache/fop/fo/properties/ScoreSpaces.java +++ b/src/org/apache/fop/fo/properties/ScoreSpaces.java @@ -10,7 +10,7 @@ public class ScoreSpaces extends Property { public static final int dataTypes = BOOL | INHERIT; public static final int traitMapping = FORMATTING; public static final int initialValueType = BOOL_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new Bool(PropNames.SCORE_SPACES, true); diff --git a/src/org/apache/fop/fo/properties/ShowDestination.java b/src/org/apache/fop/fo/properties/ShowDestination.java index 77134afe8..259e01ba7 100644 --- a/src/org/apache/fop/fo/properties/ShowDestination.java +++ b/src/org/apache/fop/fo/properties/ShowDestination.java @@ -13,7 +13,7 @@ public class ShowDestination extends Property { public static final int initialValueType = ENUM_IT; public static final int REPLACE = 1; public static final int NEW = 2; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType (PropNames.SHOW_DESTINATION, REPLACE); @@ -25,10 +25,10 @@ public class ShowDestination extends Property { ,"replace" ,"new" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/Size.java b/src/org/apache/fop/fo/properties/Size.java index cfabcc581..50409f992 100644 --- a/src/org/apache/fop/fo/properties/Size.java +++ b/src/org/apache/fop/fo/properties/Size.java @@ -17,10 +17,10 @@ public class Size extends Property { ,"landscape" ,"portrait" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/SourceDocument.java b/src/org/apache/fop/fo/properties/SourceDocument.java index 49a10e501..1f333a33e 100644 --- a/src/org/apache/fop/fo/properties/SourceDocument.java +++ b/src/org/apache/fop/fo/properties/SourceDocument.java @@ -2,6 +2,7 @@ package org.apache.fop.fo.properties; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.fo.FONode; +import org.apache.fop.fo.PropNames; import org.apache.fop.datatypes.PropertyValue; import org.apache.fop.datatypes.PropertyValueList; import org.apache.fop.datatypes.UriType; @@ -17,16 +18,18 @@ public class SourceDocument extends Property { public static final int inherited = NO; /* + * @param propindex - the int property index. * @param foNode - the FONode being built * @param list PropertyValue returned by the parser * @return PropertyValue the verified value */ - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue list) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue list) throws PropertyException { if ( ! (list instanceof PropertyValueList)) - return Property.refineParsing(foNode, list); + return super.refineParsing + (PropNames.SOURCE_DOCUMENT, foNode, list); // Confirm that the list contains only UriType elements Iterator iter = ((PropertyValueList)list).iterator(); while (iter.hasNext()) { diff --git a/src/org/apache/fop/fo/properties/SpaceAfter.java b/src/org/apache/fop/fo/properties/SpaceAfter.java index 32b5dd273..7f9d74596 100644 --- a/src/org/apache/fop/fo/properties/SpaceAfter.java +++ b/src/org/apache/fop/fo/properties/SpaceAfter.java @@ -10,7 +10,7 @@ public class SpaceAfter extends Property { public static final int dataTypes = COMPOUND | LENGTH | INHERIT; public static final int traitMapping = FORMATTING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength(PropNames.SPACE_AFTER, 0.0d, Length.PT); diff --git a/src/org/apache/fop/fo/properties/SpaceAfterConditionality.java b/src/org/apache/fop/fo/properties/SpaceAfterConditionality.java index 22d3bf0c2..3d61fae88 100644 --- a/src/org/apache/fop/fo/properties/SpaceAfterConditionality.java +++ b/src/org/apache/fop/fo/properties/SpaceAfterConditionality.java @@ -10,7 +10,7 @@ public class SpaceAfterConditionality extends Conditionality { public static final int dataTypes = ENUM; public static final int traitMapping = FORMATTING; public static final int initialValueType = ENUM_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType(PropNames.SPACE_AFTER_CONDITIONALITY, DISCARD); diff --git a/src/org/apache/fop/fo/properties/SpaceAfterMaximum.java b/src/org/apache/fop/fo/properties/SpaceAfterMaximum.java index 1853d5016..d2da9b202 100644 --- a/src/org/apache/fop/fo/properties/SpaceAfterMaximum.java +++ b/src/org/apache/fop/fo/properties/SpaceAfterMaximum.java @@ -10,7 +10,7 @@ public class SpaceAfterMaximum extends Property { public static final int dataTypes = LENGTH; public static final int traitMapping = FORMATTING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength(PropNames.SPACE_AFTER_MAXIMUM, diff --git a/src/org/apache/fop/fo/properties/SpaceAfterMinimum.java b/src/org/apache/fop/fo/properties/SpaceAfterMinimum.java index 213534539..d2b7ff81f 100644 --- a/src/org/apache/fop/fo/properties/SpaceAfterMinimum.java +++ b/src/org/apache/fop/fo/properties/SpaceAfterMinimum.java @@ -10,7 +10,7 @@ public class SpaceAfterMinimum extends Property { public static final int dataTypes = LENGTH; public static final int traitMapping = FORMATTING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength(PropNames.SPACE_AFTER_MINIMUM, diff --git a/src/org/apache/fop/fo/properties/SpaceAfterOptimum.java b/src/org/apache/fop/fo/properties/SpaceAfterOptimum.java index 2f0992a15..cdd5b1d9a 100644 --- a/src/org/apache/fop/fo/properties/SpaceAfterOptimum.java +++ b/src/org/apache/fop/fo/properties/SpaceAfterOptimum.java @@ -10,7 +10,7 @@ public class SpaceAfterOptimum extends Property { public static final int dataTypes = LENGTH; public static final int traitMapping = FORMATTING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength(PropNames.SPACE_AFTER_OPTIMUM, diff --git a/src/org/apache/fop/fo/properties/SpaceAfterPrecedence.java b/src/org/apache/fop/fo/properties/SpaceAfterPrecedence.java index 6e0775d79..fdb7bec39 100644 --- a/src/org/apache/fop/fo/properties/SpaceAfterPrecedence.java +++ b/src/org/apache/fop/fo/properties/SpaceAfterPrecedence.java @@ -10,7 +10,7 @@ public class SpaceAfterPrecedence extends PrecedenceCommon { public static final int dataTypes = INTEGER | ENUM; public static final int traitMapping = FORMATTING; public static final int initialValueType = INTEGER_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new IntegerType(PropNames.SPACE_AFTER_PRECEDENCE, 0); diff --git a/src/org/apache/fop/fo/properties/SpaceBefore.java b/src/org/apache/fop/fo/properties/SpaceBefore.java index 4b973129d..3318ae24a 100644 --- a/src/org/apache/fop/fo/properties/SpaceBefore.java +++ b/src/org/apache/fop/fo/properties/SpaceBefore.java @@ -10,7 +10,7 @@ public class SpaceBefore extends Property { public static final int dataTypes = COMPOUND | LENGTH | INHERIT; public static final int traitMapping = FORMATTING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength(PropNames.SPACE_BEFORE, 0.0d, Length.PT); diff --git a/src/org/apache/fop/fo/properties/SpaceBeforeConditionality.java b/src/org/apache/fop/fo/properties/SpaceBeforeConditionality.java index 9e877fb41..108adf246 100644 --- a/src/org/apache/fop/fo/properties/SpaceBeforeConditionality.java +++ b/src/org/apache/fop/fo/properties/SpaceBeforeConditionality.java @@ -10,7 +10,7 @@ public class SpaceBeforeConditionality extends Conditionality { public static final int dataTypes = ENUM; public static final int traitMapping = FORMATTING; public static final int initialValueType = ENUM_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType(PropNames.SPACE_BEFORE_CONDITIONALITY, DISCARD); diff --git a/src/org/apache/fop/fo/properties/SpaceBeforeMaximum.java b/src/org/apache/fop/fo/properties/SpaceBeforeMaximum.java index 0d456c7fd..8c805c69f 100644 --- a/src/org/apache/fop/fo/properties/SpaceBeforeMaximum.java +++ b/src/org/apache/fop/fo/properties/SpaceBeforeMaximum.java @@ -10,7 +10,7 @@ public class SpaceBeforeMaximum extends Property { public static final int dataTypes = LENGTH; public static final int traitMapping = FORMATTING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength(PropNames.SPACE_BEFORE_MAXIMUM, diff --git a/src/org/apache/fop/fo/properties/SpaceBeforeMinimum.java b/src/org/apache/fop/fo/properties/SpaceBeforeMinimum.java index 6761d4a7b..5b90cdbde 100644 --- a/src/org/apache/fop/fo/properties/SpaceBeforeMinimum.java +++ b/src/org/apache/fop/fo/properties/SpaceBeforeMinimum.java @@ -10,7 +10,7 @@ public class SpaceBeforeMinimum extends Property { public static final int dataTypes = LENGTH; public static final int traitMapping = FORMATTING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength(PropNames.SPACE_BEFORE_MINIMUM, diff --git a/src/org/apache/fop/fo/properties/SpaceBeforeOptimum.java b/src/org/apache/fop/fo/properties/SpaceBeforeOptimum.java index b80cffcca..235fcff57 100644 --- a/src/org/apache/fop/fo/properties/SpaceBeforeOptimum.java +++ b/src/org/apache/fop/fo/properties/SpaceBeforeOptimum.java @@ -10,7 +10,7 @@ public class SpaceBeforeOptimum extends Property { public static final int dataTypes = LENGTH; public static final int traitMapping = FORMATTING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength(PropNames.SPACE_BEFORE_OPTIMUM, diff --git a/src/org/apache/fop/fo/properties/SpaceBeforePrecedence.java b/src/org/apache/fop/fo/properties/SpaceBeforePrecedence.java index e8139c80c..3d203619f 100644 --- a/src/org/apache/fop/fo/properties/SpaceBeforePrecedence.java +++ b/src/org/apache/fop/fo/properties/SpaceBeforePrecedence.java @@ -10,7 +10,7 @@ public class SpaceBeforePrecedence extends PrecedenceCommon { public static final int dataTypes = INTEGER | ENUM; public static final int traitMapping = FORMATTING; public static final int initialValueType = INTEGER_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new IntegerType(PropNames.SPACE_BEFORE_PRECEDENCE, 0); diff --git a/src/org/apache/fop/fo/properties/SpaceEnd.java b/src/org/apache/fop/fo/properties/SpaceEnd.java index 58ab80851..ac73181d3 100644 --- a/src/org/apache/fop/fo/properties/SpaceEnd.java +++ b/src/org/apache/fop/fo/properties/SpaceEnd.java @@ -11,7 +11,7 @@ public class SpaceEnd extends Property { COMPOUND | LENGTH | PERCENTAGE | INHERIT; public static final int traitMapping = FORMATTING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength(PropNames.SPACE_END, 0.0d, Length.PT); diff --git a/src/org/apache/fop/fo/properties/SpaceEndConditionality.java b/src/org/apache/fop/fo/properties/SpaceEndConditionality.java index 7d9f93b53..ba248ae96 100644 --- a/src/org/apache/fop/fo/properties/SpaceEndConditionality.java +++ b/src/org/apache/fop/fo/properties/SpaceEndConditionality.java @@ -10,7 +10,7 @@ public class SpaceEndConditionality extends Conditionality { public static final int dataTypes = ENUM; public static final int traitMapping = FORMATTING; public static final int initialValueType = ENUM_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType(PropNames.SPACE_END_CONDITIONALITY, DISCARD); diff --git a/src/org/apache/fop/fo/properties/SpaceEndMaximum.java b/src/org/apache/fop/fo/properties/SpaceEndMaximum.java index aba75cac5..e1f86532b 100644 --- a/src/org/apache/fop/fo/properties/SpaceEndMaximum.java +++ b/src/org/apache/fop/fo/properties/SpaceEndMaximum.java @@ -10,7 +10,7 @@ public class SpaceEndMaximum extends Property { public static final int dataTypes = LENGTH | PERCENTAGE; public static final int traitMapping = FORMATTING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength(PropNames.SPACE_END_MAXIMUM, diff --git a/src/org/apache/fop/fo/properties/SpaceEndMinimum.java b/src/org/apache/fop/fo/properties/SpaceEndMinimum.java index b4db7be86..2bffee8c5 100644 --- a/src/org/apache/fop/fo/properties/SpaceEndMinimum.java +++ b/src/org/apache/fop/fo/properties/SpaceEndMinimum.java @@ -10,7 +10,7 @@ public class SpaceEndMinimum extends Property { public static final int dataTypes = LENGTH | PERCENTAGE; public static final int traitMapping = FORMATTING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength(PropNames.SPACE_END_MINIMUM, diff --git a/src/org/apache/fop/fo/properties/SpaceEndOptimum.java b/src/org/apache/fop/fo/properties/SpaceEndOptimum.java index 53e423689..ae517a25e 100644 --- a/src/org/apache/fop/fo/properties/SpaceEndOptimum.java +++ b/src/org/apache/fop/fo/properties/SpaceEndOptimum.java @@ -10,7 +10,7 @@ public class SpaceEndOptimum extends Property { public static final int dataTypes = LENGTH | PERCENTAGE; public static final int traitMapping = FORMATTING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength(PropNames.SPACE_END_OPTIMUM, diff --git a/src/org/apache/fop/fo/properties/SpaceEndPrecedence.java b/src/org/apache/fop/fo/properties/SpaceEndPrecedence.java index a1aeb819e..825279677 100644 --- a/src/org/apache/fop/fo/properties/SpaceEndPrecedence.java +++ b/src/org/apache/fop/fo/properties/SpaceEndPrecedence.java @@ -10,7 +10,7 @@ public class SpaceEndPrecedence extends PrecedenceCommon { public static final int dataTypes = INTEGER | ENUM; public static final int traitMapping = FORMATTING; public static final int initialValueType = INTEGER_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new IntegerType(PropNames.SPACE_END_PRECEDENCE, 0); diff --git a/src/org/apache/fop/fo/properties/SpaceStart.java b/src/org/apache/fop/fo/properties/SpaceStart.java index 065c1e942..ca95e63b9 100644 --- a/src/org/apache/fop/fo/properties/SpaceStart.java +++ b/src/org/apache/fop/fo/properties/SpaceStart.java @@ -11,7 +11,7 @@ public class SpaceStart extends Property { COMPOUND | LENGTH | PERCENTAGE | INHERIT; public static final int traitMapping = FORMATTING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength(PropNames.SPACE_START, 0.0d, Length.PT); diff --git a/src/org/apache/fop/fo/properties/SpaceStartConditionality.java b/src/org/apache/fop/fo/properties/SpaceStartConditionality.java index 8b0a697d3..1ced800cc 100644 --- a/src/org/apache/fop/fo/properties/SpaceStartConditionality.java +++ b/src/org/apache/fop/fo/properties/SpaceStartConditionality.java @@ -10,7 +10,7 @@ public class SpaceStartConditionality extends Conditionality { public static final int dataTypes = ENUM; public static final int traitMapping = FORMATTING; public static final int initialValueType = ENUM_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType(PropNames.SPACE_START_CONDITIONALITY, DISCARD); diff --git a/src/org/apache/fop/fo/properties/SpaceStartMaximum.java b/src/org/apache/fop/fo/properties/SpaceStartMaximum.java index b98412c88..687a5ad72 100644 --- a/src/org/apache/fop/fo/properties/SpaceStartMaximum.java +++ b/src/org/apache/fop/fo/properties/SpaceStartMaximum.java @@ -10,7 +10,7 @@ public class SpaceStartMaximum extends Property { public static final int dataTypes = LENGTH | PERCENTAGE; public static final int traitMapping = FORMATTING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength(PropNames.SPACE_START_MAXIMUM, diff --git a/src/org/apache/fop/fo/properties/SpaceStartMinimum.java b/src/org/apache/fop/fo/properties/SpaceStartMinimum.java index 4ebe7044a..018be47ff 100644 --- a/src/org/apache/fop/fo/properties/SpaceStartMinimum.java +++ b/src/org/apache/fop/fo/properties/SpaceStartMinimum.java @@ -10,7 +10,7 @@ public class SpaceStartMinimum extends Property { public static final int dataTypes = LENGTH | PERCENTAGE; public static final int traitMapping = FORMATTING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength(PropNames.SPACE_START_MINIMUM, diff --git a/src/org/apache/fop/fo/properties/SpaceStartOptimum.java b/src/org/apache/fop/fo/properties/SpaceStartOptimum.java index 255c63db0..3832979ae 100644 --- a/src/org/apache/fop/fo/properties/SpaceStartOptimum.java +++ b/src/org/apache/fop/fo/properties/SpaceStartOptimum.java @@ -10,7 +10,7 @@ public class SpaceStartOptimum extends Property { public static final int dataTypes = LENGTH | PERCENTAGE; public static final int traitMapping = FORMATTING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength(PropNames.SPACE_START_OPTIMUM, diff --git a/src/org/apache/fop/fo/properties/SpaceStartPrecedence.java b/src/org/apache/fop/fo/properties/SpaceStartPrecedence.java index 19ee25d2c..ff9283878 100644 --- a/src/org/apache/fop/fo/properties/SpaceStartPrecedence.java +++ b/src/org/apache/fop/fo/properties/SpaceStartPrecedence.java @@ -10,7 +10,7 @@ public class SpaceStartPrecedence extends PrecedenceCommon { public static final int dataTypes = INTEGER | ENUM; public static final int traitMapping = FORMATTING; public static final int initialValueType = INTEGER_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new IntegerType(PropNames.SPACE_START_PRECEDENCE, 0); diff --git a/src/org/apache/fop/fo/properties/Span.java b/src/org/apache/fop/fo/properties/Span.java index 18dfb1865..0fa632055 100644 --- a/src/org/apache/fop/fo/properties/Span.java +++ b/src/org/apache/fop/fo/properties/Span.java @@ -15,10 +15,10 @@ public class Span extends Property { null ,"all" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/StartIndent.java b/src/org/apache/fop/fo/properties/StartIndent.java index 2bc377b80..2237ac701 100644 --- a/src/org/apache/fop/fo/properties/StartIndent.java +++ b/src/org/apache/fop/fo/properties/StartIndent.java @@ -10,7 +10,7 @@ public class StartIndent extends Property { public static final int dataTypes = LENGTH | INHERIT; public static final int traitMapping = FORMATTING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength (PropNames.START_INDENT, 0.0d, Length.PT); diff --git a/src/org/apache/fop/fo/properties/StartingState.java b/src/org/apache/fop/fo/properties/StartingState.java index 383b39361..ad09ab06f 100644 --- a/src/org/apache/fop/fo/properties/StartingState.java +++ b/src/org/apache/fop/fo/properties/StartingState.java @@ -13,7 +13,7 @@ public class StartingState extends Property { public static final int initialValueType = ENUM_IT; public static final int SHOW = 1; public static final int HIDE = 2; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType (PropNames.STARTING_STATE, SHOW); @@ -25,10 +25,10 @@ public class StartingState extends Property { ,"show" ,"hide" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/StartsRow.java b/src/org/apache/fop/fo/properties/StartsRow.java index 67b4b83ee..b0e05a0c7 100644 --- a/src/org/apache/fop/fo/properties/StartsRow.java +++ b/src/org/apache/fop/fo/properties/StartsRow.java @@ -10,7 +10,7 @@ public class StartsRow extends Property { public static final int dataTypes = BOOL; public static final int traitMapping = FORMATTING; public static final int initialValueType = BOOL_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new Bool(PropNames.STARTS_ROW, false); diff --git a/src/org/apache/fop/fo/properties/SuppressAtLineBreak.java b/src/org/apache/fop/fo/properties/SuppressAtLineBreak.java index 86bebdbd2..3f91671e8 100644 --- a/src/org/apache/fop/fo/properties/SuppressAtLineBreak.java +++ b/src/org/apache/fop/fo/properties/SuppressAtLineBreak.java @@ -17,10 +17,10 @@ public class SuppressAtLineBreak extends Property { ,"suppress" ,"retain" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/SwitchTo.java b/src/org/apache/fop/fo/properties/SwitchTo.java index 874f255c1..f105d0ce8 100644 --- a/src/org/apache/fop/fo/properties/SwitchTo.java +++ b/src/org/apache/fop/fo/properties/SwitchTo.java @@ -3,7 +3,6 @@ package org.apache.fop.fo.properties; import org.apache.fop.datatypes.PropertyValueList; import org.apache.fop.datatypes.NCName; import org.apache.fop.datatypes.EnumType; -import org.apache.fop.datastructs.ROStringArray; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.datatypes.PropertyValue; import org.apache.fop.fo.PropNames; @@ -19,7 +18,7 @@ public class SwitchTo extends Property { public static final int XSL_PRECEDING = 1; public static final int XSL_FOLLOWING = 2; public static final int XSL_ANY = 3; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType (PropNames.SWITCH_TO, XSL_ANY); @@ -33,15 +32,15 @@ public class SwitchTo extends Property { ,"xsl-any" }; - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue list) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue list) throws PropertyException { // Check for the enumeration. Look for a list of NCNames. // N.B. it may be possible to perform further checks on the // validity of the NCNames - do they match multi-case case names. if ( ! (list instanceof PropertyValueList)) - return Property.refineParsing(foNode, list); + return super.refineParsing(PropNames.SWITCH_TO, foNode, list); PropertyValueList ssList = spaceSeparatedList((PropertyValueList)list); @@ -54,10 +53,10 @@ public class SwitchTo extends Property { } return list; } - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/TableLayout.java b/src/org/apache/fop/fo/properties/TableLayout.java index c30317432..a74faf149 100644 --- a/src/org/apache/fop/fo/properties/TableLayout.java +++ b/src/org/apache/fop/fo/properties/TableLayout.java @@ -15,10 +15,10 @@ public class TableLayout extends Property { null ,"fixed" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/TableOmitFooterAtBreak.java b/src/org/apache/fop/fo/properties/TableOmitFooterAtBreak.java index 71484e2f0..1cca02ad9 100644 --- a/src/org/apache/fop/fo/properties/TableOmitFooterAtBreak.java +++ b/src/org/apache/fop/fo/properties/TableOmitFooterAtBreak.java @@ -10,7 +10,7 @@ public class TableOmitFooterAtBreak extends Property { public static final int dataTypes = BOOL; public static final int traitMapping = FORMATTING; public static final int initialValueType = BOOL_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new Bool (PropNames.TABLE_OMIT_FOOTER_AT_BREAK, false); diff --git a/src/org/apache/fop/fo/properties/TableOmitHeaderAtBreak.java b/src/org/apache/fop/fo/properties/TableOmitHeaderAtBreak.java index 21325d4ed..7666ed8d2 100644 --- a/src/org/apache/fop/fo/properties/TableOmitHeaderAtBreak.java +++ b/src/org/apache/fop/fo/properties/TableOmitHeaderAtBreak.java @@ -10,7 +10,7 @@ public class TableOmitHeaderAtBreak extends Property { public static final int dataTypes = BOOL; public static final int traitMapping = FORMATTING; public static final int initialValueType = BOOL_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new Bool (PropNames.TABLE_OMIT_HEADER_AT_BREAK, false); diff --git a/src/org/apache/fop/fo/properties/TargetPresentationContext.java b/src/org/apache/fop/fo/properties/TargetPresentationContext.java index 50dbc2e31..ccb6f39a7 100644 --- a/src/org/apache/fop/fo/properties/TargetPresentationContext.java +++ b/src/org/apache/fop/fo/properties/TargetPresentationContext.java @@ -12,7 +12,7 @@ public class TargetPresentationContext extends Property { public static final int traitMapping = ACTION; public static final int initialValueType = ENUM_IT; public static final int USE_TARGET_PROCESSING_CONTEXT = 1; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType(PropNames.TARGET_PRESENTATION_CONTEXT, @@ -24,10 +24,10 @@ public class TargetPresentationContext extends Property { null ,"use-target-processing-context" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/TargetProcessingContext.java b/src/org/apache/fop/fo/properties/TargetProcessingContext.java index 133c41fa4..54d99c6f3 100644 --- a/src/org/apache/fop/fo/properties/TargetProcessingContext.java +++ b/src/org/apache/fop/fo/properties/TargetProcessingContext.java @@ -12,7 +12,7 @@ public class TargetProcessingContext extends Property { public static final int traitMapping = ACTION; public static final int initialValueType = ENUM_IT; public static final int DOCUMENT_ROOT = 1; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType(PropNames.TARGET_PROCESSING_CONTEXT, @@ -24,10 +24,10 @@ public class TargetProcessingContext extends Property { null ,"document-root" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/TargetStylesheet.java b/src/org/apache/fop/fo/properties/TargetStylesheet.java index 3890675d0..b7a61d107 100644 --- a/src/org/apache/fop/fo/properties/TargetStylesheet.java +++ b/src/org/apache/fop/fo/properties/TargetStylesheet.java @@ -12,7 +12,7 @@ public class TargetStylesheet extends Property { public static final int traitMapping = ACTION; public static final int initialValueType = ENUM_IT; public static final int USE_NORMAL_STYLESHEET = 1; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType(PropNames.TARGET_STYLESHEET, @@ -24,10 +24,10 @@ public class TargetStylesheet extends Property { null ,"use-normal-stylesheet" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/TextAlign.java b/src/org/apache/fop/fo/properties/TextAlign.java index 9d51101d6..8baac30c8 100644 --- a/src/org/apache/fop/fo/properties/TextAlign.java +++ b/src/org/apache/fop/fo/properties/TextAlign.java @@ -24,7 +24,7 @@ public class TextAlign extends Property { public static final int LEFT = 7; public static final int RIGHT = 8; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType(PropNames.TEXT_ALIGN, START); @@ -51,10 +51,10 @@ public class TextAlign extends Property { (Object) Ints.consts.get(i)); } } - public /**/static/**/ int getEnumIndex(String enum) { + public /*static*/ int getEnumIndex(String enum) { return ((Integer)(rwEnumHash.get(enum))).intValue(); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/TextAlignLast.java b/src/org/apache/fop/fo/properties/TextAlignLast.java index b47279cb7..15511035f 100644 --- a/src/org/apache/fop/fo/properties/TextAlignLast.java +++ b/src/org/apache/fop/fo/properties/TextAlignLast.java @@ -25,7 +25,7 @@ public class TextAlignLast extends Property { public static final int LEFT = 8; public static final int RIGHT = 9; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType (PropNames.TEXT_ALIGN_LAST, RELATIVE); @@ -53,10 +53,10 @@ public class TextAlignLast extends Property { (Object) Ints.consts.get(i)); } } - public /**/static/**/ int getEnumIndex(String enum) { + public /*static*/ int getEnumIndex(String enum) { return ((Integer)(rwEnumHash.get(enum))).intValue(); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/TextAltitude.java b/src/org/apache/fop/fo/properties/TextAltitude.java index e129440c8..69026ae57 100644 --- a/src/org/apache/fop/fo/properties/TextAltitude.java +++ b/src/org/apache/fop/fo/properties/TextAltitude.java @@ -12,7 +12,7 @@ public class TextAltitude extends Property { public static final int traitMapping = FORMATTING; public static final int initialValueType = ENUM_IT; public static final int USE_FONT_METRICS = 1; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType (PropNames.TEXT_ALTITUDE, USE_FONT_METRICS); @@ -24,10 +24,10 @@ public class TextAltitude extends Property { ,"use-font-metrics" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } diff --git a/src/org/apache/fop/fo/properties/TextDecoration.java b/src/org/apache/fop/fo/properties/TextDecoration.java index e0ff0689a..91ff31541 100644 --- a/src/org/apache/fop/fo/properties/TextDecoration.java +++ b/src/org/apache/fop/fo/properties/TextDecoration.java @@ -20,7 +20,7 @@ public class TextDecoration extends Property { public static final int dataTypes = COMPLEX | NONE | INHERIT; public static final int traitMapping = NEW_TRAIT; public static final int initialValueType = TEXT_DECORATION_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new TextDecorations @@ -56,8 +56,8 @@ public class TextDecoration extends Property { ,BLINK }; - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue list) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue list) throws PropertyException { byte onMask = NO_DECORATION; diff --git a/src/org/apache/fop/fo/properties/TextDepth.java b/src/org/apache/fop/fo/properties/TextDepth.java index 33a81ee6c..60980828a 100644 --- a/src/org/apache/fop/fo/properties/TextDepth.java +++ b/src/org/apache/fop/fo/properties/TextDepth.java @@ -12,7 +12,7 @@ public class TextDepth extends Property { public static final int traitMapping = FORMATTING; public static final int initialValueType = ENUM_IT; public static final int USE_FONT_METRICS = 1; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType (PropNames.TEXT_DEPTH, USE_FONT_METRICS); @@ -23,10 +23,10 @@ public class TextDepth extends Property { null ,"use-font-metrics" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/TextIndent.java b/src/org/apache/fop/fo/properties/TextIndent.java index b95c5e598..4e1aa694c 100644 --- a/src/org/apache/fop/fo/properties/TextIndent.java +++ b/src/org/apache/fop/fo/properties/TextIndent.java @@ -10,7 +10,7 @@ public class TextIndent extends Property { public static final int dataTypes = PERCENTAGE | LENGTH | INHERIT; public static final int traitMapping = FORMATTING; public static final int initialValueType = LENGTH_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return Length.makeLength (PropNames.TEXT_INDENT, 0.0d, Length.PT); diff --git a/src/org/apache/fop/fo/properties/TextShadow.java b/src/org/apache/fop/fo/properties/TextShadow.java index 3053a9e76..54ce46b88 100644 --- a/src/org/apache/fop/fo/properties/TextShadow.java +++ b/src/org/apache/fop/fo/properties/TextShadow.java @@ -6,6 +6,7 @@ import org.apache.fop.datatypes.Length; import org.apache.fop.datatypes.ShadowEffect; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.fo.FONode; +import org.apache.fop.fo.PropNames; import org.apache.fop.fo.properties.ColorNonTransparent; import java.util.Iterator; @@ -27,13 +28,13 @@ public class TextShadow extends ColorNonTransparent { * Lengths may be preceded or followed by a color * specifier. */ - public /**/static/**/ PropertyValue refineParsing - (FONode foNode, PropertyValue list) + public /*static*/ PropertyValue refineParsing + (int propindex, FONode foNode, PropertyValue list) throws PropertyException { int property = list.getProperty(); if ( ! (list instanceof PropertyValueList)) { - return Property.refineParsing(foNode, list); + return super.refineParsing(PropNames.TEXT_SHADOW, foNode, list); } if (((PropertyValueList)list).size() == 0) throw new PropertyException @@ -41,7 +42,7 @@ public class TextShadow extends ColorNonTransparent { PropertyValueList newlist = new PropertyValueList(property); Iterator effects = ((PropertyValueList)list).iterator(); while (effects.hasNext()) { - newlist.add(new ShadowEffect(property, + newlist.add(new ShadowEffect(PropNames.TEXT_SHADOW, (PropertyValueList)(effects.next()))); } return newlist; diff --git a/src/org/apache/fop/fo/properties/TextTransform.java b/src/org/apache/fop/fo/properties/TextTransform.java index ed651c11a..f9279742d 100644 --- a/src/org/apache/fop/fo/properties/TextTransform.java +++ b/src/org/apache/fop/fo/properties/TextTransform.java @@ -19,10 +19,10 @@ public class TextTransform extends Property { ,"uppercase" ,"lowercase" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/UnicodeBidi.java b/src/org/apache/fop/fo/properties/UnicodeBidi.java index ba0036308..75d9ec389 100644 --- a/src/org/apache/fop/fo/properties/UnicodeBidi.java +++ b/src/org/apache/fop/fo/properties/UnicodeBidi.java @@ -14,7 +14,7 @@ public class UnicodeBidi extends Property { public static final int NORMAL = 1; public static final int EMBED = 2; public static final int BIDI_OVERRIDE = 3; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType (PropNames.UNICODE_BIDI, NORMAL); @@ -27,10 +27,10 @@ public class UnicodeBidi extends Property { ,"embed" ,"bidi-override" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/VerticalAlign.java b/src/org/apache/fop/fo/properties/VerticalAlign.java index acb4dd35e..ab39b30fa 100644 --- a/src/org/apache/fop/fo/properties/VerticalAlign.java +++ b/src/org/apache/fop/fo/properties/VerticalAlign.java @@ -24,7 +24,7 @@ public class VerticalAlign extends Property { public static final int TEXT_BOTTOM = 6; public static final int TOP = 7; public static final int BOTTOM = 8; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType (PropNames.VERTICAL_ALIGN, BASELINE); @@ -50,10 +50,10 @@ public class VerticalAlign extends Property { (Object) Ints.consts.get(i)); } } - public /**/static/**/ int getEnumIndex(String enum) { + public /*static*/ int getEnumIndex(String enum) { return ((Integer)(rwEnumHash.get(enum))).intValue(); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/Visibility.java b/src/org/apache/fop/fo/properties/Visibility.java index be5a96d4c..c33f06c9b 100644 --- a/src/org/apache/fop/fo/properties/Visibility.java +++ b/src/org/apache/fop/fo/properties/Visibility.java @@ -14,7 +14,7 @@ public class Visibility extends Property { public static final int VISIBLE = 1; public static final int HIDDEN = 2; public static final int COLLAPSE = 3; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType (PropNames.VISIBILITY, VISIBLE); @@ -27,10 +27,10 @@ public class Visibility extends Property { ,"hidden" ,"collapse" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/WhiteSpace.java b/src/org/apache/fop/fo/properties/WhiteSpace.java index eb5b97ccd..2fb7e1ff9 100644 --- a/src/org/apache/fop/fo/properties/WhiteSpace.java +++ b/src/org/apache/fop/fo/properties/WhiteSpace.java @@ -14,7 +14,7 @@ public class WhiteSpace extends Property { public static final int NORMAL = 1; public static final int PRE = 2; public static final int NOWRAP = 3; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType (PropNames.WHITE_SPACE, NORMAL); @@ -27,10 +27,10 @@ public class WhiteSpace extends Property { ,"pre" ,"nowrap" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/WhiteSpaceCollapse.java b/src/org/apache/fop/fo/properties/WhiteSpaceCollapse.java index c8cc43938..8e313fe59 100644 --- a/src/org/apache/fop/fo/properties/WhiteSpaceCollapse.java +++ b/src/org/apache/fop/fo/properties/WhiteSpaceCollapse.java @@ -10,7 +10,7 @@ public class WhiteSpaceCollapse extends Property { public static final int dataTypes = BOOL | INHERIT; public static final int traitMapping = FORMATTING; public static final int initialValueType = BOOL_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new Bool(PropNames.WHITE_SPACE_COLLAPSE, true); diff --git a/src/org/apache/fop/fo/properties/WhiteSpaceTreatment.java b/src/org/apache/fop/fo/properties/WhiteSpaceTreatment.java index f344d11ee..a442da2dc 100644 --- a/src/org/apache/fop/fo/properties/WhiteSpaceTreatment.java +++ b/src/org/apache/fop/fo/properties/WhiteSpaceTreatment.java @@ -20,7 +20,7 @@ public class WhiteSpaceTreatment extends Property { public static final int IGNORE_IF_BEFORE_LINEFEED = 3; public static final int IGNORE_IF_AFTER_LINEFEED = 4; public static final int IGNORE_IF_SURROUNDING_LINEFEED = 5; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType (PropNames.WHITE_SPACE_TREATMENT, PRESERVE); @@ -43,10 +43,10 @@ public class WhiteSpaceTreatment extends Property { (Object) Ints.consts.get(i)); } } - public /**/static/**/ int getEnumIndex(String enum) { + public /*static*/ int getEnumIndex(String enum) { return ((Integer)(rwEnumHash.get(enum))).intValue(); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/Widows.java b/src/org/apache/fop/fo/properties/Widows.java index 07c548343..9cd2ae618 100644 --- a/src/org/apache/fop/fo/properties/Widows.java +++ b/src/org/apache/fop/fo/properties/Widows.java @@ -10,7 +10,7 @@ public class Widows extends Property { public static final int dataTypes = INTEGER | INHERIT; public static final int traitMapping = FORMATTING; public static final int initialValueType = INTEGER_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new IntegerType(PropNames.WIDOWS, 2); diff --git a/src/org/apache/fop/fo/properties/WordSpacing.java b/src/org/apache/fop/fo/properties/WordSpacing.java index c3d63af7c..bedcb8e23 100644 --- a/src/org/apache/fop/fo/properties/WordSpacing.java +++ b/src/org/apache/fop/fo/properties/WordSpacing.java @@ -6,27 +6,21 @@ import org.apache.fop.datastructs.ROStringArray; import org.apache.fop.fo.expr.PropertyException; import org.apache.fop.datatypes.PropertyValue; import org.apache.fop.fo.PropNames; -import org.apache.fop.fo.properties.Property; +import org.apache.fop.fo.properties.WordSpacingCommon; -public class WordSpacing extends Property { +public class WordSpacing extends WordSpacingCommon { public static final int dataTypes = COMPOUND | LENGTH | MAPPED_LENGTH | INHERIT; public static final int traitMapping = DISAPPEARS; public static final int initialValueType = LENGTH_IT; - public static final int NORMAL = 1; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return getMappedLength(NORMAL); //normal } public static final int inherited = NO; - private static final String[] rwEnums = { - null - ,"normal" - }; - - public static Numeric getMappedLength(int enum) + public /*static*/ Numeric getMappedLength(int enum) throws PropertyException { if (enum != NORMAL) diff --git a/src/org/apache/fop/fo/properties/WordSpacingCommon.java b/src/org/apache/fop/fo/properties/WordSpacingCommon.java new file mode 100644 index 000000000..76a7b9ae3 --- /dev/null +++ b/src/org/apache/fop/fo/properties/WordSpacingCommon.java @@ -0,0 +1,14 @@ +package org.apache.fop.fo.properties; + +import org.apache.fop.fo.properties.Property; + +public class WordSpacingCommon extends Property { + public static final int NORMAL = 1; + + private static final String[] rwEnums = { + null + ,"normal" + }; + +} + diff --git a/src/org/apache/fop/fo/properties/WordSpacingConditionality.java b/src/org/apache/fop/fo/properties/WordSpacingConditionality.java index 62a1813fa..fb43f53ce 100644 --- a/src/org/apache/fop/fo/properties/WordSpacingConditionality.java +++ b/src/org/apache/fop/fo/properties/WordSpacingConditionality.java @@ -10,7 +10,7 @@ public class WordSpacingConditionality extends Conditionality { public static final int dataTypes = ENUM; public static final int traitMapping = FORMATTING; public static final int initialValueType = ENUM_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType(PropNames.WORD_SPACING_CONDITIONALITY, DISCARD); diff --git a/src/org/apache/fop/fo/properties/WordSpacingMaximum.java b/src/org/apache/fop/fo/properties/WordSpacingMaximum.java index c3270931a..8db9a9e01 100644 --- a/src/org/apache/fop/fo/properties/WordSpacingMaximum.java +++ b/src/org/apache/fop/fo/properties/WordSpacingMaximum.java @@ -1,19 +1,31 @@ package org.apache.fop.fo.properties; import org.apache.fop.fo.expr.PropertyException; +import org.apache.fop.fo.PropNames; import org.apache.fop.datatypes.PropertyValue; -import org.apache.fop.fo.properties.Property; +import org.apache.fop.datatypes.Numeric; +import org.apache.fop.datatypes.Length; +import org.apache.fop.fo.properties.WordSpacingCommon; -public class WordSpacingMaximum extends Property { +public class WordSpacingMaximum extends WordSpacingCommon { public static final int dataTypes = LENGTH; public static final int traitMapping = DISAPPEARS; public static final int initialValueType = LENGTH_IT; - public static final int NORMAL = 1; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { - return WordSpacing.getMappedLength(WordSpacing.NORMAL); + return getMappedLength(NORMAL); } public static final int inherited = COMPUTED; + + public /*static*/ Numeric getMappedLength(int enum) + throws PropertyException + { + if (enum != NORMAL) + throw new PropertyException("Invalid MAPPED_LENGTH enum: " + + enum); + return Length.makeLength + (PropNames.WORD_SPACING_MAXIMUM, 0d, Length.PT); + } } diff --git a/src/org/apache/fop/fo/properties/WordSpacingMinimum.java b/src/org/apache/fop/fo/properties/WordSpacingMinimum.java index 1c5d85722..2ee6174cc 100644 --- a/src/org/apache/fop/fo/properties/WordSpacingMinimum.java +++ b/src/org/apache/fop/fo/properties/WordSpacingMinimum.java @@ -1,19 +1,31 @@ package org.apache.fop.fo.properties; import org.apache.fop.fo.expr.PropertyException; +import org.apache.fop.fo.PropNames; import org.apache.fop.datatypes.PropertyValue; -import org.apache.fop.fo.properties.Property; +import org.apache.fop.datatypes.Numeric; +import org.apache.fop.datatypes.Length; +import org.apache.fop.fo.properties.WordSpacingCommon; -public class WordSpacingMinimum extends Property { +public class WordSpacingMinimum extends WordSpacingCommon { public static final int dataTypes = LENGTH; public static final int traitMapping = DISAPPEARS; public static final int initialValueType = LENGTH_IT; - public static final int NORMAL = 1; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { - return WordSpacing.getMappedLength(WordSpacing.NORMAL); + return getMappedLength(WordSpacing.NORMAL); } public static final int inherited = COMPUTED; + + public /*static*/ Numeric getMappedLength(int enum) + throws PropertyException + { + if (enum != NORMAL) + throw new PropertyException("Invalid MAPPED_LENGTH enum: " + + enum); + return Length.makeLength + (PropNames.WORD_SPACING_MINIMUM, 0d, Length.PT); + } } diff --git a/src/org/apache/fop/fo/properties/WordSpacingOptimum.java b/src/org/apache/fop/fo/properties/WordSpacingOptimum.java index 943160fb6..80925cf64 100644 --- a/src/org/apache/fop/fo/properties/WordSpacingOptimum.java +++ b/src/org/apache/fop/fo/properties/WordSpacingOptimum.java @@ -1,19 +1,31 @@ package org.apache.fop.fo.properties; import org.apache.fop.fo.expr.PropertyException; +import org.apache.fop.fo.PropNames; import org.apache.fop.datatypes.PropertyValue; -import org.apache.fop.fo.properties.Property; +import org.apache.fop.datatypes.Numeric; +import org.apache.fop.datatypes.Length; +import org.apache.fop.fo.properties.WordSpacingCommon; -public class WordSpacingOptimum extends Property { +public class WordSpacingOptimum extends WordSpacingCommon { public static final int dataTypes = LENGTH; public static final int traitMapping = DISAPPEARS; public static final int initialValueType = LENGTH_IT; - public static final int NORMAL = 1; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { - return WordSpacing.getMappedLength(WordSpacing.NORMAL); + return getMappedLength(WordSpacing.NORMAL); } public static final int inherited = COMPUTED; + + public /*static*/ Numeric getMappedLength(int enum) + throws PropertyException + { + if (enum != NORMAL) + throw new PropertyException("Invalid MAPPED_LENGTH enum: " + + enum); + return Length.makeLength + (PropNames.WORD_SPACING_OPTIMUM, 0d, Length.PT); + } } diff --git a/src/org/apache/fop/fo/properties/WordSpacingPrecedence.java b/src/org/apache/fop/fo/properties/WordSpacingPrecedence.java index aebf9689b..aa057e044 100644 --- a/src/org/apache/fop/fo/properties/WordSpacingPrecedence.java +++ b/src/org/apache/fop/fo/properties/WordSpacingPrecedence.java @@ -10,7 +10,7 @@ public class WordSpacingPrecedence extends PrecedenceCommon { public static final int dataTypes = INTEGER | ENUM; public static final int traitMapping = FORMATTING; public static final int initialValueType = ENUM_IT; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType(PropNames.WORD_SPACING_PRECEDENCE, FORCE); diff --git a/src/org/apache/fop/fo/properties/WrapOption.java b/src/org/apache/fop/fo/properties/WrapOption.java index 2263219e3..5708877be 100644 --- a/src/org/apache/fop/fo/properties/WrapOption.java +++ b/src/org/apache/fop/fo/properties/WrapOption.java @@ -13,7 +13,7 @@ public class WrapOption extends Property { public static final int initialValueType = ENUM_IT; public static final int WRAP = 1; public static final int NO_WRAP = 2; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType(PropNames.WRAP_OPTION, WRAP); @@ -25,10 +25,10 @@ public class WrapOption extends Property { ,"wrap" ,"no-wrap" }; - public /**/static/**/ int getEnumIndex(String enum) throws PropertyException { + public /*static*/ int getEnumIndex(String enum) throws PropertyException { return enumValueToIndex(enum, rwEnums); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } diff --git a/src/org/apache/fop/fo/properties/WritingMode.java b/src/org/apache/fop/fo/properties/WritingMode.java index 43db4d172..02396de1a 100644 --- a/src/org/apache/fop/fo/properties/WritingMode.java +++ b/src/org/apache/fop/fo/properties/WritingMode.java @@ -21,7 +21,7 @@ public class WritingMode extends Property { public static final int LR = 4; public static final int RL = 5; public static final int TB = 6; - public /**/static/**/ PropertyValue getInitialValue(int property) + public /*static*/ PropertyValue getInitialValue(int property) throws PropertyException { return new EnumType (PropNames.WRITING_MODE, LR_TB); @@ -45,10 +45,10 @@ public class WritingMode extends Property { (Object) Ints.consts.get(i)); } } - public /**/static/**/ int getEnumIndex(String enum) { + public /*static*/ int getEnumIndex(String enum) { return ((Integer)(rwEnumHash.get(enum))).intValue(); } - public /**/static/**/ String getEnumText(int index) { + public /*static*/ String getEnumText(int index) { return rwEnums[index]; } } -- 2.39.5