diff options
author | Keiron Liddle <keiron@apache.org> | 2001-01-30 04:50:26 +0000 |
---|---|---|
committer | Keiron Liddle <keiron@apache.org> | 2001-01-30 04:50:26 +0000 |
commit | 4c36038f8c07cc6de1673c0ff3d055fc2431893e (patch) | |
tree | 635772a1f41ebd408c0b4bb31d7facf5f297c045 /src/org/apache/fop/fo | |
parent | a37f507512c3bfd2fb48904df4b18b6119006eed (diff) | |
download | xmlgraphics-fop-4c36038f8c07cc6de1673c0ff3d055fc2431893e.tar.gz xmlgraphics-fop-4c36038f8c07cc6de1673c0ff3d055fc2431893e.zip |
places svg inline
first part in moving towards proper inline areas
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194004 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/fo')
-rw-r--r-- | src/org/apache/fop/fo/flow/InstreamForeignObject.java | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/src/org/apache/fop/fo/flow/InstreamForeignObject.java b/src/org/apache/fop/fo/flow/InstreamForeignObject.java index fe8b2f3db..15c23853d 100644 --- a/src/org/apache/fop/fo/flow/InstreamForeignObject.java +++ b/src/org/apache/fop/fo/flow/InstreamForeignObject.java @@ -180,11 +180,11 @@ public class InstreamForeignObject extends FObj { /* if is embedded in a block area */ if (area instanceof BlockArea) { /* temporarily end the block area */ - area.end(); +// area.end(); } if(this.areaCurrent == null) { this.areaCurrent = - new ForeignObjectArea(fs, area.getAllocationWidth(), area.spaceLeft()); + new ForeignObjectArea(fs, area.getAllocationWidth()); this.areaCurrent.start(); areaCurrent.setWidth(this.width); @@ -234,6 +234,22 @@ public class InstreamForeignObject extends FObj { } } + if (area instanceof BlockArea) { + BlockArea ba = (BlockArea)area; + LineArea la = ba.getCurrentLineArea(); + la.addPending(); + if(areaCurrent.getEffectiveWidth() > la.getRemainingWidth()) { + la = ba.createNextLineArea(); + if(la == null) { + return new Status(Status.AREA_FULL_NONE); + } + } + la.addInlineArea(areaCurrent); + } else { + area.addChild(areaCurrent); + area.increaseHeight(areaCurrent.getEffectiveHeight()); + } + if (this.isInLabel) { startIndent += bodyIndent; /* endIndent += (areaCurrent.getEffectiveWidth() @@ -257,27 +273,27 @@ public class InstreamForeignObject extends FObj { /* if there is a space-before */ if (spaceBefore != 0) { /* add a display space */ - area.addDisplaySpace(spaceBefore); +// area.addDisplaySpace(spaceBefore); } /* add the SVG area to the containing area */ - area.addChild(areaCurrent); +// area.addChild(areaCurrent); areaCurrent.setPage(area.getPage()); /* increase the height of the containing area accordingly */ - area.increaseHeight(areaCurrent.getEffectiveHeight()); +// area.increaseHeight(areaCurrent.getEffectiveHeight()); /* if there is a space-after */ if (spaceAfter != 0) { /* add a display space */ - area.addDisplaySpace(spaceAfter); +// area.addDisplaySpace(spaceAfter); } /* if is embedded in a block area */ if (area instanceof BlockArea) { /* re-start the block area */ - area.start(); +// area.start(); } if (breakAfter == BreakAfter.PAGE) { |