aboutsummaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
authorAndreas L. Delmelle <adelmelle@apache.org>2009-03-22 19:18:14 +0000
committerAndreas L. Delmelle <adelmelle@apache.org>2009-03-22 19:18:14 +0000
commit39846b082abe7df751bd45cd70abe61e842fbb20 (patch)
tree37e26d3a83225b496b70d8dc299f98aac7614a4a /src/java
parent43ecaa845e9042fda99f8b5e91834e8d4b2c1689 (diff)
downloadxmlgraphics-fop-39846b082abe7df751bd45cd70abe61e842fbb20.tar.gz
xmlgraphics-fop-39846b082abe7df751bd45cd70abe61e842fbb20.zip
Bugzilla 46489:
Issue when combining page-position="last" with a block with break-before as a descendant of a table. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@757239 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r--src/java/org/apache/fop/layoutmgr/PageBreaker.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/PageBreaker.java b/src/java/org/apache/fop/layoutmgr/PageBreaker.java
index 5dc1576c7..1137065ab 100644
--- a/src/java/org/apache/fop/layoutmgr/PageBreaker.java
+++ b/src/java/org/apache/fop/layoutmgr/PageBreaker.java
@@ -273,7 +273,8 @@ public class PageBreaker extends AbstractBreaker {
//Get page break from which we restart
PageBreakPosition pbp = (PageBreakPosition)
alg.getPageBreaks().get(restartPoint - 1);
- newStartPos = pbp.getLeafPos();
+ //Set starting position to the first element *after* the page-break
+ newStartPos = pbp.getLeafPos() + 1;
//Handle page break right here to avoid any side-effects
if (newStartPos > 0) {
handleBreakTrait(Constants.EN_PAGE);
@@ -306,16 +307,15 @@ public class PageBreaker extends AbstractBreaker {
1, true, BreakingAlgorithm.ALL_BREAKS);
AbstractBreaker.log.debug("restart: iOptPageCount= " + iOptPageCount
+ " pageBreaks.size()= " + algRestart.getPageBreaks().size());
+ //Make sure we only add the areas we haven't added already
+ effectiveList.ignoreAtStart = newStartPos;
boolean replaceLastPage
= iOptPageCount <= pslm.getCurrentPV().getBodyRegion().getColumnCount();
if (replaceLastPage) {
//Replace last page
pslm.setCurrentPage(pageProvider.getPage(false, currentPageNum));
- //Make sure we only add the areas we haven't added already
- effectiveList.ignoreAtStart = newStartPos;
addAreas(algRestart, iOptPageCount, originalList, effectiveList);
} else {
- effectiveList.ignoreAtStart = newStartPos;
addAreas(alg, restartPoint, partCount - restartPoint, originalList, effectiveList);
//Add blank last page
pageProvider.setLastPageIndex(currentPageNum + 1);
@@ -430,8 +430,8 @@ public class PageBreaker extends AbstractBreaker {
childLC);
}
// set the offset from the top margin
- Footnote parentArea = (Footnote) pslm.getCurrentPV().getBodyRegion().getFootnote();
- int topOffset = (int) pslm.getCurrentPV().getBodyRegion().getBPD() - parentArea.getBPD();
+ Footnote parentArea = pslm.getCurrentPV().getBodyRegion().getFootnote();
+ int topOffset = pslm.getCurrentPV().getBodyRegion().getBPD() - parentArea.getBPD();
if (separatorArea != null) {
topOffset -= separatorArea.getBPD();
}
@@ -451,7 +451,7 @@ public class PageBreaker extends AbstractBreaker {
/** {@inheritDoc} */
protected void observeElementList(List elementList) {
ElementListObserver.observe(elementList, "breaker",
- ((PageSequence)pslm.getFObj()).getId());
+ pslm.getFObj().getId());
}
/**