[FOray-commit] SF.net SVN: foray: [7337] trunk/foray/foray-pioneer/src/java/org/foray/pioneer
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2006-05-31 17:39:33
|
Revision: 7337 Author: victormote Date: 2006-05-31 10:39:26 -0700 (Wed, 31 May 2006) ViewCVS: http://svn.sourceforge.net/foray/?rev=7337&view=rev Log Message: ----------- Changes to footnote logic. Modified Paths: -------------- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnotePL.java Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java 2006-05-31 17:27:05 UTC (rev 7336) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/BlockPL.java 2006-05-31 17:39:26 UTC (rev 7337) @@ -100,9 +100,8 @@ blockArea = area.makeNormalBlockArea(node); - int numChildren = node.childrenFO().size(); - for (int i = getProgress(); i < numChildren; i++) { - FONode fo = (FONode)node.childrenFO().get(i); + for (int i = getProgress(); i < node.getChildCount(); i++) { + FONode fo = node.getFONodeChildAt(i); FONodePL nodePL = this.getLayoutProxy(fo); int status = nodePL.layout(blockArea); if (Status.isIncomplete(status)) { Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java 2006-05-31 17:27:05 UTC (rev 7336) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FOTextPL.java 2006-05-31 17:39:26 UTC (rev 7337) @@ -51,7 +51,7 @@ setProgress(0); } int progressAtStart = getProgress(); - int progressAtEnd = addText(node, area, getProgress()); + int progressAtEnd = addText(node, area, progressAtStart); setProgress(progressAtEnd); if (progressAtEnd == -1) { return Status.OK; Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java 2006-05-31 17:27:05 UTC (rev 7336) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnoteBodyPL.java 2006-05-31 17:39:26 UTC (rev 7337) @@ -26,7 +26,6 @@ import org.axsl.areaW.Area; import org.axsl.areaW.FootnoteRA; -import org.axsl.areaW.NormalBlockArea; import org.axsl.areaW.PageArea; import org.axsl.areaW.RegionRABody; @@ -54,20 +53,18 @@ if (getProgress() == FONodePL.START) { setProgress(0); } - NormalBlockArea blockArea = - area.makeNormalBlockArea(node); + FootnoteRA referenceArea = (FootnoteRA) area; int numChildren = node.childrenFO().size(); for (int i = getProgress(); i < numChildren; i++) { - FONode fo = (FONode)node.childrenFO().get(i); - int status = getLayoutProxy(fo).layout(blockArea); + FONode fo = node.getFONodeChildAt(i); + FONodePL foNodePL = getLayoutProxy(fo); + int status = foNodePL.layout(referenceArea); if (Status.isIncomplete((status))) { resetProgress(); return status; } } - layout.completeCurrentLineInBlock(blockArea); - area.incrementProgressionDimension(blockArea.crBPD()); return Status.OK; } Modified: trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnotePL.java =================================================================== --- trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnotePL.java 2006-05-31 17:27:05 UTC (rev 7336) +++ trunk/foray/foray-pioneer/src/java/org/foray/pioneer/FootnotePL.java 2006-05-31 17:39:26 UTC (rev 7337) @@ -25,7 +25,6 @@ package org.foray.pioneer; import org.axsl.areaW.Area; -import org.axsl.areaW.NormalBlockArea; import org.axsl.areaW.PageArea; import org.axsl.areaW.AreaWException; @@ -62,15 +61,11 @@ /* Layout the FootnoteBody. */ FootnoteBody fbody = node.getFootnoteBody(); - // add footnote to current page or next if it can't fit - if (area instanceof NormalBlockArea) { - this.layout.addPendingFootnote(fbody); - } else { - FootnoteBodyPL fbPL - = ((FootnoteBodyPL) getLayoutProxy(fbody)); - PageArea page = area.getWritablePage(); - fbPL.layoutFootnote(page); - } + FootnoteBodyPL fbPL = ((FootnoteBodyPL) getLayoutProxy(fbody)); + PageArea page = area.getWritablePage(); + /* If the footnote cannot be entirely laid out on the current page, + * it will be added to the list of pending footnotes. */ + fbPL.layoutFootnote(page); return Status.OK; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |