]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
added xpos attr
authorKeiron Liddle <keiron@apache.org>
Fri, 15 Sep 2000 00:17:29 +0000 (00:17 +0000)
committerKeiron Liddle <keiron@apache.org>
Fri, 15 Sep 2000 00:17:29 +0000 (00:17 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193699 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/fo/flow/InstreamForeignObject.java

index ed92b66289dce2d9831df3ac64ed483c3e4aa4e0..1a8a19ca71b07e0d8a931a492c852c237011db7f 100644 (file)
@@ -105,6 +105,8 @@ public class InstreamForeignObject extends FObj {
        boolean chauto;
        int spaceBefore;
        int spaceAfter;
+    int startIndent;
+    int endIndent;
 
     ForeignObjectArea areaCurrent;
 
@@ -157,6 +159,10 @@ public class InstreamForeignObject extends FObj {
                this.cwauto = this.properties.get("content-width").getLength().isAuto();
                this.chauto = this.properties.get("content-height").getLength().isAuto();
                
+           this.startIndent =
+                       this.properties.get("start-indent").getLength().mvalue();
+           this.endIndent =
+                       this.properties.get("end-indent").getLength().mvalue();
                this.spaceBefore =
                this.properties.get("space-before.optimum").getLength().mvalue();
                this.spaceAfter =
@@ -222,6 +228,26 @@ public class InstreamForeignObject extends FObj {
                }
        }
 
+    if (this.isInLabel) {
+       startIndent += bodyIndent;
+/*     endIndent += (areaCurrent.getEffectiveWidth()
+                     - distanceBetweenStarts - startIndent)
+           + labelSeparation;*/
+    }
+
+    if (this.isInListBody) {
+       startIndent += bodyIndent + distanceBetweenStarts;
+    }
+
+    if (this.isInTableCell) {
+       startIndent += forcedStartOffset;
+/*     endIndent = areaCurrent.getEffectiveWidth() - forcedWidth -
+           forcedStartOffset;*/
+    }
+
+       areaCurrent.setStartIndent(startIndent);
+//     areaCurrent.setEndIndent(endIndent);
+
        /* if there is a space-before */
        if (spaceBefore != 0) {
                /* add a display space */