aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas L. Delmelle <adelmelle@apache.org>2011-02-06 14:14:51 +0000
committerAndreas L. Delmelle <adelmelle@apache.org>2011-02-06 14:14:51 +0000
commit0af6c82070852c312c6a72c2202276f360b1b5cb (patch)
treed525ebf15d0d7f89cfed5c256c155717dad13a55
parent6ac76ab07369f3f0d9596ac21e4f439b8e7d3ddd (diff)
downloadxmlgraphics-fop-0af6c82070852c312c6a72c2202276f360b1b5cb.tar.gz
xmlgraphics-fop-0af6c82070852c312c6a72c2202276f360b1b5cb.zip
Decommission BlockStackingLM.StackingIter
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1067670 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java2
-rw-r--r--src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java2
-rw-r--r--src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java30
3 files changed, 3 insertions, 31 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java b/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
index b74df68bc..56f286dd0 100644
--- a/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
@@ -861,7 +861,7 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager
if (bcpos == null) {
// the Positions in positionList were inside the elements
// created by the LineLM
- childPosIter = new StackingIter(positionList.listIterator());
+ childPosIter = new PositionIterator(positionList.listIterator());
while ((childLM = childPosIter.getNextChildLM()) != null) {
// set last area flag
diff --git a/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java b/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java
index a7361ae31..45036b36e 100644
--- a/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java
@@ -279,7 +279,7 @@ public class BlockLayoutManager extends BlockStackingLayoutManager
// the Positions in positionList were inside the elements
// created by the LineLM
- childPosIter = new StackingIter(positionList.listIterator());
+ childPosIter = new PositionIterator(positionList.listIterator());
while ((childLM = childPosIter.getNextChildLM()) != null) {
// set last area flag
diff --git a/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java b/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java
index 974222271..7e1881f77 100644
--- a/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java
@@ -599,7 +599,7 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager
return adj;
}
}
- } else if (innerPosition.getLM() != this) {
+ } else if (innerPosition != null && innerPosition.getLM() != this) {
// this adjustment concerns another LM
NonLeafPosition savedPos = (NonLeafPosition) lastElement.getPosition();
lastElement.setPosition(innerPosition);
@@ -1111,34 +1111,6 @@ public abstract class BlockStackingLayoutManager extends AbstractLayoutManager
}
}
- /** A stack iterator. */
- protected static class StackingIter extends PositionIterator {
-
- /**
- * Construct a stacking iterator.
- * @param parentIter the parent iterator
- */
- StackingIter(Iterator parentIter) {
- super(parentIter);
- }
-
- /**
- * @param nextObj the next position
- * @return the layout manager of the next position
- */
- protected LayoutManager getLM(Object nextObj) {
- return ((Position) nextObj).getLM();
- }
-
- /**
- * @param nextObj the next position
- * @return the next position
- */
- protected Position getPos(Object nextObj) {
- return ((Position) nextObj);
- }
- }
-
/** A mapping position. */
protected static class MappingPosition extends Position {