aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java
diff options
context:
space:
mode:
authorAdrian Cumiskey <acumiskey@apache.org>2009-10-15 20:43:13 +0000
committerAdrian Cumiskey <acumiskey@apache.org>2009-10-15 20:43:13 +0000
commit3938e8f60e96809fbdafacf5d96e3325d3452289 (patch)
tree0cabf583e4660f6ce0d42a549ec2a06690194bd8 /src/java/org/apache/fop/layoutmgr/AbstractBreaker.java
parentea58935a59a651eba814fc0eb4d16d0e2a972d97 (diff)
downloadxmlgraphics-fop-3938e8f60e96809fbdafacf5d96e3325d3452289.tar.gz
xmlgraphics-fop-3938e8f60e96809fbdafacf5d96e3325d3452289.zip
Application of the patch submitted by Alexander Kiel to improve variable names around Kerning and KnuthElement (see https://issues.apache.org/bugzilla/show_bug.cgi?id=48003).
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@825646 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/layoutmgr/AbstractBreaker.java')
-rw-r--r--src/java/org/apache/fop/layoutmgr/AbstractBreaker.java18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java b/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java
index 1a6f7cfb9..5aa8e9c18 100644
--- a/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java
+++ b/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java
@@ -588,7 +588,7 @@ public abstract class AbstractBreaker {
.listIterator(startElementIndex);
while (effectiveListIterator.nextIndex() <= endElementIndex) {
KnuthElement tempEl = (KnuthElement)effectiveListIterator.next();
- if (tempEl.isBox() && tempEl.getW() > 0) {
+ if (tempEl.isBox() && tempEl.getWidth() > 0) {
boxCount++;
}
}
@@ -861,9 +861,9 @@ public abstract class AbstractBreaker {
case BlockLevelLayoutManager.LINE_NUMBER_ADJUSTMENT:
// potential line number adjustment
lineNumberMaxAdjustment.max += ((KnuthGlue) thisElement)
- .getY();
+ .getStretch();
lineNumberMaxAdjustment.min -= ((KnuthGlue) thisElement)
- .getZ();
+ .getShrink();
adjustableLinesList.add(thisElement);
break;
case BlockLevelLayoutManager.LINE_HEIGHT_ADJUSTMENT:
@@ -885,9 +885,9 @@ public abstract class AbstractBreaker {
KnuthGlue blockSpace = (KnuthGlue) unconfirmedList
.removeFirst();
spaceMaxAdjustment.max += ((KnuthGlue) blockSpace)
- .getY();
+ .getStretch();
spaceMaxAdjustment.min -= ((KnuthGlue) blockSpace)
- .getZ();
+ .getShrink();
blockSpacesList.add(blockSpace);
}
}
@@ -898,11 +898,11 @@ public abstract class AbstractBreaker {
log.debug("| space adj = "
+ spaceMaxAdjustment);
- if (thisElement.isPenalty() && thisElement.getW() > 0) {
+ if (thisElement.isPenalty() && thisElement.getWidth() > 0) {
log.debug(" mandatory variation to the number of lines!");
((BlockLevelLayoutManager) thisElement
.getLayoutManager()).negotiateBPDAdjustment(
- thisElement.getW(), thisElement);
+ thisElement.getWidth(), thisElement);
}
if (thisBreak.bpdAdjust != 0
@@ -967,7 +967,7 @@ public abstract class AbstractBreaker {
int partial = 0;
while (spaceListIterator.hasNext()) {
KnuthGlue blockSpace = (KnuthGlue)spaceListIterator.next();
- partial += (difference > 0 ? blockSpace.getY() : blockSpace.getZ());
+ partial += (difference > 0 ? blockSpace.getStretch() : blockSpace.getShrink());
if (log.isDebugEnabled()) {
log.debug("available = " + partial + " / " + total);
log.debug("competenza = "
@@ -990,7 +990,7 @@ public abstract class AbstractBreaker {
int partial = 0;
while (lineListIterator.hasNext()) {
KnuthGlue line = (KnuthGlue)lineListIterator.next();
- partial += (difference > 0 ? line.getY() : line.getZ());
+ partial += (difference > 0 ? line.getStretch() : line.getShrink());
int newAdjust = ((BlockLevelLayoutManager) line.getLayoutManager()).negotiateBPDAdjustment(((int) ((float) partial * difference / total)) - adjustedDiff, line);
adjustedDiff += newAdjust;
}