[FOray-commit] SF.net SVN: foray:[12470] trunk/foray
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2022-01-25 23:50:44
|
Revision: 12470
http://sourceforge.net/p/foray/code/12470
Author: victormote
Date: 2022-01-25 23:50:41 +0000 (Tue, 25 Jan 2022)
Log Message:
-----------
Update the NormalBlockArea in case a new one was created.
Modified Paths:
--------------
trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java
trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextWordsPnr.java
Modified: trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java
===================================================================
--- trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java 2022-01-25 23:11:19 UTC (rev 12469)
+++ trunk/foray/foray-areatree/src/main/java/org/foray/area/NormalBlockArea4a.java 2022-01-25 23:50:41 UTC (rev 12470)
@@ -113,7 +113,7 @@
@Override
public LineArea4a makeLineArea(final boolean allowOverflow) throws AreaTreeException {
- /* The size of the next line does not need to consider the half-leadingthat follows the line.
+ /* The size of the next line does not need to consider the half-leading that follows the line.
* That half-leading will be automatically handled if the line is actually created, but can safely be ignored
* for purposes of deciding whether the line will fit. */
final int sizeNextLineArea = this.traitFontSize() + this.traitHalfLeadingOpt();
Modified: trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextWordsPnr.java
===================================================================
--- trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextWordsPnr.java 2022-01-25 23:11:19 UTC (rev 12469)
+++ trunk/foray/foray-pioneer/src/main/java/org/foray/pioneer/FoTextWordsPnr.java 2022-01-25 23:50:41 UTC (rev 12470)
@@ -66,7 +66,7 @@
setProgress(0);
}
- final NormalBlockArea normalBlockArea = areaNode instanceof NormalBlockArea ? (NormalBlockArea) areaNode :
+ NormalBlockArea normalBlockArea = areaNode instanceof NormalBlockArea ? (NormalBlockArea) areaNode :
areaNode.ancestorNormalBlockArea();
if (normalBlockArea == null) {
throw new IllegalArgumentException(AreaNode.class.getName() + " must be or have an ancestor " +
@@ -86,9 +86,11 @@
for (int index = 0; index < result.getQtyLines(); index ++) {
final int currentLeafIndex = result.getBreakPosition(index);
final LineArea lineArea = normalBlockArea.makeLineArea(true);
+ normalBlockArea = lineArea.getParent();
/* If the new line is on a different page, we need to mark the old page as being complete. */
- final PageRa latestPage = lineArea.getPage();
+ final PageRa latestPage = normalBlockArea.getPage();
+ /* Identity test here is done on purpose. */
while (currentPage != latestPage) {
currentPage.layoutComplete();
currentPage = currentPage.getNextPageInCollection();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|