aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo
diff options
context:
space:
mode:
authorVincent Hennebert <vhennebert@apache.org>2013-04-09 17:31:41 +0000
committerVincent Hennebert <vhennebert@apache.org>2013-04-09 17:31:41 +0000
commit37ea66b1918a88490046c51ed1ac8acd49c661b7 (patch)
treee019cba719102e952845903812fb97521c7ec0e2 /src/java/org/apache/fop/fo
parentce39d4c2fb899be5d8d705fe72e0153fde21e592 (diff)
downloadxmlgraphics-fop-37ea66b1918a88490046c51ed1ac8acd49c661b7.tar.gz
xmlgraphics-fop-37ea66b1918a88490046c51ed1ac8acd49c661b7.zip
Cosmetics only: enabled Checkstyle ParenPad rule and fixed corresponding violations
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1466146 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo')
-rw-r--r--src/java/org/apache/fop/fo/FONode.java54
-rw-r--r--src/java/org/apache/fop/fo/FOPropertyMapping.java36
-rw-r--r--src/java/org/apache/fop/fo/FOText.java96
-rw-r--r--src/java/org/apache/fop/fo/FObj.java18
-rw-r--r--src/java/org/apache/fop/fo/PropertyList.java4
-rw-r--r--src/java/org/apache/fop/fo/expr/FromNearestSpecifiedValueFunction.java6
-rw-r--r--src/java/org/apache/fop/fo/expr/FromParentFunction.java6
-rw-r--r--src/java/org/apache/fop/fo/expr/FromTableColumnFunction.java6
-rw-r--r--src/java/org/apache/fop/fo/expr/FunctionBase.java10
-rw-r--r--src/java/org/apache/fop/fo/expr/InheritedPropFunction.java6
-rw-r--r--src/java/org/apache/fop/fo/expr/PropertyParser.java16
-rw-r--r--src/java/org/apache/fop/fo/expr/PropertyTokenizer.java6
-rw-r--r--src/java/org/apache/fop/fo/flow/AbstractGraphics.java8
-rw-r--r--src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java8
-rw-r--r--src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java2
-rw-r--r--src/java/org/apache/fop/fo/flow/BidiOverride.java24
-rw-r--r--src/java/org/apache/fop/fo/flow/BlockContainer.java2
-rw-r--r--src/java/org/apache/fop/fo/flow/Character.java8
-rw-r--r--src/java/org/apache/fop/fo/flow/InlineContainer.java4
-rw-r--r--src/java/org/apache/fop/fo/flow/InlineLevel.java2
-rw-r--r--src/java/org/apache/fop/fo/flow/Leader.java14
-rw-r--r--src/java/org/apache/fop/fo/flow/ListItem.java10
-rw-r--r--src/java/org/apache/fop/fo/flow/PageNumber.java2
-rw-r--r--src/java/org/apache/fop/fo/flow/Wrapper.java2
-rw-r--r--src/java/org/apache/fop/fo/flow/table/ColumnNumberManager.java2
-rw-r--r--src/java/org/apache/fop/fo/flow/table/ConditionalBorder.java4
-rw-r--r--src/java/org/apache/fop/fo/flow/table/PendingSpan.java2
-rw-r--r--src/java/org/apache/fop/fo/flow/table/Table.java16
-rw-r--r--src/java/org/apache/fop/fo/flow/table/TableCell.java2
-rw-r--r--src/java/org/apache/fop/fo/pagination/PageNumberGenerator.java8
-rw-r--r--src/java/org/apache/fop/fo/pagination/PageSequence.java30
-rw-r--r--src/java/org/apache/fop/fo/pagination/RegionAfter.java2
-rw-r--r--src/java/org/apache/fop/fo/pagination/RegionBA.java2
-rw-r--r--src/java/org/apache/fop/fo/pagination/RegionBefore.java2
-rw-r--r--src/java/org/apache/fop/fo/pagination/RegionBody.java2
-rw-r--r--src/java/org/apache/fop/fo/pagination/RegionEnd.java2
-rw-r--r--src/java/org/apache/fop/fo/pagination/RegionSE.java2
-rw-r--r--src/java/org/apache/fop/fo/pagination/RegionStart.java2
-rw-r--r--src/java/org/apache/fop/fo/properties/DimensionPropertyMaker.java8
-rw-r--r--src/java/org/apache/fop/fo/properties/FontWeightPropertyMaker.java2
-rw-r--r--src/java/org/apache/fop/fo/properties/IndentPropertyMaker.java6
-rw-r--r--src/java/org/apache/fop/fo/properties/PropertyCache.java4
42 files changed, 224 insertions, 224 deletions
diff --git a/src/java/org/apache/fop/fo/FONode.java b/src/java/org/apache/fop/fo/FONode.java
index c9fd7e59a..2722498c7 100644
--- a/src/java/org/apache/fop/fo/FONode.java
+++ b/src/java/org/apache/fop/fo/FONode.java
@@ -438,8 +438,8 @@ public abstract class FONode implements Cloneable {
* with the unabbreviated URI otherwise.
*/
public static String getNodeString(String namespaceURI, String localName) {
- String prefix = getNodePrefix ( namespaceURI );
- if ( prefix != null ) {
+ String prefix = getNodePrefix (namespaceURI);
+ if (prefix != null) {
return prefix + ":" + localName;
} else {
return "(Namespace URI: \"" + namespaceURI + "\", "
@@ -552,9 +552,9 @@ 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 ) {
+ if (prefix != null) {
qn = new QName(nsURI, prefix, lName);
} else {
qn = new QName(nsURI, 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,23 +936,23 @@ 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 );
+ if (isRangeBoundaryBefore()) {
+ maybeNewRange (ranges);
}
// get current range, if one exists
DelimitedTextRange currentRange;
- if ( ranges.size() > 0 ) {
+ if (ranges.size() > 0) {
currentRange = (DelimitedTextRange) ranges.peek();
} else {
currentRange = null;
}
// proceses this node
- ranges = collectDelimitedTextRanges ( ranges, currentRange );
+ ranges = collectDelimitedTextRanges (ranges, currentRange);
// if boundary after, then push new range
- if ( isRangeBoundaryAfter() ) {
- maybeNewRange ( ranges );
+ if (isRangeBoundaryAfter()) {
+ 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 ) {
- for ( Iterator it = getChildNodes(); ( it != null ) && it.hasNext();) {
- ranges = ( (FONode) it.next() ).collectDelimitedTextRanges ( ranges );
+ protected Stack collectDelimitedTextRanges (Stack ranges, DelimitedTextRange currentRange) {
+ for (Iterator it = getChildNodes(); (it != null) && it.hasNext();) {
+ ranges = ((FONode) it.next()).collectDelimitedTextRanges (ranges);
}
return ranges;
}
@@ -992,23 +992,23 @@ 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() ) {
- if ( isBidiRangeBlockItem() ) {
+ if (ranges.empty()) {
+ if (isBidiRangeBlockItem()) {
rNew = new DelimitedTextRange(this);
}
} else {
rCur = (DelimitedTextRange) ranges.peek();
- if ( rCur != null ) {
- if ( !rCur.isEmpty() || !isSelfOrDescendent ( rCur.getNode(), this ) ) {
+ if (rCur != null) {
+ if (!rCur.isEmpty() || !isSelfOrDescendent (rCur.getNode(), this)) {
rNew = new DelimitedTextRange(this);
}
}
}
- if ( rNew != null ) {
- ranges.push ( rNew );
+ if (rNew != null) {
+ ranges.push (rNew);
} else {
rNew = rCur;
}
@@ -1016,19 +1016,19 @@ 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 ) {
- for ( FONode n = n2; n != null; n = n.getParent() ) {
- if ( n == n1 ) {
+ 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 3ae81c62a..a8a3d5bb6 100644
--- a/src/java/org/apache/fop/fo/FOPropertyMapping.java
+++ b/src/java/org/apache/fop/fo/FOPropertyMapping.java
@@ -1503,32 +1503,32 @@ public final class FOPropertyMapping implements Constants {
addPropertyMaker("fox:block-progression-unit", l);
}
- private Property calcWritingModeDependent ( int pv, int wm ) {
- if ( pv == EN_LEFT ) {
- if ( wm == Constants.EN_LR_TB ) {
+ private Property calcWritingModeDependent (int pv, int wm) {
+ if (pv == EN_LEFT) {
+ if (wm == Constants.EN_LR_TB) {
pv = EN_START;
- } else if ( wm == Constants.EN_RL_TB ) {
+ } else if (wm == Constants.EN_RL_TB) {
pv = EN_END;
} else {
pv = EN_START;
}
- } else if ( pv == EN_RIGHT ) {
- if ( wm == Constants.EN_LR_TB ) {
+ } else if (pv == EN_RIGHT) {
+ if (wm == Constants.EN_LR_TB) {
pv = EN_END;
- } else if ( wm == Constants.EN_RL_TB ) {
+ } else if (wm == Constants.EN_RL_TB) {
pv = EN_START;
} else {
pv = EN_END;
}
}
- return makeWritingModeDependentEnum ( pv );
+ return makeWritingModeDependentEnum (pv);
}
- private Property makeWritingModeDependentEnum ( int pv ) {
- if ( pv == EN_START ) {
- return getEnumProperty ( EN_START, "START" );
- } else if ( pv == EN_END ) {
- return getEnumProperty ( EN_END, "END" );
+ private Property makeWritingModeDependentEnum (int pv) {
+ if (pv == EN_START) {
+ return getEnumProperty (EN_START, "START");
+ } else if (pv == EN_END) {
+ return getEnumProperty (EN_END, "END");
} else {
return null;
}
@@ -1623,11 +1623,11 @@ public final class FOPropertyMapping implements Constants {
public Property get(int subpropId, PropertyList propertyList,
boolean bTryInherit, boolean bTryDefault) throws PropertyException {
Property p = super.get(subpropId, propertyList, bTryInherit, bTryDefault);
- if ( p != null ) {
+ if (p != null) {
int pv = p.getEnum();
- if ( ( pv == EN_LEFT ) || ( pv == EN_RIGHT ) ) {
+ if ((pv == EN_LEFT) || (pv == EN_RIGHT)) {
p = calcWritingModeDependent
- ( pv, propertyList.get(Constants.PR_WRITING_MODE).getEnum() );
+ (pv, propertyList.get(Constants.PR_WRITING_MODE).getEnum());
}
}
return p;
@@ -1677,10 +1677,10 @@ public final class FOPropertyMapping implements Constants {
return getEnumProperty(EN_CENTER, "CENTER");
} else if (correspondingValue == EN_LEFT) {
return calcWritingModeDependent
- ( EN_LEFT, propertyList.get(Constants.PR_WRITING_MODE).getEnum() );
+ (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() );
+ (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 6806d752d..caa27ed0c 100644
--- a/src/java/org/apache/fop/fo/FOText.java
+++ b/src/java/org/apache/fop/fo/FOText.java
@@ -114,15 +114,15 @@ public class FOText extends FONode implements CharSequence {
PropertyList list, Locator locator) throws FOPException {
if (charBuffer == null) {
// buffer not yet initialized, do so now
- int newLength = ( length < 16 ) ? 16 : length;
+ int newLength = (length < 16) ? 16 : length;
charBuffer = CharBuffer.allocate(newLength);
} else {
// allocate a larger buffer, and transfer contents
int requires = charBuffer.position() + length;
int capacity = charBuffer.capacity();
- if ( requires > capacity ) {
+ if (requires > capacity) {
int newCapacity = capacity * 2;
- if ( requires > newCapacity ) {
+ if (requires > newCapacity) {
newCapacity = requires;
}
CharBuffer newBuffer = CharBuffer.allocate(newCapacity);
@@ -194,7 +194,7 @@ public class FOText extends FONode implements CharSequence {
/** {@inheritDoc} */
public void endOfNode() throws FOPException {
- if ( charBuffer != null ) {
+ if (charBuffer != null) {
charBuffer.rewind();
}
super.endOfNode();
@@ -664,7 +664,7 @@ public class FOText extends FONode implements CharSequence {
/** {@inheritDoc} */
public String toString() {
- if ( charBuffer == null ) {
+ if (charBuffer == null) {
return "";
} else {
CharBuffer cb = charBuffer.duplicate();
@@ -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,16 +737,16 @@ 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 ) {
- if ( start < end ) {
- if ( bidiLevels == null ) {
+ public void setBidiLevel (int level, int start, int end) {
+ if (start < end) {
+ if (bidiLevels == null) {
bidiLevels = new int [ length() ];
}
- for ( int i = start, n = end; i < n; i++ ) {
+ for (int i = start, n = end; i < n; i++) {
bidiLevels [ i ] = level;
}
- if ( parent != null ) {
- ( (FObj) parent ).setBidiLevel ( level );
+ if (parent != null) {
+ ((FObj) parent).setBidiLevel (level);
}
} else {
assert start < end;
@@ -771,12 +771,12 @@ 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 ) {
- if ( this.bidiLevels != null ) {
+ public int[] getBidiLevels (int start, int end) {
+ if (this.bidiLevels != null) {
assert start <= end;
int n = end - start;
int[] bidiLevels = new int [ n ];
- for ( int i = 0; i < n; i++ ) {
+ for (int i = 0; i < n; i++) {
bidiLevels[i] = this.bidiLevels [ start + i ];
}
return bidiLevels;
@@ -794,10 +794,10 @@ 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 {
- if ( ( position < 0 ) || ( position >= length() ) ) {
+ public int bidiLevelAt (int position) throws IndexOutOfBoundsException {
+ if ((position < 0) || (position >= length())) {
throw new IndexOutOfBoundsException();
- } else if ( bidiLevels != null ) {
+ } else if (bidiLevels != null) {
return bidiLevels [ position ];
} else {
return -1;
@@ -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 ) {
- if ( mappings == null ) {
+ 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 ) {
- if ( mappings != null ) {
- return (String) mappings.get ( new MapRange ( start, end ) );
+ public String getMapping (int start, int end) {
+ if (mappings != null) {
+ 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 ) {
- if ( mappings != null ) {
- return ( (String) mappings.get ( new MapRange ( start, end ) ) ) .length();
+ public int getMappingLength (int start, int end) {
+ if (mappings != null) {
+ return ((String) mappings.get (new MapRange (start, end))) .length();
} else {
return 0;
}
@@ -864,37 +864,37 @@ 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 );
- if ( la == null ) {
+ 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
+ } else if (nm == nc) { // mapping is same length as mapped range
return la;
- } else if ( nm > nc ) { // mapping is longer than mapped range
+ } else if (nm > nc) { // mapping is longer than mapped range
int[] ma = new int [ nm ];
- 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++ ) {
+ 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;
}
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 ) {
- if ( currentRange != null ) {
- currentRange.append ( charIterator(), this );
+ protected Stack collectDelimitedTextRanges (Stack ranges, DelimitedTextRange currentRange) {
+ if (currentRange != null) {
+ currentRange.append (charIterator(), this);
}
return ranges;
}
@@ -907,12 +907,12 @@ public class FOText extends FONode implements CharSequence {
this.end = end;
}
public int hashCode() {
- return ( start * 31 ) + end;
+ return (start * 31) + end;
}
- public boolean equals ( Object o ) {
- if ( o instanceof MapRange ) {
+ public boolean equals (Object o) {
+ if (o instanceof MapRange) {
MapRange r = (MapRange) o;
- return ( r.start == start ) && ( r.end == end );
+ return (r.start == start) && (r.end == end);
} else {
return false;
}
diff --git a/src/java/org/apache/fop/fo/FObj.java b/src/java/org/apache/fop/fo/FObj.java
index e7b4fc2e9..96b817de3 100644
--- a/src/java/org/apache/fop/fo/FObj.java
+++ b/src/java/org/apache/fop/fo/FObj.java
@@ -608,14 +608,14 @@ public abstract class FObj extends FONode implements Constants {
*/
public void setBidiLevel(int bidiLevel) {
assert bidiLevel >= 0;
- if ( bidiLevel >= 0 ) {
- if ( ( this.bidiLevel < 0 ) || ( bidiLevel < this.bidiLevel ) ) {
+ if (bidiLevel >= 0) {
+ if ((this.bidiLevel < 0) || (bidiLevel < this.bidiLevel)) {
this.bidiLevel = bidiLevel;
- if ( parent != null ) {
+ if (parent != null) {
FObj foParent = (FObj) parent;
int parentBidiLevel = foParent.getBidiLevel();
- if ( ( parentBidiLevel < 0 ) || ( bidiLevel < parentBidiLevel ) ) {
- foParent.setBidiLevel ( bidiLevel );
+ if ((parentBidiLevel < 0) || (bidiLevel < parentBidiLevel)) {
+ foParent.setBidiLevel (bidiLevel);
}
}
}
@@ -639,10 +639,10 @@ public abstract class FObj extends FONode implements Constants {
* any ancestor
*/
public int getBidiLevelRecursive() {
- for ( FONode fn = this; fn != null; fn = fn.getParent() ) {
- if ( fn instanceof FObj ) {
- int level = ( (FObj) fn).getBidiLevel();
- if ( level >= 0 ) {
+ for (FONode fn = this; fn != null; fn = fn.getParent()) {
+ if (fn instanceof FObj) {
+ int level = ((FObj) fn).getBidiLevel();
+ if (level >= 0) {
return level;
}
}
diff --git a/src/java/org/apache/fop/fo/PropertyList.java b/src/java/org/apache/fop/fo/PropertyList.java
index 49bbf48a0..99018636e 100644
--- a/src/java/org/apache/fop/fo/PropertyList.java
+++ b/src/java/org/apache/fop/fo/PropertyList.java
@@ -302,7 +302,7 @@ public abstract class PropertyList {
propID = -1;
break;
}
- } catch ( PropertyException e ) {
+ } catch (PropertyException e) {
propID = -1;
}
return propID;
@@ -311,7 +311,7 @@ public abstract class PropertyList {
private String addAttributeToList(Attributes attributes,
String attributeName) throws ValidationException {
String attributeValue = attributes.getValue(attributeName);
- if ( attributeValue != null ) {
+ if (attributeValue != null) {
convertAttributeToProperty(attributes, attributeName, attributeValue);
}
return attributeValue;
diff --git a/src/java/org/apache/fop/fo/expr/FromNearestSpecifiedValueFunction.java b/src/java/org/apache/fop/fo/expr/FromNearestSpecifiedValueFunction.java
index 7eb463fb6..a3698edf1 100644
--- a/src/java/org/apache/fop/fo/expr/FromNearestSpecifiedValueFunction.java
+++ b/src/java/org/apache/fop/fo/expr/FromNearestSpecifiedValueFunction.java
@@ -42,10 +42,10 @@ public class FromNearestSpecifiedValueFunction extends FunctionBase {
@Override
/** {@inheritDoc} */
public Property getOptionalArgDefault(int index, PropertyInfo pi) throws PropertyException {
- if ( index == 0 ) {
- return getPropertyName ( pi );
+ if (index == 0) {
+ 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 e24074e9d..ce6873e54 100644
--- a/src/java/org/apache/fop/fo/expr/FromParentFunction.java
+++ b/src/java/org/apache/fop/fo/expr/FromParentFunction.java
@@ -43,10 +43,10 @@ public class FromParentFunction extends FunctionBase {
@Override
/** {@inheritDoc} */
public Property getOptionalArgDefault(int index, PropertyInfo pi) throws PropertyException {
- if ( index == 0 ) {
- return getPropertyName ( pi );
+ if (index == 0) {
+ 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 48ea4e152..98d4e1d07 100644
--- a/src/java/org/apache/fop/fo/expr/FromTableColumnFunction.java
+++ b/src/java/org/apache/fop/fo/expr/FromTableColumnFunction.java
@@ -51,10 +51,10 @@ public class FromTableColumnFunction extends FunctionBase {
@Override
/** {@inheritDoc} */
public Property getOptionalArgDefault(int index, PropertyInfo pi) throws PropertyException {
- if ( index == 0 ) {
- return getPropertyName ( pi );
+ if (index == 0) {
+ 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 6e0fd6702..bb68a1201 100644
--- a/src/java/org/apache/fop/fo/expr/FunctionBase.java
+++ b/src/java/org/apache/fop/fo/expr/FunctionBase.java
@@ -35,9 +35,9 @@ 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 );
+ if (index >= getOptionalArgsCount()) {
+ 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 6e982bd31..35d5803e9 100644
--- a/src/java/org/apache/fop/fo/expr/InheritedPropFunction.java
+++ b/src/java/org/apache/fop/fo/expr/InheritedPropFunction.java
@@ -42,10 +42,10 @@ public class InheritedPropFunction extends FunctionBase {
@Override
/** {@inheritDoc} */
public Property getOptionalArgDefault(int index, PropertyInfo pi) throws PropertyException {
- if ( index == 0 ) {
- return getPropertyName ( pi );
+ if (index == 0) {
+ 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 f3e3e4a50..b910c1c12 100644
--- a/src/java/org/apache/fop/fo/expr/PropertyParser.java
+++ b/src/java/org/apache/fop/fo/expr/PropertyParser.java
@@ -370,10 +370,10 @@ public final class PropertyParser extends PropertyTokenizer {
while (true) {
Property p = parseAdditiveExpr();
int i = args.size();
- if ( ( i < numReq ) || ( ( i - numReq ) < numOpt ) || hasVar ) {
- args.add ( p );
+ if ((i < numReq) || ((i - numReq) < numOpt) || hasVar) {
+ 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) {
@@ -384,16 +384,16 @@ public final class PropertyParser extends PropertyTokenizer {
expectRpar();
}
int numArgs = args.size();
- if ( numArgs < numReq ) {
+ if (numArgs < numReq) {
throw new PropertyException("Expected " + numReq + " required arguments, but only " + numArgs + " specified");
} else {
- for ( int i = 0; i < numOpt; i++ ) {
- if ( args.size() < ( numReq + i + 1 ) ) {
- args.add ( function.getOptionalArgDefault ( i, propInfo ) );
+ for (int i = 0; i < numOpt; i++) {
+ if (args.size() < (numReq + i + 1)) {
+ 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 3c9c81d27..159f91304 100644
--- a/src/java/org/apache/fop/fo/expr/PropertyTokenizer.java
+++ b/src/java/org/apache/fop/fo/expr/PropertyTokenizer.java
@@ -79,7 +79,7 @@ class PropertyTokenizer {
currentTokenValue = null;
currentTokenStartIndex = exprIndex;
boolean bSawDecimal;
- while ( true ) {
+ while (true) {
if (exprIndex >= exprLength) {
currentToken = TOK_EOF;
return;
@@ -254,8 +254,8 @@ class PropertyTokenizer {
}
private void scanRestOfName() {
- while ( ++exprIndex < exprLength ) {
- if ( !isNameChar ( expr.charAt ( exprIndex ) ) ) {
+ while (++exprIndex < exprLength) {
+ if (!isNameChar (expr.charAt (exprIndex))) {
break;
}
}
diff --git a/src/java/org/apache/fop/fo/flow/AbstractGraphics.java b/src/java/org/apache/fop/fo/flow/AbstractGraphics.java
index 2bf0061b0..f0b0bc7b5 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 ) {
- if ( currentRange != null ) {
- currentRange.append ( CharUtilities.OBJECT_REPLACEMENT_CHARACTER, this );
+ protected Stack collectDelimitedTextRanges (Stack ranges, DelimitedTextRange currentRange) {
+ if (currentRange != null) {
+ 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 68582a430..2127b98ea 100644
--- a/src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java
+++ b/src/java/org/apache/fop/fo/flow/AbstractPageNumberCitation.java
@@ -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 ) {
- if ( currentRange != null ) {
- currentRange.append ( CharUtilities.OBJECT_REPLACEMENT_CHARACTER, this );
+ protected Stack collectDelimitedTextRanges (Stack ranges, DelimitedTextRange currentRange) {
+ if (currentRange != null) {
+ currentRange.append (CharUtilities.OBJECT_REPLACEMENT_CHARACTER, this);
}
return ranges;
}
diff --git a/src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java b/src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java
index 018f6bb73..f69649110 100644
--- a/src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java
+++ b/src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java
@@ -122,7 +122,7 @@ public abstract class AbstractRetrieveMarker extends FObjMixed {
newPropertyList);
addChildTo(newChild, newParent);
newChild.startOfNode();
- switch ( newChild.getNameId() ) {
+ switch (newChild.getNameId()) {
case FO_TABLE:
Table t = (Table) child;
cloneSubtree(t.getColumns().iterator(),
diff --git a/src/java/org/apache/fop/fo/flow/BidiOverride.java b/src/java/org/apache/fop/fo/flow/BidiOverride.java
index 0c14688b7..62e4d7c5c 100644
--- a/src/java/org/apache/fop/fo/flow/BidiOverride.java
+++ b/src/java/org/apache/fop/fo/flow/BidiOverride.java
@@ -97,27 +97,27 @@ 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();
int direction = getDirection();
- if ( unicodeBidi == Constants.EN_BIDI_OVERRIDE ) {
- pfx = ( direction == Constants.EN_RTL ) ? CharUtilities.RLO : CharUtilities.LRO;
+ if (unicodeBidi == Constants.EN_BIDI_OVERRIDE) {
+ pfx = (direction == Constants.EN_RTL) ? CharUtilities.RLO : CharUtilities.LRO;
sfx = CharUtilities.PDF;
- } else if ( unicodeBidi == Constants.EN_EMBED ) {
- pfx = ( direction == Constants.EN_RTL ) ? CharUtilities.RLE : CharUtilities.LRE;
+ } else if (unicodeBidi == Constants.EN_EMBED) {
+ pfx = (direction == Constants.EN_RTL) ? CharUtilities.RLE : CharUtilities.LRE;
sfx = CharUtilities.PDF;
}
- if ( currentRange != null ) {
- if ( pfx != 0 ) {
- currentRange.append ( pfx, this );
+ if (currentRange != null) {
+ if (pfx != 0) {
+ currentRange.append (pfx, this);
}
- for ( Iterator it = getChildNodes(); ( it != null ) && it.hasNext();) {
- ranges = ( (FONode) it.next() ).collectDelimitedTextRanges ( ranges );
+ for (Iterator it = getChildNodes(); (it != null) && it.hasNext();) {
+ ranges = ((FONode) it.next()).collectDelimitedTextRanges (ranges);
}
- if ( sfx != 0 ) {
- currentRange.append ( sfx, this );
+ if (sfx != 0) {
+ 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 005f9289a..bab0f7ac5 100644
--- a/src/java/org/apache/fop/fo/flow/BlockContainer.java
+++ b/src/java/org/apache/fop/fo/flow/BlockContainer.java
@@ -98,7 +98,7 @@ public class BlockContainer extends FObj implements BreakPropertySet, WritingMod
referenceOrientation = pList.get(PR_REFERENCE_ORIENTATION).getNumeric();
span = pList.get(PR_SPAN).getEnum();
writingModeTraits = new WritingModeTraits
- ( WritingMode.valueOf(pList.get(PR_WRITING_MODE).getEnum()) );
+ (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 2d0814301..8e59d1f9b 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 ) {
- if ( currentRange != null ) {
- currentRange.append ( charIterator(), this );
+ protected Stack collectDelimitedTextRanges (Stack ranges, DelimitedTextRange currentRange) {
+ if (currentRange != null) {
+ 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 b8e9fd09a..e3d3bd84c 100644
--- a/src/java/org/apache/fop/fo/flow/InlineContainer.java
+++ b/src/java/org/apache/fop/fo/flow/InlineContainer.java
@@ -96,7 +96,7 @@ public class InlineContainer extends FObj {
overflow = pList.get(PR_OVERFLOW).getEnum();
referenceOrientation = pList.get(PR_REFERENCE_ORIENTATION).getNumeric();
writingModeTraits = new WritingModeTraits
- ( WritingMode.valueOf(pList.get(PR_WRITING_MODE).getEnum()) );
+ (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 b0531f859..66c03cf7d 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 c1fd98002..e39996a97 100644
--- a/src/java/org/apache/fop/fo/flow/Leader.java
+++ b/src/java/org/apache/fop/fo/flow/Leader.java
@@ -116,12 +116,12 @@ public class Leader extends InlineLevel {
protected void validateChildNode(Locator loc, String nsURI, String localName)
throws ValidationException {
if (FO_URI.equals(nsURI)) {
- if ( localName.equals("leader")
+ if (localName.equals("leader")
|| localName.equals("inline-container")
|| localName.equals("block-container")
|| localName.equals("float")
|| localName.equals("marker")
- || !isInlineItem(nsURI, localName) ) {
+ || !isInlineItem(nsURI, localName)) {
invalidChildError(loc, nsURI, localName);
}
}
@@ -203,12 +203,12 @@ public class Leader extends InlineLevel {
}
@Override
- protected Stack collectDelimitedTextRanges ( Stack ranges, DelimitedTextRange currentRange ) {
- if ( currentRange != null ) {
- if ( leaderPattern == EN_USECONTENT ) {
- ranges = super.collectDelimitedTextRanges ( ranges, currentRange );
+ protected Stack collectDelimitedTextRanges (Stack ranges, DelimitedTextRange currentRange) {
+ if (currentRange != null) {
+ if (leaderPattern == EN_USECONTENT) {
+ 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 bfd512f4d..2e572aac5 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 );
+ if (label != null) {
+ ranges = label.collectDelimitedTextRanges (ranges);
}
ListItemBody body = getBody();
- if ( body != null ) {
- ranges = body.collectDelimitedTextRanges ( ranges );
+ if (body != null) {
+ 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 33b34e2d5..1cd76e572 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/Wrapper.java b/src/java/org/apache/fop/fo/flow/Wrapper.java
index dd15187f2..a62d4f7a9 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/ColumnNumberManager.java b/src/java/org/apache/fop/fo/flow/table/ColumnNumberManager.java
index 9f3ed195d..89cba94c9 100644
--- a/src/java/org/apache/fop/fo/flow/table/ColumnNumberManager.java
+++ b/src/java/org/apache/fop/fo/flow/table/ColumnNumberManager.java
@@ -77,7 +77,7 @@ public class ColumnNumberManager {
for (int i = 0; i < pendingSpans.size(); i++) {
pSpan = (PendingSpan) pendingSpans.get(i);
if (pSpan != null) {
- if ( pSpan.decrRowsLeft() == 0 ) {
+ if (pSpan.decrRowsLeft() == 0) {
pendingSpans.set(i, null);
} else {
usedColumnIndices.set(i);
diff --git a/src/java/org/apache/fop/fo/flow/table/ConditionalBorder.java b/src/java/org/apache/fop/fo/flow/table/ConditionalBorder.java
index e69439276..639e01db4 100644
--- a/src/java/org/apache/fop/fo/flow/table/ConditionalBorder.java
+++ b/src/java/org/apache/fop/fo/flow/table/ConditionalBorder.java
@@ -75,10 +75,10 @@ public class ConditionalBorder {
*/
ConditionalBorder(BorderSpecification borderSpecification,
CollapsingBorderModel collapsingBorderModel) {
- this ( borderSpecification, borderSpecification,
+ this (borderSpecification, borderSpecification,
borderSpecification.getBorderInfo().getWidth().isDiscard()
? BorderSpecification.getDefaultBorder() : borderSpecification,
- collapsingBorderModel );
+ collapsingBorderModel);
}
/**
diff --git a/src/java/org/apache/fop/fo/flow/table/PendingSpan.java b/src/java/org/apache/fop/fo/flow/table/PendingSpan.java
index feaaf304a..5b0d72120 100644
--- a/src/java/org/apache/fop/fo/flow/table/PendingSpan.java
+++ b/src/java/org/apache/fop/fo/flow/table/PendingSpan.java
@@ -48,7 +48,7 @@ class PendingSpan {
* @return number of rows spanned after decrementing
*/
public int decrRowsLeft() {
- if ( rowsLeft > 0 ) {
+ if (rowsLeft > 0) {
return --rowsLeft;
} else {
return 0;
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 f23ac1cc4..46804577d 100644
--- a/src/java/org/apache/fop/fo/flow/table/Table.java
+++ b/src/java/org/apache/fop/fo/flow/table/Table.java
@@ -139,7 +139,7 @@ public class Table extends TableFObj implements ColumnNumberManagerHolder, Break
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()) );
+ (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 );
+ if (header != null) {
+ ranges = header.collectDelimitedTextRanges (ranges);
}
// footer sub-tree
TableFooter footer = getTableFooter();
- if ( footer != null ) {
- ranges = footer.collectDelimitedTextRanges ( ranges );
+ if (footer != null) {
+ ranges = footer.collectDelimitedTextRanges (ranges);
}
// body sub-tree
- for ( Iterator it = getChildNodes(); ( it != null ) && it.hasNext();) {
- ranges = ( (FONode) it.next() ).collectDelimitedTextRanges ( ranges );
+ for (Iterator it = getChildNodes(); (it != null) && it.hasNext();) {
+ ranges = ((FONode) it.next()).collectDelimitedTextRanges (ranges);
}
return ranges;
}
diff --git a/src/java/org/apache/fop/fo/flow/table/TableCell.java b/src/java/org/apache/fop/fo/flow/table/TableCell.java
index 20a80d135..b9a811328 100644
--- a/src/java/org/apache/fop/fo/flow/table/TableCell.java
+++ b/src/java/org/apache/fop/fo/flow/table/TableCell.java
@@ -118,7 +118,7 @@ public class TableCell extends TableFObj implements CommonAccessibilityHolder {
missingChildElementError("marker* (%block;)+", true);
}
if ((startsRow() || endsRow())
- && getParent().getNameId() == FO_TABLE_ROW ) {
+ && getParent().getNameId() == FO_TABLE_ROW) {
TableEventProducer eventProducer = TableEventProducer.Provider.get(
getUserAgent().getEventBroadcaster());
eventProducer.startEndRowUnderTableRowWarning(this, getLocator());
diff --git a/src/java/org/apache/fop/fo/pagination/PageNumberGenerator.java b/src/java/org/apache/fop/fo/pagination/PageNumberGenerator.java
index ddc03ff53..6bc913d1b 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 6b1ee2ef4..c4c380059 100644
--- a/src/java/org/apache/fop/fo/pagination/PageSequence.java
+++ b/src/java/org/apache/fop/fo/pagination/PageSequence.java
@@ -96,7 +96,7 @@ public class PageSequence extends AbstractPageSequence implements WritingModeTra
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()) );
+ (WritingMode.valueOf(pList.get(PR_WRITING_MODE).getEnum()));
if (masterReference == null || masterReference.equals("")) {
missingPropertyError("master-reference");
}
@@ -330,7 +330,7 @@ public class PageSequence extends AbstractPageSequence implements WritingModeTra
* @return the reference orientation trait value
*/
public int getReferenceOrientation() {
- if ( referenceOrientation != null ) {
+ if (referenceOrientation != null) {
return referenceOrientation.getValue();
} else {
return 0;
@@ -341,7 +341,7 @@ public class PageSequence extends AbstractPageSequence implements WritingModeTra
* {@inheritDoc}
*/
public Direction getInlineProgressionDirection() {
- if ( writingModeTraits != null ) {
+ if (writingModeTraits != null) {
return writingModeTraits.getInlineProgressionDirection();
} else {
return Direction.LR;
@@ -352,7 +352,7 @@ public class PageSequence extends AbstractPageSequence implements WritingModeTra
* {@inheritDoc}
*/
public Direction getBlockProgressionDirection() {
- if ( writingModeTraits != null ) {
+ if (writingModeTraits != null) {
return writingModeTraits.getBlockProgressionDirection();
} else {
return Direction.TB;
@@ -363,7 +363,7 @@ public class PageSequence extends AbstractPageSequence implements WritingModeTra
* {@inheritDoc}
*/
public Direction getColumnProgressionDirection() {
- if ( writingModeTraits != null ) {
+ if (writingModeTraits != null) {
return writingModeTraits.getColumnProgressionDirection();
} else {
return Direction.LR;
@@ -374,7 +374,7 @@ public class PageSequence extends AbstractPageSequence implements WritingModeTra
* {@inheritDoc}
*/
public Direction getRowProgressionDirection() {
- if ( writingModeTraits != null ) {
+ if (writingModeTraits != null) {
return writingModeTraits.getRowProgressionDirection();
} else {
return Direction.TB;
@@ -385,7 +385,7 @@ public class PageSequence extends AbstractPageSequence implements WritingModeTra
* {@inheritDoc}
*/
public Direction getShiftDirection() {
- if ( writingModeTraits != null ) {
+ if (writingModeTraits != null) {
return writingModeTraits.getShiftDirection();
} else {
return Direction.TB;
@@ -396,7 +396,7 @@ public class PageSequence extends AbstractPageSequence implements WritingModeTra
* {@inheritDoc}
*/
public WritingMode getWritingMode() {
- if ( writingModeTraits != null ) {
+ if (writingModeTraits != null) {
return writingModeTraits.getWritingMode();
} else {
return WritingMode.LR_TB;
@@ -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 );
+ if (flows != null) {
+ for (FONode fn : flows.values()) {
+ if (fn instanceof StaticContent) {
+ ranges = ((StaticContent) fn).collectDelimitedTextRanges (ranges);
}
}
}
// collect ranges in main flow
Flow main = getMainFlow();
- if ( main != null ) {
- ranges = main.collectDelimitedTextRanges ( ranges );
+ if (main != null) {
+ 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 9c4e2fd3a..757ec4f33 100644
--- a/src/java/org/apache/fop/fo/pagination/RegionAfter.java
+++ b/src/java/org/apache/fop/fo/pagination/RegionAfter.java
@@ -53,7 +53,7 @@ public class RegionAfter extends RegionBA {
Rectangle vpRect;
// [TBD] WRITING MODE ALERT
- switch ( getWritingMode().getEnumValue() ) {
+ switch (getWritingMode().getEnumValue()) {
case Constants.EN_TB_LR:
case Constants.EN_TB_RL:
neighbourContext = pageHeightContext;
diff --git a/src/java/org/apache/fop/fo/pagination/RegionBA.java b/src/java/org/apache/fop/fo/pagination/RegionBA.java
index eac7723f5..0b394f63e 100644
--- a/src/java/org/apache/fop/fo/pagination/RegionBA.java
+++ b/src/java/org/apache/fop/fo/pagination/RegionBA.java
@@ -72,7 +72,7 @@ public abstract class RegionBA extends SideRegion {
* @param siblingContext the context to use to resolve extent on siblings
*/
protected void adjustIPD
- ( Rectangle vpRefRect, WritingMode wm, PercentBaseContext siblingContext ) {
+ (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 eddd290a9..1a4c07db8 100644
--- a/src/java/org/apache/fop/fo/pagination/RegionBefore.java
+++ b/src/java/org/apache/fop/fo/pagination/RegionBefore.java
@@ -57,7 +57,7 @@ public class RegionBefore extends RegionBA {
PercentBaseContext neighbourContext;
Rectangle vpRect;
// [TBD] WRITING MODE ALERT
- switch ( getWritingMode().getEnumValue() ) {
+ switch (getWritingMode().getEnumValue()) {
case Constants.EN_TB_LR:
case Constants.EN_TB_RL:
neighbourContext = pageHeightContext;
diff --git a/src/java/org/apache/fop/fo/pagination/RegionBody.java b/src/java/org/apache/fop/fo/pagination/RegionBody.java
index 1fa260ff5..cd5cddf47 100644
--- a/src/java/org/apache/fop/fo/pagination/RegionBody.java
+++ b/src/java/org/apache/fop/fo/pagination/RegionBody.java
@@ -115,7 +115,7 @@ public class RegionBody extends Region {
int start;
int end;
// [TBD] WRITING MODE ALERT
- switch ( getWritingMode().getEnumValue() ) {
+ switch (getWritingMode().getEnumValue()) {
case Constants.EN_RL_TB:
start = commonMarginBlock.marginRight.getValue(pageWidthContext);
end = commonMarginBlock.marginLeft.getValue(pageWidthContext);
diff --git a/src/java/org/apache/fop/fo/pagination/RegionEnd.java b/src/java/org/apache/fop/fo/pagination/RegionEnd.java
index 535524c37..4a28cba55 100644
--- a/src/java/org/apache/fop/fo/pagination/RegionEnd.java
+++ b/src/java/org/apache/fop/fo/pagination/RegionEnd.java
@@ -52,7 +52,7 @@ public class RegionEnd extends RegionSE {
PercentBaseContext neighbourContext;
Rectangle vpRect;
// [TBD] WRITING MODE ALERT
- switch ( getWritingMode().getEnumValue() ) {
+ switch (getWritingMode().getEnumValue()) {
case Constants.EN_RL_TB:
neighbourContext = pageHeightContext;
vpRect = new Rectangle(0, 0, getExtent().getValue(pageWidthContext), reldims.bpd);
diff --git a/src/java/org/apache/fop/fo/pagination/RegionSE.java b/src/java/org/apache/fop/fo/pagination/RegionSE.java
index 9fc2bdc27..1b0fb9cf0 100644
--- a/src/java/org/apache/fop/fo/pagination/RegionSE.java
+++ b/src/java/org/apache/fop/fo/pagination/RegionSE.java
@@ -63,7 +63,7 @@ public abstract class RegionSE extends SideRegion {
* @param siblingContext the context to use to resolve extent on siblings
*/
protected void adjustIPD
- ( Rectangle vpRefRect, WritingMode wm, PercentBaseContext siblingContext ) {
+ (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 3371a934e..31c92870f 100644
--- a/src/java/org/apache/fop/fo/pagination/RegionStart.java
+++ b/src/java/org/apache/fop/fo/pagination/RegionStart.java
@@ -52,7 +52,7 @@ public class RegionStart extends RegionSE {
PercentBaseContext neighbourContext;
Rectangle vpRect;
// [TBD] WRITING MODE ALERT
- switch ( getWritingMode().getEnumValue() ) {
+ switch (getWritingMode().getEnumValue()) {
case Constants.EN_RL_TB:
neighbourContext = pageHeightContext;
vpRect = new Rectangle(reldims.ipd - getExtent().getValue(pageWidthContext), 0,
diff --git a/src/java/org/apache/fop/fo/properties/DimensionPropertyMaker.java b/src/java/org/apache/fop/fo/properties/DimensionPropertyMaker.java
index 60c069004..fa81ad599 100644
--- a/src/java/org/apache/fop/fo/properties/DimensionPropertyMaker.java
+++ b/src/java/org/apache/fop/fo/properties/DimensionPropertyMaker.java
@@ -43,13 +43,13 @@ public class DimensionPropertyMaker extends CorrespondingPropertyMaker {
* @param extraCorresponding an array of four element integer arrays
*/
public void setExtraCorresponding(int[][] extraCorresponding) {
- if ( extraCorresponding == null ) {
+ if (extraCorresponding == null) {
throw new NullPointerException();
}
- for ( int i = 0; i < extraCorresponding.length; i++ ) {
+ 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 + "]" );
+ if ((eca == null) || (eca.length != 4)) {
+ throw new IllegalArgumentException ("bad sub-array @ [" + i + "]");
}
}
this.extraCorresponding = extraCorresponding;
diff --git a/src/java/org/apache/fop/fo/properties/FontWeightPropertyMaker.java b/src/java/org/apache/fop/fo/properties/FontWeightPropertyMaker.java
index 6397813e6..8d93beb30 100644
--- a/src/java/org/apache/fop/fo/properties/FontWeightPropertyMaker.java
+++ b/src/java/org/apache/fop/fo/properties/FontWeightPropertyMaker.java
@@ -49,7 +49,7 @@ public class FontWeightPropertyMaker extends EnumProperty.Maker {
} else {
String pValue = checkValueKeywords(value);
Property newProp = checkEnumValues(pValue);
- int enumValue = ( newProp != null ) ? newProp.getEnum() : -1;
+ int enumValue = (newProp != null) ? newProp.getEnum() : -1;
if (enumValue == Constants.EN_BOLDER || enumValue == Constants.EN_LIGHTER) {
/* check for relative enum values, compute in relation to parent */
Property parentProp = pList.getInherited(Constants.PR_FONT_WEIGHT);
diff --git a/src/java/org/apache/fop/fo/properties/IndentPropertyMaker.java b/src/java/org/apache/fop/fo/properties/IndentPropertyMaker.java
index 6b7c58a62..dd00cd044 100644
--- a/src/java/org/apache/fop/fo/properties/IndentPropertyMaker.java
+++ b/src/java/org/apache/fop/fo/properties/IndentPropertyMaker.java
@@ -55,7 +55,7 @@ public class IndentPropertyMaker extends CorrespondingPropertyMaker {
* @param paddingCorresponding the corresping propids.
*/
public void setPaddingCorresponding(int[] paddingCorresponding) {
- if ( ( paddingCorresponding == null ) || ( paddingCorresponding.length != 4 ) ) {
+ if ((paddingCorresponding == null) || (paddingCorresponding.length != 4)) {
throw new IllegalArgumentException();
}
this.paddingCorresponding = paddingCorresponding;
@@ -66,7 +66,7 @@ public class IndentPropertyMaker extends CorrespondingPropertyMaker {
* @param borderWidthCorresponding the corresping propids.
*/
public void setBorderWidthCorresponding(int[] borderWidthCorresponding) {
- if ( ( borderWidthCorresponding == null ) || ( borderWidthCorresponding.length != 4 ) ) {
+ if ((borderWidthCorresponding == null) || (borderWidthCorresponding.length != 4)) {
throw new IllegalArgumentException();
}
this.borderWidthCorresponding = borderWidthCorresponding;
@@ -215,7 +215,7 @@ public class IndentPropertyMaker extends CorrespondingPropertyMaker {
PropertyList pList = getWMPropertyList(propertyList);
if (pList != null) {
int wmcorr = pList.selectFromWritingMode
- ( corresponding[0], corresponding[1], corresponding[2], corresponding[3] );
+ (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/PropertyCache.java b/src/java/org/apache/fop/fo/properties/PropertyCache.java
index f35ab2dad..e14d30b2a 100644
--- a/src/java/org/apache/fop/fo/properties/PropertyCache.java
+++ b/src/java/org/apache/fop/fo/properties/PropertyCache.java
@@ -81,12 +81,12 @@ public final class PropertyCache<T> {
useCache = Boolean.valueOf(
System.getProperty("org.apache.fop.fo.properties.use-cache", "true"))
.booleanValue();
- } catch ( SecurityException e ) {
+ } catch (SecurityException e) {
useCache = true;
LOG.info("Unable to access org.apache.fop.fo.properties.use-cache"
+ " due to security restriction; defaulting to 'true'.");
}
- if ( useCache ) {
+ if (useCache) {
this.map = new ConcurrentHashMap<Integer, WeakReference<T>>();
this.putCounter = new AtomicInteger();
this.cleanupLock = new ReentrantLock();