aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas L. Delmelle <adelmelle@apache.org>2011-02-11 17:49:16 +0000
committerAndreas L. Delmelle <adelmelle@apache.org>2011-02-11 17:49:16 +0000
commit5eeb7821e5aa84267a980f945c472074b017f043 (patch)
tree357210f3a878d4a757830a8e940050e3e72ef324
parentc7271d310f22942bffadabd94bc3d0d198125f7d (diff)
downloadxmlgraphics-fop-5eeb7821e5aa84267a980f945c472074b017f043.tar.gz
xmlgraphics-fop-5eeb7821e5aa84267a980f945c472074b017f043.zip
A few minor nits...
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1069908 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/java/org/apache/fop/layoutmgr/AbstractBreaker.java20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java b/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java
index 402161a92..253790623 100644
--- a/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java
+++ b/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java
@@ -429,7 +429,7 @@ public abstract class AbstractBreaker {
effectiveList);
blockListIndex = -1;
} else {
- log.debug("PLM> iOptPageCount= " + optimalPageCount
+ log.debug("PLM> optimalPageCount= " + optimalPageCount
+ " pageBreaks.size()= " + alg.getPageBreaks().size());
//*** Phase 3: Add areas ***
@@ -455,11 +455,7 @@ public abstract class AbstractBreaker {
return true;
} else {
Position subPosition = position.getPosition();
- if (subPosition == null) {
- return false;
- } else {
- return containsNonRestartableLM(subPosition);
- }
+ return subPosition != null && containsNonRestartableLM(subPosition);
}
}
@@ -501,7 +497,7 @@ public abstract class AbstractBreaker {
int endElementIndex = 0;
int lastBreak = -1;
for (int p = startPart; p < startPart + partCount; p++) {
- PageBreakPosition pbp = (PageBreakPosition) alg.getPageBreaks().get(p);
+ PageBreakPosition pbp = alg.getPageBreaks().get(p);
//Check the last break position for forced breaks
int lastBreakClass;
@@ -761,7 +757,7 @@ public abstract class AbstractBreaker {
/* Retrieve the original position wrapped into this space position */
positionAtBreak = positionAtBreak.getPosition();
LayoutManager restartAtLM = null;
- List<KnuthElement> firstElements = Collections.EMPTY_LIST;
+ List<KnuthElement> firstElements = Collections.emptyList();
if (containsNonRestartableLM(positionAtBreak)) {
if (alg.getIPDdifference() > 0) {
EventBroadcaster eventBroadcaster = getCurrentChildLM().getFObj()
@@ -875,11 +871,11 @@ public abstract class AbstractBreaker {
*/
private BlockSequence justifyBoxes // CSOK: MethodLength
(BlockSequence blockList, PageBreakingAlgorithm alg, int availableBPD) {
- int iOptPageNumber;
+ int optimalPageCount;
alg.setConstantLineWidth(availableBPD);
- iOptPageNumber = alg.findBreakingPoints(blockList, /*availableBPD,*/
+ optimalPageCount = alg.findBreakingPoints(blockList, /*availableBPD,*/
1, true, BreakingAlgorithm.ALL_BREAKS);
- log.debug("PLM> iOptPageNumber= " + iOptPageNumber);
+ log.debug("PLM> optimalPageCount= " + optimalPageCount);
//
ListIterator<KnuthElement> sequenceIterator = blockList.listIterator();
@@ -904,7 +900,7 @@ public abstract class AbstractBreaker {
// inside the
// while loop must be a box
KnuthElement firstElement;
- while ( sequenceIterator.hasNext() ) {
+ while (sequenceIterator.hasNext()) {
firstElement = sequenceIterator.next();
if ( !firstElement.isBox() ) {
log.debug("PLM> ignoring glue or penalty element "