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 gm...@apache.org on 2004/10/13 02:31:46 UTC
cvs commit: xml-fop/src/java/org/apache/fop/layoutmgr AbstractLayoutManager.java
gmazza 2004/10/12 17:31:46
Modified: src/java/org/apache/fop/fo FOText.java FObj.java
FObjMixed.java
src/java/org/apache/fop/layoutmgr AbstractLayoutManager.java
Log:
Some simplifications allowed as a result of having FOText extend FONode directly.
Revision Changes Path
1.29 +1 -9 xml-fop/src/java/org/apache/fop/fo/FOText.java
Index: FOText.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FOText.java,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- FOText.java 13 Oct 2004 00:09:54 -0000 1.28
+++ FOText.java 13 Oct 2004 00:31:46 -0000 1.29
@@ -28,7 +28,7 @@
import org.apache.fop.layoutmgr.TextLayoutManager;
/**
- * A text node in the formatting object tree.
+ * A text node (PCDATA) in the formatting object tree.
*
* Unfortunately the BufferManager implementatation holds
* onto references to the character data in this object
@@ -486,14 +486,6 @@
}
}
- }
-
- /**
- * @todo rename somehow, there isn't an fo:text.
- * @todo see if should still be a subclass of FObj
- */
- public String getName() {
- return "fo:text";
}
/**
1.78 +9 -26 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.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- FObj.java 12 Oct 2004 05:07:46 -0000 1.77
+++ FObj.java 13 Oct 2004 00:31:46 -0000 1.78
@@ -54,9 +54,6 @@
*/
private boolean isOutOfLineFODescendant = false;
- /** Id of this fo element or null if no id. */
- protected String id = null;
-
/** Markers added to this element. */
protected Map markers = null;
@@ -135,19 +132,15 @@
* fo and sets the id attribute of this object.
*/
private void setupID() throws SAXParseException {
- Property prop = this.propertyList.get(PR_ID);
- if (prop != null) {
- String str = prop.getString();
- if (str != null && !str.equals("")) {
- Set idrefs = getFOEventHandler().getIDReferences();
- if (!idrefs.contains(str)) {
- id = str;
- idrefs.add(id);
- } else {
- throw new SAXParseException("Property id \"" + str +
- "\" previously used; id values must be unique" +
- " in document.", locator);
- }
+ String str = getPropString(PR_ID);
+ if (str != null && !str.equals("")) {
+ Set idrefs = getFOEventHandler().getIDReferences();
+ if (!idrefs.contains(str)) {
+ idrefs.add(str);
+ } else {
+ throw new SAXParseException("Property id \"" + str +
+ "\" previously used; id values must be unique" +
+ " in document.", locator);
}
}
}
@@ -347,16 +340,6 @@
return ((FObj) parent).getLayoutDimension(key);
}
return new Integer(0);
- }
-
- /**
- * Get the id string for this formatting object.
- * This will be unique for the fo document.
- *
- * @return the id string or null if not set
- */
- public String getID() {
- return id;
}
/**
1.41 +1 -2 xml-fop/src/java/org/apache/fop/fo/FObjMixed.java
Index: FObjMixed.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/FObjMixed.java,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- FObjMixed.java 12 Oct 2004 05:07:46 -0000 1.40
+++ FObjMixed.java 13 Oct 2004 00:31:46 -0000 1.41
@@ -25,8 +25,7 @@
/**
* Base class for representation of mixed content formatting objects
- * and their processing
- * @todo define what a "mixed content formatting object" is
+ * (i.e., those that can contain both child FO's and text nodes/PCDATA)
*/
public class FObjMixed extends FObj {
/** TextInfo for this object */
1.26 +1 -1 xml-fop/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java
Index: AbstractLayoutManager.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/AbstractLayoutManager.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- AbstractLayoutManager.java 12 Oct 2004 05:07:47 -0000 1.25
+++ AbstractLayoutManager.java 13 Oct 2004 00:31:46 -0000 1.26
@@ -86,7 +86,7 @@
*/
public void setFObj(FObj fo) {
this.fobj = fo;
- foID = fobj.getID();
+ foID = fobj.getPropString(PR_ID);
markers = fobj.getMarkers();
fobjIter = fobj.getChildNodes();
childLMiter = new LMiter(this);
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org