diff options
author | jtauber <jtauber@unknown> | 1999-11-25 17:33:16 +0000 |
---|---|---|
committer | jtauber <jtauber@unknown> | 1999-11-25 17:33:16 +0000 |
commit | 5273e66a656c4e769d0820fabc3dfbc9b35a6c50 (patch) | |
tree | 8c4b6a292f1ad503b961295492ffaf25b5ce83e8 /src/org/apache/fop/svg | |
parent | fcc0954359c3dca5843a9c2ba24d3f0628fd717f (diff) | |
download | xmlgraphics-fop-5273e66a656c4e769d0820fabc3dfbc9b35a6c50.tar.gz xmlgraphics-fop-5273e66a656c4e769d0820fabc3dfbc9b35a6c50.zip |
Partial implementation of keep-with-next (doesn't yet remove area from previous page when fo is moved to next page to ensure keep). The layout method on each FO now returns a Status object rather than an int to allow for more information to be passed back in the future.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193240 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/svg')
-rw-r--r-- | src/org/apache/fop/svg/Graphic.java | 2 | ||||
-rw-r--r-- | src/org/apache/fop/svg/Line.java | 7 | ||||
-rw-r--r-- | src/org/apache/fop/svg/LineGraphic.java | 3 | ||||
-rw-r--r-- | src/org/apache/fop/svg/Rect.java | 7 | ||||
-rw-r--r-- | src/org/apache/fop/svg/SVG.java | 25 | ||||
-rw-r--r-- | src/org/apache/fop/svg/Text.java | 7 |
6 files changed, 28 insertions, 23 deletions
diff --git a/src/org/apache/fop/svg/Graphic.java b/src/org/apache/fop/svg/Graphic.java index cd223a417..fb0381815 100644 --- a/src/org/apache/fop/svg/Graphic.java +++ b/src/org/apache/fop/svg/Graphic.java @@ -22,7 +22,7 @@ Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. - 4. The names "Fop" and "Apache Software Foundation" must not be used to + 4. The names "FOP" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. diff --git a/src/org/apache/fop/svg/Line.java b/src/org/apache/fop/svg/Line.java index 27d8f76f8..3deb3a32e 100644 --- a/src/org/apache/fop/svg/Line.java +++ b/src/org/apache/fop/svg/Line.java @@ -22,7 +22,7 @@ Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. - 4. The names "Fop" and "Apache Software Foundation" must not be used to + 4. The names "FOP" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -48,6 +48,7 @@ Software Foundation, please see <http://www.apache.org/>. */ + package org.apache.fop.svg; // FOP @@ -108,7 +109,7 @@ public class Line extends FObj { * * @return the status of the layout */ - public int layout(Area area) throws FOPException { + public Status layout(Area area) throws FOPException { /* retrieve properties */ int x1 = this.properties.get("x1").getLength().mvalue(); @@ -126,6 +127,6 @@ public class Line extends FObj { } /* return status */ - return OK; + return new Status(Status.OK); } } diff --git a/src/org/apache/fop/svg/LineGraphic.java b/src/org/apache/fop/svg/LineGraphic.java index 59ed032d7..c769d05d7 100644 --- a/src/org/apache/fop/svg/LineGraphic.java +++ b/src/org/apache/fop/svg/LineGraphic.java @@ -22,7 +22,7 @@ Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. - 4. The names "Fop" and "Apache Software Foundation" must not be used to + 4. The names "FOP" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -48,6 +48,7 @@ Software Foundation, please see <http://www.apache.org/>. */ + package org.apache.fop.svg; /** diff --git a/src/org/apache/fop/svg/Rect.java b/src/org/apache/fop/svg/Rect.java index 722b87e28..dcce4145c 100644 --- a/src/org/apache/fop/svg/Rect.java +++ b/src/org/apache/fop/svg/Rect.java @@ -22,7 +22,7 @@ Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. - 4. The names "Fop" and "Apache Software Foundation" must not be used to + 4. The names "FOP" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -48,6 +48,7 @@ Software Foundation, please see <http://www.apache.org/>. */ + package org.apache.fop.svg; // FOP @@ -108,7 +109,7 @@ public class Rect extends FObj { * * @return the status of the layout */ - public int layout(Area area) throws FOPException { + public Status layout(Area area) throws FOPException { /* retrieve properties */ int width = this.properties.get("width").getLength().mvalue(); @@ -126,6 +127,6 @@ public class Rect extends FObj { } /* return status */ - return OK; + return new Status(Status.OK); } } diff --git a/src/org/apache/fop/svg/SVG.java b/src/org/apache/fop/svg/SVG.java index 27042e2b3..1befac887 100644 --- a/src/org/apache/fop/svg/SVG.java +++ b/src/org/apache/fop/svg/SVG.java @@ -22,7 +22,7 @@ Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. - 4. The names "Fop" and "Apache Software Foundation" must not be used to + 4. The names "FOP" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -48,6 +48,7 @@ Software Foundation, please see <http://www.apache.org/>. */ + package org.apache.fop.svg; // FOP @@ -117,10 +118,10 @@ public class SVG extends FObj { * * @return the status of the layout */ - public int layout(Area area) throws FOPException { + public Status layout(Area area) throws FOPException { if (this.marker == BREAK_AFTER) { - return OK; + return new Status(Status.OK); } if (this.marker == START) { @@ -151,15 +152,15 @@ public class SVG extends FObj { this.marker = 0; if (breakBefore == BreakBefore.PAGE) { - return FORCE_PAGE_BREAK; + return new Status(Status.FORCE_PAGE_BREAK); } if (breakBefore == BreakBefore.ODD_PAGE) { - return FORCE_PAGE_BREAK_ODD; + return new Status(Status.FORCE_PAGE_BREAK_ODD); } if (breakBefore == BreakBefore.EVEN_PAGE) { - return FORCE_PAGE_BREAK_EVEN; + return new Status(Status.FORCE_PAGE_BREAK_EVEN); } } @@ -181,8 +182,8 @@ public class SVG extends FObj { int numChildren = this.children.size(); for (int i = 0; i < numChildren; i++) { FONode fo = (FONode) children.elementAt(i); - int status; - if ((status = fo.layout(svgArea)) != OK) { + Status status; + if ((status = fo.layout(svgArea)).isIncomplete()) { return status; } } @@ -207,20 +208,20 @@ public class SVG extends FObj { if (breakAfter == BreakAfter.PAGE) { this.marker = BREAK_AFTER; - return FORCE_PAGE_BREAK; + return new Status(Status.FORCE_PAGE_BREAK); } if (breakAfter == BreakAfter.ODD_PAGE) { this.marker = BREAK_AFTER; - return FORCE_PAGE_BREAK_ODD; + return new Status(Status.FORCE_PAGE_BREAK_ODD); } if (breakAfter == BreakAfter.EVEN_PAGE) { this.marker = BREAK_AFTER; - return FORCE_PAGE_BREAK_EVEN; + return new Status(Status.FORCE_PAGE_BREAK_EVEN); } /* return status */ - return OK; + return new Status(Status.OK); } } diff --git a/src/org/apache/fop/svg/Text.java b/src/org/apache/fop/svg/Text.java index 6794ce009..db91846fa 100644 --- a/src/org/apache/fop/svg/Text.java +++ b/src/org/apache/fop/svg/Text.java @@ -22,7 +22,7 @@ Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. - 4. The names "Fop" and "Apache Software Foundation" must not be used to + 4. The names "FOP" and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. @@ -48,6 +48,7 @@ Software Foundation, please see <http://www.apache.org/>. */ + package org.apache.fop.svg; // FOP @@ -124,7 +125,7 @@ public class Text extends FObjMixed { * * @return the status of the layout */ - public int layout(Area area) throws FOPException { + public Status layout(Area area) throws FOPException { /* retrieve properties */ int x = this.properties.get("x").getLength().mvalue(); @@ -140,6 +141,6 @@ public class Text extends FObjMixed { } /* return status */ - return OK; + return new Status(Status.OK); } } |