xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vhenneb...@apache.org
Subject svn commit: r679758 [16/34] - in /xmlgraphics/fop/branches/Temp_AFPGOCAResources: ./ examples/embedding/java/embedding/ examples/embedding/java/embedding/events/ examples/embedding/java/embedding/intermediate/ examples/embedding/java/embedding/model/ e...
Date Fri, 25 Jul 2008 10:56:32 GMT
Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/BreakingAlgorithm.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -26,24 +26,24 @@
 
 /**
  * The set of nodes is sorted into lines indexed into activeLines.
- * The nodes in each line are linked together in a single linked list by the 
+ * The nodes in each line are linked together in a single linked list by the
  * KnuthNode.next field. The activeLines array contains a link to the head of
  * the linked list in index 'line*2' and a link to the tail at index 'line*2+1'.
  * <p>
- * The set of active nodes can be traversed by 
+ * The set of active nodes can be traversed by
  * <pre>
  * for (int line = startLine; line &lt; endLine; line++) {
  *     for (KnuthNode node = getNode(line); node != null; node = node.next) {
  *         // Do something with 'node'
  *     }
  * }
- * </pre> 
+ * </pre>
  */
 public abstract class BreakingAlgorithm {
 
     /** the logger for the class */
     protected static Log log = LogFactory.getLog(BreakingAlgorithm.class);
-    
+
     /** Maximum adjustment ration */
     protected static final int INFINITE_RATIO = 1000;
 
@@ -79,7 +79,7 @@
      * The paragraph of KnuthElements.
      */
     protected KnuthSequence par;
-    
+
     /**
      * The width of a line (or height of a column in page-breaking mode).
      * -1 indicates that the line widths are different for each line.
@@ -118,12 +118,12 @@
      * line number l corresponds to the number of the line ending at the node's breakpoint.
      */
     protected KnuthNode[] activeLines;
-    
+
     /**
      * The number of active nodes.
      */
     protected int activeNodeCount;
-    
+
     /**
      * The lowest available line in the set of active nodes.
      */
@@ -218,7 +218,7 @@
         /** best node for the preceding breakpoint */
         public KnuthNode previous;
 
-        /** next possible node in the same line */ 
+        /** next possible node in the same line */
         public KnuthNode next;
 
         /**
@@ -226,7 +226,7 @@
          * into a line.
          */
         public int fitRecoveryCounter = 0;
-        
+
         public KnuthNode(int position, int line, int fitness,
                          int totalWidth, int totalStretch, int totalShrink,
                          double adjustRatio, int availableShrink, int availableStretch,
@@ -249,7 +249,7 @@
             return "<KnuthNode at " + position + " "
                     + totalWidth + "+" + totalStretch + "-" + totalShrink
                     + " line:" + line + " prev:" + (previous != null ? previous.position : -1)
-                    + " dem:" + totalDemerits + ">"; 
+                    + " dem:" + totalDemerits + ">";
         }
     }
 
@@ -363,10 +363,10 @@
     protected int getMaxRecoveryAttempts() {
         return MAX_RECOVERY_ATTEMPTS;
     }
-    
+
     /**
      * Controls the behaviour of the algorithm in cases where the first element of a part
-     * overflows a line/page. 
+     * overflows a line/page.
      * @return true if the algorithm should try to send the element to the next line/page.
      */
     protected boolean isPartOverflowRecoveryActivated() {
@@ -397,13 +397,13 @@
     }
 
     /** @see #findBreakingPoints(KnuthSequence, int, double, boolean, int) */
