diff options
author | Vincent Hennebert <vhennebert@apache.org> | 2013-05-07 16:23:13 +0000 |
---|---|---|
committer | Vincent Hennebert <vhennebert@apache.org> | 2013-05-07 16:23:13 +0000 |
commit | e8f590803ae0bb67a0d1686c47ccc2fb6d187ae8 (patch) | |
tree | 1d332afdbc04dce657b7480df6f20d4498cd0712 /src/java/org/apache/fop/fo | |
parent | 4726c4f941c2179152a3c27e0dc7f62147e825f3 (diff) | |
download | xmlgraphics-fop-e8f590803ae0bb67a0d1686c47ccc2fb6d187ae8.tar.gz xmlgraphics-fop-e8f590803ae0bb67a0d1686c47ccc2fb6d187ae8.zip |
Cosmetics only: enabled Checkstyle MethodParamPad rule and fixed corresponding violations
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1479969 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo')
37 files changed, 133 insertions, 133 deletions
diff --git a/src/java/org/apache/fop/fo/FONode.java b/src/java/org/apache/fop/fo/FONode.java index 2722498c7..e2b91b55c 100644 --- a/src/java/org/apache/fop/fo/FONode.java +++ b/src/java/org/apache/fop/fo/FONode.java @@ -438,7 +438,7 @@ public abstract class FONode implements Cloneable { * with the unabbreviated URI otherwise. */ public static String getNodeString(String namespaceURI, String localName) { - String prefix = getNodePrefix (namespaceURI); + String prefix = getNodePrefix(namespaceURI); if (prefix != null) { return prefix + ":" + localName; } else { @@ -552,7 +552,7 @@ public abstract class FONode implements Cloneable { protected void invalidChildError(Locator loc, String parentName, String nsURI, String lName, String ruleViolated) throws ValidationException { - String prefix = getNodePrefix (nsURI); + String prefix = getNodePrefix(nsURI); QName qn; // qualified name of offending node if (prefix != null) { qn = new QName(nsURI, prefix, lName); @@ -926,7 +926,7 @@ public abstract class FONode implements Cloneable { * @return true if indicated boundary (or boundaries) constitute a delimited text range * boundary. */ - public boolean isDelimitedTextRangeBoundary (int boundary) { + public boolean isDelimitedTextRangeBoundary(int boundary) { return true; } @@ -936,10 +936,10 @@ public abstract class FONode implements Cloneable { * @param ranges a stack of delimited text ranges * @return the (possibly) updated stack of delimited text ranges */ - public Stack collectDelimitedTextRanges (Stack ranges) { + public Stack collectDelimitedTextRanges(Stack ranges) { // if boundary before, then push new range if (isRangeBoundaryBefore()) { - maybeNewRange (ranges); + maybeNewRange(ranges); } // get current range, if one exists DelimitedTextRange currentRange; @@ -949,10 +949,10 @@ public abstract class FONode implements Cloneable { currentRange = null; } // proceses this node - ranges = collectDelimitedTextRanges (ranges, currentRange); + ranges = collectDelimitedTextRanges(ranges, currentRange); // if boundary after, then push new range if (isRangeBoundaryAfter()) { - maybeNewRange (ranges); + maybeNewRange(ranges); } return ranges; } @@ -965,9 +965,9 @@ public abstract class FONode implements Cloneable { * @param currentRange the current range or null (if none) * @return the (possibly) updated stack of delimited text ranges */ - protected Stack collectDelimitedTextRanges (Stack ranges, DelimitedTextRange currentRange) { + protected Stack collectDelimitedTextRanges(Stack ranges, DelimitedTextRange currentRange) { for (Iterator it = getChildNodes(); (it != null) && it.hasNext();) { - ranges = ((FONode) it.next()).collectDelimitedTextRanges (ranges); + ranges = ((FONode) it.next()).collectDelimitedTextRanges(ranges); } return ranges; } @@ -992,7 +992,7 @@ public abstract class FONode implements Cloneable { * @param ranges stack of delimited text ranges * @return new range (if constructed and pushed onto stack) or current range (if any) or null */ - private DelimitedTextRange maybeNewRange (Stack ranges) { + private DelimitedTextRange maybeNewRange(Stack ranges) { DelimitedTextRange rCur = null; // current range (top of range stack) DelimitedTextRange rNew = null; // new range to be pushed onto range stack if (ranges.empty()) { @@ -1002,13 +1002,13 @@ public abstract class FONode implements Cloneable { } else { rCur = (DelimitedTextRange) ranges.peek(); if (rCur != null) { - if (!rCur.isEmpty() || !isSelfOrDescendent (rCur.getNode(), this)) { + if (!rCur.isEmpty() || !isSelfOrDescendent(rCur.getNode(), this)) { rNew = new DelimitedTextRange(this); } } } if (rNew != null) { - ranges.push (rNew); + ranges.push(rNew); } else { rNew = rCur; } @@ -1016,17 +1016,17 @@ public abstract class FONode implements Cloneable { } private boolean isRangeBoundaryBefore() { - return isDelimitedTextRangeBoundary (Constants.EN_BEFORE); + return isDelimitedTextRangeBoundary(Constants.EN_BEFORE); } private boolean isRangeBoundaryAfter() { - return isDelimitedTextRangeBoundary (Constants.EN_AFTER); + return isDelimitedTextRangeBoundary(Constants.EN_AFTER); } /** * Determine if node N2 is the same or a descendent of node N1. */ - private static boolean isSelfOrDescendent (FONode n1, FONode n2) { + private static boolean isSelfOrDescendent(FONode n1, FONode n2) { for (FONode n = n2; n != null; n = n.getParent()) { if (n == n1) { return true; diff --git a/src/java/org/apache/fop/fo/FOPropertyMapping.java b/src/java/org/apache/fop/fo/FOPropertyMapping.java index a8a3d5bb6..61255dc01 100644 --- a/src/java/org/apache/fop/fo/FOPropertyMapping.java +++ b/src/java/org/apache/fop/fo/FOPropertyMapping.java @@ -1503,7 +1503,7 @@ public final class FOPropertyMapping implements Constants { addPropertyMaker("fox:block-progression-unit", l); } - private Property calcWritingModeDependent (int pv, int wm) { + private Property calcWritingModeDependent(int pv, int wm) { if (pv == EN_LEFT) { if (wm == Constants.EN_LR_TB) { pv = EN_START; @@ -1521,14 +1521,14 @@ public final class FOPropertyMapping implements Constants { pv = EN_END; } } - return makeWritingModeDependentEnum (pv); + return makeWritingModeDependentEnum(pv); } - private Property makeWritingModeDependentEnum (int pv) { + private Property makeWritingModeDependentEnum(int pv) { if (pv == EN_START) { - return getEnumProperty (EN_START, "START"); + return getEnumProperty(EN_START, "START"); } else if (pv == EN_END) { - return getEnumProperty (EN_END, "END"); + return getEnumProperty(EN_END, "END"); } else { return null; } @@ -1626,8 +1626,8 @@ public final class FOPropertyMapping implements Constants { if (p != null) { int pv = p.getEnum(); if ((pv == EN_LEFT) || (pv == EN_RIGHT)) { - p = calcWritingModeDependent - (pv, propertyList.get(Constants.PR_WRITING_MODE).getEnum()); + p = calcWritingModeDependent( + pv, propertyList.get(Constants.PR_WRITING_MODE).getEnum()); } } return p; @@ -1676,11 +1676,11 @@ public final class FOPropertyMapping implements Constants { } else if (correspondingValue == EN_CENTER) { return getEnumProperty(EN_CENTER, "CENTER"); } else if (correspondingValue == EN_LEFT) { - return calcWritingModeDependent - (EN_LEFT, propertyList.get(Constants.PR_WRITING_MODE).getEnum()); + return calcWritingModeDependent( + EN_LEFT, propertyList.get(Constants.PR_WRITING_MODE).getEnum()); } else if (correspondingValue == EN_RIGHT) { - return calcWritingModeDependent - (EN_RIGHT, propertyList.get(Constants.PR_WRITING_MODE).getEnum()); + return calcWritingModeDependent( + EN_RIGHT, propertyList.get(Constants.PR_WRITING_MODE).getEnum()); } else { return null; } diff --git a/src/java/org/apache/fop/fo/FOText.java b/src/java/org/apache/fop/fo/FOText.java index caa27ed0c..2fc998c63 100644 --- a/src/java/org/apache/fop/fo/FOText.java +++ b/src/java/org/apache/fop/fo/FOText.java @@ -717,7 +717,7 @@ public class FOText extends FONode implements CharSequence { } @Override - public boolean isDelimitedTextRangeBoundary (int boundary) { + public boolean isDelimitedTextRangeBoundary(int boundary) { return false; } @@ -737,7 +737,7 @@ public class FOText extends FONode implements CharSequence { * @param start the starting index of interval * @param end the ending index of interval */ - public void setBidiLevel (int level, int start, int end) { + public void setBidiLevel(int level, int start, int end) { if (start < end) { if (bidiLevels == null) { bidiLevels = new int [ length() ]; @@ -746,7 +746,7 @@ public class FOText extends FONode implements CharSequence { bidiLevels [ i ] = level; } if (parent != null) { - ((FObj) parent).setBidiLevel (level); + ((FObj) parent).setBidiLevel(level); } } else { assert start < end; @@ -771,7 +771,7 @@ public class FOText extends FONode implements CharSequence { * @return a (possibly empty) array of bidi levels or null * in case no bidi levels have been assigned */ - public int[] getBidiLevels (int start, int end) { + public int[] getBidiLevels(int start, int end) { if (this.bidiLevels != null) { assert start <= end; int n = end - start; @@ -794,7 +794,7 @@ public class FOText extends FONode implements CharSequence { * @throws IndexOutOfBoundsException if position is not non-negative integer * or is greater than or equal to length */ - public int bidiLevelAt (int position) throws IndexOutOfBoundsException { + public int bidiLevelAt(int position) throws IndexOutOfBoundsException { if ((position < 0) || (position >= length())) { throw new IndexOutOfBoundsException(); } else if (bidiLevels != null) { @@ -810,11 +810,11 @@ public class FOText extends FONode implements CharSequence { * @param end index in character buffer * @param mappedChars sequence of character codes denoting substituted characters */ - public void addMapping (int start, int end, CharSequence mappedChars) { + public void addMapping(int start, int end, CharSequence mappedChars) { if (mappings == null) { mappings = new java.util.HashMap(); } - mappings.put (new MapRange (start, end), mappedChars.toString()); + mappings.put(new MapRange(start, end), mappedChars.toString()); } /** @@ -824,8 +824,8 @@ public class FOText extends FONode implements CharSequence { * @return true if a mapping exist such that the mapping's interval is coincident to * [start,end) */ - public boolean hasMapping (int start, int end) { - return (mappings != null) && (mappings.containsKey (new MapRange (start, end))); + public boolean hasMapping(int start, int end) { + return (mappings != null) && (mappings.containsKey(new MapRange(start, end))); } /** @@ -835,9 +835,9 @@ public class FOText extends FONode implements CharSequence { * @return a string of characters representing the mapping over the interval * [start,end) */ - public String getMapping (int start, int end) { + public String getMapping(int start, int end) { if (mappings != null) { - return (String) mappings.get (new MapRange (start, end)); + return (String) mappings.get(new MapRange(start, end)); } else { return null; } @@ -849,9 +849,9 @@ public class FOText extends FONode implements CharSequence { * @param end index in character buffer * @return the length of the mapping (if present) or zero */ - public int getMappingLength (int start, int end) { + public int getMappingLength(int start, int end) { if (mappings != null) { - return ((String) mappings.get (new MapRange (start, end))) .length(); + return ((String) mappings.get(new MapRange(start, end))) .length(); } else { return 0; } @@ -864,18 +864,18 @@ public class FOText extends FONode implements CharSequence { * @return a (possibly empty) array of bidi levels or null * in case no bidi levels have been assigned */ - public int[] getMappingBidiLevels (int start, int end) { - if (hasMapping (start, end)) { + public int[] getMappingBidiLevels(int start, int end) { + if (hasMapping(start, end)) { int nc = end - start; - int nm = getMappingLength (start, end); - int[] la = getBidiLevels (start, end); + int nm = getMappingLength(start, end); + int[] la = getBidiLevels(start, end); if (la == null) { return null; } else if (nm == nc) { // mapping is same length as mapped range return la; } else if (nm > nc) { // mapping is longer than mapped range int[] ma = new int [ nm ]; - System.arraycopy (la, 0, ma, 0, la.length); + System.arraycopy(la, 0, ma, 0, la.length); for (int i = la.length, n = ma.length, l = (i > 0) ? la [ i - 1 ] : 0; i < n; i++) { ma [ i ] = l; @@ -883,18 +883,18 @@ public class FOText extends FONode implements CharSequence { return ma; } else { // mapping is shorter than mapped range int[] ma = new int [ nm ]; - System.arraycopy (la, 0, ma, 0, ma.length); + System.arraycopy(la, 0, ma, 0, ma.length); return ma; } } else { - return getBidiLevels (start, end); + return getBidiLevels(start, end); } } @Override - protected Stack collectDelimitedTextRanges (Stack ranges, DelimitedTextRange currentRange) { + protected Stack collectDelimitedTextRanges(Stack ranges, DelimitedTextRange currentRange) { if (currentRange != null) { - currentRange.append (charIterator(), this); + currentRange.append(charIterator(), this); } return ranges; } @@ -909,7 +909,7 @@ public class FOText extends FONode implements CharSequence { public int hashCode() { return (start * 31) + end; } - public boolean equals (Object o) { + public boolean equals(Object o) { if (o instanceof MapRange) { MapRange r = (MapRange) o; return (r.start == start) && (r.end == end); diff --git a/src/java/org/apache/fop/fo/FObj.java b/src/java/org/apache/fop/fo/FObj.java index 96b817de3..92dc9fd73 100644 --- a/src/java/org/apache/fop/fo/FObj.java +++ b/src/java/org/apache/fop/fo/FObj.java @@ -615,7 +615,7 @@ public abstract class FObj extends FONode implements Constants { FObj foParent = (FObj) parent; int parentBidiLevel = foParent.getBidiLevel(); if ((parentBidiLevel < 0) || (bidiLevel < parentBidiLevel)) { - foParent.setBidiLevel (bidiLevel); + foParent.setBidiLevel(bidiLevel); } } } diff --git a/src/java/org/apache/fop/fo/expr/FromNearestSpecifiedValueFunction.java b/src/java/org/apache/fop/fo/expr/FromNearestSpecifiedValueFunction.java index a3698edf1..6da7fcd25 100644 --- a/src/java/org/apache/fop/fo/expr/FromNearestSpecifiedValueFunction.java +++ b/src/java/org/apache/fop/fo/expr/FromNearestSpecifiedValueFunction.java @@ -43,9 +43,9 @@ public class FromNearestSpecifiedValueFunction extends FunctionBase { /** {@inheritDoc} */ public Property getOptionalArgDefault(int index, PropertyInfo pi) throws PropertyException { if (index == 0) { - return getPropertyName (pi); + return getPropertyName(pi); } else { - return super.getOptionalArgDefault (index, pi); + return super.getOptionalArgDefault(index, pi); } } diff --git a/src/java/org/apache/fop/fo/expr/FromParentFunction.java b/src/java/org/apache/fop/fo/expr/FromParentFunction.java index ce6873e54..22a1a95e1 100644 --- a/src/java/org/apache/fop/fo/expr/FromParentFunction.java +++ b/src/java/org/apache/fop/fo/expr/FromParentFunction.java @@ -44,9 +44,9 @@ public class FromParentFunction extends FunctionBase { /** {@inheritDoc} */ public Property getOptionalArgDefault(int index, PropertyInfo pi) throws PropertyException { if (index == 0) { - return getPropertyName (pi); + return getPropertyName(pi); } else { - return super.getOptionalArgDefault (index, pi); + return super.getOptionalArgDefault(index, pi); } } diff --git a/src/java/org/apache/fop/fo/expr/FromTableColumnFunction.java b/src/java/org/apache/fop/fo/expr/FromTableColumnFunction.java index 98d4e1d07..6874a821f 100644 --- a/src/java/org/apache/fop/fo/expr/FromTableColumnFunction.java +++ b/src/java/org/apache/fop/fo/expr/FromTableColumnFunction.java @@ -52,9 +52,9 @@ public class FromTableColumnFunction extends FunctionBase { /** {@inheritDoc} */ public Property getOptionalArgDefault(int index, PropertyInfo pi) throws PropertyException { if (index == 0) { - return getPropertyName (pi); + return getPropertyName(pi); } else { - return super.getOptionalArgDefault (index, pi); + return super.getOptionalArgDefault(index, pi); } } diff --git a/src/java/org/apache/fop/fo/expr/FunctionBase.java b/src/java/org/apache/fop/fo/expr/FunctionBase.java index bb68a1201..707424b86 100644 --- a/src/java/org/apache/fop/fo/expr/FunctionBase.java +++ b/src/java/org/apache/fop/fo/expr/FunctionBase.java @@ -36,8 +36,8 @@ public abstract class FunctionBase implements Function { /** {@inheritDoc} */ public Property getOptionalArgDefault(int index, PropertyInfo pi) throws PropertyException { if (index >= getOptionalArgsCount()) { - PropertyException e = new PropertyException (new IndexOutOfBoundsException ("illegal optional argument index")); - e.setPropertyInfo (pi); + PropertyException e = new PropertyException(new IndexOutOfBoundsException("illegal optional argument index")); + e.setPropertyInfo(pi); throw e; } else { return null; @@ -58,7 +58,7 @@ public abstract class FunctionBase implements Function { * @param pi property information instance that applies to property being evaluated * @return string property whose value is name of property being evaluated */ - protected final Property getPropertyName (PropertyInfo pi) { - return StringProperty.getInstance (pi.getPropertyMaker().getName()); + protected final Property getPropertyName(PropertyInfo pi) { + return StringProperty.getInstance(pi.getPropertyMaker().getName()); } } diff --git a/src/java/org/apache/fop/fo/expr/InheritedPropFunction.java b/src/java/org/apache/fop/fo/expr/InheritedPropFunction.java index 35d5803e9..d73a8e089 100644 --- a/src/java/org/apache/fop/fo/expr/InheritedPropFunction.java +++ b/src/java/org/apache/fop/fo/expr/InheritedPropFunction.java @@ -43,9 +43,9 @@ public class InheritedPropFunction extends FunctionBase { /** {@inheritDoc} */ public Property getOptionalArgDefault(int index, PropertyInfo pi) throws PropertyException { if (index == 0) { - return getPropertyName (pi); + return getPropertyName(pi); } else { - return super.getOptionalArgDefault (index, pi); + return super.getOptionalArgDefault(index, pi); } } diff --git a/src/java/org/apache/fop/fo/expr/PropertyParser.java b/src/java/org/apache/fop/fo/expr/PropertyParser.java index b910c1c12..574fc0e12 100644 --- a/src/java/org/apache/fop/fo/expr/PropertyParser.java +++ b/src/java/org/apache/fop/fo/expr/PropertyParser.java @@ -371,9 +371,9 @@ public final class PropertyParser extends PropertyTokenizer { Property p = parseAdditiveExpr(); int i = args.size(); if ((i < numReq) || ((i - numReq) < numOpt) || hasVar) { - args.add (p); + args.add(p); } else { - throw new PropertyException ("Unexpected function argument at index " + i); + throw new PropertyException("Unexpected function argument at index " + i); } // ignore extra args if (currentToken != TOK_COMMA) { @@ -389,11 +389,11 @@ public final class PropertyParser extends PropertyTokenizer { } else { for (int i = 0; i < numOpt; i++) { if (args.size() < (numReq + i + 1)) { - args.add (function.getOptionalArgDefault (i, propInfo)); + args.add(function.getOptionalArgDefault(i, propInfo)); } } } - return (Property[]) args.toArray (new Property [ args.size() ]); + return (Property[]) args.toArray(new Property [ args.size() ]); } /** diff --git a/src/java/org/apache/fop/fo/expr/PropertyTokenizer.java b/src/java/org/apache/fop/fo/expr/PropertyTokenizer.java index 159f91304..22b5c05e4 100644 --- a/src/java/org/apache/fop/fo/expr/PropertyTokenizer.java +++ b/src/java/org/apache/fop/fo/expr/PropertyTokenizer.java @@ -255,7 +255,7 @@ class PropertyTokenizer { private void scanRestOfName() { while (++exprIndex < exprLength) { - if (!isNameChar (expr.charAt (exprIndex))) { + if (!isNameChar(expr.charAt(exprIndex))) { break; } } diff --git a/src/java/org/apache/fop/fo/extensions/svg/SVGElement.java b/src/java/org/apache/fop/fo/extensions/svg/SVGElement.java index 5c6ab16ad..eac8338aa 100644 --- a/src/java/org/apache/fop/fo/extensions/svg/SVGElement.java +++ b/src/java/org/apache/fop/fo/extensions/svg/SVGElement.java @@ -164,15 +164,15 @@ public class SVGElement extends SVGObj { if (str.length() == 0) { str = "100%"; } - float width = UnitProcessor.svgHorizontalLengthToUserSpace - (str, SVGConstants.SVG_WIDTH_ATTRIBUTE, ctx); + float width = UnitProcessor.svgHorizontalLengthToUserSpace( + str, SVGConstants.SVG_WIDTH_ATTRIBUTE, ctx); str = svgRoot.getAttributeNS(null, SVGConstants.SVG_HEIGHT_ATTRIBUTE); if (str.length() == 0) { str = "100%"; } - float height = UnitProcessor.svgVerticalLengthToUserSpace - (str, SVGConstants.SVG_HEIGHT_ATTRIBUTE, ctx); + float height = UnitProcessor.svgVerticalLengthToUserSpace( + str, SVGConstants.SVG_HEIGHT_ATTRIBUTE, ctx); return new Point2D.Float(width, height); } diff --git a/src/java/org/apache/fop/fo/flow/AbstractGraphics.java b/src/java/org/apache/fop/fo/flow/AbstractGraphics.java index f0b0bc7b5..9d94644b9 100644 --- a/src/java/org/apache/fop/fo/flow/AbstractGraphics.java +++ b/src/java/org/apache/fop/fo/flow/AbstractGraphics.java @@ -254,14 +254,14 @@ public abstract class AbstractGraphics extends FObj public abstract Length getIntrinsicAlignmentAdjust(); @Override - public boolean isDelimitedTextRangeBoundary (int boundary) { + public boolean isDelimitedTextRangeBoundary(int boundary) { return false; } @Override - protected Stack collectDelimitedTextRanges (Stack ranges, DelimitedTextRange currentRange) { + protected Stack collectDelimitedTextRanges(Stack ranges, DelimitedTextRange currentRange) { if (currentRange != null) { - currentRange.append (CharUtilities.OBJECT_REPLACEMENT_CHARACTER, this); + currentRange.append(CharUtilities.OBJECT_REPLACEMENT_CHARACTER, this); } return ranges; } diff --git a/src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java b/src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java index 2127b98ea..af6c5d316 100644 --- a/src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java +++ b/src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java @@ -115,8 +115,8 @@ public abstract class AbstractPageNumberCitation extends FObj } /** {@inheritDoc} */ - public void processNode - (String elementName, Locator locator, Attributes attlist, PropertyList pList) + public void processNode( + String elementName, Locator locator, Attributes attlist, PropertyList pList) throws FOPException { super.processNode(elementName, locator, attlist, pList); if (!inMarker() && (refId == null || "".equals(refId))) { @@ -201,14 +201,14 @@ public abstract class AbstractPageNumberCitation extends FObj } @Override - public boolean isDelimitedTextRangeBoundary (int boundary) { + public boolean isDelimitedTextRangeBoundary(int boundary) { return false; } @Override - protected Stack collectDelimitedTextRanges (Stack ranges, DelimitedTextRange currentRange) { + protected Stack collectDelimitedTextRanges(Stack ranges, DelimitedTextRange currentRange) { if (currentRange != null) { - currentRange.append (CharUtilities.OBJECT_REPLACEMENT_CHARACTER, this); + currentRange.append(CharUtilities.OBJECT_REPLACEMENT_CHARACTER, this); } return ranges; } diff --git a/src/java/org/apache/fop/fo/flow/BidiOverride.java b/src/java/org/apache/fop/fo/flow/BidiOverride.java index 62e4d7c5c..9f0ea2470 100644 --- a/src/java/org/apache/fop/fo/flow/BidiOverride.java +++ b/src/java/org/apache/fop/fo/flow/BidiOverride.java @@ -97,7 +97,7 @@ public class BidiOverride extends Inline { } @Override - protected Stack collectDelimitedTextRanges (Stack ranges, DelimitedTextRange currentRange) { + protected Stack collectDelimitedTextRanges(Stack ranges, DelimitedTextRange currentRange) { char pfx = 0; char sfx = 0; int unicodeBidi = getUnicodeBidi(); @@ -111,13 +111,13 @@ public class BidiOverride extends Inline { } if (currentRange != null) { if (pfx != 0) { - currentRange.append (pfx, this); + currentRange.append(pfx, this); } for (Iterator it = getChildNodes(); (it != null) && it.hasNext();) { - ranges = ((FONode) it.next()).collectDelimitedTextRanges (ranges); + ranges = ((FONode) it.next()).collectDelimitedTextRanges(ranges); } if (sfx != 0) { - currentRange.append (sfx, this); + currentRange.append(sfx, this); } } return ranges; diff --git a/src/java/org/apache/fop/fo/flow/BlockContainer.java b/src/java/org/apache/fop/fo/flow/BlockContainer.java index bab0f7ac5..b8616c1ce 100644 --- a/src/java/org/apache/fop/fo/flow/BlockContainer.java +++ b/src/java/org/apache/fop/fo/flow/BlockContainer.java @@ -97,8 +97,8 @@ public class BlockContainer extends FObj implements BreakPropertySet, WritingMod overflow = pList.get(PR_OVERFLOW).getEnum(); referenceOrientation = pList.get(PR_REFERENCE_ORIENTATION).getNumeric(); span = pList.get(PR_SPAN).getEnum(); - writingModeTraits = new WritingModeTraits - (WritingMode.valueOf(pList.get(PR_WRITING_MODE).getEnum())); + writingModeTraits = new WritingModeTraits( + WritingMode.valueOf(pList.get(PR_WRITING_MODE).getEnum())); disableColumnBalancing = pList.get(PR_X_DISABLE_COLUMN_BALANCING).getEnum(); } diff --git a/src/java/org/apache/fop/fo/flow/Character.java b/src/java/org/apache/fop/fo/flow/Character.java index 8e59d1f9b..e5f5dadd9 100644 --- a/src/java/org/apache/fop/fo/flow/Character.java +++ b/src/java/org/apache/fop/fo/flow/Character.java @@ -236,14 +236,14 @@ public class Character extends FObj implements StructureTreeElementHolder { } @Override - public boolean isDelimitedTextRangeBoundary (int boundary) { + public boolean isDelimitedTextRangeBoundary(int boundary) { return false; } @Override - protected Stack collectDelimitedTextRanges (Stack ranges, DelimitedTextRange currentRange) { + protected Stack collectDelimitedTextRanges(Stack ranges, DelimitedTextRange currentRange) { if (currentRange != null) { - currentRange.append (charIterator(), this); + currentRange.append(charIterator(), this); } return ranges; } diff --git a/src/java/org/apache/fop/fo/flow/InlineContainer.java b/src/java/org/apache/fop/fo/flow/InlineContainer.java index e3d3bd84c..748eb593a 100644 --- a/src/java/org/apache/fop/fo/flow/InlineContainer.java +++ b/src/java/org/apache/fop/fo/flow/InlineContainer.java @@ -95,8 +95,8 @@ public class InlineContainer extends FObj { lineHeight = pList.get(PR_LINE_HEIGHT).getSpace(); overflow = pList.get(PR_OVERFLOW).getEnum(); referenceOrientation = pList.get(PR_REFERENCE_ORIENTATION).getNumeric(); - writingModeTraits = new WritingModeTraits - (WritingMode.valueOf(pList.get(PR_WRITING_MODE).getEnum())); + writingModeTraits = new WritingModeTraits( + WritingMode.valueOf(pList.get(PR_WRITING_MODE).getEnum())); } /** @@ -252,7 +252,7 @@ public class InlineContainer extends FObj { } @Override - public boolean isDelimitedTextRangeBoundary (int boundary) { + public boolean isDelimitedTextRangeBoundary(int boundary) { return false; } diff --git a/src/java/org/apache/fop/fo/flow/InlineLevel.java b/src/java/org/apache/fop/fo/flow/InlineLevel.java index 66c03cf7d..87ea5837a 100644 --- a/src/java/org/apache/fop/fo/flow/InlineLevel.java +++ b/src/java/org/apache/fop/fo/flow/InlineLevel.java @@ -113,7 +113,7 @@ public abstract class InlineLevel extends FObjMixed implements CommonAccessibili } @Override - public boolean isDelimitedTextRangeBoundary (int boundary) { + public boolean isDelimitedTextRangeBoundary(int boundary) { return false; } diff --git a/src/java/org/apache/fop/fo/flow/Leader.java b/src/java/org/apache/fop/fo/flow/Leader.java index e39996a97..123da0c48 100644 --- a/src/java/org/apache/fop/fo/flow/Leader.java +++ b/src/java/org/apache/fop/fo/flow/Leader.java @@ -203,12 +203,12 @@ public class Leader extends InlineLevel { } @Override - protected Stack collectDelimitedTextRanges (Stack ranges, DelimitedTextRange currentRange) { + protected Stack collectDelimitedTextRanges(Stack ranges, DelimitedTextRange currentRange) { if (currentRange != null) { if (leaderPattern == EN_USECONTENT) { - ranges = super.collectDelimitedTextRanges (ranges, currentRange); + ranges = super.collectDelimitedTextRanges(ranges, currentRange); } else { - currentRange.append (CharUtilities.OBJECT_REPLACEMENT_CHARACTER, this); + currentRange.append(CharUtilities.OBJECT_REPLACEMENT_CHARACTER, this); } } return ranges; diff --git a/src/java/org/apache/fop/fo/flow/ListItem.java b/src/java/org/apache/fop/fo/flow/ListItem.java index 2e572aac5..b7f6e15cc 100644 --- a/src/java/org/apache/fop/fo/flow/ListItem.java +++ b/src/java/org/apache/fop/fo/flow/ListItem.java @@ -206,14 +206,14 @@ public class ListItem extends FObj implements BreakPropertySet, CommonAccessibil } @Override - protected Stack collectDelimitedTextRanges (Stack ranges, DelimitedTextRange currentRange) { + protected Stack collectDelimitedTextRanges(Stack ranges, DelimitedTextRange currentRange) { ListItemLabel label = getLabel(); if (label != null) { - ranges = label.collectDelimitedTextRanges (ranges); + ranges = label.collectDelimitedTextRanges(ranges); } ListItemBody body = getBody(); if (body != null) { - ranges = body.collectDelimitedTextRanges (ranges); + ranges = body.collectDelimitedTextRanges(ranges); } return ranges; } diff --git a/src/java/org/apache/fop/fo/flow/PageNumber.java b/src/java/org/apache/fop/fo/flow/PageNumber.java index 1cd76e572..8fac84bca 100644 --- a/src/java/org/apache/fop/fo/flow/PageNumber.java +++ b/src/java/org/apache/fop/fo/flow/PageNumber.java @@ -201,7 +201,7 @@ public class PageNumber extends FObj } @Override - public boolean isDelimitedTextRangeBoundary (int boundary) { + public boolean isDelimitedTextRangeBoundary(int boundary) { return false; } diff --git a/src/java/org/apache/fop/fo/flow/RetrieveTableMarker.java b/src/java/org/apache/fop/fo/flow/RetrieveTableMarker.java index d4bc7c687..57ae9e7bb 100644 --- a/src/java/org/apache/fop/fo/flow/RetrieveTableMarker.java +++ b/src/java/org/apache/fop/fo/flow/RetrieveTableMarker.java @@ -47,8 +47,8 @@ public class RetrieveTableMarker extends AbstractRetrieveMarker { * <i>NOTE: An <code>fo:retrieve-table-marker</code> is only permitted as a descendant * of an <code>fo:table-header</code> or an <code>fo:table-footer</code>.</i> */ - public void processNode - (String elementName, Locator locator, Attributes attlist, PropertyList pList) + public void processNode( + String elementName, Locator locator, Attributes attlist, PropertyList pList) throws FOPException { if (findAncestor(FO_TABLE_HEADER) < 0 && findAncestor(FO_TABLE_FOOTER) < 0) { diff --git a/src/java/org/apache/fop/fo/flow/Wrapper.java b/src/java/org/apache/fop/fo/flow/Wrapper.java index a62d4f7a9..134d65c9a 100644 --- a/src/java/org/apache/fop/fo/flow/Wrapper.java +++ b/src/java/org/apache/fop/fo/flow/Wrapper.java @@ -150,7 +150,7 @@ public class Wrapper extends FObjMixed implements CommonAccessibilityHolder { } @Override - public boolean isDelimitedTextRangeBoundary (int boundary) { + public boolean isDelimitedTextRangeBoundary(int boundary) { return false; } diff --git a/src/java/org/apache/fop/fo/flow/table/Table.java b/src/java/org/apache/fop/fo/flow/table/Table.java index 46804577d..983954e79 100644 --- a/src/java/org/apache/fop/fo/flow/table/Table.java +++ b/src/java/org/apache/fop/fo/flow/table/Table.java @@ -138,8 +138,8 @@ public class Table extends TableFObj implements ColumnNumberManagerHolder, Break tableLayout = pList.get(PR_TABLE_LAYOUT).getEnum(); tableOmitFooterAtBreak = pList.get(PR_TABLE_OMIT_FOOTER_AT_BREAK).getEnum(); tableOmitHeaderAtBreak = pList.get(PR_TABLE_OMIT_HEADER_AT_BREAK).getEnum(); - writingModeTraits = new WritingModeTraits - (WritingMode.valueOf(pList.get(PR_WRITING_MODE).getEnum())); + writingModeTraits = new WritingModeTraits( + WritingMode.valueOf(pList.get(PR_WRITING_MODE).getEnum())); //Bind extension properties widowContentLimit = pList.get(PR_X_WIDOW_CONTENT_LIMIT).getLength(); @@ -602,20 +602,20 @@ public class Table extends TableFObj implements ColumnNumberManagerHolder, Break } @Override - protected Stack collectDelimitedTextRanges (Stack ranges, DelimitedTextRange currentRange) { + protected Stack collectDelimitedTextRanges(Stack ranges, DelimitedTextRange currentRange) { // header sub-tree TableHeader header = getTableHeader(); if (header != null) { - ranges = header.collectDelimitedTextRanges (ranges); + ranges = header.collectDelimitedTextRanges(ranges); } // footer sub-tree TableFooter footer = getTableFooter(); if (footer != null) { - ranges = footer.collectDelimitedTextRanges (ranges); + ranges = footer.collectDelimitedTextRanges(ranges); } // body sub-tree for (Iterator it = getChildNodes(); (it != null) && it.hasNext();) { - ranges = ((FONode) it.next()).collectDelimitedTextRanges (ranges); + ranges = ((FONode) it.next()).collectDelimitedTextRanges(ranges); } return ranges; } diff --git a/src/java/org/apache/fop/fo/pagination/PageNumberGenerator.java b/src/java/org/apache/fop/fo/pagination/PageNumberGenerator.java index 6bc913d1b..bda08838e 100644 --- a/src/java/org/apache/fop/fo/pagination/PageNumberGenerator.java +++ b/src/java/org/apache/fop/fo/pagination/PageNumberGenerator.java @@ -49,8 +49,8 @@ public class PageNumberGenerator { * @param language (may be null or empty, which is treated as null) * @param country (may be null or empty, which is treated as null) */ - public PageNumberGenerator (String format, int groupingSeparator, int groupingSize, int letterValue, String features, String language, String country) { - this.converter = new NumberConverter (format, groupingSeparator, groupingSize, letterValue, features, language, country); + public PageNumberGenerator(String format, int groupingSeparator, int groupingSize, int letterValue, String features, String language, String country) { + this.converter = new NumberConverter(format, groupingSeparator, groupingSize, letterValue, features, language, country); } /** @@ -58,8 +58,8 @@ public class PageNumberGenerator { * @param number page number to format * @return the formatted page number as a String */ - public String makeFormattedPageNumber (int number) { - return converter.convert (number); + public String makeFormattedPageNumber(int number) { + return converter.convert(number); } } diff --git a/src/java/org/apache/fop/fo/pagination/PageSequence.java b/src/java/org/apache/fop/fo/pagination/PageSequence.java index c4c380059..368b69f90 100644 --- a/src/java/org/apache/fop/fo/pagination/PageSequence.java +++ b/src/java/org/apache/fop/fo/pagination/PageSequence.java @@ -95,8 +95,8 @@ public class PageSequence extends AbstractPageSequence implements WritingModeTra locale = CommonHyphenation.toLocale(language, country); masterReference = pList.get(PR_MASTER_REFERENCE).getString(); referenceOrientation = pList.get(PR_REFERENCE_ORIENTATION).getNumeric(); - writingModeTraits = new WritingModeTraits - (WritingMode.valueOf(pList.get(PR_WRITING_MODE).getEnum())); + writingModeTraits = new WritingModeTraits( + WritingMode.valueOf(pList.get(PR_WRITING_MODE).getEnum())); if (masterReference == null || masterReference.equals("")) { missingPropertyError("master-reference"); } @@ -263,8 +263,8 @@ public class PageSequence extends AbstractPageSequence implements WritingModeTra * @return the SimplePageMaster to use for this page * @throws PageProductionException if there's a problem determining the page master */ - public SimplePageMaster getNextSimplePageMaster - (int page, boolean isFirstPage, boolean isLastPage, boolean isBlank) + public SimplePageMaster getNextSimplePageMaster( + int page, boolean isFirstPage, boolean isLastPage, boolean isBlank) throws PageProductionException { if (pageSequenceMaster == null) { @@ -405,20 +405,20 @@ public class PageSequence extends AbstractPageSequence implements WritingModeTra @Override - protected Stack collectDelimitedTextRanges (Stack ranges, DelimitedTextRange currentRange) { + protected Stack collectDelimitedTextRanges(Stack ranges, DelimitedTextRange currentRange) { // collect ranges from static content flows Map<String, FONode> flows = getFlowMap(); if (flows != null) { for (FONode fn : flows.values()) { if (fn instanceof StaticContent) { - ranges = ((StaticContent) fn).collectDelimitedTextRanges (ranges); + ranges = ((StaticContent) fn).collectDelimitedTextRanges(ranges); } } } // collect ranges in main flow Flow main = getMainFlow(); if (main != null) { - ranges = main.collectDelimitedTextRanges (ranges); + ranges = main.collectDelimitedTextRanges(ranges); } return ranges; } diff --git a/src/java/org/apache/fop/fo/pagination/RegionAfter.java b/src/java/org/apache/fop/fo/pagination/RegionAfter.java index 757ec4f33..1232c68bc 100644 --- a/src/java/org/apache/fop/fo/pagination/RegionAfter.java +++ b/src/java/org/apache/fop/fo/pagination/RegionAfter.java @@ -43,7 +43,7 @@ public class RegionAfter extends RegionBA { } /** {@inheritDoc} */ - public Rectangle getViewportRectangle (FODimension reldims) { + public Rectangle getViewportRectangle(FODimension reldims) { /* Special rules apply to resolving extent as values are resolved relative * to the page size and reference orientation. */ diff --git a/src/java/org/apache/fop/fo/pagination/RegionBA.java b/src/java/org/apache/fop/fo/pagination/RegionBA.java index 0b394f63e..82decf32e 100644 --- a/src/java/org/apache/fop/fo/pagination/RegionBA.java +++ b/src/java/org/apache/fop/fo/pagination/RegionBA.java @@ -71,8 +71,8 @@ public abstract class RegionBA extends SideRegion { * @param wm writing mode * @param siblingContext the context to use to resolve extent on siblings */ - protected void adjustIPD - (Rectangle vpRefRect, WritingMode wm, PercentBaseContext siblingContext) { + protected void adjustIPD( + Rectangle vpRefRect, WritingMode wm, PercentBaseContext siblingContext) { int offset = 0; RegionStart start = (RegionStart) getSiblingRegion(FO_REGION_START); if (start != null) { diff --git a/src/java/org/apache/fop/fo/pagination/RegionBefore.java b/src/java/org/apache/fop/fo/pagination/RegionBefore.java index 1a4c07db8..5a0e7543c 100644 --- a/src/java/org/apache/fop/fo/pagination/RegionBefore.java +++ b/src/java/org/apache/fop/fo/pagination/RegionBefore.java @@ -48,7 +48,7 @@ public class RegionBefore extends RegionBA { } /** {@inheritDoc} */ - public Rectangle getViewportRectangle (FODimension reldims) { + public Rectangle getViewportRectangle(FODimension reldims) { /* Special rules apply to resolving extent as values are resolved relative * to the page size and reference orientation. */ diff --git a/src/java/org/apache/fop/fo/pagination/RegionBody.java b/src/java/org/apache/fop/fo/pagination/RegionBody.java index cd5cddf47..164c1cee5 100644 --- a/src/java/org/apache/fop/fo/pagination/RegionBody.java +++ b/src/java/org/apache/fop/fo/pagination/RegionBody.java @@ -97,7 +97,7 @@ public class RegionBody extends Region { } /** {@inheritDoc} */ - public Rectangle getViewportRectangle (FODimension reldims) { + public Rectangle getViewportRectangle(FODimension reldims) { /* Special rules apply to resolving margins in the page context. * Contrary to normal margins in this case top and bottom margin * are resolved relative to the height. In the property subsystem diff --git a/src/java/org/apache/fop/fo/pagination/RegionEnd.java b/src/java/org/apache/fop/fo/pagination/RegionEnd.java index 4a28cba55..5de7dc194 100644 --- a/src/java/org/apache/fop/fo/pagination/RegionEnd.java +++ b/src/java/org/apache/fop/fo/pagination/RegionEnd.java @@ -43,7 +43,7 @@ public class RegionEnd extends RegionSE { } /** {@inheritDoc} */ - public Rectangle getViewportRectangle (FODimension reldims) { + public Rectangle getViewportRectangle(FODimension reldims) { /* Special rules apply to resolving extent as values are resolved relative * to the page size and reference orientation. */ diff --git a/src/java/org/apache/fop/fo/pagination/RegionSE.java b/src/java/org/apache/fop/fo/pagination/RegionSE.java index 1b0fb9cf0..79b36645c 100644 --- a/src/java/org/apache/fop/fo/pagination/RegionSE.java +++ b/src/java/org/apache/fop/fo/pagination/RegionSE.java @@ -62,8 +62,8 @@ public abstract class RegionSE extends SideRegion { * @param wm writing mode * @param siblingContext the context to use to resolve extent on siblings */ - protected void adjustIPD - (Rectangle vpRefRect, WritingMode wm, PercentBaseContext siblingContext) { + protected void adjustIPD( + Rectangle vpRefRect, WritingMode wm, PercentBaseContext siblingContext) { int offset = 0; RegionBefore before = (RegionBefore) getSiblingRegion(FO_REGION_BEFORE); if (before != null && before.getPrecedence() == EN_TRUE) { diff --git a/src/java/org/apache/fop/fo/pagination/RegionStart.java b/src/java/org/apache/fop/fo/pagination/RegionStart.java index 31c92870f..6e2e752fc 100644 --- a/src/java/org/apache/fop/fo/pagination/RegionStart.java +++ b/src/java/org/apache/fop/fo/pagination/RegionStart.java @@ -43,7 +43,7 @@ public class RegionStart extends RegionSE { } /** {@inheritDoc} */ - public Rectangle getViewportRectangle (FODimension reldims) { + public Rectangle getViewportRectangle(FODimension reldims) { /* Special rules apply to resolving extent as values are resolved relative * to the page size and reference orientation. */ diff --git a/src/java/org/apache/fop/fo/properties/DimensionPropertyMaker.java b/src/java/org/apache/fop/fo/properties/DimensionPropertyMaker.java index fa81ad599..b84c5eeea 100644 --- a/src/java/org/apache/fop/fo/properties/DimensionPropertyMaker.java +++ b/src/java/org/apache/fop/fo/properties/DimensionPropertyMaker.java @@ -49,7 +49,7 @@ public class DimensionPropertyMaker extends CorrespondingPropertyMaker { for (int i = 0; i < extraCorresponding.length; i++) { int[] eca = extraCorresponding[i]; if ((eca == null) || (eca.length != 4)) { - throw new IllegalArgumentException ("bad sub-array @ [" + i + "]"); + throw new IllegalArgumentException("bad sub-array @ [" + i + "]"); } } this.extraCorresponding = extraCorresponding; diff --git a/src/java/org/apache/fop/fo/properties/IndentPropertyMaker.java b/src/java/org/apache/fop/fo/properties/IndentPropertyMaker.java index dd00cd044..5d4a696c4 100644 --- a/src/java/org/apache/fop/fo/properties/IndentPropertyMaker.java +++ b/src/java/org/apache/fop/fo/properties/IndentPropertyMaker.java @@ -214,8 +214,8 @@ public class IndentPropertyMaker extends CorrespondingPropertyMaker { throws PropertyException { PropertyList pList = getWMPropertyList(propertyList); if (pList != null) { - int wmcorr = pList.selectFromWritingMode - (corresponding[0], corresponding[1], corresponding[2], corresponding[3]); + int wmcorr = pList.selectFromWritingMode( + corresponding[0], corresponding[1], corresponding[2], corresponding[3]); return propertyList.get(wmcorr); } else { return null; diff --git a/src/java/org/apache/fop/fo/properties/TextDecorationMaker.java b/src/java/org/apache/fop/fo/properties/TextDecorationMaker.java index fad48ed0c..f084fa017 100644 --- a/src/java/org/apache/fop/fo/properties/TextDecorationMaker.java +++ b/src/java/org/apache/fop/fo/properties/TextDecorationMaker.java @@ -85,8 +85,8 @@ public class TextDecorationMaker extends ListProperty.Maker { case Constants.EN_BLINK: case Constants.EN_NO_BLINK: if (none) { - throw new PropertyException - ("'none' specified, no additional values allowed"); + throw new PropertyException( + "'none' specified, no additional values allowed"); } switch (enumValue) { case Constants.EN_UNDERLINE: |