diff options
author | Karen Lease <klease@apache.org> | 2002-08-28 21:10:21 +0000 |
---|---|---|
committer | Karen Lease <klease@apache.org> | 2002-08-28 21:10:21 +0000 |
commit | 91171270a32decc930a8810ccaa59cb4c255d104 (patch) | |
tree | 665c359eb63765861f78c72e4eb659fa5fe7633b /src/org/apache/fop | |
parent | 0e6a2b065f051cc8467f6327bb8085cc03c5aa94 (diff) | |
download | xmlgraphics-fop-91171270a32decc930a8810ccaa59cb4c255d104.tar.gz xmlgraphics-fop-91171270a32decc930a8810ccaa59cb4c255d104.zip |
Remove two parameter version of getNextBreakPoss method and remove all calls to it which always used a null second parameter
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195123 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop')
11 files changed, 17 insertions, 42 deletions
diff --git a/src/org/apache/fop/layoutmgr/AbstractBPLayoutManager.java b/src/org/apache/fop/layoutmgr/AbstractBPLayoutManager.java index b00b708f8..b0478917f 100644 --- a/src/org/apache/fop/layoutmgr/AbstractBPLayoutManager.java +++ b/src/org/apache/fop/layoutmgr/AbstractBPLayoutManager.java @@ -157,15 +157,10 @@ public abstract class AbstractBPLayoutManager extends AbstractLayoutManager impl * default implementation? */ public BreakPoss getNextBreakPoss(LayoutContext context) { - return getNextBreakPoss(context, null); - } - - - public BreakPoss getNextBreakPoss(LayoutContext context, - Position prevBreakPoss) { return null; } + /** * Return value indicating whether the next area to be generated could * start a new line or flow area. diff --git a/src/org/apache/fop/layoutmgr/BPLayoutManager.java b/src/org/apache/fop/layoutmgr/BPLayoutManager.java index 8c6b990f9..eef90a60d 100644 --- a/src/org/apache/fop/layoutmgr/BPLayoutManager.java +++ b/src/org/apache/fop/layoutmgr/BPLayoutManager.java @@ -27,16 +27,7 @@ public interface BPLayoutManager extends LayoutManager { * space specifiers from ancestor areas or previous areas, reference * area inline-progression-dimension and various other layout-related * information. - * @param prevBreakPosition If not null, gives a Position returned by - * this layout manager on a previous call to getNextBreakPoss. It may not - * be the previous one returned. The Layout Manager should return the next - * potential Break Possibility after prevBreakPosition. - * If prevBreakPosition is null, it should return the first possible - * BreakPoss. */ - public BreakPoss getNextBreakPoss(LayoutContext context, - Position prevBreakPosition); - public BreakPoss getNextBreakPoss(LayoutContext context); diff --git a/src/org/apache/fop/layoutmgr/BlockLayoutManager.java b/src/org/apache/fop/layoutmgr/BlockLayoutManager.java index d43ce8cc1..f8938ea4c 100644 --- a/src/org/apache/fop/layoutmgr/BlockLayoutManager.java +++ b/src/org/apache/fop/layoutmgr/BlockLayoutManager.java @@ -108,9 +108,7 @@ public class BlockLayoutManager extends BlockStackingLayoutManager { return curBlockArea.getIPD(); } - public BreakPoss getNextBreakPoss(LayoutContext context, - Position prevLineBP) { - + public BreakPoss getNextBreakPoss(LayoutContext context) { BPLayoutManager curLM ; // currently active LM MinOptMax stackSize = new MinOptMax(); @@ -139,7 +137,7 @@ public class BlockLayoutManager extends BlockStackingLayoutManager { } while (!curLM.isFinished()) { - if ((bp = curLM.getNextBreakPoss(childLC, null)) != null) { + if ((bp = curLM.getNextBreakPoss(childLC)) != null) { stackSize.add(bp.getStackingSize()); if (stackSize.min > context.getStackLimit().max) { // reset to last break diff --git a/src/org/apache/fop/layoutmgr/ContentLayoutManager.java b/src/org/apache/fop/layoutmgr/ContentLayoutManager.java index 8f3c64261..03fb82a98 100644 --- a/src/org/apache/fop/layoutmgr/ContentLayoutManager.java +++ b/src/org/apache/fop/layoutmgr/ContentLayoutManager.java @@ -41,7 +41,7 @@ public class ContentLayoutManager implements LayoutManager { childLC.setRefIPD(ipd); while (!curLM.isFinished()) { - if ((bp = curLM.getNextBreakPoss(childLC, null)) != null) { + if ((bp = curLM.getNextBreakPoss(childLC)) != null) { stack.add(bp.getStackingSize()); childBreaks.add(bp); } diff --git a/src/org/apache/fop/layoutmgr/FlowLayoutManager.java b/src/org/apache/fop/layoutmgr/FlowLayoutManager.java index 114283b58..e55647d1f 100644 --- a/src/org/apache/fop/layoutmgr/FlowLayoutManager.java +++ b/src/org/apache/fop/layoutmgr/FlowLayoutManager.java @@ -36,8 +36,7 @@ public class FlowLayoutManager extends BlockStackingLayoutManager { super(fobj); } - public BreakPoss getNextBreakPoss(LayoutContext context, - Position prevLineBP) { + public BreakPoss getNextBreakPoss(LayoutContext context) { BPLayoutManager curLM ; // currently active LM MinOptMax stackSize = new MinOptMax(); @@ -54,7 +53,7 @@ public class FlowLayoutManager extends BlockStackingLayoutManager { childLC.setRefIPD(context.getRefIPD()); if (!curLM.isFinished()) { - if ((bp = curLM.getNextBreakPoss(childLC, null)) != null) { + if ((bp = curLM.getNextBreakPoss(childLC)) != null) { stackSize.add(bp.getStackingSize()); blockBreaks.add(bp); // set stackLimit for remaining space diff --git a/src/org/apache/fop/layoutmgr/InlineStackingBPLayoutManager.java b/src/org/apache/fop/layoutmgr/InlineStackingBPLayoutManager.java index 1fb48417f..d4e66e76f 100644 --- a/src/org/apache/fop/layoutmgr/InlineStackingBPLayoutManager.java +++ b/src/org/apache/fop/layoutmgr/InlineStackingBPLayoutManager.java @@ -184,7 +184,7 @@ public class InlineStackingBPLayoutManager extends AbstractBPLayoutManager { } - public BreakPoss getNextBreakPoss(LayoutContext lc, Position pbp) { + public BreakPoss getNextBreakPoss(LayoutContext lc) { // Get a break from currently active child LM BreakPoss bp = null; BPLayoutManager curLM ; diff --git a/src/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java b/src/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java index d8a00f0f7..261d24aeb 100644 --- a/src/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java +++ b/src/org/apache/fop/layoutmgr/LeafNodeLayoutManager.java @@ -66,8 +66,7 @@ public class LeafNodeLayoutManager extends AbstractBPLayoutManager { return null; } - public BreakPoss getNextBreakPoss(LayoutContext context, - Position prevBreakPoss) { + public BreakPoss getNextBreakPoss(LayoutContext context) { curArea = get(context); if (curArea == null) { setFinished(true); diff --git a/src/org/apache/fop/layoutmgr/LineBPLayoutManager.java b/src/org/apache/fop/layoutmgr/LineBPLayoutManager.java index 16998de81..7fdb7d547 100644 --- a/src/org/apache/fop/layoutmgr/LineBPLayoutManager.java +++ b/src/org/apache/fop/layoutmgr/LineBPLayoutManager.java @@ -104,8 +104,7 @@ public class LineBPLayoutManager extends InlineStackingBPLayoutManager { * generate inline areas. If a block-level generating LM is found, * finish any line being filled and return to the parent LM. */ - public BreakPoss getNextBreakPoss(LayoutContext context, - Position prevLineBP) { + public BreakPoss getNextBreakPoss(LayoutContext context) { // Get a break from currently active child LM // Set up constraints for inline level managers @@ -153,7 +152,7 @@ public class LineBPLayoutManager extends InlineStackingBPLayoutManager { // GET NEXT POSSIBLE BREAK FROM CHILD LM // prevBP = bp; - if ((bp = curLM.getNextBreakPoss(inlineLC, null)) != null) { + if ((bp = curLM.getNextBreakPoss(inlineLC)) != null) { // Add any space before and previous content dimension MinOptMax prevIPD = updatePrevIPD(bp, prevBP, (m_vecInlineBreaks.size() == iPrevLineEnd), diff --git a/src/org/apache/fop/layoutmgr/PageLayoutManager.java b/src/org/apache/fop/layoutmgr/PageLayoutManager.java index 095c83786..464334022 100644 --- a/src/org/apache/fop/layoutmgr/PageLayoutManager.java +++ b/src/org/apache/fop/layoutmgr/PageLayoutManager.java @@ -96,7 +96,7 @@ public class PageLayoutManager extends AbstractBPLayoutManager implements Runnab BreakPoss bp; LayoutContext childLC = new LayoutContext(0); while (!isFinished()) { - if ((bp = getNextBreakPoss(childLC, null)) != null) { + if ((bp = getNextBreakPoss(childLC)) != null) { addAreas((BlockBreakPosition)bp.getPosition()); // add static areas and resolve any new id areas @@ -108,8 +108,7 @@ public class PageLayoutManager extends AbstractBPLayoutManager implements Runnab } - public BreakPoss getNextBreakPoss(LayoutContext context, - Position prevLineBP) { + public BreakPoss getNextBreakPoss(LayoutContext context) { BPLayoutManager curLM ; // currently active LM @@ -121,7 +120,7 @@ public class PageLayoutManager extends AbstractBPLayoutManager implements Runnab childLC.setRefIPD(flowIPD); if (!curLM.isFinished()) { - bp = curLM.getNextBreakPoss(childLC, null); + bp = curLM.getNextBreakPoss(childLC); } if(bp != null) { return new BreakPoss( @@ -242,7 +241,7 @@ public class PageLayoutManager extends AbstractBPLayoutManager implements Runnab childLC.setRefIPD((int)reg.getViewArea().getWidth()); while (!lm.isFinished()) { - BreakPoss bp = lm.getNextBreakPoss(childLC, null); + BreakPoss bp = lm.getNextBreakPoss(childLC); if (bp != null) { ArrayList vecBreakPoss = new ArrayList(); vecBreakPoss.add(bp); diff --git a/src/org/apache/fop/layoutmgr/StaticContentLayoutManager.java b/src/org/apache/fop/layoutmgr/StaticContentLayoutManager.java index 8d1859731..94599533a 100644 --- a/src/org/apache/fop/layoutmgr/StaticContentLayoutManager.java +++ b/src/org/apache/fop/layoutmgr/StaticContentLayoutManager.java @@ -34,8 +34,7 @@ public class StaticContentLayoutManager extends BlockStackingLayoutManager { this.region = region; } - public BreakPoss getNextBreakPoss(LayoutContext context, - Position prevLineBP) { + public BreakPoss getNextBreakPoss(LayoutContext context) { BPLayoutManager curLM ; // currently active LM @@ -45,7 +44,7 @@ public class StaticContentLayoutManager extends BlockStackingLayoutManager { BreakPoss bp; LayoutContext childLC = context; if (!curLM.isFinished()) { - if ((bp = curLM.getNextBreakPoss(childLC, null)) != null) { + if ((bp = curLM.getNextBreakPoss(childLC)) != null) { blockBreaks.add(bp); if(bp.isForcedBreak()) { System.out.println("Forced breaks are not allowed in static content"); diff --git a/src/org/apache/fop/layoutmgr/TextBPLayoutManager.java b/src/org/apache/fop/layoutmgr/TextBPLayoutManager.java index 7baf9a857..0c7867830 100644 --- a/src/org/apache/fop/layoutmgr/TextBPLayoutManager.java +++ b/src/org/apache/fop/layoutmgr/TextBPLayoutManager.java @@ -201,9 +201,6 @@ public class TextBPLayoutManager extends AbstractBPLayoutManager { * Return the next break possibility that fits the constraints. * @param context An object specifying the flags and input information * concerning the context of the BreakPoss. - * @para prevPos An object specifying the previous Position returned - * by a BreakPoss from this LM. It may be earlier than the current - * pointer when doing hyphenation or starting a new line. * @return BreakPoss An object containing information about the next * legal break position or the end of the text run if no break * was found. @@ -215,8 +212,7 @@ public class TextBPLayoutManager extends AbstractBPLayoutManager { * There may be LINEFEED characters if they weren't converted * into spaces. A LINEFEED always forces a break. */ - public BreakPoss getNextBreakPoss(LayoutContext context, - Position prevPos) { + public BreakPoss getNextBreakPoss(LayoutContext context) { /* On first call in a new Line, the START_AREA * flag in LC is set. */ |