]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Fix line element list reporting.
authorJeremias Maerki <jeremias@apache.org>
Wed, 10 Aug 2005 07:13:00 +0000 (07:13 +0000)
committerJeremias Maerki <jeremias@apache.org>
Wed, 10 Aug 2005 07:13:00 +0000 (07:13 +0000)
TODO item for the single LineBreakPosition created for nested block-level FOs. This seems wrong to me.

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/inlineblock@231185 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java

index 254c6bacdbd715e9ce5c2376d5478ebb3b6c0107..50013dfc28f82e2ba871ab4f1451d9207565ec8d 100644 (file)
@@ -733,6 +733,7 @@ public class LineLayoutManager extends InlineStackingLayoutManager
                                         null, false));
                             }
                             lastPar.endParagraph();
+                            ElementListObserver.observe(lastPar, "line", null);
                             lastPar = null;
                             if (log.isTraceEnabled()) {
                                 trace.append(" ]");
@@ -763,13 +764,12 @@ public class LineLayoutManager extends InlineStackingLayoutManager
         }
         if (lastPar != null) {
             lastPar.endParagraph();
+            ElementListObserver.observe(lastPar, "line", null);
             if (log.isTraceEnabled()) {
                 trace.append(" ]");
             }
         }
         log.trace(trace);
-        // TODO Do we need more of these lines?
-        ElementListObserver.observe(lastPar, "line", null);
     }
 
     /**
@@ -936,6 +936,8 @@ public class LineLayoutManager extends InlineStackingLayoutManager
      * @return the line layout possibilities for the paragraph
      */
     private LineLayoutPossibilities createBlockLineBreak(KnuthSequence seq) {
+        //TODO Should this really create only a single LineBreakPosition???
+        //This creates an implicit keep-together on the nested block-level FOs.
         lineLayouts = new LineLayoutPossibilities();
         lineLayouts.addPossibility(1,0);
         int lineHeight = 0, lineStretch = 0, lineShrink = 0;