You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by bc...@apache.org on 2004/10/20 20:21:27 UTC
cvs commit: xml-fop/src/java/org/apache/fop/fo/flow TableRow.java
bckfnn 2004/10/20 11:21:27
Modified: src/java/org/apache/fop/fo FObj.java
src/java/org/apache/fop/fo/flow TableRow.java
Log:
Fourth phase of performance improvement.
- Remove propertyList from FObj.
PR: 31699
Revision Changes Path
1.83 +4 -63 xml-fop/src/java/org/apache/fop/fo/FObj.java
Index: FObj.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FObj.java,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -r1.82 -r1.83
--- FObj.java 20 Oct 2004 13:19:23 -0000 1.82
+++ FObj.java 20 Oct 2004 18:21:27 -0000 1.83
@@ -26,7 +26,6 @@
import java.util.Set;
import org.apache.fop.fo.flow.Marker;
-import org.apache.fop.fo.properties.Property;
import org.apache.fop.fo.properties.PropertyMaker;
import org.xml.sax.Attributes;
@@ -39,9 +38,6 @@
public class FObj extends FONode implements Constants {
public static PropertyMaker[] propertyListTable = null;
- /** Formatting properties for this fo element. */
- protected PropertyList propertyList;
-
/** The immediate child nodes of this node. */
public ArrayList childNodes = null;
@@ -96,9 +92,9 @@
public void processNode(String elementName, Locator locator,
Attributes attlist, PropertyList pList) throws SAXParseException {
setLocator(locator);
- propertyList.addAttributesToList(attlist);
- propertyList.setWritingMode();
- bind(propertyList);
+ pList.addAttributesToList(attlist);
+ pList.setWritingMode();
+ bind(pList);
}
/**
@@ -106,8 +102,7 @@
*/
protected PropertyList createPropertyList(PropertyList parent, FOEventHandler foEventHandler) throws SAXParseException {
//return foEventHandler.getPropertyListMaker().make(this, parent);
- propertyList = new StaticPropertyList(this, parent);
- return propertyList;
+ return new StaticPropertyList(this, parent);
}
/**
@@ -145,60 +140,6 @@
*/
public boolean getIsOutOfLineFODescendant() {
return isOutOfLineFODescendant;
- }
-
- /**
- * Return the property list object for this FO. PropertyList tends
- * to hold the base, pre-trait properties for this FO, either explicitly
- * declared in the input XML or from inherited values.
- */
- public PropertyList getPropertyList() {
- return propertyList;
- }
-
- /**
- * Helper method to quickly obtain the value of a property
- * for this FO, without querying for the propertyList first.
- * @param propId - the Constants ID of the desired property to obtain
- * @return the property
- */
- public Property getProperty(int propId) {
- return propertyList.get(propId);
- }
-
- /**
- * Convenience method to quickly obtain the String value of a property
- * for this FO, without querying for the propertyList first.
- * Meaningful only for properties having a string representation
- * @param propId - the Constants ID of the desired property to obtain
- * @return the String value of the property value
- */
- public String getPropString(int propId) {
- return propertyList.get(propId).getString();
- }
-
- /**
- * Convenience method to quickly obtain the length value of a property
- * for this FO, without querying for the propertyList first.
- * Meaningful only for properties having a length representation
- * Note: getValue() only correct after resolution completed, therefore
- * should be called only in layout manager code.
- * @param propId - the Constants ID of the desired property to obtain
- * @return the length value of the property value
- */
- public int getPropLength(int propId) {
- return propertyList.get(propId).getLength().getValue();
- }
-
- /**
- * Convenience method to quickly obtain the Constants class enumeration
- * value of a property for this FO. Meaningful only for properties
- * having an enumeration representation
- * @param propId - the Constants ID of the desired property to obtain
- * @return the enumeration value of the property value
- */
- public int getPropEnum(int propId) {
- return propertyList.get(propId).getEnum();
}
/**
1.40 +0 -19 xml-fop/src/java/org/apache/fop/fo/flow/TableRow.java
Index: TableRow.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/TableRow.java,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- TableRow.java 20 Oct 2004 17:49:16 -0000 1.39
+++ TableRow.java 20 Oct 2004 18:21:27 -0000 1.40
@@ -26,7 +26,6 @@
import org.xml.sax.SAXParseException;
// FOP
-import org.apache.fop.datatypes.KeepValue;
import org.apache.fop.datatypes.Length;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
@@ -38,9 +37,6 @@
import org.apache.fop.fo.properties.KeepProperty;
import org.apache.fop.fo.properties.LengthRangeProperty;
import org.apache.fop.layoutmgr.table.Row;
-import org.apache.fop.fo.Constants;
-import org.apache.fop.fo.properties.Property;
-
/**
* Class modelling the fo:table-row object.
@@ -124,21 +120,6 @@
throws SAXParseException {
if (!(nsURI == FO_URI && localName.equals("table-cell"))) {
invalidChildError(loc, nsURI, localName);
- }
- }
-
- private KeepValue getKeepValue(int propId) {
- Property p = this.propertyList.get(propId);
- Number n = p.getNumber();
- if (n != null) {
- return new KeepValue(KeepValue.KEEP_WITH_VALUE, n.intValue());
- }
- switch (p.getEnum()) {
- case Constants.ALWAYS:
- return new KeepValue(KeepValue.KEEP_WITH_ALWAYS, 0);
- case Constants.AUTO:
- default:
- return new KeepValue(KeepValue.KEEP_WITH_AUTO, 0);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org