aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/fo/flow/PageNumber.java
diff options
context:
space:
mode:
authorjtauber <jtauber@unknown>1999-11-25 17:33:16 +0000
committerjtauber <jtauber@unknown>1999-11-25 17:33:16 +0000
commit5273e66a656c4e769d0820fabc3dfbc9b35a6c50 (patch)
tree8c4b6a292f1ad503b961295492ffaf25b5ce83e8 /src/org/apache/fop/fo/flow/PageNumber.java
parentfcc0954359c3dca5843a9c2ba24d3f0628fd717f (diff)
downloadxmlgraphics-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/fo/flow/PageNumber.java')
-rw-r--r--src/org/apache/fop/fo/flow/PageNumber.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/org/apache/fop/fo/flow/PageNumber.java b/src/org/apache/fop/fo/flow/PageNumber.java
index e31d7ab62..2844b5d98 100644
--- a/src/org/apache/fop/fo/flow/PageNumber.java
+++ b/src/org/apache/fop/fo/flow/PageNumber.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.fo.flow;
// FOP
@@ -85,10 +86,10 @@ public class PageNumber extends FObj {
this.name = "fo:page-number";
}
- public int layout(Area area) throws FOPException {
+ public Status layout(Area area) throws FOPException {
if (!(area instanceof BlockArea)) {
System.err.println("WARNING: page-number outside block area");
- return OK;
+ return new Status(Status.OK);
}
if (this.marker == START) {
String fontFamily = this.properties.get("font-family").getString();
@@ -111,6 +112,6 @@ public class PageNumber extends FObj {
}
String p = Integer.toString(area.getPage().getNumber());
this.marker = ((BlockArea) area).addText(fs, red, green, blue, wrapOption, whiteSpaceTreatment, p.toCharArray(), 0, p.length());
- return OK;
+ return new Status(Status.OK);
}
}