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 vm...@apache.org on 2003/05/01 05:32:25 UTC
cvs commit: xml-fop/src/java/org/apache/fop/fo FObj.java PropertyListBuilder.java
vmote 2003/04/30 20:32:24
Modified: src/java/org/apache/fop/fo FObj.java
PropertyListBuilder.java
Log:
Refactor: Clean up API between FObj.handleAttrs() and PropertyListBuilder.makeList(). Pass the current object instead of the parent.
Revision Changes Path
1.3 +2 -7 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.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- FObj.java 27 Apr 2003 22:21:24 -0000 1.2
+++ FObj.java 1 May 2003 03:32:24 -0000 1.3
@@ -151,15 +151,10 @@
* The attributes must be used immediately as the sax attributes
* will be altered for the next element.
* @param attlist Collection of attributes passed to us from the parser.
+ * @throws FOPException
*/
public void handleAttrs(Attributes attlist) throws FOPException {
- FObj par = findNearestAncestorFObj();
- PropertyList props = null;
- if (par != null) {
- props = par.properties;
- }
- properties = getListBuilder().makeList(FO_URI, name, attlist, props,
- par);
+ properties = getListBuilder().makeList(FO_URI, name, attlist, this);
properties.setFObj(this);
this.propMgr = makePropertyManager(properties);
setWritingMode();
1.5 +20 -2 xml-fop/src/java/org/apache/fop/fo/PropertyListBuilder.java
Index: PropertyListBuilder.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/PropertyListBuilder.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- PropertyListBuilder.java 28 Apr 2003 02:30:25 -0000 1.4
+++ PropertyListBuilder.java 1 May 2003 03:32:24 -0000 1.5
@@ -117,20 +117,38 @@
return b;
}
+ /**
+ *
+ * @param nameSpaceURI URI for the namespace of the element to which
+ * the attributes belong.
+ * @param elementName Local name for the element to which the attributes
+ * belong.
+ * @param attributes Collection of attributes passed to us from the parser.
+ * @param fo The FObj to which the attributes need to be attached as
+ * properties.
+ * @return PropertyList object containing collection of Properties objects
+ * appropriate for the FObj
+ * @throws FOPException
+ */
public PropertyList makeList(String nameSpaceURI, String elementName,
Attributes attributes,
- PropertyList parentPropertyList,
- FObj parentFO) throws FOPException {
+ FObj fo) throws FOPException {
String nameSpaceURIToUse = "http://www.w3.org/TR/1999/XSL/Format";
if (nameSpaceURI != null) {
nameSpaceURIToUse = nameSpaceURI;
}
+ FObj parentFO = fo.findNearestAncestorFObj();
+ PropertyList parentPropertyList = null;
+ if (parentFO != null) {
+ parentPropertyList = parentFO.properties;
+ }
PropertyList par = null;
if (parentPropertyList != null
&& nameSpaceURIToUse.equals(parentPropertyList.getNameSpace())) {
par = parentPropertyList;
}
+
PropertyList p = new PropertyList(par, nameSpaceURIToUse,
elementName);
p.setBuilder(this);
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org