Lines 37-42
Link Here
|
37 |
import org.apache.fop.layoutmgr.TraitSetter; |
37 |
import org.apache.fop.layoutmgr.TraitSetter; |
38 |
import org.apache.fop.layoutmgr.KnuthElement; |
38 |
import org.apache.fop.layoutmgr.KnuthElement; |
39 |
import org.apache.fop.layoutmgr.KnuthBox; |
39 |
import org.apache.fop.layoutmgr.KnuthBox; |
|
|
40 |
import org.apache.fop.layoutmgr.KnuthBlockBox; |
40 |
import org.apache.fop.layoutmgr.KnuthPenalty; |
41 |
import org.apache.fop.layoutmgr.KnuthPenalty; |
41 |
import org.apache.fop.layoutmgr.KnuthPossPosIter; |
42 |
import org.apache.fop.layoutmgr.KnuthPossPosIter; |
42 |
import org.apache.fop.area.Area; |
43 |
import org.apache.fop.area.Area; |
Lines 62-67
Link Here
|
62 |
|
63 |
|
63 |
private LinkedList labelList = null; |
64 |
private LinkedList labelList = null; |
64 |
private LinkedList bodyList = null; |
65 |
private LinkedList bodyList = null; |
|
|
66 |
private LinkedList footnoteList; |
65 |
|
67 |
|
66 |
private int listItemHeight; |
68 |
private int listItemHeight; |
67 |
|
69 |
|
Lines 221-227
Link Here
|
221 |
|
223 |
|
222 |
// "wrap" the Position inside each element |
224 |
// "wrap" the Position inside each element |
223 |
wrapPositionElements(returnedList, returnList, true); |
225 |
wrapPositionElements(returnedList, returnList, true); |
224 |
|
226 |
|
225 |
addKnuthElementsForSpaceAfter(returnList, alignment); |
227 |
addKnuthElementsForSpaceAfter(returnList, alignment); |
226 |
|
228 |
|
227 |
if (keepWithNextPendingOnLabel || keepWithNextPendingOnBody || mustKeepWithNext()) { |
229 |
if (keepWithNextPendingOnLabel || keepWithNextPendingOnBody || mustKeepWithNext()) { |
Lines 256-262
Link Here
|
256 |
LinkedList returnList = new LinkedList(); |
258 |
LinkedList returnList = new LinkedList(); |
257 |
while ((step = getNextStep(elementLists, start, end, partialHeights)) |
259 |
while ((step = getNextStep(elementLists, start, end, partialHeights)) |
258 |
> 0) { |
260 |
> 0) { |
259 |
|
261 |
|
260 |
if (end[0] + 1 == elementLists[0].size()) { |
262 |
if (end[0] + 1 == elementLists[0].size()) { |
261 |
if (keepWithNextPendingOnLabel) { |
263 |
if (keepWithNextPendingOnLabel) { |
262 |
keepWithNextActive = true; |
264 |
keepWithNextActive = true; |
Lines 278-284
Link Here
|
278 |
addedBoxHeight += boxHeight; |
280 |
addedBoxHeight += boxHeight; |
279 |
ListItemPosition stepPosition = new ListItemPosition(this, |
281 |
ListItemPosition stepPosition = new ListItemPosition(this, |
280 |
start[0], end[0], start[1], end[1]); |
282 |
start[0], end[0], start[1], end[1]); |
281 |
returnList.add(new KnuthBox(boxHeight, stepPosition, false)); |
283 |
if (footnoteList.size() > 0) { |
|
|
284 |
returnList.add(new KnuthBlockBox(boxHeight, footnoteList, stepPosition, false)); |
285 |
} else { |
286 |
returnList.add(new KnuthBox(boxHeight, stepPosition, false)); |
287 |
} |
288 |
footnoteList = null; |
282 |
if (addedBoxHeight < totalHeight) { |
289 |
if (addedBoxHeight < totalHeight) { |
283 |
int p = 0; |
290 |
int p = 0; |
284 |
if (keepWithNextActive || mustKeepTogether()) { |
291 |
if (keepWithNextActive || mustKeepTogether()) { |
Lines 300-311
Link Here
|
300 |
start[0] = end[0] + 1; |
307 |
start[0] = end[0] + 1; |
301 |
start[1] = end[1] + 1; |
308 |
start[1] = end[1] + 1; |
302 |
|
309 |
|
|
|
310 |
// empty list for footnote-transport |
311 |
footnoteList = new LinkedList(); |
312 |
|
303 |
// get next possible sequence for label and body |
313 |
// get next possible sequence for label and body |
304 |
int seqCount = 0; |
314 |
int seqCount = 0; |
305 |
for (int i = 0; i < start.length; i++) { |
315 |
for (int i = 0; i < start.length; i++) { |
306 |
while (end[i] + 1 < elementLists[i].size()) { |
316 |
while (end[i] + 1 < elementLists[i].size()) { |
307 |
end[i]++; |
317 |
end[i]++; |
308 |
KnuthElement el = (KnuthElement)elementLists[i].get(end[i]); |
318 |
KnuthElement el = (KnuthElement)elementLists[i].get(end[i]); |
|
|
319 |
|
320 |
// receive footnotes |
321 |
if (el instanceof KnuthBlockBox) { |
322 |
if (((KnuthBlockBox)el).hasAnchors()) { |
323 |
footnoteList.addAll(((KnuthBlockBox)el).getFootnoteBodyLMs()); |
324 |
} |
325 |
} |
326 |
|
309 |
if (el.isPenalty()) { |
327 |
if (el.isPenalty()) { |
310 |
if (el.getP() < KnuthElement.INFINITE) { |
328 |
if (el.getP() < KnuthElement.INFINITE) { |
311 |
//First legal break point |
329 |
//First legal break point |