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: [email protected]
For additional commands, e-mail: [email protected]