Author: spepping
Date: Sat Dec 18 11:36:28 2010
New Revision: 1050618

URL: http://svn.apache.org/viewvc?rev=1050618&view=rev
Log:
Merge from trunk

Added:
    
xmlgraphics/fop/branches/Temp_ComplexScripts/test/layoutengine/standard-testcases/basic-link_for_toc.xml
      - copied unchanged from r1050617, 
xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/basic-link_for_toc.xml
    
xmlgraphics/fop/branches/Temp_ComplexScripts/test/layoutengine/standard-testcases/block-container_break.xml
      - copied unchanged from r1050617, 
xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/block-container_break.xml
    
xmlgraphics/fop/branches/Temp_ComplexScripts/test/layoutengine/standard-testcases/inline_hyphenation_border.xml
      - copied unchanged from r1050617, 
xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/inline_hyphenation_border.xml
    
xmlgraphics/fop/branches/Temp_ComplexScripts/test/layoutengine/standard-testcases/knuth_element-null_position.xml
      - copied unchanged from r1050617, 
xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/knuth_element-null_position.xml
Modified:
    xmlgraphics/fop/branches/Temp_ComplexScripts/   (props changed)
    
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/AFPStreamer.java
    
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/apps/  
 (props changed)
    
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/parser/
   (props changed)
    
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/LineArea.java
    
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineArea.java
    
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineParent.java
    
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
    
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java
    
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/util/ColorExt.java
   (props changed)
    xmlgraphics/fop/branches/Temp_ComplexScripts/status.xml

Propchange: xmlgraphics/fop/branches/Temp_ComplexScripts/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Dec 18 11:36:28 2010
@@ -1,4 +1,4 @@
 /xmlgraphics/fop/branches/Temp_AreaTreeNewDesign:603620-746655
 /xmlgraphics/fop/branches/fop-0_95:684572,688085,688696
 /xmlgraphics/fop/branches/fop-1_0:959975-964707
-/xmlgraphics/fop/trunk:981451-1042153
+/xmlgraphics/fop/trunk:981451-1050617

Modified: 
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/AFPStreamer.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/AFPStreamer.java?rev=1050618&r1=1050617&r2=1050618&view=diff
==============================================================================
--- 
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/AFPStreamer.java
 (original)
+++ 
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/AFPStreamer.java
 Sat Dec 18 11:36:28 2010
@@ -174,6 +174,14 @@ public class AFPStreamer implements Stre
 
         outputStream.close();
 
+
+        if (documentOutputStream != null) {
+            documentOutputStream.close();
+        }
+
+        if (documentFile != null) {
+            documentFile.close();
+        }
         // delete temporary file
         tempFile.delete();
     }
@@ -213,4 +221,4 @@ public class AFPStreamer implements Stre
 //        long end = System.currentTimeMillis();
 //        log.debug("writing time " + (end - start) + "ms");
     }
-}
\ No newline at end of file
+}

Propchange: 
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/apps/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Dec 18 11:36:28 2010
@@ -2,4 +2,4 @@
 
/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/apps:603620-746655
 
/xmlgraphics/fop/branches/fop-0_95/src/java/org/apache/fop/afp/apps:684572,688085,688696
 
/xmlgraphics/fop/branches/fop-1_0/src/java/org/apache/fop/afp/apps:959975-964707
-/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/apps:981451-1042153
+/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/apps:981451-1050617

Propchange: 
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/afp/parser/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Dec 18 11:36:28 2010
@@ -2,4 +2,4 @@
 
/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/afp/parser:603620-746655
 
/xmlgraphics/fop/branches/fop-0_95/src/java/org/apache/fop/afp/parser:684572,688085,688696
 
/xmlgraphics/fop/branches/fop-1_0/src/java/org/apache/fop/afp/parser:959975-964707
-/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/parser:981451-1042153
+/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/parser:981451-1050617

Modified: 
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/LineArea.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/LineArea.java?rev=1050618&r1=1050617&r2=1050618&view=diff
==============================================================================
--- 
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/LineArea.java
 (original)
+++ 
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/LineArea.java
 Sat Dec 18 11:36:28 2010
@@ -19,13 +19,13 @@
 
 package org.apache.fop.area;
 
