You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by vh...@apache.org on 2007/12/14 12:33:06 UTC
svn commit: r604171 - in
/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr: ./ inline/ list/
table/
Author: vhennebert
Date: Fri Dec 14 03:32:51 2007
New Revision: 604171
URL: http://svn.apache.org/viewvc?rev=604171&view=rev
Log:
Clean up: removed all reset and resetPosition methods, which pre-date the Knuth era and are no longer needed
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LayoutManager.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/ContentLayoutManager.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListItemContentLayoutManager.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableAndCaptionLayoutManager.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableCaptionLayoutManager.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java?rev=604171&r1=604170&r2=604171&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java Fri Dec 14 03:32:51 2007
@@ -130,45 +130,6 @@
}
/**
- * Reset the layoutmanager "iterator" so that it will start
- * with the passed Position's generating LM
- * on the next call to getChildLM.
- * @param pos a Position returned by a child layout manager
- * representing a potential break decision.
- * If pos is null, then back up to the first child LM.
- */
- protected void reset(org.apache.fop.layoutmgr.Position pos) {
- //if (lm == null) return;
- LayoutManager lm = (pos != null) ? pos.getLM() : null;
- if (curChildLM != lm) {
- // ASSERT curChildLM == (LayoutManager)childLMiter.previous()
- if (childLMiter.hasPrevious() && curChildLM
- != (LayoutManager) childLMiter.previous()) {
- //log.error("LMiter problem!");
- }
- while (curChildLM != lm && childLMiter.hasPrevious()) {
- curChildLM.resetPosition(null);
- curChildLM = (LayoutManager) childLMiter.previous();
- }
- // Otherwise next returns same object
- childLMiter.next();
- }
- if (curChildLM != null) {
- curChildLM.resetPosition(pos);
- }
- if (isFinished()) {
- setFinished(false);
- }
- }
-
- /** {@inheritDoc} */
- public void resetPosition(Position resetPos) {
- // if (resetPos == null) {
- // reset(null);
- // }
- }
-
- /**
* Tell whether this LayoutManager has handled all of its content.
* @return True if there are no more break possibilities,
* ie. the last one returned represents the end of the content.
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java?rev=604171&r1=604170&r2=604171&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java Fri Dec 14 03:32:51 2007
@@ -938,15 +938,6 @@
}
}
- /**
- * {@inheritDoc}
- */
- public void resetPosition(Position resetPos) {
- if (resetPos == null) {
- reset(null);
- }
- }
-
/**
* Force current area to be added to parent area.
* {@inheritDoc}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java?rev=604171&r1=604170&r2=604171&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java Fri Dec 14 03:32:51 2007
@@ -477,19 +477,6 @@
}
/**
- * {@inheritDoc}
- */
- public void resetPosition(Position resetPos) {
- if (resetPos == null) {
- reset(null);
- childBreaks.clear();
- } else {
- //reset(resetPos);
- LayoutManager lm = resetPos.getLM();
- }
- }
-
- /**
* convenience method that returns the Block node
* @return the block node
*/
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java?rev=604171&r1=604170&r2=604171&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java Fri Dec 14 03:32:51 2007
@@ -343,14 +343,6 @@
}
/**
- * {@inheritDoc}
- */
- public void resetPosition(Position resetPos) {
- if (resetPos == null) {
- reset(null);
- }
- }
- /**
* Returns the IPD of the content area
* @return the IPD of the content area
*/
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LayoutManager.java?rev=604171&r1=604170&r2=604171&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/LayoutManager.java Fri Dec 14 03:32:51 2007
@@ -59,13 +59,6 @@
PageSequenceLayoutManager getPSLM();
/**
- * Reset to the position.
- *
- * @param position the Position to reset to
- */
- void resetPosition(Position position);
-
- /**
* Return a value indicating whether this LayoutManager has laid out
* all its content (or generated BreakPossibilities for all content.)
*
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/ContentLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/ContentLayoutManager.java?rev=604171&r1=604170&r2=604171&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/ContentLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/ContentLayoutManager.java Fri Dec 14 03:32:51 2007
@@ -215,13 +215,6 @@
/**
* {@inheritDoc}
*/
- public void resetPosition(Position position) {
- //to be done
- }
-
- /**
- * {@inheritDoc}
- */
public boolean createNextChildLMs(int pos) {
return false;
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java?rev=604171&r1=604170&r2=604171&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java Fri Dec 14 03:32:51 2007
@@ -155,41 +155,6 @@
}
/**
- * Reset position for returning next BreakPossibility.
- * @param prevPos a Position returned by this layout manager
- * representing a potential break decision.
- */
- public void resetPosition(Position prevPos) {
- if (prevPos != null) {
- // ASSERT (prevPos.getLM() == this)
- if (prevPos.getLM() != this) {
- //getLogger().error(
- // "InlineStackingLayoutManager.resetPosition: " +
- // "LM mismatch!!!");
- }
- // Back up the child LM Position
- Position childPos = prevPos.getPosition();
- reset(childPos);
- /*
- if (prevBP != null
- && prevBP.getLayoutManager() != childPos.getLM()) {
- childLC = null;
- }
- prevBP = new BreakPoss(childPos);
- */
- } else {
- // Backup to start of first child layout manager
- //prevBP = null;
- // super.resetPosition(prevPos);
- reset(prevPos);
- // If any areas created, we are restarting!
- bAreaCreated = false;
- }
- // Do we need to reset some context like pending or prevContent?
- // What about prevBP?
- }
-
- /**
* TODO: Explain this method
* @param lm ???
* @return ???
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java?rev=604171&r1=604170&r2=604171&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java Fri Dec 14 03:32:51 2007
@@ -1556,33 +1556,6 @@
}
/**
- * Reset the positions to the given position.
- *
- * @param resetPos the position to reset to
- */
- public void resetPosition(Position resetPos) {
- if (resetPos == null) {
- setFinished(false);
- iReturnedLBP = 0;
- } else {
- if (isFinished()) {
- // if isFinished is true, iReturned LBP == breakpoints.size()
- // and breakpoints.get(iReturnedLBP) would generate
- // an IndexOutOfBoundException
- setFinished(false);
- iReturnedLBP--;
- }
- // It is not clear that the member lineLayouts has the correct value;
- // because the method is not called, this cannot be checked.
- while ((LineBreakPosition) lineLayouts.getChosenPosition(iReturnedLBP)
- != (LineBreakPosition) resetPos) {
- iReturnedLBP--;
- }
- iReturnedLBP++;
- }
- }
-
- /**
* Add the areas with the break points.
*
* @param parentIter the iterator of break positions
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java?rev=604171&r1=604170&r2=604171&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java Fri Dec 14 03:32:51 2007
@@ -224,36 +224,6 @@
}
- /**
- * Reset position for returning next BreakPossibility.
- *
- * @param prevPos the position to reset to
- */
- public void resetPosition(Position prevPos) {
- if (prevPos != null) {
- // ASSERT (prevPos.getLM() == this)
- if (prevPos.getLM() != this) {
- log.error("TextLayoutManager.resetPosition: "
- + "LM mismatch!!!");
- }
- LeafPosition tbp = (LeafPosition) prevPos;
- AreaInfo ai = (AreaInfo) vecAreaInfo.get(tbp.getLeafPos());
- if (ai.iBreakIndex != iNextStart) {
- iNextStart = ai.iBreakIndex;
- vecAreaInfo.ensureCapacity(tbp.getLeafPos() + 1);
- // TODO: reset or recalculate total IPD = sum of all word IPD
- // up to the break position
- ipdTotal = ai.ipdArea;
- setFinished(false);
- }
- } else {
- // Reset to beginning!
- vecAreaInfo.clear();
- iNextStart = 0;
- setFinished(false);
- }
- }
-
// TODO: see if we can use normal getNextBreakPoss for this with
// extra hyphenation information in LayoutContext
private boolean getHyphenIPD(HyphContext hc, MinOptMax hyphIPD) {
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java?rev=604171&r1=604170&r2=604171&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java Fri Dec 14 03:32:51 2007
@@ -277,19 +277,6 @@
}
}
- /**
- * Reset the position of this layout manager.
- *
- * @param resetPos the position to reset to
- */
- public void resetPosition(Position resetPos) {
- if (resetPos == null) {
- reset(null);
- } else {
- //TODO Something to put here?
- }
- }
-
/** {@inheritDoc} */
public boolean mustKeepTogether() {
//TODO Keeps will have to be more sophisticated sooner or later
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListItemContentLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListItemContentLayoutManager.java?rev=604171&r1=604170&r2=604171&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListItemContentLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListItemContentLayoutManager.java Fri Dec 14 03:32:51 2007
@@ -220,20 +220,6 @@
}
}
- /**
- * Reset the position of the layout.
- *
- * @param resetPos the position to reset to
- */
- public void resetPosition(Position resetPos) {
- if (resetPos == null) {
- reset(null);
- } else {
- setFinished(false);
- //reset(resetPos);
- }
- }
-
/** {@inheritDoc} */
public boolean mustKeepTogether() {
//TODO Keeps will have to be more sophisticated sooner or later
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java?rev=604171&r1=604170&r2=604171&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java Fri Dec 14 03:32:51 2007
@@ -623,17 +623,6 @@
}
}
- /**
- * Reset the position of this layout manager.
- *
- * @param resetPos the position to reset to
- */
- public void resetPosition(Position resetPos) {
- if (resetPos == null) {
- reset(null);
- }
- }
-
/** {@inheritDoc} */
public boolean mustKeepTogether() {
//TODO Keeps will have to be more sophisticated sooner or later
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableAndCaptionLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableAndCaptionLayoutManager.java?rev=604171&r1=604170&r2=604171&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableAndCaptionLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableAndCaptionLayoutManager.java Fri Dec 14 03:32:51 2007
@@ -194,16 +194,5 @@
curBlockArea.addBlock((Block) childArea);
}
}
-
- /**
- * Reset the position of this layout manager.
- *
- * @param resetPos the position to reset to
- */
- public void resetPosition(Position resetPos) {
- if (resetPos == null) {
- reset(null);
- }
- }
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableCaptionLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableCaptionLayoutManager.java?rev=604171&r1=604170&r2=604171&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableCaptionLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableCaptionLayoutManager.java Fri Dec 14 03:32:51 2007
@@ -193,16 +193,5 @@
curBlockArea.addBlock((Block) childArea);
}
}
-
- /**
- * Reset the layout position.
- *
- * @param resetPos the position to reset to
- */
- public void resetPosition(Position resetPos) {
- if (resetPos == null) {
- reset(null);
- }
- }
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java?rev=604171&r1=604170&r2=604171&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java Fri Dec 14 03:32:51 2007
@@ -505,17 +505,6 @@
}
/**
- * Reset the position of the layout.
- *
- * @param resetPos the position to reset to
- */
- public void resetPosition(Position resetPos) {
- if (resetPos == null) {
- reset(null);
- }
- }
-
- /**
* {@inheritDoc}
*/
public int negotiateBPDAdjustment(int adj, KnuthElement lastElement) {
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java?rev=604171&r1=604170&r2=604171&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java Fri Dec 14 03:32:51 2007
@@ -404,17 +404,6 @@
}
}
- /**
- * Reset the position of this layout manager.
- *
- * @param resetPos the position to reset to
- */
- public void resetPosition(Position resetPos) {
- if (resetPos == null) {
- reset(null);
- }
- }
-
/** {@inheritDoc} */
public int negotiateBPDAdjustment(int adj, KnuthElement lastElement) {
// TODO Auto-generated method stub
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org