]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Bugfix for omitted empty lines caused by forced linefeeds.
authorJeremias Maerki <jeremias@apache.org>
Wed, 2 Feb 2005 14:19:06 +0000 (14:19 +0000)
committerJeremias Maerki <jeremias@apache.org>
Wed, 2 Feb 2005 14:19:06 +0000 (14:19 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198364 13f79535-47bb-0310-9956-ffa450edef68

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

index c469ecadfede62f076ae1e287bf9048dd0d86df5..aa1fe85157c1b0fb15a37b142eb907a6056046ea 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -111,6 +111,7 @@ public class LineLayoutManager extends InlineStackingLayoutManager {
             lineHeight = lh;
             baseline = bl;
         }
+        
     }
 
 
@@ -469,6 +470,12 @@ public class LineLayoutManager extends InlineStackingLayoutManager {
                     // add the new elements to the paragraph
                     knuthPar.addAll(returnedList);
                     if (bForceLinefeed) {
+                        if (knuthPar.size() == 0) {
+                            //only a forced linefeed on this line 
+                            //-> compensate with a zero width box
+                            knuthPar.add(new KnuthBox(0, 0, 0, 0,
+                                    null, false));
+                        }
                         knuthPar.endParagraph();
                         knuthPar = new Paragraph();
                         knuthPar.startParagraph(availIPD.opt);