-import org.apache.fop.area.inline.InlineArea;
-import org.apache.fop.fo.Constants;
-
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.fop.area.inline.InlineArea;
+import org.apache.fop.fo.Constants;
+
 /**
  * The line area.
  * This is a line area that contains inline areas.
@@ -59,6 +59,15 @@ public class LineArea extends Area {
             variationFactor = 1.0;
             bAddedToAreaTree = false;
         }
+
+        /** {...@inheritdoc} */
+        public String toString() {
+            return getClass().getSimpleName()
+                + ": diff=" + difference
+                + ", variation=" + variationFactor
+                + ", stretch=" + availableStretch
+                + ", shrink=" + availableShrink;
+        }
     }
 
     private LineAdjustingInfo adjustingInfo = null;
@@ -208,6 +217,9 @@ public class LineArea extends Area {
      */
     public void finish() {
         if (adjustingInfo.lineAlignment == Constants.EN_JUSTIFY) {
+            if (log.isTraceEnabled()) {
+                log.trace("Applying variation factor to justified line: " + 
adjustingInfo);
+            }
             // justified line: apply the variation factor
             boolean bUnresolvedAreasPresent = false;
             // recursively apply variation factor to descendant areas

Modified: 
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineArea.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineArea.java?rev=1050618&r1=1050617&r2=1050618&view=diff
==============================================================================
--- 
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineArea.java
 (original)
+++ 
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineArea.java
 Sat Dec 18 11:36:28 2010
@@ -245,6 +245,11 @@ public class InlineArea extends Area {
      * @param ipdVariation the variation
      */
     public void handleIPDVariation(int ipdVariation) {
+        if (log.isTraceEnabled()) {
+            log.trace("Handling IPD variation for " + 
getClass().getSimpleName()
+                    + ": increase by " + ipdVariation + " mpt.");
+        }
+
         increaseIPD(ipdVariation);
         notifyIPDVariation(ipdVariation);
     }

Modified: 
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineParent.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineParent.java?rev=1050618&r1=1050617&r2=1050618&view=diff
==============================================================================
--- 
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineParent.java
 (original)
+++ 
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/area/inline/InlineParent.java
 Sat Dec 18 11:36:28 2010
@@ -19,11 +19,10 @@
 
 package org.apache.fop.area.inline;
 
-import org.apache.fop.area.Area;
-
-import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
+import java.util.Iterator;
+
+import org.apache.fop.area.Area;
 
 /**
  * Inline parent area.
@@ -36,7 +35,7 @@ public class InlineParent extends Inline
     /**
      * The list of inline areas added to this inline parent.
      */
-    protected List inlines = new ArrayList();
+    protected List<InlineArea> inlines = new java.util.ArrayList<InlineArea>();
 
     /** Controls whether the IPD is automatically adjusted based on the area's 
children. */
     protected transient boolean autoSize;
@@ -52,13 +51,14 @@ public class InlineParent extends Inline
      *
      * @param childArea the child area to add
      */
+    @Override
     public void addChildArea(Area childArea) {
         if (inlines.size() == 0) {
             autoSize = (getIPD() == 0);
         }
         if (childArea instanceof InlineArea) {
             InlineArea inlineChildArea = (InlineArea) childArea;
-            inlines.add(childArea);
+            inlines.add(inlineChildArea);
             // set the parent area for the child area
             inlineChildArea.setParentArea(this);
             if (autoSize) {
@@ -73,7 +73,7 @@ public class InlineParent extends Inline
      *
      * @return the list of child areas
      */
-    public List getChildAreas() {
+    public List<InlineArea> getChildAreas() {
         return inlines;
     }
 
@@ -84,14 +84,20 @@ public class InlineParent extends Inline
      * @param lineShrink      the total shrink of the line
      * @return true if there is an UnresolvedArea descendant
      */
+    @Override
     public boolean applyVariationFactor(double variationFactor,
                                         int lineStretch, int lineShrink) {
         boolean bUnresolvedAreasPresent = false;
+        int cumulativeIPD = 0;
         // recursively apply variation factor to descendant areas
         for (int i = 0, len = inlines.size(); i < len; i++) {
-            bUnresolvedAreasPresent |= ((InlineArea)inlines.get(i))
-                .applyVariationFactor(variationFactor, lineStretch, 
lineShrink);
+            InlineArea inline = inlines.get(i);
+            bUnresolvedAreasPresent |= inline.applyVariationFactor(
+                    variationFactor, lineStretch, lineShrink);
+            cumulativeIPD += inline.getIPD();  //Update this area's IPD based 
on changes to children
         }
+        setIPD(cumulativeIPD);
+
         return bUnresolvedAreasPresent;
     }
 

Modified: 
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java?rev=1050618&r1=1050617&r2=1050618&view=diff
==============================================================================
--- 
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
 (original)
+++ 
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
 Sat Dec 18 11:36:28 2010
@@ -323,7 +323,7 @@ public class BlockContainerLayoutManager
                     }
                     if (ElementListUtils.endsWithForcedBreak(returnedList)) {
                         // a descendant of this block has break-after
-                        if (curLM.isFinished()) {
+                        if (curLM.isFinished() && !hasNextChildLM()) {
                             // there is no other content in this block;
                             // it's useless to add space after before a page 
break
                             setFinished(true);

Modified: 
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java?rev=1050618&r1=1050617&r2=1050618&view=diff
==============================================================================
--- 
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java
 (original)
+++ 
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java
 Sat Dec 18 11:36:28 2010
@@ -285,8 +285,9 @@ public abstract class InlineStackingLayo
         KnuthElement oldElement;
         while (oldListIterator.hasNext()) {
             oldElement = (KnuthElement) oldListIterator.next();
-            oldElement.setPosition
-                (oldElement.getPosition().getPosition());
+            if (oldElement.getPosition() != null) {
+                oldElement.setPosition(oldElement.getPosition().getPosition());
+            }
         }
         // reset the iterator
         oldListIterator = oldList.listIterator();
@@ -338,8 +339,11 @@ public abstract class InlineStackingLayo
         oldListIterator = oldList.listIterator();
         while (oldListIterator.hasNext()) {
             oldElement = (KnuthElement) oldListIterator.next();
-            oldElement.setPosition
-                (notifyPos(new NonLeafPosition(this, 
oldElement.getPosition())));
+            NonLeafPosition newPos = new NonLeafPosition(this, 
oldElement.getPosition());
+            if (newPos.generatesAreas()) {
+                notifyPos(newPos);
+            }
+            oldElement.setPosition(newPos);
         }
         return bSomethingChanged;
     }

Propchange: 
xmlgraphics/fop/branches/Temp_ComplexScripts/src/java/org/apache/fop/util/ColorExt.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sat Dec 18 11:36:28 2010
@@ -2,4 +2,4 @@
 
/xmlgraphics/fop/branches/Temp_Accessibility/src/java/org/apache/fop/util/ColorExt.java:745924-830281
 
/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/util/ColorExt.java:603620-746655
 
/xmlgraphics/fop/branches/fop-0_95/src/java/org/apache/fop/util/ColorExt.java:684572,688085,688696
-/xmlgraphics/fop/trunk/src/java/org/apache/fop/util/ColorExt.java:981451-1042153
+/xmlgraphics/fop/trunk/src/java/org/apache/fop/util/ColorExt.java:981451-1050617

Modified: xmlgraphics/fop/branches/Temp_ComplexScripts/status.xml
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_ComplexScripts/status.xml?rev=1050618&r1=1050617&r2=1050618&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_ComplexScripts/status.xml (original)
+++ xmlgraphics/fop/branches/Temp_ComplexScripts/status.xml Sat Dec 18 11:36:28 
2010
@@ -58,6 +58,12 @@
       documents. Example: the fix of marks layering will be such a case when 
it's done.
     -->
     <release version="FOP Trunk" date="TBD">
+      <action context="Layout" dev="VH" type="fix" fixes-bug="50089">
+        Bugfix: content after forced break in block-container is not rendered.
+      </action>
+      <action context="Layout" dev="JM" type="fix" fixes-bug="42034">
+        Fixed adjustment of inline parent area for justified text containing a 
forward page reference.
+      </action>
       <action context="Layout" dev="AD" type="fix" fixes-bug="38264">
         Fixed behavior when combining hyphenation with preserved linefeeds or 
whitespace.
       </action>



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to