You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ad...@apache.org on 2008/06/22 13:28:06 UTC

svn commit: r670344 - in /xmlgraphics/fop/trunk/src/java/org/apache/fop/fo: FObjMixed.java flow/AbstractRetrieveMarker.java

Author: adelmelle
Date: Sun Jun 22 04:28:06 2008
New Revision: 670344

URL: http://svn.apache.org/viewvc?rev=670344&view=rev
Log:
Changed signature for static handleWhiteSpaceFor(), and used internally to make the code a bit more compact

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FObjMixed.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FObjMixed.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FObjMixed.java?rev=670344&r1=670343&r2=670344&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FObjMixed.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FObjMixed.java Sun Jun 22 04:28:06 2008
@@ -68,8 +68,7 @@
         flushText();
         if (!inMarker()
                 || getNameId() == FO_MARKER) {
-            getBuilderContext().whiteSpaceHandler
-                .handleWhiteSpace(this, currentTextNode);
+            handleWhiteSpaceFor(this, null);
         }
         super.endOfNode();
     }
@@ -81,10 +80,11 @@
      *  to trigger 'end-of-node' white-space handling)
      *  
      * @param fobj  the node for which to handle white-space
+     * @param nextChild the next child to be added
      */
-    protected static void handleWhiteSpaceFor(FObjMixed fobj) {
+    protected static void handleWhiteSpaceFor(FObjMixed fobj, FONode nextChild) {
         fobj.getBuilderContext().getXMLWhiteSpaceHandler()
-            .handleWhiteSpace(fobj, fobj.currentTextNode);
+            .handleWhiteSpace(fobj, fobj.currentTextNode, nextChild);
     }
     
     /**
@@ -159,8 +159,7 @@
                 }
             } else {
                 // handle white-space for all text up to here
-                getBuilderContext().whiteSpaceHandler
-                    .handleWhiteSpace(this, currentTextNode, child);
+                handleWhiteSpaceFor(this, child);
                 currentTextNode = null;
             }
         }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java?rev=670344&r1=670343&r2=670344&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/AbstractRetrieveMarker.java Sun Jun 22 04:28:06 2008
@@ -111,7 +111,7 @@
                 addChildTo(newChild, (FObj) newParent);
                 if (newChild.getNameId() == FO_TABLE) {
                     Table t = (Table) child;
-                    cloneSubtree(t.getColumns().listIterator(),
+                    cloneSubtree(t.getColumns().iterator(),
                             newChild, marker, newPropertyList);
                     cloneSingleNode(t.getTableHeader(),
                             newChild, marker, newPropertyList);
@@ -129,8 +129,9 @@
                 ft.bind(parentPropertyList);
                 addChildTo(newChild, (FObj) newParent);
             }
+            // trigger 'end-of-node' white-space handling
             if (newChild instanceof FObjMixed) {
-                handleWhiteSpaceFor((FObjMixed) newChild);
+                handleWhiteSpaceFor((FObjMixed) newChild, null);
             }
         }
     }
@@ -169,7 +170,7 @@
         }
         cloneSubtree(marker.getChildNodes(), this,
                         marker, propertyList);
-        handleWhiteSpaceFor(this);
+        handleWhiteSpaceFor(this, null);
     }
 
     /**



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org