From: Vincent Hennebert Date: Tue, 16 Jun 2009 16:59:37 +0000 (+0000) Subject: Removed dead code X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=55e004cd9a78e1d12a8c7f78d012169c1ffda62c;p=xmlgraphics-fop.git Removed dead code git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_ChangingIPDHack@785291 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java index 0c332281f..6e0c34a82 100755 --- a/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java @@ -248,8 +248,6 @@ public class InlineLayoutManager extends InlineStackingLayoutManager { List returnList = new LinkedList(); KnuthSequence lastSequence = null; - SpaceSpecifier leadingSpace = context.getLeadingSpace(); - if (fobj instanceof Title) { alignmentContext = new AlignmentContext(font, lineHeight.getOptimum(this).getLength().getValue(this), @@ -274,14 +272,6 @@ public class InlineLayoutManager extends InlineStackingLayoutManager { if (getSpaceStart() != null) { context.getLeadingSpace().addSpace(new SpaceVal(getSpaceStart(), this)); } - - // Check for "fence" - if (hasLeadingFence(!context.isFirstArea())) { - // Reset leading space sequence for child areas - leadingSpace = new SpaceSpecifier(false); - } - // Reset state variables - clearPrevIPD(); // Clear stored prev content dimensions } StringBuffer trace = new StringBuffer("InlineLM:"); diff --git a/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java index 963b98b37..65e59554f 100644 --- a/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java @@ -19,12 +19,13 @@ package org.apache.fop.layoutmgr.inline; -import java.util.LinkedList; import java.util.Iterator; +import java.util.LinkedList; import java.util.List; import java.util.ListIterator; -import java.util.HashMap; +import org.apache.fop.area.Area; +import org.apache.fop.area.inline.Space; import org.apache.fop.fo.FObj; import org.apache.fop.fo.properties.SpaceProperty; import org.apache.fop.layoutmgr.AbstractLayoutManager; @@ -34,8 +35,6 @@ import org.apache.fop.layoutmgr.LayoutManager; import org.apache.fop.layoutmgr.NonLeafPosition; import org.apache.fop.layoutmgr.Position; import org.apache.fop.layoutmgr.PositionIterator; -import org.apache.fop.area.Area; -import org.apache.fop.area.inline.Space; import org.apache.fop.traits.MinOptMax; /** @@ -62,12 +61,6 @@ public abstract class InlineStackingLayoutManager extends AbstractLayoutManager } } - - /** - * Size of any start or end borders and padding. - */ - private MinOptMax allocIPD = new MinOptMax(0); - /** * Size of border and padding in BPD (ie, before and after). */ @@ -78,9 +71,6 @@ public abstract class InlineStackingLayoutManager extends AbstractLayoutManager /** The child layout context */ protected LayoutContext childLC; - /** Used to store previous content IPD for each child LM. */ - private HashMap hmPrevIPD = new HashMap(); - /** * Create an inline stacking layout manager. * This is used for fo's that create areas that @@ -148,22 +138,6 @@ public abstract class InlineStackingLayoutManager extends AbstractLayoutManager return null; } - /** - * TODO: Explain this method - * @param lm ??? - * @return ??? - */ - protected MinOptMax getPrevIPD(LayoutManager lm) { - return (MinOptMax) hmPrevIPD.get(lm); - } - - /** - * Clear the previous IPD calculation. - */ - protected void clearPrevIPD() { - hmPrevIPD.clear(); - } - /** * Returns the current area. * @return the current area diff --git a/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java b/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java index 3a0672f4e..b0f9f6a8c 100644 --- a/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java @@ -169,11 +169,6 @@ public class LineLayoutManager extends InlineStackingLayoutManager private AlignmentContext alignmentContext = null; private List knuthParagraphs = null; - private int iReturnedLBP = 0; - - // parameters of Knuth's algorithm: - // penalty value for flagged penalties - private int flaggedPenalty = 50; private LineLayoutPossibilities lineLayouts; private List lineLayoutsList; @@ -318,11 +313,9 @@ public class LineLayoutManager extends InlineStackingLayoutManager private int activePossibility; private int addedPositions; private int textIndent; - private int fillerMinWidth; private int lineHeight; private int lead; private int follow; - private int maxDiff; private static final double MAX_DEMERITS = 10e6; public LineBreakingAlgorithm (int pageAlign, @@ -333,22 +326,17 @@ public class LineLayoutManager extends InlineStackingLayoutManager super(textAlign, textAlignLast, first, false, maxFlagCount); pageAlignment = pageAlign; textIndent = indent; - fillerMinWidth = fillerWidth; lineHeight = lh; lead = ld; follow = fl; thisLLM = llm; activePossibility = -1; - maxDiff = fobj.getWidows() >= fobj.getOrphans() - ? fobj.getWidows() - : fobj.getOrphans(); } public void updateData1(int lineCount, double demerits) { lineLayouts.addPossibility(lineCount, demerits); - if (super.log.isTraceEnabled()) { - super.log.trace( - "Layout possibility in " + lineCount + " lines; break at position:"); + if (log.isTraceEnabled()) { + log.trace("Layout possibility in " + lineCount + " lines; break at position:"); } } @@ -583,8 +571,6 @@ public class LineLayoutManager extends InlineStackingLayoutManager // Get a break from currently active child LM // Set up constraints for inline level managers - clearPrevIPD(); - //PHASE 1: Create Knuth elements if (knuthParagraphs == null) { // it's the first time this method is called