Revision: 12469
http://sourceforge.net/p/foray/code/12469
Author: victormote
Date: 2022-01-25 23:11:19 +0000 (Tue, 25 Jan 2022)
Log Message:
-----------
If last content hasn't been included on a line yet, add a line instead of adding the content to the last existing line.
Modified Paths:
--------------
trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/FirstFitLb.java
Modified: trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/FirstFitLb.java
===================================================================
--- trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/FirstFitLb.java 2022-01-24 15:00:11 UTC (rev 12468)
+++ trunk/foray/foray-linebreak/src/main/java/org/foray/linebreak/FirstFitLb.java 2022-01-25 23:11:19 UTC (rev 12469)
@@ -328,9 +328,9 @@
state.breakpoints.append(paragraph.qtyParaLeaves());
}
- /* Make sure the last line catches all of the content. */
+ /* Do we need to add another line to catch the remaining content? */
if (paragraph.qtyParaLeaves() > state.breakpoints.lastElement()) {
- state.breakpoints.setIntAt(state.breakpoints.length() - 1, paragraph.qtyParaLeaves());
+ state.breakpoints.append(paragraph.qtyParaLeaves());
}
while (state.lineLengths.length() > state.breakpoints.length()) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|