Looks good!
Glen
[EMAIL PROTECTED] wrote:
lfurini 2005/04/27 08:59:59
Modified:src/java/org/apache/fop/layoutmgr Tag:
Temp_KnuthStylePageBreaking AbstractBreaker.java
PageSequenceLayoutManager.java
Log:
Using a more clear boolean instead of an int, as suggested by Glen and Andreas
Revision ChangesPath
No revision
No revision
1.1.2.6 +3 -3 xml-fop/src/java/org/apache/fop/layoutmgr/Attic/AbstractBreaker.java
Index: AbstractBreaker.java
===
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/Attic/AbstractBreaker.java,v
retrieving revision 1.1.2.5
retrieving revision 1.1.2.6
diff -u -r1.1.2.5 -r1.1.2.6
--- AbstractBreaker.java 26 Apr 2005 16:39:12 - 1.1.2.5
+++ AbstractBreaker.java 27 Apr 2005 15:59:59 - 1.1.2.6
@@ -96,7 +96,7 @@
return (blockLists.size() == 0);
}
-protected void startPart(BlockSequence list, int localPageNumber) {
+protected void startPart(BlockSequence list, boolean bIsFirstPage) {
//nop
}
@@ -202,7 +202,7 @@
System.out.println(PLM part: + (p + 1)
+ , break at position + endElementIndex);
-startPart(effectiveList, p+1);
+startPart(effectiveList, (p == 0));
int displayAlign = getCurrentDisplayAlign();
1.50.2.18 +8 -12 xml-fop/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java
Index: PageSequenceLayoutManager.java
===
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java,v
retrieving revision 1.50.2.17
retrieving revision 1.50.2.18
diff -u -r1.50.2.17 -r1.50.2.18
--- PageSequenceLayoutManager.java 26 Apr 2005 16:39:12 - 1.50.2.17
+++ PageSequenceLayoutManager.java 27 Apr 2005 15:59:59 - 1.50.2.18
@@ -193,7 +193,7 @@
addAreas(alg, partCount, originalList, effectiveList);
}
-protected void startPart(BlockSequence list, int localPageNumber) {
+protected void startPart(BlockSequence list, boolean bIsFirstPage) {
if (curPage == null) {
throw new IllegalStateException(curPage must not be null);
} else {
@@ -203,16 +203,12 @@
if (!firstPart) {
if (curFlowIdx curPage.getCurrentSpan().getColumnCount()-1) {
curFlowIdx++;
-} else if (localPageNumber == 1) {
-// this is the first page that will be created by
-// the current BlockSequence: it could have a break
-// condition that must be satisfied
-handleBreak(list.getStartOn());
-} else {
-// this is NOT the first page that will be created by
-// the current BlockSequence: we simply need a new
-// page
-handleBreak(Constants.EN_PAGE);
+} else {
+// if this is the first page that will be created by
+// the current BlockSequence, it could have a break
+// condition that must be satisfied;
+// otherwise, we simply need a new page
+handleBreak(bIsFirstPage ? list.getStartOn() : Constants.EN_PAGE);
}
}
}
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]