vmote 2003/08/24 15:15:51
Modified:src/java/org/apache/fop/fo FObj.java
src/java/org/apache/fop/fo/flow InstreamForeignObject.java
src/java/org/apache/fop/layoutmgr AddLMVisitor.java
Log:
1. move fo/flow/InstreamForeignObject.getInlineArea() to
layoutmgr/AddLMVisitor.getIFOInlineArea()
2. remove unneeded field fo/flow/InstreamForeignObject.areaCurrent
Revision ChangesPath
1.15 +2 -2 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.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- FObj.java 22 Aug 2003 05:43:45 - 1.14
+++ FObj.java 24 Aug 2003 22:15:51 - 1.15
@@ -102,7 +102,7 @@
/**
* The children of this node.
*/
-protected ArrayList children = null;
+public ArrayList children = null;
/**
* Markers added to this element.
@@ -372,7 +372,7 @@
return null;
}
-/**
+ /**
* Add the marker to this formatting object.
* If this object can contain markers it checks that the marker
* has a unique class-name for this object and that it is
1.7 +2 -164
xml-fop/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java
Index: InstreamForeignObject.java
===
RCS file:
/home/cvs/xml-fop/src/java/org/apache/fop/fo/flow/InstreamForeignObject.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- InstreamForeignObject.java22 Aug 2003 06:27:34 - 1.6
+++ InstreamForeignObject.java24 Aug 2003 22:15:51 - 1.7
@@ -50,20 +50,10 @@
*/
package org.apache.fop.fo.flow;
-// FOP
-import java.awt.geom.Point2D;
-import java.awt.geom.Rectangle2D;
-
-import org.apache.fop.area.inline.ForeignObject;
-import org.apache.fop.area.inline.Viewport;
-import org.apache.fop.datatypes.Length;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FObj;
import org.apache.fop.fo.FOTreeVisitor;
-import org.apache.fop.fo.XMLObj;
import org.apache.fop.fo.properties.DisplayAlign;
-import org.apache.fop.fo.properties.Overflow;
-import org.apache.fop.fo.properties.Scaling;
import org.apache.fop.fo.properties.TextAlign;
import org.w3c.dom.Document;
@@ -74,8 +64,6 @@
*/
public class InstreamForeignObject extends FObj {
-public Viewport areaCurrent;
-
/**
* constructs an instream-foreign-object object (called by Maker).
*
@@ -85,157 +73,7 @@
super(parent);
}
-/**
- * Get the inline area created by this element.
- *
- * @return the viewport inline area
- */
-public Viewport getInlineArea() {
-if (children == null) {
-return areaCurrent;
-}
-
-if (this.children.size() != 1) {
-// error
-return null;
-}
-FONode fo = (FONode)children.get(0);
-if (!(fo instanceof XMLObj)) {
-// error
-return null;
-}
-XMLObj child = (XMLObj)fo;
-
-// viewport size is determined by block-progression-dimension
-// and inline-progression-dimension
-
-// if replaced then use height then ignore block-progression-dimension
-//int h = this.properties.get(height).getLength().mvalue();
-
-// use specified line-height then ignore dimension in height direction
-boolean hasLH = false;//properties.get(line-height).getSpecifiedValue()
!= null;
-
-Length len;
-
-int bpd = -1;
-int ipd = -1;
-boolean bpdauto = false;
-if (hasLH) {
-bpd = properties.get(line-height).getLength().getValue();
-} else {
-// this property does not apply when the line-height applies
-// isn't the block-progression-dimension always in the same
-// direction as the line height?
-len = properties.get(block-progression-dimension.optimum).getLength();
-if (!len.isAuto()) {
-bpd = len.getValue();
-} else {
-len = properties.get(height).getLength();
-if (!len.isAuto()) {
-bpd = len.getValue();
-}
-}
-}
-
-len = properties.get(inline-progression-dimension.optimum).getLength();
-if (!len.isAuto()) {
-ipd = len.getValue();
-} else {
-len = properties.get(width).getLength();
-if (!len.isAuto()) {
-ipd = len.getValue();
-}
-