removed LM.getCurrPageString() in favor of already existing
curPage.getPageString(); switched from LM.getCurrentPageString() to
LM.getCurrentPageViewport() (latter giving access to the former.)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_KnuthStylePageBreaking@198558
13f79535-47bb-0310-9956-
ffa450edef68
}
/**
- * Delegate getting the current page number to the parent layout manager.
+ * Delegate getting the current page viewport to the parent layout manager.
*
* @see org.apache.fop.layoutmgr.LayoutManager
*/
- public String getCurrentPageNumberString() {
- return parentLM.getCurrentPageNumberString();
+ public PageViewport getCurrentPageViewport() {
+ return parentLM.getCurrentPageViewport();
}
/**
Position bp2) { }
/** @see org.apache.fop.layoutmgr.LayoutManager */
- public String getCurrentPageNumberString() {
- return parentLM.getCurrentPageNumberString();
+ public PageViewport getCurrentPageViewport() {
+ return parentLM.getCurrentPageViewport();
}
/** @see org.apache.fop.layoutmgr.LayoutManager */
void addAreas(PositionIterator posIter, LayoutContext context);
/**
- * Get the string of the current page number.
+ * Get the PageViewport currently being generated
*
- * @return the string for the current page number
+ * @return the current PageViewport
*/
- String getCurrentPageNumberString();
+ PageViewport getCurrentPageViewport();
/**
* Resolve the id reference.
public InlineArea get(LayoutContext context) {
// get page string from parent, build area
TextArea inline = new TextArea();
- String str = parentLM.getCurrentPageNumberString();
+ String str = parentLM.getCurrentPageViewport().getPageNumberString();
int width = 0;
for (int count = 0; count < str.length(); count++) {
width += font.getCharWidth(str.charAt(count));
private int startPageNum = 0;
private int currentPageNum = 0;
- private String pageNumberString;
/** Current page being worked on. */
private PageViewport curPage = null;
public void activateLayout() {
startPageNum = pageSeq.getStartingPageNumber();
currentPageNum = startPageNum - 1;
- pageNumberString = pageSeq.makeFormattedPageNumber(currentPageNum);
LineArea title = null;
return null;
}
- /**
- * Get the current page number string.
- * This returns the formatted string for the current page.
- *
- * @return the formatted page number string
- */
- public String getCurrentPageNumberString() {
- return pageNumberString;
- }
-
/**
* Provides access to the current page.
* @return the current PageViewport
}
currentPageNum++;
- pageNumberString = pageSeq.makeFormattedPageNumber(currentPageNum);
+ String pageNumberString = pageSeq.makeFormattedPageNumber(currentPageNum);
try {
// create a new page
MinOptMax range = new MinOptMax(rv.getRegionReference().getIPD());
lm.doLayout(reg, lm, range);
-
/*
while (!lm.isFinished()) {
BreakPoss bp = lm.getNextBreakPoss(childLC);