From: Andreas L. Delmelle Date: Sun, 6 Feb 2011 14:14:51 +0000 (+0000) Subject: Decommission BlockStackingLM.StackingIter X-Git-Tag: fop-1_1rc1old~316 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=0af6c82070852c312c6a72c2202276f360b1b5cb;p=xmlgraphics-fop.git Decommission BlockStackingLM.StackingIter git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1067670 13f79535-47bb-0310-9956-ffa450edef68 --- 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 {