From: William Victor Mote Date: Mon, 25 Aug 2003 18:10:30 +0000 (+0000) Subject: move fo/flow/ListItemBody.getItemLayoutManager() to layoutmgr/AddLMVisitor.getListIte... X-Git-Tag: Root_Temp_KnuthStylePageBreaking~1165 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=97d951521c5899e032631bcf86cf782c8bf96779;p=xmlgraphics-fop.git move fo/flow/ListItemBody.getItemLayoutManager() to layoutmgr/AddLMVisitor.getListItemBodyLayoutManager() git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196838 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/java/org/apache/fop/fo/flow/ListItemBody.java b/src/java/org/apache/fop/fo/flow/ListItemBody.java index 3a8113714..960f6a610 100644 --- a/src/java/org/apache/fop/fo/flow/ListItemBody.java +++ b/src/java/org/apache/fop/fo/flow/ListItemBody.java @@ -55,8 +55,6 @@ import org.apache.fop.fo.FONode; import org.apache.fop.fo.FObj; import org.apache.fop.fo.FOTreeVisitor; import org.apache.fop.fo.properties.CommonAccessibility; -import org.apache.fop.layoutmgr.list.Item; -import org.apache.fop.apps.*; /** * Class modelling the fo:list-item-body object. See Sec. 6.8.4 of the XSL-FO @@ -71,16 +69,6 @@ public class ListItemBody extends FObj { super(parent); } - /** - * @return Item layout manager - */ - public Item getItemLayoutManager() { - Item item = new Item(); - item.setUserAgent(getUserAgent()); - item.setFObj(this); - return item; - } - private void setup() { // Common Accessibility Properties diff --git a/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java b/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java index 4a3139df5..eb35aea80 100644 --- a/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java +++ b/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java @@ -84,6 +84,7 @@ import org.apache.fop.fo.flow.ExternalGraphic; import org.apache.fop.fo.flow.BlockContainer; import org.apache.fop.fo.flow.Footnote; import org.apache.fop.fo.flow.ListBlock; +import org.apache.fop.fo.flow.ListItemBody; import org.apache.fop.fo.flow.InstreamForeignObject; import org.apache.fop.fo.flow.InlineContainer; import org.apache.fop.fo.flow.ListItem; @@ -108,6 +109,7 @@ import org.apache.fop.layoutmgr.table.Cell; import org.apache.fop.layoutmgr.table.Body; import org.apache.fop.layoutmgr.table.Row; import org.apache.fop.layoutmgr.table.TableLayoutManager; +import org.apache.fop.layoutmgr.list.Item; import org.apache.fop.layoutmgr.list.ListBlockLayoutManager; import org.apache.fop.layoutmgr.list.ListItemLayoutManager; import org.apache.fop.util.CharUtilities; @@ -637,13 +639,23 @@ public class AddLMVisitor extends FOTreeVisitor { blm.setUserAgent(node.getUserAgent()); blm.setFObj(node); blm.setLabel(node.getLabel().getItemLayoutManager()); - blm.setBody(node.getBody().getItemLayoutManager()); + blm.setBody(getListItemBodyLayoutManager(node.getBody())); currentLMList.add(blm); } else { node.getLogger().error("list-item requires list-item-label and list-item-body"); } } + /** + * @return Item layout manager + */ + public Item getListItemBodyLayoutManager(ListItemBody node) { + Item item = new Item(); + item.setUserAgent(node.getUserAgent()); + item.setFObj(node); + return item; + } + /** * Overridden from FObj * @param lms the list to which the layout manager(s) should be added