-    public int findBreakingPoints(KnuthSequence par, 
-                                  double threshold, 
+    public int findBreakingPoints(KnuthSequence par,
+                                  double threshold,
                                   boolean force,
                                   int allowedBreaks) {
         return findBreakingPoints(par, 0, threshold, force, allowedBreaks);
     }
-    
+
     /** Finds an optimal set of breakpoints for the given paragraph.
      * @param par the paragraph to break
      * @param startIndex index of the Knuth element at which the breaking must start
@@ -425,7 +425,7 @@
 
         // reset lastTooShort and lastTooLong, as they could be not null
         // because of previous calls to findBreakingPoints
-        lastTooShort = lastTooLong = null; 
+        lastTooShort = lastTooLong = null;
         // reset startLine and endLine
         startLine = endLine = 0;
         // current element in the paragraph
@@ -449,7 +449,7 @@
         if (log.isTraceEnabled()) {
             log.trace("Looping over " + (par.size() - startIndex) + " elements");
         }
-        
+
         KnuthNode lastForced = getNode(0);
 
         // main loop
@@ -478,9 +478,9 @@
                 // consider all penalties, non-flagged penalties or non-forcing penalties
                 // according to the value of allowedBreaks
                 if (((KnuthPenalty) thisElement).getP() < KnuthElement.INFINITE
-                    && (!(allowedBreaks == NO_FLAGGED_PENALTIES) 
+                    && (!(allowedBreaks == NO_FLAGGED_PENALTIES)
                             || !(((KnuthPenalty) thisElement).isFlagged()))
-                    && (!(allowedBreaks == ONLY_FORCED_BREAKS) 
+                    && (!(allowedBreaks == ONLY_FORCED_BREAKS)
                             || ((KnuthPenalty) thisElement).getP() == -KnuthElement.INFINITE)) {
                     considerLegalBreak(thisElement, i);
                 }
@@ -491,9 +491,9 @@
                     log.debug("Could not find a set of breaking points " + threshold);
                     return 0;
                 }
-                // lastDeactivated was a "good" break, while lastTooShort and lastTooLong 
+                // lastDeactivated was a "good" break, while lastTooShort and lastTooLong
                 // were "bad" breaks since the beginning;
-                // if it is not the node we just restarted from, lastDeactivated can 
+                // if it is not the node we just restarted from, lastDeactivated can
                 // replace either lastTooShort or lastTooLong
                 if (lastDeactivated != null && lastDeactivated != lastForced) {
                     if (lastDeactivated.adjustRatio > 0) {
@@ -519,7 +519,7 @@
                         lastForced = node;
                         node.fitRecoveryCounter = lastTooLong.previous.fitRecoveryCounter + 1;
                         if (log.isDebugEnabled()) {
-                            log.debug("first part doesn't fit into line, recovering: " 
+                            log.debug("first part doesn't fit into line, recovering: "
                                     + node.fitRecoveryCounter);
                         }
                         if (node.fitRecoveryCounter > getMaxRecoveryAttempts()) {
@@ -621,7 +621,7 @@
      * @param difference difference between target and actual line width
      * @param totalDemerits minimum total demerits up to the breakpoint
      * @param previous active node for the preceding breakpoint
-     */ 
+     */
     protected KnuthNode createNode(int position, int line, int fitness,
                                    int totalWidth, int totalStretch, int totalShrink,
                                    double adjustRatio, int availableShrink, int availableStretch,
@@ -680,8 +680,8 @@
     protected void considerLegalBreak(KnuthElement element, int elementIdx) {
 
         if (log.isTraceEnabled()) {
-            log.trace("considerLegalBreak() at " + elementIdx 
-                    + " (" + totalWidth + "+" + totalStretch + "-" + totalShrink 
+            log.trace("considerLegalBreak() at " + elementIdx
+                    + " (" + totalWidth + "+" + totalStretch + "-" + totalShrink
                     + "), parts/lines: " + startLine + "-" + endLine);
             log.trace("\tCurrent active node list: " + activeNodeCount + " " + this.toString("\t"));
         }
@@ -711,17 +711,17 @@
                     removeNode(line, node);
                     lastDeactivated = compareNodes(lastDeactivated, node);
                 }
-    
+
                 // The line is within the available shrink and the threshold.
                 if (r >= -1 && r <= threshold) {
                     int fitnessClass = computeFitness(r);
                     double demerits = computeDemerits(node, element, fitnessClass, r);
-    
+
                     if (log.isTraceEnabled()) {
                         log.trace("\tDemerits=" + demerits);
                         log.trace("\tFitness class=" + fitnessClass);
                     }
-    
+
                     if (demerits < best.getDemerits(fitnessClass)) {
                         // updates best demerits data
                         best.addRecord(demerits, node, r, availableShrink, availableStretch,
@@ -729,7 +729,7 @@
                         lastTooShort = null;
                     }
                 }
-                
+
                 // The line is way too short, but we are in forcing mode, so a node is
                 // calculated and stored in lastValidNode.
                 if (force && (r <= -1 || r > threshold)) {
@@ -739,7 +739,7 @@
                     int newStretch = totalStretch;
                     int newShrink = totalShrink;
 
-                    // add the width, stretch and shrink of glue elements after 
+                    // add the width, stretch and shrink of glue elements after
                     // the break
                     // this does not affect the dimension of the line / page, only
                     // the values stored in the node; these would be as if the break
@@ -772,7 +772,7 @@
                         if (lastTooShort == null || demerits <= lastTooShort.totalDemerits) {
                             if (considerTooShort) {
                                 //consider possibilities which are too short
-                                best.addRecord(demerits, node, r, 
+                                best.addRecord(demerits, node, r,
                                         availableShrink, availableStretch,
                                         difference, fitnessClass);
                             }
@@ -805,7 +805,7 @@
         int newStretch = totalStretch;
         int newShrink = totalShrink;
 
-        // add the width, stretch and shrink of glue elements after 
+        // add the width, stretch and shrink of glue elements after
         // the break
         // this does not affect the dimension of the line / page, only
         // the values stored in the node; these would be as if the break
@@ -831,7 +831,7 @@
                 // the nodes in activeList must be ordered
                 // by line number and position;
                 if (log.isTraceEnabled()) {
-                    log.trace("\tInsert new break in list of " + activeNodeCount 
+                    log.trace("\tInsert new break in list of " + activeNodeCount
                             + " from fitness class " + i);
                 }
                 KnuthNode newNode = createNode(elementIdx, line + 1, i,
@@ -849,7 +849,7 @@
      * @param activeNode node for the previous breakpoint
      * @param element currently considered breakpoint
      * @return The difference in width. Positive numbers mean extra space in the line,
-     * negative number that the line overflows. 
+     * negative number that the line overflows.
      */
     protected int computeDifference(KnuthNode activeNode, KnuthElement element,
                                     int elementIndex) {
@@ -862,14 +862,14 @@
     }
 
     /**
-     * Return the adjust ration needed to make up for the difference. A ration of 
+     * Return the adjust ration needed to make up for the difference. A ration of
      * <ul>
      *    <li>0 means that the break has the exact right width</li>
-     *    <li>&gt;= -1 &amp;&amp; &lt; 0  means that the break is wider than the line, 
-     *        but within the minimim values of the glues.</li> 
-     *    <li>&gt;0 &amp;&amp; &lt; 1 means that the break is smaller than the line width, 
+     *    <li>&gt;= -1 &amp;&amp; &lt; 0  means that the break is wider than the line,
+     *        but within the minimim values of the glues.</li>
+     *    <li>&gt;0 &amp;&amp; &lt; 1 means that the break is smaller than the line width,
      *        but within the maximum values of the glues.</li>
-     *    <li>&gt; 1 means that the break is too small to make up for the glues.</li> 
+     *    <li>&gt; 1 means that the break is too small to make up for the glues.</li>
      * </ul>
      * @param activeNode
      * @param difference
@@ -895,11 +895,11 @@
             return 0;
         }
     }
-    
+
     /**
      * Figure out the fitness class of this line (tight, loose,
      * very tight or very loose).
-     * See the section on "More Bells and Whistles" in Knuth's 
+     * See the section on "More Bells and Whistles" in Knuth's
      * "Breaking Paragraphs Into Lines".
      * @param r
      * @return the fitness class
@@ -923,11 +923,11 @@
      * node and ending at the given element.
      * @param activeNode considered preceding line break
      * @param element considered current line break
-     * @param fitnessClass fitness of the current line 
+     * @param fitnessClass fitness of the current line
      * @param r adjustment ratio for the current line
      * @return the demerit of the current line
      */
-    protected double computeDemerits(KnuthNode activeNode, KnuthElement element, 
+    protected double computeDemerits(KnuthNode activeNode, KnuthElement element,
                                   int fitnessClass, double r) {
         double demerits = 0;
         // compute demerits
@@ -942,14 +942,14 @@
         } else {
             demerits = f * f;
         }
-    
+
         if (element.isPenalty() && ((KnuthPenalty) element).isFlagged()
             && getElement(activeNode.position).isPenalty()
             && ((KnuthPenalty) getElement(activeNode.position)).isFlagged()) {
             // add demerit for consecutive breaks at flagged penalties
             demerits += repeatedFlaggedDemerit;
             // there are at least two consecutive lines ending with a flagged penalty;
-            // check if the previous line end with a flagged penalty too, 
+            // check if the previous line end with a flagged penalty too,
             // and if this situation is allowed
             int flaggedPenaltiesCount = 2;
             for (KnuthNode prevNode = activeNode.previous;
@@ -1084,18 +1084,18 @@
      */
     protected int getLineWidth(int line) {
         if (this.lineWidth < 0) {
-            throw new IllegalStateException("lineWidth must be set" 
+            throw new IllegalStateException("lineWidth must be set"
                     + (this.lineWidth != 0 ? " and positive, but it is: " + this.lineWidth : ""));
         } else {
             return this.lineWidth;
         }
     }
-    
+
     /** @return the constant line/part width or -1 if there is no such value */
     protected int getLineWidth() {
         return this.lineWidth;
     }
-    
+
     /**
      * Creates a string representation of the active nodes. Used for debugging.
      * @param prepend a string to prepend on each entry
@@ -1130,7 +1130,7 @@
             bestActiveNode = bestActiveNode.previous;
         }
     }
-    
+
     /** @return the alignment for normal lines/parts */
     public int getAlignment() {
         return this.alignment;

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/ConditionalElementListener.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/ConditionalElementListener.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/ConditionalElementListener.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/ConditionalElementListener.java Fri Jul 25 03:55:49 2008
@@ -49,5 +49,5 @@
      *                        (null means zero length)
      */
     void notifyPadding(RelSide side, MinOptMax effectiveLength);
-    
+
 }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/ElementListObserver.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/ElementListObserver.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/ElementListObserver.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/ElementListObserver.java Fri Jul 25 03:55:49 2008
@@ -28,9 +28,9 @@
  * Please see the subclass within the test code.
  */
 public class ElementListObserver {
-    
+
     private static List activeObservers = null;
-    
+
     /**
      * Adds a new Observer to the list.
      * @param observer the observer implementation
@@ -41,7 +41,7 @@
         }
         activeObservers.add(observer);
     }
-    
+
     /**
      * Removes an Observer from the list. This call simply returns if the observer was not on
      * the list and does nothing.
@@ -52,7 +52,7 @@
             activeObservers.remove(observer);
         }
     }
-    
+
     /**
      * Notifies all registered observers about the element list.
      * @param elementList the Knuth element list
@@ -70,7 +70,7 @@
             }
         }
     }
-    
+
     /** @return true if observation is active, i.e. Observers are registered. */
     public static boolean isObservationActive() {
         return activeObservers != null;
@@ -80,7 +80,7 @@
      * Implement this interface to receive notifications on element lists.
      */
     public interface Observer {
-        
+
         /**
          * Notifies the observer about the element list.
          * @param elementList the Knuth element list
@@ -89,7 +89,7 @@
          * @param id ID for the element list (may be null)
          */
         void observe(List elementList, String category, String id);
-        
+
     }
-    
+
 }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/ElementListUtils.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/ElementListUtils.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/ElementListUtils.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/ElementListUtils.java Fri Jul 25 03:55:49 2008
@@ -29,14 +29,14 @@
  * Utilities for Knuth element lists.
  */
 public final class ElementListUtils {
-    
+
     private ElementListUtils() {
         // Utility class.
     }
 
     /**
      * Removes legal breaks in an element list. A constraint can be specified to limit the
-     * range in which the breaks are removed. Legal breaks occuring before at least 
+     * range in which the breaks are removed. Legal breaks occuring before at least
      * constraint.opt space is filled will be removed.
      * @param elements the element list
      * @param constraint min/opt/max value to restrict the range in which the breaks are removed.
@@ -48,7 +48,7 @@
 
     /**
      * Removes legal breaks in an element list. A constraint can be specified to limit the
-     * range in which the breaks are removed. Legal breaks occuring before at least 
+     * range in which the breaks are removed. Legal breaks occuring before at least
      * constraint space is filled will be removed.
      * @param elements the element list
      * @param constraint value to restrict the range in which the breaks are removed.

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/ExternalDocumentLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/ExternalDocumentLayoutManager.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/ExternalDocumentLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/ExternalDocumentLayoutManager.java Fri Jul 25 03:55:49 2008
@@ -61,8 +61,8 @@
 
     private static Log log = LogFactory.getLog(ExternalDocumentLayoutManager.class);
 
-    private ImageLayout imageLayout; 
-    
+    private ImageLayout imageLayout;
+
     /**
      * Constructor
      *
@@ -74,7 +74,7 @@
     }
 
     /**
-     * @return the ExternalDocument being managed by this layout manager 
+     * @return the ExternalDocument being managed by this layout manager
      */
     protected ExternalDocument getExternalDocument() {
         return (ExternalDocument)pageSeq;
@@ -84,24 +84,24 @@
     public PageSequenceLayoutManager getPSLM() {
         throw new IllegalStateException("getPSLM() is illegal for " + getClass().getName());
     }
-    
+
     /** {@inheritDoc} */
     public void activateLayout() {
         initialize();
 
         FOUserAgent userAgent = pageSeq.getUserAgent();
         ImageManager imageManager = userAgent.getFactory().getImageManager();
-        
+
         String uri = getExternalDocument().getSrc();
         Integer firstPageIndex = ImageUtil.getPageIndexFromURI(uri);
         boolean hasPageIndex = (firstPageIndex != null);
-        
+
         try {
             ImageInfo info = imageManager.getImageInfo(uri, userAgent.getImageSessionContext());
-            
+
             Object moreImages = info.getCustomObjects().get(ImageInfo.HAS_MORE_IMAGES);
             boolean hasMoreImages = moreImages != null && !Boolean.FALSE.equals(moreImages);
-            
+
             Dimension intrinsicSize = info.getSize().getDimensionMpt();
             ImageLayout layout = new ImageLayout(getExternalDocument(), this, intrinsicSize);
 
@@ -111,7 +111,7 @@
             }
 
             makePageForImage(info, layout);
-            
+
             if (!hasPageIndex && hasMoreImages) {
                 if (log.isTraceEnabled()) {
                     log.trace("Starting multi-page processing...");
@@ -129,16 +129,16 @@
                         }
                         ImageInfo subinfo = imageManager.getImageInfo(
                                 tempURI.toASCIIString(), userAgent.getImageSessionContext());
-                        
+
                         moreImages = subinfo.getCustomObjects().get(ImageInfo.HAS_MORE_IMAGES);
                         hasMoreImages = moreImages != null && !Boolean.FALSE.equals(moreImages);
-                        
+
                         intrinsicSize = subinfo.getSize().getDimensionMpt();
                         layout = new ImageLayout(
                                 getExternalDocument(), this, intrinsicSize);
-                        
+
                         makePageForImage(subinfo, layout);
-                        
+
                         pageIndex++;
                     }
                 } catch (URISyntaxException e) {
@@ -170,15 +170,15 @@
         fillPage(info.getOriginalURI());
         finishPage();
     }
-    
+
     private void fillPage(String uri) {
 
         Dimension imageSize = this.imageLayout.getViewportSize();
-        
+
         Block blockArea = new Block();
         blockArea.setIPD(imageSize.width);
         LineArea lineArea = new LineArea();
-        
+
         Image imageArea = new Image(uri);
         TraitSetter.setProducerID(imageArea, fobj.getId());
         transferForeignAttributes(imageArea);
@@ -189,7 +189,7 @@
         vp.setBPD(imageSize.height);
         vp.setContentPosition(imageLayout.getPlacement());
         vp.setOffset(0);
-        
+
         //Link them all together...
         lineArea.addInlineArea(vp);
         lineArea.updateExtentsFromChildren();
@@ -197,7 +197,7 @@
         curPage.getPageViewport().getCurrentFlow().addBlock(blockArea);
         curPage.getPageViewport().getCurrentSpan().notifyFlowsFinished();
     }
-        
+
     /** {@inheritDoc} */
     public void finishPageSequence() {
         if (pageSeq.hasId()) {
@@ -208,7 +208,7 @@
                 (currentPageNum - startPageNum) + 1);
         areaTreeHandler.notifyPageSequenceFinished(pageSeq,
                 (currentPageNum - startPageNum) + 1);
-        
+
         if (log.isDebugEnabled()) {
             log.debug("Ending layout");
         }
@@ -217,9 +217,9 @@
     /** {@inheritDoc} */
     protected Page createPage(int pageNumber, boolean isBlank) {
         String pageNumberString = pageSeq.makeFormattedPageNumber(pageNumber);
-        
+
         Dimension imageSize = this.imageLayout.getViewportSize();
-        
+
         // Set up the CTM on the page reference area based on writing-mode
         // and reference-orientation
         Rectangle referenceRect;
@@ -231,10 +231,10 @@
         FODimension reldims = new FODimension(0, 0);
         CTM pageCTM = CTM.getCTMandRelDims(pageSeq.getReferenceOrientation(),
             Constants.EN_LR_TB, referenceRect, reldims);
-        
+
         Page page = new Page(referenceRect, pageNumber, pageNumberString, isBlank);
-        
-        PageViewport pv = page.getPageViewport(); 
+
+        PageViewport pv = page.getPageViewport();
         org.apache.fop.area.Page pageArea = new org.apache.fop.area.Page();
         pv.setPage(pageArea);
 
@@ -242,8 +242,8 @@
         rv.setIPD(referenceRect.width);
         rv.setBPD(referenceRect.height);
         rv.setClip(true);
-        
-        BodyRegion body = new BodyRegion(Constants.FO_REGION_BODY, 
+
+        BodyRegion body = new BodyRegion(Constants.FO_REGION_BODY,
                 "fop-image-region", rv, 1, 0);
         body.setIPD(imageSize.width);
         body.setBPD(imageSize.height);
@@ -256,7 +256,7 @@
 
         //Also creates first normal flow region
         pv.createSpan(false);
-        
+
         return page;
     }
 

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/FlowLayoutManager.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -46,12 +46,12 @@
      * logging instance
      */
     private static Log log = LogFactory.getLog(FlowLayoutManager.class);
-    
+
     /** Array of areas currently being filled stored by area class */
     private BlockParent[] currentAreas = new BlockParent[Area.CLASS_MAX];
 
     private int currentSpan = EN_NONE;
-    
+
     /**
      * This is the top level layout manager.
      * It is created by the PageSequence FO.
@@ -96,7 +96,7 @@
                 SpaceResolver.resolveElementList(returnList);
                 return returnList;
             }
-            
+
             // Set up a LayoutContext
             //MinOptMax bpd = context.getStackLimit();
 
@@ -104,7 +104,7 @@
             childLC.setStackLimitBP(context.getStackLimitBP());
             childLC.setRefIPD(context.getRefIPD());
             childLC.setWritingMode(getCurrentPage().getSimplePageMaster().getWritingMode());
-            
+
             // get elements from curLM
             returnedList = curLM.getNextKnuthElements(childLC, alignment);
             //log.debug("FLM.getNextKnuthElements> returnedList.size() = " + returnedList.size());
@@ -148,7 +148,7 @@
             //Propagate and clear
             context.updateKeepWithNextPending(childLC.getKeepWithNextPending());
             childLC.clearKeepWithNextPending();
-            
+
             context.updateKeepWithNextPending(getKeepWithNextStrength());
         }
 
@@ -201,7 +201,7 @@
     public int getKeepTogetherStrength() {
         return KEEP_AUTO;
     }
-    
+
     /** {@inheritDoc} */
     public int getKeepWithNextStrength() {
         return KEEP_AUTO;
@@ -211,7 +211,7 @@
     public int getKeepWithPreviousStrength() {
         return KEEP_AUTO;
     }
-    
+
     /** {@inheritDoc} */
     public List getChangedKnuthElements(List oldList, /*int flaggedPenalty,*/ int alignment) {
         ListIterator oldListIterator = oldList.listIterator();
@@ -255,7 +255,7 @@
                 if (prevLM.mustKeepWithNext()
                     || currLM.mustKeepWithPrevious()) {
                     // add an infinite penalty to forbid a break between blocks
-                    returnedList.add(new KnuthPenalty(0, KnuthElement.INFINITE, false, 
+                    returnedList.add(new KnuthPenalty(0, KnuthElement.INFINITE, false,
                             new Position(this), false));
                 } else if (!((KnuthElement) returnedList.get(returnedList
                         .size() - 1)).isGlue()) {
@@ -288,7 +288,7 @@
     }
 
     /**
-     * {@inheritDoc} 
+     * {@inheritDoc}
      */
     public void addAreas(PositionIterator parentIter, LayoutContext layoutContext) {
         AreaAdditionUtil.addAreas(this, parentIter, layoutContext);
@@ -299,7 +299,7 @@
      * Add child area to a the correct container, depending on its
      * area class. A Flow can fill at most one area container of any class
      * at any one time. The actual work is done by BlockStackingLM.
-     * 
+     *
      * @param childArea the area to add
      */
     public void addChildArea(Area childArea) {
@@ -314,7 +314,7 @@
     public Area getParentArea(Area childArea) {
         BlockParent parentArea = null;
         int aclass = childArea.getAreaClass();
-        
+
         if (aclass == Area.CLASS_NORMAL) {
             parentArea = getCurrentPV().getCurrentFlow();
         } else if (aclass == Area.CLASS_BEFORE_FLOAT) {
@@ -325,7 +325,7 @@
             throw new IllegalStateException("(internal error) Invalid "
                     + "area class (" + aclass + ") requested.");
         }
-        
+
         this.currentAreas[aclass] = parentArea;
         setCurrentArea(parentArea);
         return parentArea;
@@ -338,7 +338,7 @@
     public int getContentAreaIPD() {
         return getCurrentPV().getCurrentSpan().getColumnWidth();
     }
-   
+
     /**
      * Returns the BPD of the content area
      * @return the BPD of the content area

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/FootnoteBodyLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/FootnoteBodyLayoutManager.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/FootnoteBodyLayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/FootnoteBodyLayoutManager.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -95,7 +95,7 @@
     public int getKeepTogetherStrength() {
         return getParentKeepTogetherStrength();
     }
-    
+
     /** {@inheritDoc} */
     public int getKeepWithNextStrength() {
         return KEEP_AUTO;
@@ -105,5 +105,5 @@
     public int getKeepWithPreviousStrength() {
         return KEEP_AUTO;
     }
-    
+
 }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/InlineKnuthSequence.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/InlineKnuthSequence.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/InlineKnuthSequence.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/InlineKnuthSequence.java Fri Jul 25 03:55:49 2008
@@ -35,12 +35,12 @@
     private boolean isClosed = false;
 
     /**
-     * Creates a new and empty list. 
+     * Creates a new and empty list.
      */
     public InlineKnuthSequence() {
         super();
     }
-    
+
     /**
      * Creates a new list from an existing list.
      * @param list The list from which to create the new list.
@@ -84,14 +84,14 @@
     }
 
     /* (non-Javadoc)
-     * {@inheritDoc} 
+     * {@inheritDoc}
      */
     public boolean appendSequence(KnuthSequence sequence, boolean keepTogether,
                                   BreakElement breakElement) {
         return appendSequence(sequence);
     }
 
-        
+
     /* (non-Javadoc)
      * {@inheritDoc}
      */

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KeepUtil.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KeepUtil.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KeepUtil.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KeepUtil.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -46,7 +46,7 @@
             return keep.getNumber().intValue();
         }
     }
-    
+
     /**
      * Returns the combined block-level keep strength from a keep property.
      * <p>
@@ -60,7 +60,7 @@
                 getKeepStrength(keep.getWithinPage()),
                 getKeepStrength(keep.getWithinColumn()));
     }
-    
+
     /**
      * Indicates whether a keep strength indicates a keep constraint.
      * @param strength the keep strength
@@ -69,7 +69,7 @@
     public static boolean hasKeep(int strength) {
         return strength > BlockLevelLayoutManager.KEEP_AUTO;
     }
-    
+
     /**
      * Returns the penalty value to be used for a certain keep strength.
      * <ul>
@@ -90,7 +90,7 @@
         }
         return penalty;
     }
-    
+
     /**
      * Returns a string representation of a keep strength value.
      * @param keepStrength the keep strength
@@ -105,5 +105,5 @@
             return Integer.toString(keepStrength);
         }
     }
-    
+
 }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthBlockBox.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthBlockBox.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthBlockBox.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthBlockBox.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -28,7 +28,7 @@
  * Knuth box used to represent a line in block-progression-dimension (i.e. the width is its height).
  */
 public class KnuthBlockBox extends KnuthBox {
-    
+
     private MinOptMax ipdRange;
     /**
      * Natural width of the line represented by this box. In addition to ipdRange because
@@ -58,7 +58,7 @@
      * Creates a new box.
      * @param w block progression dimension of this box
      * @param list footnotes cited by elements in this box. The list contains the
-     * corresponding FootnoteBodyLayoutManagers 
+     * corresponding FootnoteBodyLayoutManagers
      * @param pos the Position stored in this box
      * @param bAux is this box auxiliary?
      */

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthBox.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthBox.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthBox.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthBox.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -23,11 +23,11 @@
  * An instance of this class represents an unbreakable piece of content with
  * fixed width: for example an image, a syllable (but only if letter spacing
  * is constant), ...
- * 
+ *
  * A KnuthBox is never a feasible breaking point.
- * 
+ *
  * The represented piece of content is never suppressed.
- * 
+ *
  * Besides the inherited methods and attributes, this class has some more
  * attributes to store information about the content height and its vertical
  * positioning, and the methods used to get them.
@@ -61,5 +61,5 @@
         sb.append(getW());
         return sb.toString();
     }
-    
+
 }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthElement.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthElement.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthElement.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthElement.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,7 +21,7 @@
 
 /**
  * This is the super class for KnuthBox, KnuthGlue and KnuthPenalty.
- * 
+ *
  * It stores information common to all sub classes, and the methods to get it:
  * the width, a Position and a boolean marking KnuthElements used for some
  * special feature (for example, the additional elements used to represent
@@ -59,21 +59,21 @@
         return width;
     }
 
-    /** @return the penalty value of this element, if applicable. */ 
+    /** @return the penalty value of this element, if applicable. */
     public int getP() {
         throw new RuntimeException("Element is not a penalty");
     }
 
-    /** @return the stretch value of this element, if applicable. */ 
+    /** @return the stretch value of this element, if applicable. */
     public int getY() {
         throw new RuntimeException("Element is not a glue");
     }
 
-    /** @return the shrink value of this element, if applicable. */ 
+    /** @return the shrink value of this element, if applicable. */
     public int getZ() {
         throw new RuntimeException("Element is not a glue");
     }
-    
+
     /** {@inheritDoc} */
     public boolean isUnresolvedElement() {
         return false;

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthGlue.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthGlue.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthGlue.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthGlue.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -20,16 +20,16 @@
 package org.apache.fop.layoutmgr;
 
 /**
- * An instance of this class represents a piece of content with adjustable 
+ * An instance of this class represents a piece of content with adjustable
  * width: for example a space between words of justified text.
- * 
+ *
  * A KnuthGlue is a feasible breaking point only if it immediately follows
  * a KnuthBox.
- * 
+ *
  * The represented piece of content is suppressed if either the KnuthGlue
  * is a chosen breaking point or there isn't any KnuthBox between the
  * previous breaking point and the KnuthGlue itself.
- * 
+ *
  * So, an unsuppressible piece of content with adjustable width, for example
  * a leader or a word with adjustable letter space, cannot be represented
  * by a single KnuthGlue; it can be represented using the sequence:
@@ -39,14 +39,14 @@
  *   KnuthBox(width = 0)
  * where the infinity penalty avoids choosing the KnuthGlue as a breaking point
  * and the 0-width KnuthBoxes prevent suppression.
- * 
+ *
  * Besides the inherited methods and attributes, this class has two attributes
  * used to store the stretchability (difference between max and opt width) and
  * the shrinkability (difference between opt and min width), and the methods
  * to get these values.
  */
 public class KnuthGlue extends KnuthElement {
-    
+
     private int stretchability;
     private int shrinkability;
     private int adjustmentClass = -1;
@@ -88,12 +88,12 @@
     public int getZ() {
         return shrinkability;
     }
-    
+
     /** @return the adjustment class (or role) of this glue. */
     public int getAdjustmentClass() {
         return adjustmentClass;
     }
-    
+
     /** {@inheritDoc} */
     public String toString() {
         StringBuffer sb = new StringBuffer(64);
@@ -109,5 +109,5 @@
         }
         return sb.toString();
     }
-    
+
 }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthPenalty.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthPenalty.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthPenalty.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthPenalty.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -24,15 +24,15 @@
 /**
  * An instance of this class represents information about a feasible
  * breaking point; it does not represent any piece of content.
- * 
+ *
  * A KnuthPenalty is a feasible breaking point unless its value is infinity;
  * a KnuthPenalty whose value is -infinity represents a forced break.
- * 
+ *
  * A KnuthPenalty is suppressed, and its width is ignored, if it is not a
  * chosen breaking point; for example, a KnuthPenalty representing a
  * hyphenation point has a width (the "-" width), which must be ignored if
  * that point is not chosen as a breaking point.
- * 
+ *
  * Besides the inherited methods and attributes, this class has two more
  * attributes and the methods used to get them: the penalty value, which is
  * a kind of "aesthetic cost" (the higher the value, the more unsightly the
@@ -45,7 +45,7 @@
     public static final int FLAGGED_PENALTY = 50;
 
     private int penalty;
-    private boolean bFlagged; 
+    private boolean bFlagged;
     private int breakClass = -1;
 
     /**
@@ -65,7 +65,7 @@
 
     /**
      * Create a new KnuthPenalty.
-     * 
+     *
      * @param w the width of this penalty
      * @param p the penalty value of this penalty
      * @param f is this penalty flagged?
@@ -102,7 +102,7 @@
     public void setP(int p) {
         this.penalty = p;
     }
-    
+
     /** @return true is this penalty is a flagged one. */
     public boolean isFlagged() {
         return bFlagged;
@@ -112,7 +112,7 @@
     public boolean isForcedBreak() {
         return penalty == -KnuthElement.INFINITE;
     }
-    
+
     /**
      * @return the break class of this penalty (EN_AUTO, EN_COLUMN, EN_PAGE, EN_EVEN_PAGE,
      * EN_ODD_PAGE)
@@ -120,7 +120,7 @@
     public int getBreakClass() {
         return breakClass;
     }
-    
+
     /**
      * Sets the break class for this penalty.
      * @param cl the break class (EN_AUTO, EN_COLUMN, EN_PAGE, EN_EVEN_PAGE, EN_ODD_PAGE)
@@ -128,7 +128,7 @@
     public void setBreakClass(int cl) {
         this.breakClass = cl;
     }
-    
+
     /** {@inheritDoc} */
     public String toString() {
         StringBuffer sb = new StringBuffer(64);
@@ -171,5 +171,5 @@
         }
         return sb.toString();
     }
-    
+
 }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthPossPosIter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthPossPosIter.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthPossPosIter.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthPossPosIter.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -35,7 +35,7 @@
         super(elementList.listIterator(startPos));
         iterCount = endPos - startPos;
     }
-    
+
     /**
      * Auxiliary constructor
      * @param elementList List of Knuth elements
@@ -45,7 +45,7 @@
     }
 
     // Check position < endPos
-    
+
     /**
      * {@inheritDoc}
      */

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthSequence.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthSequence.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthSequence.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/KnuthSequence.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -27,7 +27,7 @@
  * Represents a list of Knuth elements.
  */
 /**
- * 
+ *
  */
 public abstract class KnuthSequence extends ArrayList {
     /**
@@ -68,19 +68,19 @@
      * Append sequence to this sequence if it can be appended.
      * @param sequence The sequence that is to be appended.
      * @param keepTogether Whether the two sequences must be kept together.
-     * @param breakElement The BreakElement that may be inserted between the two sequences. 
+     * @param breakElement The BreakElement that may be inserted between the two sequences.
      * @return whether the sequence was succesfully appended to this sequence.
      */
     public abstract boolean appendSequence(KnuthSequence sequence, boolean keepTogether,
                                            BreakElement breakElement);
-    
+
     /**
      * Append sequence to this sequence if it can be appended.
      * @param sequence The sequence that is to be appended.
      * @return whether the sequence was succesfully appended to this sequence.
      */
     public abstract boolean appendSequence(KnuthSequence sequence);
-    
+
     /**
      * Append sequence to this sequence if it can be appended.
      * If that is not possible, close this sequence.
@@ -95,13 +95,13 @@
             return true;
         }
     }
-    
+
     /**
      * Append sequence to this sequence if it can be appended.
      * If that is not possible, close this sequence.
      * @param sequence The sequence that is to be appended.
      * @param keepTogether Whether the two sequences must be kept together.
-     * @param breakElement The BreakElement that may be inserted between the two sequences. 
+     * @param breakElement The BreakElement that may be inserted between the two sequences.
      * @return whether the sequence was succesfully appended to this sequence.
      */
     public boolean appendSequenceOrClose(KnuthSequence sequence, boolean keepTogether,
@@ -113,7 +113,7 @@
             return true;
         }
     }
-    
+
     /**
      * Wrap the Positions of the elements of this sequence in a Position for LayoutManager lm.
      * @param lm The LayoutManager for the Positions that will be created.
@@ -127,14 +127,14 @@
             (lm.notifyPos(new NonLeafPosition(lm, element.getPosition())));
         }
     }
-    
+
     /**
      * @return the last element of this sequence.
      */
     public ListElement getLast() {
         int idx = size();
         if (idx == 0) {
-            return null; 
+            return null;
         }
         return (ListElement) get(idx - 1);
     }
@@ -146,7 +146,7 @@
     public ListElement removeLast() {
         int idx = size();
         if (idx == 0) {
-            return null; 
+            return null;
         }
         return (ListElement) remove(idx - 1);
     }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LMiter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LMiter.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LMiter.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LMiter.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LayoutContext.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LayoutContext.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LayoutContext.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LayoutContext.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -106,15 +106,15 @@
 
     /** Current pending space-before or space-start from ancestor areas */
     private SpaceSpecifier leadingSpace;
-    
+
     /**
-     * A list of pending marks (border and padding) on the after edge when a page break occurs. 
+     * A list of pending marks (border and padding) on the after edge when a page break occurs.
      * May be null.
      */
     private List pendingAfterMarks;
-    
+
     /**
-     * A list of pending marks (border and padding) on the before edge when a page break occurs. 
+     * A list of pending marks (border and padding) on the before edge when a page break occurs.
      * May be null.
      */
     private List pendingBeforeMarks;
@@ -124,7 +124,7 @@
 
     /** Alignment in BP direction */
     private int bpAlignment = Constants.EN_START;
-    
+
     /** Stretch or shrink value when making areas. */
     private double ipdAdjust = 0.0;
 
@@ -132,12 +132,12 @@
     private double dSpaceAdjust = 0.0;
 
     private AlignmentContext alignmentContext = null;
-    
+
     /** Amount of space before / start */
     private int spaceBefore = 0;
     /** Amount of space after / end */
     private int spaceAfter = 0;
-    
+
     /** Amount of space to reserve at the beginning of each line */
     private int lineStartBorderAndPaddingWidth = 0;
     /** Amount of space to reserve at the end of each line */
@@ -146,9 +146,9 @@
     private int breakBefore;
     private int breakAfter;
 
-    private int pendingKeepWithNext = BlockLevelLayoutManager.KEEP_AUTO; 
-    private int pendingKeepWithPrevious = BlockLevelLayoutManager.KEEP_AUTO; 
-    
+    private int pendingKeepWithNext = BlockLevelLayoutManager.KEEP_AUTO;
+    private int pendingKeepWithPrevious = BlockLevelLayoutManager.KEEP_AUTO;
+
     /**
      * Copy constructor for creating child layout contexts.
      * @param parentLC the parent layout context to copy from
@@ -188,13 +188,13 @@
 
     public void copyPendingMarksFrom(LayoutContext source) {
         if (source.pendingAfterMarks != null) {
-            this.pendingAfterMarks = new java.util.ArrayList(source.pendingAfterMarks); 
+            this.pendingAfterMarks = new java.util.ArrayList(source.pendingAfterMarks);
         }
         if (source.pendingBeforeMarks != null) {
-            this.pendingBeforeMarks = new java.util.ArrayList(source.pendingBeforeMarks); 
+            this.pendingBeforeMarks = new java.util.ArrayList(source.pendingBeforeMarks);
         }
     }
-    
+
     public void setFlags(int flags) {
         setFlags(flags, true);
     }
@@ -238,7 +238,7 @@
     public int getKeepWithNextPending() {
         return this.pendingKeepWithNext;
     }
-    
+
     /**
      * Returns the strength of a keep-with-previous currently pending.
      * @return the keep-with-previous strength
@@ -246,7 +246,7 @@
     public int getKeepWithPreviousPending() {
         return this.pendingKeepWithPrevious;
     }
-    
+
     /**
      * Clears any pending keep-with-next strength.
      */
@@ -260,7 +260,7 @@
     public void clearKeepWithPreviousPending() {
         this.pendingKeepWithPrevious = BlockLevelLayoutManager.KEEP_AUTO;
     }
-    
+
     /**
      * Clears both keep-with-previous and keep-with-next strengths.
      */
@@ -292,7 +292,7 @@
     public boolean isKeepWithNextPending() {
         return getKeepWithNextPending() != BlockLevelLayoutManager.KEEP_AUTO;
     }
-    
+
     /**
      * Indicates whether a keep-with-previous constraint is pending.
      * @return true if a keep-with-previous constraint is pending
@@ -300,7 +300,7 @@
     public boolean isKeepWithPreviousPending() {
         return getKeepWithPreviousPending() != BlockLevelLayoutManager.KEEP_AUTO;
     }
-    
+
     public void setLeadingSpace(SpaceSpecifier space) {
         leadingSpace = space;
     }
@@ -333,7 +333,7 @@
         }
         this.pendingAfterMarks.add(element);
     }
-    
+
     /**
      * @return the pending border and padding elements at the after edge
      * @see #addPendingAfterMark(UnresolvedListElementWithLength)
@@ -345,7 +345,7 @@
             return null;
         }
     }
-    
+
     /**
      * Clears all pending marks on the LayoutContext.
      */
@@ -353,7 +353,7 @@
         this.pendingBeforeMarks = null;
         this.pendingAfterMarks = null;
     }
-    
+
     /**
      * Adds a border or padding element to the pending list which will be used to generate
      * the right element list for break possibilities. Conditionality resolution will be done
@@ -366,7 +366,7 @@
         }
         this.pendingBeforeMarks.add(element);
     }
-    
+
     /**
      * @return the pending border and padding elements at the before edge
      * @see #addPendingBeforeMark(UnresolvedListElementWithLength)
@@ -378,7 +378,7 @@
             return null;
         }
     }
-    
+
     /**
      * Sets the stack limit in block-progression-dimension.
      * @param limit the stack limit
@@ -419,7 +419,7 @@
         setStackLimitBP(context.getStackLimitBP());
         setStackLimitIP(context.getStackLimitIP());
     }
-    
+
     /**
      * Sets the inline-progression-dimension of the nearest ancestor reference area.
      */
@@ -429,7 +429,7 @@
 
     /**
      * Returns the inline-progression-dimension of the nearest ancestor reference area.
-     * 
+     *
      * @return the inline-progression-dimension of the nearest ancestor reference area
      */
     public int getRefIPD() {
@@ -455,12 +455,12 @@
     public void setBPAlignment(int alignment) {
         this.bpAlignment = alignment;
     }
-    
+
     /** @return the currently applicable alignment in BP direction (EN_START, EN_JUSTIFY...) */
     public int getBPAlignment() {
         return this.bpAlignment;
     }
-    
+
     public void setSpaceAdjust(double adjust) {
         dSpaceAdjust = adjust;
     }
@@ -480,7 +480,7 @@
     public void setAlignmentContext(AlignmentContext alignmentContext) {
         this.alignmentContext = alignmentContext;
     }
-    
+
     public AlignmentContext getAlignmentContext() {
         return this.alignmentContext;
     }
@@ -490,7 +490,7 @@
             this.alignmentContext = this.alignmentContext.getParentAlignmentContext();
         }
     }
-    
+
     /**
      * Get the width to be reserved for border and padding at the start of the line.
      * @return the width to be reserved
@@ -498,7 +498,7 @@
     public int getLineStartBorderAndPaddingWidth() {
         return lineStartBorderAndPaddingWidth;
     }
-    
+
     /**
      * Set the width to be reserved for border and padding at the start of the line.
      * @param lineStartBorderAndPaddingWidth the width to be reserved
@@ -506,7 +506,7 @@
     public void setLineStartBorderAndPaddingWidth(int lineStartBorderAndPaddingWidth) {
         this.lineStartBorderAndPaddingWidth = lineStartBorderAndPaddingWidth;
     }
-    
+
     /**
      * Get the width to be reserved for border and padding at the end of the line.
      * @return the width to be reserved
@@ -514,7 +514,7 @@
     public int getLineEndBorderAndPaddingWidth() {
         return lineEndBorderAndPaddingWidth;
     }
-    
+
     /**
      * Set the width to be reserved for border and padding at the end of the line.
      * @param lineEndBorderAndPaddingWidth the width to be reserved
@@ -522,7 +522,7 @@
     public void setLineEndBorderAndPaddingWidth(int lineEndBorderAndPaddingWidth) {
         this.lineEndBorderAndPaddingWidth = lineEndBorderAndPaddingWidth;
     }
-    
+
     /**
      * @return true if the current element list ends early because of a span change
      * in multi-column layout.
@@ -530,7 +530,7 @@
     public int getNextSpan() {
         return nextSpan;
     }
-    
+
     /**
      * Used to signal the PSLM that the element list ends early because of a span change in
      * multi-column layout.
@@ -544,8 +544,8 @@
                     + span);
         }
     }
-    
-    /** 
+
+    /**
      * Get the writing mode of the relevant reference area.
      * @return the applicable writing mode
      */
@@ -553,7 +553,7 @@
         return writingMode;
     }
 
-    /** 
+    /**
      * Set the writing mode.
      * @param writingMode the writing mode
      */
@@ -597,7 +597,7 @@
      * Returns the value of the break before the element whose
      * {@link LayoutManager#getNextKnuthElements(LayoutContext, int)} method has just been
      * called.
-     * 
+     *
      * @return one of {@link Constants#EN_AUTO}, {@link Constants#EN_COLUMN},
      * {@link Constants#EN_PAGE}, {@link Constants#EN_EVEN_PAGE}, or
      * {@link Constants#EN_ODD_PAGE}
@@ -608,7 +608,7 @@
 
     /**
      * Sets the value of the break before the current element.
-     * 
+     *
      * @param breakBefore the value of the break-before
      * @see #getBreakBefore()
      */
@@ -620,7 +620,7 @@
      * Returns the value of the break after the element whose
      * {@link LayoutManager#getNextKnuthElements(LayoutContext, int)} method has just been
      * called.
-     * 
+     *
      * @return one of {@link Constants#EN_AUTO}, {@link Constants#EN_COLUMN},
      * {@link Constants#EN_PAGE}, {@link Constants#EN_EVEN_PAGE}, or
      * {@link Constants#EN_ODD_PAGE}
@@ -632,7 +632,7 @@
 
     /**
      * Sets the value of the break after the current element.
-     * 
+     *
      * @param breakAfter the value of the break-after
      * @see #getBreakAfter()
      */
@@ -650,7 +650,7 @@
         + "\nTrailing Space: \t"
             + (getTrailingSpace() == null ? "null" : getTrailingSpace().toString())
         + "\nLeading Space: \t"
-            + (getLeadingSpace() == null ? "null" : getLeadingSpace().toString()) 
+            + (getLeadingSpace() == null ? "null" : getLeadingSpace().toString())
         + "\nReference IPD: \t" + getRefIPD()
         + "\nSpace Adjust: \t" + getSpaceAdjust()
         + "\nIPD Adjust: \t" + getIPDAdjust()
@@ -663,7 +663,7 @@
         + "\nKeeps: \t[keep-with-next=" + KeepUtil.keepStrengthToString(getKeepWithNextPending())
                 + "][keep-with-previous="
                 + KeepUtil.keepStrengthToString(getKeepWithPreviousPending()) + "] pending"
-        + "\nBreaks: \tforced [" + (breakBefore != Constants.EN_AUTO ? "break-before" : "") + "][" 
+        + "\nBreaks: \tforced [" + (breakBefore != Constants.EN_AUTO ? "break-before" : "") + "]["
         + (breakAfter != Constants.EN_AUTO ? "break-after" : "") + "]";
     }
 

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LayoutException.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LayoutException.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LayoutException.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LayoutException.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -28,13 +28,13 @@
 /**
  * Exception thrown by FOP if an unrecoverable layout error occurs. An example: An area overflows
  * a viewport that has overflow="error-if-overflow".
- * 
+ *
  * @todo Discuss if this should become a checked exception.
  */
 public class LayoutException extends RuntimeException {
 
     private static final long serialVersionUID = 5157080040923740433L;
-    
+
     private String localizedMessage;
     private LayoutManager layoutManager;
 
@@ -80,7 +80,7 @@
     public LayoutManager getLayoutManager() {
         return this.layoutManager;
     }
-    
+
     /** Exception factory for {@link LayoutException}. */
     public static class LayoutExceptionFactory implements ExceptionFactory {
 
@@ -95,11 +95,11 @@
             }
             return ex;
         }
-        
+
         /** {@inheritDoc} */
         public Class getExceptionClass() {
             return LayoutException.class;
         }
-        
-    }    
+
+    }
 }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LayoutManager.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LayoutManager.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LayoutManager.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
  */
 
 /* $Id$ */
- 
+
 package org.apache.fop.layoutmgr;
 
 import java.util.List;
@@ -45,11 +45,11 @@
     LayoutManager getParent();
 
     /**
-     * initialize the layout manager. Allows each layout manager 
+     * initialize the layout manager. Allows each layout manager
      * to calculate often used values.
      */
     void initialize();
-    
+
     /**
      * Get the active PageSequenceLayoutManager instance for this
      * layout process.
@@ -130,9 +130,9 @@
     void addChildLMs(List newLMs);
 
     /**
-     * Get a sequence of KnuthElements representing the content 
+     * Get a sequence of KnuthElements representing the content
      * of the node assigned to the LM
-     * 
+     *
      * @param context   the LayoutContext used to store layout information
      * @param alignment the desired text alignment
      * @return          the list of KnuthElements
@@ -140,54 +140,54 @@
     List getNextKnuthElements(LayoutContext context, int alignment);
 
     /**
-     * Get a sequence of KnuthElements representing the content 
+     * Get a sequence of KnuthElements representing the content
      * of the node assigned to the LM, after changes have been applied
      *
      * In the context of line breaking, this method is called after hyphenation has
-     * been performed, in order to receive the sequence of elements representing the 
+     * been performed, in order to receive the sequence of elements representing the
      * text together with all possible hyphenation points.
      * For example, if the text "representation" originates a single box element
      * when getNextKnuthElements() is called, it will be now split in syllables
      * (rep-re-sen-ta-tion) each one originating a box and divided by additional
      * elements allowing a line break.
-     * 
+     *
      * In the context of page breaking, this method is called only if the pages need
      * to be "vertically justified" modifying (also) the quantity of lines created by
      * the paragraphs, and after a first page breaking has been performed.
      * According to the result of the first page breaking, each paragraph now knows
-     * how many lines it must create (among the existing layout possibilities) and 
+     * how many lines it must create (among the existing layout possibilities) and
      * has to create a sequence of elements representing this layout; in particular,
      * each box, representing a line, will contain a LineBreakPositions that will be
      * used in the addAreas() phase.
-     * 
+     *
      * LMs having children look at the old list of elements in order to know which
      * ones they must get the new elements from, as break conditions of preserved
-     * linefeeds can divide children into smaller groups (page sequences or 
+     * linefeeds can divide children into smaller groups (page sequences or
      * paragraphs).
      * LMs having no children can simply return the old elements if they have nothing
      * to change.
      *
      * Inline LMs need to know the text alignment because it affects the elements
      * representing feasible breaks between syllables.
-     * 
+     *
      * @param oldList        the elements to replace
      * @param alignment      the desired text alignment
      * @return               the updated list of KnuthElements
      */
     List getChangedKnuthElements(List oldList, int alignment);
-    
+
     /**
      * Returns the IPD of the content area
      * @return the IPD of the content area
      */
     int getContentAreaIPD();
-   
+
     /**
      * Returns the BPD of the content area
      * @return the BPD of the content area
      */
     int getContentAreaBPD();
-   
+
     /**
      * Returns an indication if the layout manager generates a reference area.
      * @return True if the layout manager generates a reference area
@@ -205,13 +205,13 @@
      * @return True if the layout manager generates a line area
      */
     boolean getGeneratesLineArea();
-    
+
     /**
      * Returns the fo this layout manager is associated with.
      * @return The fo for this layout manager or null.
      */
     FObj getFObj();
-    
+
     /**
      * Adds a Position to the Position participating in the first|last determination by assigning
      * it a unique position index.

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LayoutManagerMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LayoutManagerMaker.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LayoutManagerMaker.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LayoutManagerMaker.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -34,7 +34,7 @@
  * The interface for all LayoutManager makers
  */
 public interface LayoutManagerMaker {
-    
+
     /**
      * Make LayoutManagers for the node and add them to the list lms.
      * @param node the FO node for which the LayoutManagers are made

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LayoutManagerMapping.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LayoutManagerMapping.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LayoutManagerMapping.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LayoutManagerMapping.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -145,7 +145,7 @@
     }
 
     /**
-     * {@inheritDoc} 
+     * {@inheritDoc}
      */
     public void makeLayoutManagers(FONode node, List lms) {
         Maker maker = (Maker) makers.get(node.getClass());
@@ -175,7 +175,7 @@
         } else if (lms.size() > 1) {
             throw new IllegalStateException("Duplicate LayoutManagers for class "
                                    + node.getClass()
-                                   + " found, only one may be declared."); 
+                                   + " found, only one may be declared.");
         }
         return (LayoutManager) lms.get(0);
     }
@@ -186,7 +186,7 @@
     }
 
     /*
-     * {@inheritDoc} 
+     * {@inheritDoc}
      */
     public FlowLayoutManager makeFlowLayoutManager(
             PageSequenceLayoutManager pslm, Flow flow) {
@@ -194,21 +194,21 @@
     }
 
     /*
-     * {@inheritDoc} 
+     * {@inheritDoc}
      */
     public ContentLayoutManager makeContentLayoutManager(PageSequenceLayoutManager pslm,
                                                          Title title) {
         return new ContentLayoutManager(pslm, title);
     }
-    
+
     /*
-     * {@inheritDoc} 
+     * {@inheritDoc}
      */
     public StaticContentLayoutManager makeStaticContentLayoutManager(
             PageSequenceLayoutManager pslm, StaticContent sc, SideRegion reg) {
         return new StaticContentLayoutManager(pslm, sc, reg);
     }
-    
+
     /** {@inheritDoc} */
     public StaticContentLayoutManager makeStaticContentLayoutManager(
         PageSequenceLayoutManager pslm, StaticContent sc, org.apache.fop.area.Block block) {
@@ -321,7 +321,7 @@
     public static class ListItemLayoutManagerMaker extends Maker {
          public void make(FONode node, List lms) {
              lms.add(new ListItemLayoutManager((ListItem) node));
-         }      
+         }
     }
 
     public static class ListBlockLayoutManagerMaker extends Maker {
@@ -353,7 +353,7 @@
            lms.add(new PageNumberCitationLastLayoutManager((PageNumberCitationLast) node));
         }
     }
-    
+
     public static class TableLayoutManagerMaker extends Maker {
         public void make(FONode node, List lms) {
             Table table = (Table) node;
@@ -361,7 +361,7 @@
             lms.add(tlm);
         }
     }
-     
+
     public class RetrieveMarkerLayoutManagerMaker extends Maker {
         public void make(FONode node, List lms) {
             Iterator baseIter;
@@ -373,7 +373,7 @@
                 FONode child = (FONode) baseIter.next();
                 makeLayoutManagers(child, lms);
             }
-        }       
+        }
     }
 
     public class WrapperLayoutManagerMaker extends Maker {
@@ -390,7 +390,7 @@
                 FONode child = (FONode) baseIter.next();
                 makeLayoutManagers(child, lms);
             }
-        }       
+        }
     }
 
     public ExternalDocumentLayoutManager makeExternalDocumentLayoutManager(

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LeafPosition.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LeafPosition.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LeafPosition.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/LeafPosition.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
  */
 
 /* $Id$ */
- 
+
 package org.apache.fop.layoutmgr;
 
 public class LeafPosition extends Position {
@@ -31,11 +31,11 @@
     public int getLeafPos() {
         return iLeafPos;
     }
-    
+
     public boolean generatesAreas() {
         return getLM() != null;
     }
-    
+
     /** {@inheritDoc} */
     public String toString() {
         StringBuffer sb = new StringBuffer();

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/ListElement.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/ListElement.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/ListElement.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/ListElement.java Fri Jul 25 03:55:49 2008
@@ -23,12 +23,12 @@
  * This class is the base class for all kinds of elements that are added to element lists. There
  * are basically two kinds of list elements: Knuth elements and unresolved elements like spaces,
  * border and padding elements which are converted to Knuth elements prior to the breaking
- * process. 
+ * process.
  */
 public abstract class ListElement {
 
     private Position position;
-    
+
     /**
      * Main constructor
      * @param position the Position instance needed by the addAreas stage of the LMs.
@@ -36,14 +36,14 @@
     public ListElement(Position position) {
         this.position = position;
     }
-    
+
     /**
      * @return the Position instance for this element.
      */
     public Position getPosition() {
         return this.position;
     }
-    
+
     /**
      * Change the Position stored in this element.
      * @param position the Position instance
@@ -78,14 +78,14 @@
         return false;
     }
 
-    /** @return true if the element is a penalty and represents a forced break. */ 
+    /** @return true if the element is a penalty and represents a forced break. */
     public boolean isForcedBreak() {
         return false;
     }
 
-    /** @return true if the element is an unresolved element such as a space or a border. */ 
+    /** @return true if the element is an unresolved element such as a space or a border. */
     public boolean isUnresolvedElement() {
         return true;
     }
-    
+
 }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/MinOptMaxUtil.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/MinOptMaxUtil.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/MinOptMaxUtil.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/MinOptMaxUtil.java Fri Jul 25 03:55:49 2008
@@ -35,7 +35,7 @@
      * @param lr restricting source
      * @param context Percentage evaluation context
      */
-    public static void restrict(MinOptMax mom, LengthRangeProperty lr, 
+    public static void restrict(MinOptMax mom, LengthRangeProperty lr,
                                 PercentBaseContext context) {
         if (lr.getEnum() != Constants.EN_AUTO) {
             if (lr.getMinimum(context).getEnum() != Constants.EN_AUTO) {
@@ -70,7 +70,7 @@
     /**
      * Extends the minimum length to the given length if necessary, and adjusts opt and
      * max accordingly.
-     * 
+     *
      * @param mom the min/opt/max trait
      * @param len the new minimum length
      */
@@ -81,7 +81,7 @@
             mom.max = Math.max(mom.opt, mom.max);
         }
     }
-    
+
     /**
      * After a calculation on a MinOptMax, this can be called to set opt to
      * a new effective value.
@@ -95,7 +95,7 @@
             }
         }
     }
-    
+
     /**
      * Converts a LengthRangeProperty to a MinOptMax.
      * @param prop LengthRangeProperty
@@ -104,14 +104,14 @@
      */
     public static MinOptMax toMinOptMax(LengthRangeProperty prop, PercentBaseContext context) {
         MinOptMax mom = new MinOptMax(
-                (prop.getMinimum(context).isAuto() 
+                (prop.getMinimum(context).isAuto()
                         ? 0 : prop.getMinimum(context).getLength().getValue(context)),
-                (prop.getOptimum(context).isAuto() 
+                (prop.getOptimum(context).isAuto()
                         ? 0 : prop.getOptimum(context).getLength().getValue(context)),
-                (prop.getMaximum(context).isAuto() 
-                        ? Integer.MAX_VALUE 
+                (prop.getMaximum(context).isAuto()
+                        ? Integer.MAX_VALUE
                         : prop.getMaximum(context).getLength().getValue(context)));
         return mom;
     }
-    
+
 }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/NonLeafPosition.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/NonLeafPosition.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/NonLeafPosition.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/NonLeafPosition.java Fri Jul 25 03:55:49 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
  */
 
 /* $Id$ */
- 
+
 package org.apache.fop.layoutmgr;
 
 public class NonLeafPosition extends Position {
@@ -31,11 +31,11 @@
     public Position getPosition() {
         return subPos;
     }
-    
+
     public boolean generatesAreas() {
         return (subPos != null ? subPos.generatesAreas() : false);
     }
-    
+
     /** {@inheritDoc} */
     public String toString() {
         StringBuffer sb = new StringBuffer();

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/PaddingElement.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/PaddingElement.java?rev=679758&r1=679757&r2=679758&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/PaddingElement.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/layoutmgr/PaddingElement.java Fri Jul 25 03:55:49 2008
@@ -42,10 +42,10 @@
             boolean isFirst, boolean isLast, PercentBaseContext context) {
         super(position, condLength, side, isFirst, isLast, context);
     }
-    
+
     /** {@inheritDoc} */
     public void notifyLayoutManager(MinOptMax effectiveLength) {
-        LayoutManager lm = getOriginatingLayoutManager(); 
+        LayoutManager lm = getOriginatingLayoutManager();
         if (lm instanceof ConditionalElementListener) {
             ((ConditionalElementListener)lm).notifyPadding(
                     getSide(), effectiveLength);
@@ -62,5 +62,5 @@
         sb.append("]");
         return sb.toString();
     }
-    
+
 }



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


Mime
View raw message