diff options
author | Chris Bowditch <cbowditch@apache.org> | 2014-07-07 15:31:16 +0000 |
---|---|---|
committer | Chris Bowditch <cbowditch@apache.org> | 2014-07-07 15:31:16 +0000 |
commit | e02054dadf9986fff81aec0dd9dc0a09d5ed76d3 (patch) | |
tree | 8e9bb6963a4fc7bc3908b343bb00e702cbfd2444 /src | |
parent | 6ebc570ad4891b338192c2e2900424c8445efc86 (diff) | |
download | xmlgraphics-fop-e02054dadf9986fff81aec0dd9dc0a09d5ed76d3.tar.gz xmlgraphics-fop-e02054dadf9986fff81aec0dd9dc0a09d5ed76d3.zip |
FOP-1976; committed change suggested by Matthias Reischenbacher
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1608489 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java b/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java index 1168a4d30..70f02f896 100644 --- a/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java +++ b/src/java/org/apache/fop/layoutmgr/PageSequenceLayoutManager.java @@ -217,11 +217,12 @@ public class PageSequenceLayoutManager extends AbstractPageSequenceLayoutManager */ 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++; |