From 525242b190bd09f913b7f3018e6029ff5d4a1aa0 Mon Sep 17 00:00:00 2001 From: Glen Mazza Date: Sat, 12 Jun 2004 18:03:47 +0000 Subject: [PATCH] Removed get/setUserAgent() initializations from the LayoutManagers. (Infrequently called, and already obtainable through AbstractLayoutManager's FObj member variable.) git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197701 13f79535-47bb-0310-9956-ffa450edef68 --- .../fop/layoutmgr/AbstractLayoutManager.java | 20 ------------------- .../apache/fop/layoutmgr/LayoutManager.java | 14 ------------- .../fop/layoutmgr/PageLayoutManager.java | 2 -- .../layoutmgr/list/ListItemLayoutManager.java | 3 --- .../org/apache/fop/layoutmgr/table/Row.java | 1 - .../layoutmgr/table/TableLayoutManager.java | 2 -- 6 files changed, 42 deletions(-) diff --git a/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java b/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java index e34fbc69a..b4b7a08f1 100644 --- a/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java @@ -68,7 +68,6 @@ public abstract class AbstractLayoutManager implements LayoutManager, Constants */ public AbstractLayoutManager(FObj fo) { setFObj(fo); - setUserAgent(fo.getUserAgent()); } /** @@ -101,24 +100,6 @@ public abstract class AbstractLayoutManager implements LayoutManager, Constants protected void initProperties() { } - /** - * Set the user agent. - * - * @param ua the user agent - */ - public void setUserAgent(FOUserAgent ua) { - userAgent = ua; - } - - /** - * Get the user agent. - * - * @see org.apache.fop.layoutmgr.LayoutManager#getUserAgent() - */ - public FOUserAgent getUserAgent() { - return userAgent; - } - public void setParent(LayoutManager lm) { this.parentLM = lm; } @@ -185,7 +166,6 @@ public abstract class AbstractLayoutManager implements LayoutManager, Constants } while (childLMiter.hasNext()) { curChildLM = (LayoutManager) childLMiter.next(); - curChildLM.setUserAgent(getUserAgent()); curChildLM.setParent(this); curChildLM.initialize(); return curChildLM; diff --git a/src/java/org/apache/fop/layoutmgr/LayoutManager.java b/src/java/org/apache/fop/layoutmgr/LayoutManager.java index 54ade889a..102c89978 100644 --- a/src/java/org/apache/fop/layoutmgr/LayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/LayoutManager.java @@ -42,20 +42,6 @@ public interface LayoutManager { */ void setFObj(FObj obj); - /** - * Set the user agent. For resolving user agent values. - * - * @param ua the user agent - */ - void setUserAgent(FOUserAgent ua); - - /** - * Get the user agent. - * - * @return the user agent - */ - FOUserAgent getUserAgent(); - /** * Set the parent layout manager. * The parent layout manager is required for adding areas. diff --git a/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java b/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java index 34f9d1891..4c4015521 100644 --- a/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java @@ -465,7 +465,6 @@ public class PageLayoutManager extends AbstractLayoutManager implements Runnable log.error("no region viewport: shouldn't happen"); } StaticContentLayoutManager lm = getStaticContentLayoutManager(flow); - lm.setUserAgent(getUserAgent()); lm.initialize(); lm.setRegionReference(reg.getRegion()); lm.setParent(this); @@ -894,7 +893,6 @@ public class PageLayoutManager extends AbstractLayoutManager implements Runnable return lm; } lm = new StaticContentLayoutManager(); - lm.setUserAgent(getUserAgent()); lm.setFObj(sc); staticContentLMs.put(sc.getFlowName(), lm); return lm; diff --git a/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java b/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java index 8c58514bc..0af9e7b45 100644 --- a/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java @@ -106,9 +106,6 @@ public class ListItemLayoutManager extends BlockStackingLayoutManager { // currently active LM Item curLM; - label.setUserAgent(getUserAgent()); - body.setUserAgent(getUserAgent()); - BreakPoss lastPos = null; List breakList = new ArrayList(); diff --git a/src/java/org/apache/fop/layoutmgr/table/Row.java b/src/java/org/apache/fop/layoutmgr/table/Row.java index e0c9cf3fc..efb3dba80 100644 --- a/src/java/org/apache/fop/layoutmgr/table/Row.java +++ b/src/java/org/apache/fop/layoutmgr/table/Row.java @@ -94,7 +94,6 @@ public class Row extends BlockStackingLayoutManager { // add cells to list while (childLMiter.hasNext()) { curChildLM = (LayoutManager) childLMiter.next(); - curChildLM.setUserAgent(getUserAgent()); curChildLM.setParent(this); curChildLM.initialize(); cellList.add(curChildLM); diff --git a/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java b/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java index c11fd90d7..a0e966f32 100644 --- a/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/table/TableLayoutManager.java @@ -162,7 +162,6 @@ public class TableLayoutManager extends BlockStackingLayoutManager { } MinOptMax headerSize = null; if (tableHeader != null) { - tableHeader.setUserAgent(getUserAgent()); tableHeader.resetPosition(null); headerBreak = getHeight(tableHeader, context); headerSize = headerBreak.getStackingSize(); @@ -171,7 +170,6 @@ public class TableLayoutManager extends BlockStackingLayoutManager { MinOptMax footerSize = null; if (tableFooter != null) { - tableFooter.setUserAgent(getUserAgent()); tableFooter.resetPosition(null); footerBreak = getHeight(tableFooter, context); footerSize = footerBreak.getStackingSize(); -- 2.39.5