From e511633e5e706652f23c7cebefb56575f4f36053 Mon Sep 17 00:00:00 2001 From: Peter Bernard West Date: Mon, 21 Oct 2002 15:45:30 +0000 Subject: [PATCH] initialValues[] moved to PropertyConsts singleton. getInitialValue() removed. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@195344 13f79535-47bb-0310-9956-ffa450edef68 --- src/org/apache/fop/fo/FOTree.java | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/src/org/apache/fop/fo/FOTree.java b/src/org/apache/fop/fo/FOTree.java index c4ec68423..777529f08 100644 --- a/src/org/apache/fop/fo/FOTree.java +++ b/src/org/apache/fop/fo/FOTree.java @@ -53,7 +53,6 @@ public class FOTree extends Tree implements Runnable { SyncedXmlEventsBuffer xmlevents; private Thread parserThread; private boolean errorDump; - public final PropertyConsts propConsts; /** * The PropertyParser which will be used by the FO tree @@ -61,8 +60,6 @@ public class FOTree extends Tree implements Runnable { */ protected PropertyParser exprParser; - protected PropertyValue[] initialValues - = new PropertyValue[PropNames.LAST_PROPERTY_INDEX + 1]; /** * @param xmlevents the buffer from which XMLEvents from the @@ -75,44 +72,29 @@ public class FOTree extends Tree implements Runnable { errorDump = Configuration.getBooleanValue("debugMode").booleanValue(); this.xmlevents = xmlevents; exprParser = new PropertyParser(this); - propConsts = PropertyConsts.getPropertyConsts(); // Initialize the FontSize first. Any lengths defined in ems must // be resolved relative to the current font size. This may happen // during setup of initial values. // Set the initial value PropertyValue prop = - propConsts.getInitialValue(PropNames.FONT_SIZE); + PropertyConsts.pconsts.getInitialValue(PropNames.FONT_SIZE); + System.out.println("font-size property: " + prop); if ( ! (prop instanceof Numeric) || ! ((Numeric)prop).isLength()) throw new PropertyException("Initial font-size is not a Length"); - initialValues[PropNames.FONT_SIZE] = prop; + /* for (int i = 1; i <= PropNames.LAST_PROPERTY_INDEX; i++) { if (i == PropNames.FONT_SIZE) continue; // Set up the initial values for each property - prop = propConsts.getInitialValue(i); - //System.out.println("....Setting initial value: " - // + i + ((prop == null) ? " NULL" : " notNULL")); - initialValues[i] = prop; + PropertyConsts.pconsts.getInitialValue(i); + //System.out.println("....Setting initial value for " + i); } + */ } - /** - * Get the initial value PropertyValue for a given property. - * Note that this is a raw value; if it is - * an unresolved percentage that value will be returned. - * @param index - the property index. - * @return a PropertyValue containing the property - * value element at the bottom of the stack for the indexed property. - */ - public PropertyValue getInitialValue(int index) - throws PropertyException - { - return initialValues[index]; - } - /** * Parser thread notifies itself to FO tree builder by this call. The * purpose of this notification is to allow the FO tree builder thread -- 2.39.5