]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
This applies Dorothea Wiarda's patch to prevent "character dropping" when
authorSteve Coffman <gears@apache.org>
Wed, 8 Nov 2000 23:47:44 +0000 (23:47 +0000)
committerSteve Coffman <gears@apache.org>
Wed, 8 Nov 2000 23:47:44 +0000 (23:47 +0000)
a new LineArea is created in BlockArea.AddText.

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

src/org/apache/fop/layout/BlockArea.java
src/org/apache/fop/layout/LineArea.java

index 3c6e40495c1fcbbb17c6d52238f2257008fe1035..782580eb36652ba8a906460a7f44685460d37758 100644 (file)
@@ -167,9 +167,11 @@ public class BlockArea extends Area {
        while (ts != -1) {
            this.currentLineArea.align(this.align);
            this.addLineArea(this.currentLineArea);
+            
            this.currentLineArea = new
                LineArea(fontState, lineHeight, halfLeading,
-                        allocationWidth, startIndent, endIndent);  
+                        allocationWidth, startIndent, endIndent,
+                         currentLineArea);  
            if (currentHeight + currentLineArea.getHeight() >
                this.maxHeight) {
                return ts;
@@ -199,7 +201,7 @@ public class BlockArea extends Area {
        currentLineArea = new LineArea(fontState, lineHeight,
                                       halfLeading, allocationWidth,
                                       startIndent + textIndent,
-                                      endIndent);
+                                      endIndent,null);
     }
 
     public int getEndIndent() {
index 6ce891051e832241c02f4c58d6db7541be23b0b4..e27651b33960e2d47b687694d350e4bfb4717b07 100644 (file)
@@ -125,7 +125,7 @@ public class LineArea extends Area {
 
     public LineArea(FontState fontState, int lineHeight, int
                    halfLeading, int allocationWidth, int startIndent,
-                   int endIndent) { 
+                   int endIndent,LineArea prevLineArea) { 
        super(fontState);        
        
        this.currentFontState = fontState;
@@ -145,6 +145,13 @@ public class LineArea extends Area {
        this.startIndent = startIndent;
        this.endIndent = endIndent;
        
+        if(prevLineArea != null){
+           Enumeration e=prevLineArea.pendingAreas.elements();
+            while( e.hasMoreElements() ){
+               pendingAreas.addElement(e.nextElement());
+           }
+            pendingWidth=prevLineArea.getPendingWidth();         
+       }
     }
     
     public void render(Renderer renderer) {