You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by cb...@apache.org on 2014/07/07 17:31:16 UTC
svn commit: r1608489 -
/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java
Author: cbowditch
Date: Mon Jul 7 15:31:16 2014
New Revision: 1608489
URL: http://svn.apache.org/r1608489
Log:
FOP-1976; committed change suggested by Matthias Reischenbacher
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java?rev=1608489&r1=1608488&r2=1608489&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java Mon Jul 7 15:31:16 2014
@@ -217,11 +217,12 @@ public class PageSequenceLayoutManager e
*/
protected int getForcedLastPageNum(final int lastPageNum) {
int forcedLastPageNum = lastPageNum;
- if (lastPageNum % 2 != 0
+ int relativeLastPage = lastPageNum - startPageNum + 1;
+ if (relativeLastPage % 2 != 0
&& (getPageSequence().getForcePageCount() == Constants.EN_EVEN
|| getPageSequence().getForcePageCount() == Constants.EN_END_ON_EVEN)) {
forcedLastPageNum++;
- } else if (lastPageNum % 2 == 0 && (
+ } else if (relativeLastPage % 2 == 0 && (
getPageSequence().getForcePageCount() == Constants.EN_ODD
|| getPageSequence().getForcePageCount() == Constants.EN_END_ON_ODD)) {
forcedLastPageNum++;
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org