From: Simon Pepping Date: Mon, 15 Nov 2004 21:01:40 +0000 (+0000) Subject: Made RetrieveMarkerLM implement InlineLevelLM. X-Git-Tag: Root_Temp_KnuthStylePageBreaking~360 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b0488a8beeaa08c3d42ff296cc24bb3f4356dd7b;p=xmlgraphics-fop.git Made RetrieveMarkerLM implement InlineLevelLM. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198147 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/layoutmgr/RetrieveMarkerLayoutManager.java b/src/java/org/apache/fop/layoutmgr/RetrieveMarkerLayoutManager.java index 2b4e673a1..fba6b94e1 100644 --- a/src/java/org/apache/fop/layoutmgr/RetrieveMarkerLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/RetrieveMarkerLayoutManager.java @@ -30,7 +30,9 @@ import org.apache.fop.fo.flow.RetrieveMarker; /** * LayoutManager for a block FO. */ -public class RetrieveMarkerLayoutManager extends AbstractLayoutManager { +public class RetrieveMarkerLayoutManager extends AbstractLayoutManager + implements InlineLevelLayoutManager { + private RetrieveMarker fobj; private LayoutManager replaceLM = null; @@ -67,6 +69,9 @@ public class RetrieveMarkerLayoutManager extends AbstractLayoutManager { return replaceLM.getNextBreakPoss(context); } + /** + * @see org.apache.fop.layoutmgr.InlineLevelLayoutManager#getNextKnuthElements + */ public LinkedList getNextKnuthElements(LayoutContext context, int alignment) { loadLM(); @@ -77,6 +82,66 @@ public class RetrieveMarkerLayoutManager extends AbstractLayoutManager { .getNextKnuthElements(context, alignment); } + /** + * @see org.apache.fop.layoutmgr.InlineLevelLayoutManager#addALetterSpaceTo + */ + public KnuthElement addALetterSpaceTo(KnuthElement element) { + loadLM(); + if (replaceLM == null) { + return null; + } + return ((InlineLevelLayoutManager) replaceLM) + .addALetterSpaceTo(element); + } + + /** + * @see org.apache.fop.layoutmgr.InlineLevelLayoutManager#getWordChars + */ + public void getWordChars(StringBuffer sbChars, Position pos) { + loadLM(); + if (replaceLM != null) { + ((InlineLevelLayoutManager) replaceLM) + .getWordChars(sbChars, pos); + } + } + + /** + * @see org.apache.fop.layoutmgr.InlineLevelLayoutManager#hyphenate + */ + public void hyphenate(Position pos, HyphContext hc) { + loadLM(); + if (replaceLM != null) { + ((InlineLevelLayoutManager) replaceLM).hyphenate(pos, hc); + } + } + + /** + * @see org.apache.fop.layoutmgr.InlineLevelLayoutManager#applyChanges + */ + public boolean applyChanges(List oldList) { + loadLM(); + if (replaceLM == null) { + return false; + } + return ((InlineLevelLayoutManager) replaceLM) + .applyChanges(oldList); + } + + /** + * @see org.apache.fop.layoutmgr.InlineLevelLayoutManager#getChangedKnuthElements + */ + public LinkedList getChangedKnuthElements(List oldList, + int flaggedPenalty, + int alignment) { + loadLM(); + if (replaceLM == null) { + return null; + } + return ((InlineLevelLayoutManager) replaceLM) + .getChangedKnuthElements(oldList, flaggedPenalty, + alignment); + } + public void addAreas(PositionIterator parentIter, LayoutContext layoutContext) {