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 vh...@apache.org on 2008/07/24 11:37:16 UTC

svn commit: r679326 [18/33] - in /xmlgraphics/fop/trunk: examples/embedding/java/embedding/ examples/embedding/java/embedding/events/ examples/embedding/java/embedding/intermediate/ examples/embedding/java/embedding/model/ examples/embedding/java/embed...

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineLayoutManager.java Thu Jul 24 02:35:34 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.
@@ -92,7 +92,7 @@
     protected SpaceProperty lineHeight;
     /** The keep-together property */
     //private KeepProperty keepTogether;
-    
+
     private AlignmentContext alignmentContext = null;
 
     /**
@@ -106,26 +106,26 @@
     public InlineLayoutManager(InlineLevel node) {
         super(node);
     }
-    
+
     private Inline getInlineFO() {
         return (Inline) fobj;
     }
-    
+
     /** {@inheritDoc} */
     public void initialize() {
         InlineLevel fobj = (InlineLevel) this.fobj;
 
         int padding = 0;
-        
+
         FontInfo fi = fobj.getFOEventHandler().getFontInfo();
         CommonFont commonFont = fobj.getCommonFont();
         FontTriplet[] fontkeys = commonFont.getFontState(fi);
         font = fi.getFontInstance(fontkeys[0], commonFont.fontSize.getValue(this));
-        
+
         lineHeight = fobj.getLineHeight();
         borderProps = fobj.getCommonBorderPaddingBackground();
         inlineProps = fobj.getCommonMarginInline();
-        
+
         if (fobj instanceof Inline) {
             alignmentAdjust = ((Inline)fobj).getAlignmentAdjust();
             alignmentBaseline = ((Inline)fobj).getAlignmentBaseline();
@@ -152,13 +152,13 @@
     protected MinOptMax getExtraIPD(boolean isNotFirst, boolean isNotLast) {
         int borderAndPadding = 0;
         if (borderProps != null) {
-            borderAndPadding 
+            borderAndPadding
                 = borderProps.getPadding(CommonBorderPaddingBackground.START, isNotFirst, this);
-            borderAndPadding 
+            borderAndPadding
                 += borderProps.getBorderWidth(CommonBorderPaddingBackground.START, isNotFirst);
-            borderAndPadding 
+            borderAndPadding
                 += borderProps.getPadding(CommonBorderPaddingBackground.END, isNotLast, this);
-            borderAndPadding 
+            borderAndPadding
                 += borderProps.getBorderWidth(CommonBorderPaddingBackground.END, isNotLast);
         }
         return new MinOptMax(borderAndPadding);
@@ -189,11 +189,11 @@
     protected SpaceProperty getSpaceEnd() {
         return inlineProps != null ? inlineProps.spaceEnd : null;
     }
-    
-    /** 
-     * Create and initialize an <code>InlineArea</code> 
-     * 
-     * @param hasInlineParent   true if the parent is an inline 
+
+    /**
+     * Create and initialize an <code>InlineArea</code>
+     *
+     * @param hasInlineParent   true if the parent is an inline
      * @return the area
      */
     protected InlineArea createArea(boolean hasInlineParent) {
@@ -209,7 +209,7 @@
         }
         return area;
     }
-    
+
     /** {@inheritDoc} */
     protected void setTraits(boolean isNotFirst, boolean isNotLast) {
         if (borderProps != null) {
@@ -232,7 +232,7 @@
             return ((BlockLevelLayoutManager) lm).mustKeepTogether();
         } else if (lm instanceof InlineLayoutManager) {
             return ((InlineLayoutManager) lm).mustKeepTogether();
-        } else { 
+        } else {
             return mustKeepTogether(lm.getParent());
         }
     }
@@ -249,12 +249,12 @@
         KnuthSequence lastSequence = null;
 
         SpaceSpecifier leadingSpace = context.getLeadingSpace();
-        
+
         if (fobj instanceof Title) {
             alignmentContext = new AlignmentContext(font,
                                     lineHeight.getOptimum(this).getLength().getValue(this),
                                     context.getWritingMode());
-                                                    
+
         } else {
             alignmentContext = new AlignmentContext(font
                                     , lineHeight.getOptimum(this).getLength().getValue(this)
@@ -264,7 +264,7 @@
                                     , dominantBaseline
                                     , context.getAlignmentContext());
         }
-        
+
         childLC = new LayoutContext(context);
         childLC.setAlignmentContext(alignmentContext);
 
@@ -300,9 +300,9 @@
                 + borderProps.getBorderEndWidth(true)
              );
         }
-        
+
         while ((curLM = getChildLM()) != null) {
-            
+
             if (!(curLM instanceof InlineLevelLayoutManager)) {
                 // A block LM
                 // Leave room for start/end border and padding
@@ -314,7 +314,7 @@
                             - borderProps.getBorderEndWidth(hasNextChildLM()));
                 }
             }
-            
+
             // get KnuthElements from curLM
             returnedList = curLM.getNextKnuthElements(childLC, alignment);
             if (returnList.isEmpty() && childLC.isKeepWithPreviousPending()) {
@@ -326,7 +326,7 @@
                 // just iterate once more to see if there is another child
                 continue;
             }
-            
+
             if (curLM instanceof InlineLevelLayoutManager) {
                 context.clearKeepWithNextPending();
                 // "wrap" the Position stored in each element of returnedList
@@ -375,31 +375,31 @@
             lastSequence = (KnuthSequence) ListUtil.getLast(returnList);
             lastChildLM = curLM;
         }
-        
+
         if (lastSequence != null) {
             addKnuthElementsForBorderPaddingEnd(lastSequence);
         }
 
         setFinished(true);
         log.trace(trace);
-        
+
         if (returnList.isEmpty()) {
             /*
-             * if the FO itself is empty, but has an id specified 
+             * if the FO itself is empty, but has an id specified
              * or associated fo:markers, then we still need a dummy
              * sequence to register its position in the area tree
              */
             if (fobj.hasId() || fobj.hasMarkers()) {
                 InlineKnuthSequence emptySeq = new InlineKnuthSequence();
                 emptySeq.add(new KnuthInlineBox(
-                                0, 
-                                alignmentContext, 
-                                notifyPos(getAuxiliaryPosition()), 
+                                0,
+                                alignmentContext,
+                                notifyPos(getAuxiliaryPosition()),
                                 true));
                 returnList.add(emptySeq);
             }
         }
-        
+
         return returnList.isEmpty() ? null : returnList;
     }
 
@@ -414,7 +414,7 @@
      */
     public void addAreas(PositionIterator parentIter,
                          LayoutContext context) {
-        
+
         addId();
 
         setChildContext(new LayoutContext(context)); // Store current value
@@ -454,11 +454,11 @@
         }*/
 
         addMarkersToPage(
-                true, 
-                !areaCreated, 
+                true,
+                !areaCreated,
                 lastPos == null || isLast(lastPos));
-        
-        InlineArea parent = createArea(lastLM == null 
+
+        InlineArea parent = createArea(lastLM == null
                                         || lastLM instanceof InlineLevelLayoutManager);
         parent.setBPD(alignmentContext.getHeight());
         if (parent instanceof InlineParent) {
@@ -472,7 +472,7 @@
             }
         }
         setCurrentArea(parent);
-        
+
         StackingIter childPosIter
             = new StackingIter(positionList.listIterator());
 
@@ -487,7 +487,7 @@
             prevLM = childLM;
         }
 
-        
+
         /* If this LM has a trailing fence, resolve trailing space
          * specs from descendants.  Otherwise, propagate any trailing
          * space specs to the parent LM via the layout context.  If
@@ -496,7 +496,7 @@
          * must be the last area for the current LM too.
          */
         boolean isLast = (getContext().isLastArea() && prevLM == lastChildLM);
-        
+
         if (hasTrailingFence(isLast)) {
             addSpace(getCurrentArea(),
                      getContext().getTrailingSpace().resolve(false),
@@ -510,17 +510,17 @@
         if (context.getTrailingSpace() != null  && getSpaceEnd() != null) {
             context.getTrailingSpace().addSpace(new SpaceVal(getSpaceEnd(), this));
         }
-        
+
         // Not sure if lastPos can legally be null or if that masks a different problem.
         // But it seems to fix bug 38053.
         setTraits(areaCreated, lastPos == null || !isLast(lastPos));
         parentLM.addChildArea(getCurrentArea());
 
         addMarkersToPage(
-                false, 
-                !areaCreated, 
+                false,
+                !areaCreated,
                 lastPos == null || isLast(lastPos));
-        
+
         context.setFlags(LayoutContext.LAST_AREA, isLast);
         areaCreated = true;
         checkEndOfLayout(lastPos);
@@ -545,7 +545,7 @@
         addKnuthElementsForBorderPaddingEnd(returnedList);
         return returnedList;
     }
-    
+
     /**
      * Creates Knuth elements for start border padding and adds them to the return list.
      * @param returnList return list to add the additional elements to
@@ -604,5 +604,5 @@
         //}
         return this.auxiliaryPosition;
     }
-    
+
 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineLevelEventProducer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineLevelEventProducer.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineLevelEventProducer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineLevelEventProducer.java Thu Jul 24 02:35:34 2008
@@ -33,7 +33,7 @@
      * Provider class for the event producer.
      */
     class Provider {
-        
+
         /**
          * Returns an event producer.
          * @param broadcaster the event broadcaster to use
@@ -52,7 +52,7 @@
      * @event.severity ERROR
      */
     void leaderWithoutContent(Object source, Locator loc);
-    
+
     /**
      * A line overflows.
      * @param source the event source
@@ -62,5 +62,5 @@
      * @event.severity WARN
      */
     void lineOverflows(Object source, int line, int overflowLength, Locator loc);
-    
+
 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineLevelLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineLevelLayoutManager.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineLevelLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineLevelLayoutManager.java Thu Jul 24 02:35:34 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.inline;
 
 import java.util.List;
@@ -30,7 +30,7 @@
 public interface InlineLevelLayoutManager extends LayoutManager {
 
     /**
-     * Tell the LM to modify its data, adding a letter space 
+     * Tell the LM to modify its data, adding a letter space
      * to the word fragment represented by the given elements,
      * and returning the corrected elements
      *
@@ -40,7 +40,7 @@
     List addALetterSpaceTo(List oldList);
 
     /**
-     * Tell the LM to modify its data, removing the word space 
+     * Tell the LM to modify its data, removing the word space
      * represented by the given elements
      *
      * @param oldList the elements representing the word space

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InlineStackingLayoutManager.java Thu Jul 24 02:35:34 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.
@@ -43,7 +43,7 @@
  * which stack children in the inline direction, such as Inline or
  * Line. It should not be instantiated directly.
  */
-public abstract class InlineStackingLayoutManager extends AbstractLayoutManager 
+public abstract class InlineStackingLayoutManager extends AbstractLayoutManager
                                          implements InlineLevelLayoutManager {
 
 
@@ -103,7 +103,7 @@
     }
 
     /**
-     * Returns the extra IPD needed for any leading or trailing fences for the 
+     * Returns the extra IPD needed for any leading or trailing fences for the
      * current area.
      * @param bNotFirst true if not the first area for this layout manager
      * @param bNotLast true if not the last area for this layout manager
@@ -139,7 +139,7 @@
     protected SpaceProperty getSpaceStart() {
         return null;
     }
-    
+
     /**
      * Get the space at the end of the inline area.
      * @return the space property describing the space
@@ -246,7 +246,7 @@
 
         // The last element may not have a layout manager (its position == null);
         // this may happen if it is a padding box; see bug 39571.
-        InlineLevelLayoutManager LM = 
+        InlineLevelLayoutManager LM =
             (InlineLevelLayoutManager) element.getLayoutManager();
         if (LM != null) {
             oldList = LM.addALetterSpaceTo(oldList);
@@ -362,7 +362,7 @@
     }
 
     /**
-     * {@inheritDoc} 
+     * {@inheritDoc}
      */
     public List getChangedKnuthElements(List oldList, int alignment) {
         // "unwrap" the Positions stored in the elements

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InstreamForeignObjectLM.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InstreamForeignObjectLM.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InstreamForeignObjectLM.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/InstreamForeignObjectLM.java Thu Jul 24 02:35:34 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,10 +28,10 @@
  * LayoutManager for the fo:instream-foreign-object formatting object
  */
 public class InstreamForeignObjectLM extends AbstractGraphicsLayoutManager {
-    
+
     /**
      * Constructor.
-     * 
+     *
      * @param node
      *            the formatting object that creates this area
      */
@@ -48,6 +48,6 @@
 
         return new ForeignObject(doc, ns);
     }
-    
+
 }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/KnuthInlineBox.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/KnuthInlineBox.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/KnuthInlineBox.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/KnuthInlineBox.java Thu Jul 24 02:35:34 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.
@@ -25,7 +25,7 @@
 import org.apache.fop.layoutmgr.Position;
 
 public class KnuthInlineBox extends KnuthBox {
-    
+
     private FootnoteBodyLayoutManager footnoteBodyLM = null;
     private AlignmentContext alignmentContext = null;
 
@@ -69,8 +69,8 @@
     public boolean isAnchor() {
         return (footnoteBodyLM != null);
     }
-    
-    
+
+
     /** {@inheritDoc} */
     public String toString() {
         StringBuffer sb = new StringBuffer(super.toString());

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LeaderLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LeaderLayoutManager.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LeaderLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LeaderLayoutManager.java Thu Jul 24 02:35:34 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.
@@ -51,10 +51,10 @@
 public class LeaderLayoutManager extends LeafNodeLayoutManager {
     private Leader fobj;
     private Font font = null;
-    
+
     private List contentList = null;
     private ContentLayoutManager clm = null;
-    
+
     private int contentAreaIPD = 0;
 
     /**
@@ -66,7 +66,7 @@
         super(node);
         fobj = node;
     }
-    
+
     /** {@inheritDoc} */
     public void initialize() {
         FontInfo fi = fobj.getFOEventHandler().getFontInfo();
@@ -117,7 +117,7 @@
 
         if (fobj.getLeaderPattern() == EN_RULE) {
             if (fobj.getRuleStyle() != EN_NONE) {
-                org.apache.fop.area.inline.Leader leader 
+                org.apache.fop.area.inline.Leader leader
                     = new org.apache.fop.area.inline.Leader();
                 leader.setRuleStyle(fobj.getRuleStyle());
                 leader.setRuleThickness(fobj.getRuleThickness().getValue(this));
@@ -167,7 +167,7 @@
 
             // child FOs are assigned to the InlineStackingLM
             fobjIter = null;
-            
+
             // get breaks then add areas to FilledArea
             FilledArea fa = new FilledArea();
 
@@ -262,7 +262,7 @@
         curArea.setAdjustingInfo(ipd.max - ipd.opt, ipd.opt - ipd.min, 0);
 
         addKnuthElementsForBorderPaddingStart(seq);
-        
+
         // node is a fo:Leader
         seq.add(new KnuthInlineBox(0, alignmentContext,
                                     new LeafPosition(this, -1), true));
@@ -272,20 +272,20 @@
             seq.add
                 (new KnuthGlue(areaInfo.ipdArea.opt,
                                areaInfo.ipdArea.max - areaInfo.ipdArea.opt,
-                               areaInfo.ipdArea.opt - areaInfo.ipdArea.min, 
+                               areaInfo.ipdArea.opt - areaInfo.ipdArea.min,
                                new LeafPosition(this, 0), false));
         } else {
             seq.add
                 (new KnuthGlue(areaInfo.ipdArea.opt,
                                0,
-                               0, 
+                               0,
                                new LeafPosition(this, 0), false));
         }
         seq.add(new KnuthInlineBox(0, alignmentContext,
                                     new LeafPosition(this, -1), true));
 
         addKnuthElementsForBorderPaddingEnd(seq);
-        
+
         LinkedList returnList = new LinkedList();
         returnList.add(seq);
         setFinished(true);
@@ -314,7 +314,7 @@
         List returnList = new LinkedList();
 
         addKnuthElementsForBorderPaddingStart(returnList);
-        
+
         returnList.add(new KnuthInlineBox(0, areaInfo.alignmentContext,
                                     new LeafPosition(this, -1), true));
         returnList.add(new KnuthPenalty(0, KnuthElement.INFINITE, false,
@@ -323,20 +323,20 @@
             returnList.add
                 (new KnuthGlue(areaInfo.ipdArea.opt,
                                areaInfo.ipdArea.max - areaInfo.ipdArea.opt,
-                               areaInfo.ipdArea.opt - areaInfo.ipdArea.min, 
+                               areaInfo.ipdArea.opt - areaInfo.ipdArea.min,
                                new LeafPosition(this, 0), false));
         } else {
             returnList.add
                 (new KnuthGlue(areaInfo.ipdArea.opt,
                                0,
-                               0, 
+                               0,
                                new LeafPosition(this, 0), false));
         }
         returnList.add(new KnuthInlineBox(0, areaInfo.alignmentContext,
                                     new LeafPosition(this, -1), true));
 
         addKnuthElementsForBorderPaddingEnd(returnList);
-        
+
         setFinished(true);
         return returnList;
     }
@@ -353,9 +353,9 @@
     public int getContentAreaIPD() {
         return contentAreaIPD;
     }
-   
+
     private void setContentAreaIPD(int contentAreaIPD) {
         this.contentAreaIPD = contentAreaIPD;
     }
-    
+
 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LeafNodeLayoutManager.java Thu Jul 24 02:35:34 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.
@@ -48,7 +48,7 @@
  * This class can be extended to handle the creation and adding of the
  * inline area.
  */
-public abstract class LeafNodeLayoutManager extends AbstractLayoutManager 
+public abstract class LeafNodeLayoutManager extends AbstractLayoutManager
                                    implements InlineLevelLayoutManager {
 
     /**
@@ -64,7 +64,7 @@
     protected CommonBorderPaddingBackground commonBorderPaddingBackground = null;
     /** The alignment context applying to this area */
     protected AlignmentContext alignmentContext = null;
-    
+
     /** Flag to indicate if something was changed as part of the getChangeKnuthElements sequence */
     protected boolean isSomethingChanged = false;
     /** Our area info for the Knuth elements */
@@ -86,7 +86,7 @@
             bHyphenated = bHyph;
             this.alignmentContext = alignmentContext;
         }
-        
+
     }
 
 
@@ -201,7 +201,7 @@
     protected InlineArea getEffectiveArea() {
         return curArea;
     }
-    
+
     /**
      * Offset this area.
      * Offset the inline area in the bpd direction when adding the
@@ -247,18 +247,18 @@
         area.setIPD(width);
         area.setAdjustment(width - areaInfo.ipdArea.opt);
     }
-    
+
     /** {@inheritDoc} */
     public List getNextKnuthElements(LayoutContext context, int alignment) {
         curArea = get(context);
-        
+
         if (curArea == null) {
             setFinished(true);
             return null;
         }
 
         alignmentContext = makeAlignmentContext(context);
-        
+
         MinOptMax ipd = getAllocationIPD(context.getRefIPD());
 
         // create the AreaInfo object to store the computed values
@@ -269,12 +269,12 @@
         KnuthSequence seq = new InlineKnuthSequence();
 
         addKnuthElementsForBorderPaddingStart(seq);
-        
+
         seq.add(new KnuthInlineBox(areaInfo.ipdArea.opt, alignmentContext,
                                     notifyPos(new LeafPosition(this, 0)), false));
 
         addKnuthElementsForBorderPaddingEnd(seq);
-        
+
         LinkedList returnList = new LinkedList();
 
         returnList.add(seq);
@@ -322,18 +322,18 @@
         LinkedList returnList = new LinkedList();
 
         addKnuthElementsForBorderPaddingStart(returnList);
-        
+
         // fobj is a fo:ExternalGraphic, fo:InstreamForeignObject,
         // fo:PageNumber or fo:PageNumberCitation
-        returnList.add(new KnuthInlineBox(areaInfo.ipdArea.opt, areaInfo.alignmentContext, 
+        returnList.add(new KnuthInlineBox(areaInfo.ipdArea.opt, areaInfo.alignmentContext,
                                           notifyPos(new LeafPosition(this, 0)), true));
 
         addKnuthElementsForBorderPaddingEnd(returnList);
-        
+
         setFinished(true);
         return returnList;
     }
-    
+
     /**
      * Creates Knuth elements for start border padding and adds them to the return list.
      * @param returnList return list to add the additional elements to
@@ -345,7 +345,7 @@
                          + commonBorderPaddingBackground.getPaddingStart(false, this);
             if (ipStart > 0) {
                 // Add a non breakable glue
-                returnList.add(new KnuthPenalty(0, KnuthPenalty.INFINITE, 
+                returnList.add(new KnuthPenalty(0, KnuthPenalty.INFINITE,
                                                 false, new LeafPosition(this, -1), true));
                 returnList.add(new KnuthGlue(ipStart, 0, 0, new LeafPosition(this, -1), true));
             }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java Thu Jul 24 02:35:34 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.
@@ -75,7 +75,7 @@
  * creates a line area to contain the inline areas added by the
  * child layout managers.
  */
-public class LineLayoutManager extends InlineStackingLayoutManager 
+public class LineLayoutManager extends InlineStackingLayoutManager
                                implements BlockLevelLayoutManager {
 
     /**
@@ -85,7 +85,7 @@
 
     private Block fobj;
     private boolean isFirstInBlock;
-    
+
     /** {@inheritDoc} */
     public void initialize() {
         textAlignment = fobj.getTextAlign();
@@ -108,7 +108,7 @@
             return textAlignment;
         }
     }
-    
+
     /**
      * Private class to store information about inline breaks.
      * Each value holds the start and end indexes into a List of
@@ -148,7 +148,7 @@
             spaceAfter = sa;
             baseline = bl;
         }
-        
+
     }
 
 
@@ -181,7 +181,7 @@
 
     /**
      * this constant is used to create elements when text-align is center:
-     * every TextLM descendant of LineLM must use the same value, 
+     * every TextLM descendant of LineLM must use the same value,
      * otherwise the line breaking algorithm does not find the right
      * break point
      */
@@ -205,7 +205,7 @@
 
     // this class represents a paragraph
     private class Paragraph extends InlineKnuthSequence {
-        /** Number of elements to ignore at the beginning of the list. */ 
+        /** Number of elements to ignore at the beginning of the list. */
         private int ignoreAtStart = 0;
         /** Number of elements to ignore at the end of the list. */
         private int ignoreAtEnd = 0;
@@ -233,11 +233,11 @@
             // set the minimum amount of empty space at the end of the
             // last line
             if (textAlignment == EN_CENTER) {
-                lineFiller = new MinOptMax(lastLineEndIndent); 
+                lineFiller = new MinOptMax(lastLineEndIndent);
             } else {
-                lineFiller = new MinOptMax(lastLineEndIndent, 
-                                            lastLineEndIndent, 
-                                            layoutManager.iLineWidth); 
+                lineFiller = new MinOptMax(lastLineEndIndent,
+                                            lastLineEndIndent,
+                                            layoutManager.iLineWidth);
             }
 
             // add auxiliary elements at the beginning of the paragraph
@@ -251,7 +251,7 @@
             // at the beginning of the first paragraph
             if (isFirstInBlock && knuthParagraphs.size() == 0
                         && textIndent != 0) {
-                this.add(new KnuthInlineBox(textIndent, null, 
+                this.add(new KnuthInlineBox(textIndent, null,
                                       null, false));
                 ignoreAtStart++;
             }
@@ -277,10 +277,10 @@
                     // add the elements representing the space
                     // at the end of the last line
                     // and the forced break
-                    this.add(new KnuthPenalty(0, KnuthElement.INFINITE, 
+                    this.add(new KnuthPenalty(0, KnuthElement.INFINITE,
                                               false, null, false));
-                    this.add(new KnuthGlue(0, 
-                            lineFiller.max - lineFiller.opt, 
+                    this.add(new KnuthGlue(0,
+                            lineFiller.max - lineFiller.opt,
                             lineFiller.opt - lineFiller.min, null, false));
                     this.add(new KnuthPenalty(lineFiller.opt, -KnuthElement.INFINITE,
                                               false, null, false));
@@ -339,7 +339,7 @@
             follow = fl;
             thisLLM = llm;
             activePossibility = -1;
-            maxDiff = fobj.getWidows() >= fobj.getOrphans() 
+            maxDiff = fobj.getWidows() >= fobj.getOrphans()
                     ? fobj.getWidows()
                     : fobj.getOrphans();
         }
@@ -382,7 +382,7 @@
             }
 
             if (log.isWarnEnabled()) {
-                int lack = difference + bestActiveNode.availableShrink; 
+                int lack = difference + bestActiveNode.availableShrink;
                 if (lack < 0) {
                     InlineLevelEventProducer eventProducer
                         = InlineLevelEventProducer.Provider.get(
@@ -391,15 +391,15 @@
                             -lack, getFObj().getLocator());
                 }
             }
-            
-            //log.debug("LLM> (" + (lineLayouts.getLineNumber(activePossibility) - addedPositions) 
+
+            //log.debug("LLM> (" + (lineLayouts.getLineNumber(activePossibility) - addedPositions)
             //    + ") difference = " + difference + " ratio = " + ratio);
             lineLayouts.addBreakPosition(makeLineBreakPosition(par,
                    (bestActiveNode.line > 1 ? bestActiveNode.previous.position + 1 : 0),
                    bestActiveNode.position,
-                   bestActiveNode.availableShrink - (addedPositions > 0 
-                       ? 0 : ((Paragraph)par).lineFiller.opt - ((Paragraph)par).lineFiller.min), 
-                   bestActiveNode.availableStretch, 
+                   bestActiveNode.availableShrink - (addedPositions > 0
+                       ? 0 : ((Paragraph)par).lineFiller.opt - ((Paragraph)par).lineFiller.min),
+                   bestActiveNode.availableStretch,
                    difference, ratio, indent), activePossibility);
             addedPositions++;
         }
@@ -413,8 +413,8 @@
         private LineBreakPosition makeLineBreakPosition(KnuthSequence par,
                                                         int firstElementIndex,
                                                         int lastElementIndex,
-                                                        int availableShrink, 
-                                                        int availableStretch, 
+                                                        int availableShrink,
+                                                        int availableStretch,
                                                         int difference,
                                                         double ratio,
                                                         int indent) {
@@ -424,7 +424,7 @@
             int spaceAfter = lineHeight - lead - follow - spaceBefore;
             // height before the main baseline
             int lineLead = lead;
-            // maximum follow 
+            // maximum follow
             int lineFollow = follow;
             // true if this line contains only zero-height, auxiliary boxes
             // and the actual line width is 0; in this case, the line "collapses"
@@ -492,7 +492,7 @@
                                              firstElementIndex, lastElementIndex,
                                              availableShrink, availableStretch,
                                              difference, ratio, 0, indent,
-                                             lineLead + lineFollow, 
+                                             lineLead + lineFollow,
                                              iLineWidth, spaceBefore, spaceAfter,
                                              lineLead);
             }
@@ -501,7 +501,7 @@
         public int findBreakingPoints(Paragraph par, /*int lineWidth,*/
                                       double threshold, boolean force,
                                       int allowedBreaks) {
-            return super.findBreakingPoints(par, /*lineWidth,*/ 
+            return super.findBreakingPoints(par, /*lineWidth,*/
                     threshold, force, allowedBreaks);
         }
 
@@ -548,9 +548,9 @@
         }
     }
 
-      
+
     private int constantLineHeight = 12000;
-      
+
 
     /**
      * Create a new Line Layout Manager.
@@ -641,19 +641,19 @@
      */
     private void collectInlineKnuthElements(LayoutContext context) {
         LayoutContext inlineLC = new LayoutContext(context);
-        
+
         InlineLevelLayoutManager curLM;
         List returnedList = null;
         iLineWidth = context.getStackLimitIP().opt;
-            
+
         // convert all the text in a sequence of paragraphs made
         // of KnuthBox, KnuthGlue and KnuthPenalty objects
         boolean bPrevWasKnuthBox = false;
-        
+
         StringBuffer trace = new StringBuffer("LineLM:");
-        
+
         Paragraph lastPar = null;
-        
+
         while ((curLM = (InlineLevelLayoutManager) getChildLM()) != null) {
             returnedList = curLM.getNextKnuthElements(inlineLC, effectiveAlignment);
             if (returnedList == null
@@ -663,10 +663,10 @@
                  * so just iterate once more to see if there are other children */
                 continue;
             }
-            
+
             if (lastPar != null) {
                 KnuthSequence firstSeq = (KnuthSequence) returnedList.get(0);
-                
+
                 // finish last paragraph before a new block sequence
                 if (!firstSeq.isInlineSequence()) {
                     lastPar.endParagraph();
@@ -677,7 +677,7 @@
                     }
                     bPrevWasKnuthBox = false;
                 }
-                
+
                 // does the first element of the first paragraph add to an existing word?
                 if (lastPar != null) {
                     KnuthElement thisElement;
@@ -688,28 +688,28 @@
                     }
                 }
             }
-            
+
             // loop over the KnuthSequences (and single KnuthElements) in returnedList
             ListIterator iter = returnedList.listIterator();
             while (iter.hasNext()) {
                 KnuthSequence sequence = (KnuthSequence) iter.next();
                 // the sequence contains inline Knuth elements
                 if (sequence.isInlineSequence()) {
-                    // look at the last element 
+                    // look at the last element
                     ListElement lastElement = sequence.getLast();
                     if (lastElement == null) {
                         throw new NullPointerException(
                         "Sequence was empty! lastElement is null");
                     }
-                    bPrevWasKnuthBox = lastElement.isBox() 
-                                        && !((KnuthElement) lastElement).isAuxiliary() 
+                    bPrevWasKnuthBox = lastElement.isBox()
+                                        && !((KnuthElement) lastElement).isAuxiliary()
                                         && ((KnuthElement) lastElement).getW() != 0;
-                    
+
                     // if last paragraph is open, add the new elements to the paragraph
                     // else this is the last paragraph
-                    if (lastPar == null) { 
-                        lastPar = new Paragraph(this, 
-                                                textAlignment, textAlignmentLast, 
+                    if (lastPar == null) {
+                        lastPar = new Paragraph(this,
+                                                textAlignment, textAlignmentLast,
                                                 textIndent.getValue(this),
                                                 lastLineEndIndent.getValue(this));
                         lastPar.startSequence();
@@ -725,7 +725,7 @@
                     if (log.isTraceEnabled()) {
                         trace.append(" I");
                     }
-                    
+
                     // finish last paragraph if it was closed with a linefeed
                     if (lastElement.isPenalty()
                             && ((KnuthPenalty) lastElement).getP()
@@ -735,7 +735,7 @@
                         // which forces a line break
                         lastPar.removeLast();
                         if (!lastPar.containsBox()) {
-                            //only a forced linefeed on this line 
+                            //only a forced linefeed on this line
                             //-> compensate with an auxiliary glue
                             lastPar.add(new KnuthGlue(iLineWidth, 0, iLineWidth, null, true));
                         }
@@ -765,11 +765,11 @@
         }
         log.trace(trace);
     }
-    
+
     /**
      * Find a set of breaking points.
-     * This method is called only once by getNextBreakPoss, and it 
-     * subsequently calls the other findBreakingPoints() method with 
+     * This method is called only once by getNextBreakPoss, and it
+     * subsequently calls the other findBreakingPoints() method with
      * different parameters, until a set of breaking points is found.
      *
      * @param par       the list of elements that must be parted
@@ -805,7 +805,7 @@
             }
         }
     }
-    
+
     private boolean findBreakingPoints(Paragraph par, int lineWidth,
             double threshold, boolean force) {
         KnuthParagraph knuthPara = new KnuthParagraph(par);
@@ -813,11 +813,11 @@
         if (lines == 0) {
             return false;
         }
-        
+
         for (int i = lines-1; i >= 0; i--) {
             int line = i+1;
             if (log.isTraceEnabled()) {
-                log.trace("Making line from " + knuthPara.getStart(i) + " to " + 
+                log.trace("Making line from " + knuthPara.getStart(i) + " to " +
                            knuthPara.getEnd(i));
             }
             // compute indent and adjustment ratio, according to
@@ -826,7 +826,7 @@
             int difference = knuthPara.getDifference(i);
             if (line == lines) {
                 difference += par.lineFillerWidth;
-            }    
+            }
             int textAlign = (line < lines)
                 ? textAlignment : textAlignmentLast;
             int indent = (textAlign == EN_CENTER)
@@ -841,7 +841,7 @@
             int end = knuthPara.getEnd(i);
             makeLineBreakPosition(par, start, end, 0, ratio, indent);
         }
-        return true;        
+        return true;
     }
 
     private void makeLineBreakPosition(Paragraph par,
@@ -893,7 +893,7 @@
                                               lineLead));
     }*/
 
-    
+
     /**
      * Phase 2 of Knuth algorithm: find optimal break points.
      * @param alignment alignment in BP direction of the paragraph
@@ -918,9 +918,9 @@
             }
             lineLayoutsList.add(0, llPoss);
         }
-        
+
         setFinished(true);
-    
+
         //Post-process the line breaks found
         return postProcessLineBreaks(alignment, context);
     }
@@ -944,12 +944,12 @@
                                         hyphenationLadderCount.getEnum() == EN_NO_LIMIT
                                         ? 0 : hyphenationLadderCount.getValue(),
                                         this);
-   
-        if (hyphenationProperties.hyphenate.getEnum() == EN_TRUE 
+
+        if (hyphenationProperties.hyphenate.getEnum() == EN_TRUE
                 && fobj.getWrapOption() != EN_NO_WRAP) {
             findHyphenationPoints(currPar);
         }
-   
+
         // first try
         int allowedBreaks;
         if (wrapOption == EN_NO_WRAP) {
@@ -969,7 +969,7 @@
                 // the first try failed
                 log.debug("No set of breaking points found with maxAdjustment = " + maxAdjustment);
             }
-   
+
             // now try something different
             log.debug("Hyphenation possible? " + (hyphenationProperties.hyphenate.getEnum() == EN_TRUE));
             if (hyphenationProperties.hyphenate.getEnum() == EN_TRUE
@@ -980,7 +980,7 @@
                 // try with a higher threshold
                 maxAdjustment = 5;
             }
-   
+
             if ((iBPcount
                  = alg.findBreakingPoints(currPar,
                                           maxAdjustment, false, allowedBreaks)) == 0) {
@@ -998,12 +998,12 @@
                     = alg.findBreakingPoints(currPar,
                                              maxAdjustment, true, allowedBreaks);
             }
-   
+
             // use non-hyphenated breaks, when possible
             lineLayouts.restorePossibilities();
-   
+
             /* extension (not in the XSL FO recommendation): if vertical alignment
-               is justify and the paragraph has only one layout, try using 
+               is justify and the paragraph has only one layout, try using
                shorter or longer lines */
             //TODO This code snippet is disabled. Reenable?
             if (false && alignment == EN_JUSTIFY && textAlignment == EN_JUSTIFY) {
@@ -1048,9 +1048,9 @@
      * @return the newly built element list
      */
     private List postProcessLineBreaks(int alignment, LayoutContext context) {
-    
+
         List returnList = new LinkedList();
-        
+
         for (int p = 0; p < knuthParagraphs.size(); p++) {
             // penalty between paragraphs
             if (p > 0) {
@@ -1061,7 +1061,7 @@
                             new Position(this), penalty, context));
                 }
             }
-        
+
             LineLayoutPossibilities llPoss;
             llPoss = (LineLayoutPossibilities) lineLayoutsList.get(p);
             KnuthSequence seq = (KnuthSequence) knuthParagraphs.get(p);
@@ -1078,10 +1078,10 @@
                     }
                     targetList.add(tempElement);
                 }
-                returnList.addAll(targetList); 
+                returnList.addAll(targetList);
             } else if (seq.isInlineSequence() && alignment == EN_JUSTIFY) {
                 /* justified vertical alignment (not in the XSL FO recommendation):
-                   create a multi-layout sequence whose elements will contain 
+                   create a multi-layout sequence whose elements will contain
                    a conventional Position */
                 Position returnPosition = new LeafPosition(this, p);
                 createElements(returnList, llPoss, returnPosition);
@@ -1107,7 +1107,7 @@
                     }
                     int endIndex
                       = ((LineBreakPosition) llPoss.getChosenPosition(i)).getLeafPos();
-                    // create a list of the FootnoteBodyLM handling footnotes 
+                    // create a list of the FootnoteBodyLM handling footnotes
                     // whose citations are in this line
                     List footnoteList = new LinkedList();
                     ListIterator elementIterator = seq.listIterator(startIndex);
@@ -1138,7 +1138,7 @@
                 }
             }
         }
-        
+
         return returnList;
     }
 
@@ -1286,7 +1286,7 @@
     public int getKeepTogetherStrength() {
         return ((BlockLevelLayoutManager) getParent()).getKeepTogetherStrength();
     }
-    
+
     /** {@inheritDoc} */
     public boolean mustKeepWithPrevious() {
         return getKeepWithPreviousStrength() > KEEP_AUTO;
@@ -1306,7 +1306,7 @@
     public int getKeepWithPreviousStrength() {
         return KEEP_AUTO;
     }
-    
+
     /** {@inheritDoc} */
     public int negotiateBPDAdjustment(int adj, KnuthElement lastElement) {
         LeafPosition pos = (LeafPosition)lastElement.getPosition();
@@ -1331,7 +1331,7 @@
     }
 
     /**
-     * {@inheritDoc} 
+     * {@inheritDoc}
      */
     public List getChangedKnuthElements(List oldList, int alignment) {
         List returnList = new LinkedList();
@@ -1354,8 +1354,8 @@
                 MinOptMax contentIPD;
                 if (alignment == EN_JUSTIFY) {
                     contentIPD = new MinOptMax(
-                        lbp.lineWidth - lbp.difference - lbp.availableShrink, 
-                        lbp.lineWidth - lbp.difference, 
+                        lbp.lineWidth - lbp.difference - lbp.availableShrink,
+                        lbp.lineWidth - lbp.difference,
                         lbp.lineWidth - lbp.difference + lbp.availableStretch);
                 } else if (alignment == EN_CENTER) {
                     contentIPD = new MinOptMax(lbp.lineWidth - 2 * lbp.startIndent);
@@ -1397,10 +1397,10 @@
         // find all hyphenation points
         while (currParIterator.hasNext()) {
             firstElement = (KnuthElement) currParIterator.next();
-            // 
+            //
             if (firstElement.getLayoutManager() != currLM) {
                 currLM = (InlineLevelLayoutManager) firstElement.getLayoutManager();
-                if (currLM != null) { 
+                if (currLM != null) {
                     updateList.add(new Update(currLM, currParIterator.previousIndex()));
                 } else {
                     break;
@@ -1409,7 +1409,7 @@
                 break;
             }
             //TODO Something's not right here. See block_hyphenation_linefeed_preserve.xml
-            
+
             // collect word fragments, ignoring auxiliary elements;
             // each word fragment was created by a different TextLM
             if (firstElement.isBox() && !firstElement.isAuxiliary()) {
@@ -1432,7 +1432,7 @@
                     } else if (!nextElement.isAuxiliary()) {
                         // a non-auxiliary non-box KnuthElement: stop
                         // go back to the last box or auxiliary element
-                        currParIterator.previous(); 
+                        currParIterator.previous();
                         break;
                     } else {
                         if (currLM != nextElement.getLayoutManager()) {
@@ -1475,7 +1475,7 @@
         //int iRemovedElements = 0;
 
         while (updateListIterator.hasNext()) {
-            // ask the LMs to apply the changes and return 
+            // ask the LMs to apply the changes and return
             // the new KnuthElements to replace the old ones
             currUpdate = (Update) updateListIterator.next();
             int fromIndex = currUpdate.iFirstIndex;
@@ -1584,11 +1584,11 @@
             } else if ((pos instanceof NonLeafPosition) && pos.generatesAreas()) {
                 addBlockArea(context, pos, isLastPosition);
             } else {
-                /*                
+                /*
                  * pos was the Position inside a penalty item, nothing to do;
                  * or Pos does not generate an area,
                  * i.e. it stand for spaces, borders and padding.
-                 */            
+                 */
             }
         }
         setCurrentArea(null); // ?? necessary
@@ -1605,14 +1605,14 @@
             KnuthElement tempElement = null;
             // the TLM which created the last KnuthElement in this line
             LayoutManager lastLM = null;
-            
+
             LineBreakPosition lbp = (LineBreakPosition) pos;
             int iCurrParIndex;
             iCurrParIndex = lbp.iParIndex;
             KnuthSequence seq = (KnuthSequence) knuthParagraphs.get(iCurrParIndex);
             int iStartElement = lbp.iStartIndex;
             int iEndElement = lbp.getLeafPos();
-            
+
             LineArea lineArea
               = new LineArea((lbp.getLeafPos() < seq.size() - 1
                               ? textAlignment : textAlignmentLast),
@@ -1625,12 +1625,12 @@
             lineArea.addTrait(Trait.SPACE_BEFORE, new Integer(lbp.spaceBefore));
             lineArea.addTrait(Trait.SPACE_AFTER, new Integer(lbp.spaceAfter));
             alignmentContext.resizeLine(lbp.lineHeight, lbp.baseline);
-            
+
             if (seq instanceof Paragraph) {
                 Paragraph currPar = (Paragraph) seq;
                 // ignore the first elements added by the LineLayoutManager
                 iStartElement += (iStartElement == 0) ? currPar.ignoreAtStart : 0;
-                
+
                 // if this is the last line area that for this paragraph,
                 // ignore the last elements added by the LineLayoutManager and
                 // subtract the last-line-end-indent from the area ipd
@@ -1639,10 +1639,10 @@
                     lineArea.setIPD(lineArea.getIPD() - lastLineEndIndent.getValue(this));
                 }
             }
-            
+
             // Remove trailing spaces if allowed so
             if (whiteSpaceTreament == EN_IGNORE_IF_SURROUNDING_LINEFEED
-                || whiteSpaceTreament == EN_IGNORE 
+                || whiteSpaceTreament == EN_IGNORE
                 || whiteSpaceTreament == EN_IGNORE_IF_BEFORE_LINEFEED) {
                 // ignore the last element in the line if it is a KnuthGlue object
                 seqIterator = seq.listIterator(iEndElement);
@@ -1661,10 +1661,10 @@
                     lastLM = tempElement.getLayoutManager();
                 }
             }
-            
+
             // Remove leading spaces if allowed so
             if (whiteSpaceTreament == EN_IGNORE_IF_SURROUNDING_LINEFEED
-                || whiteSpaceTreament == EN_IGNORE 
+                || whiteSpaceTreament == EN_IGNORE
                 || whiteSpaceTreament == EN_IGNORE_IF_AFTER_LINEFEED) {
                 // ignore KnuthGlue and KnuthPenalty objects
                 // at the beginning of the line
@@ -1678,13 +1678,13 @@
             // Add the inline areas to lineArea
             PositionIterator inlinePosIter
               = new KnuthPossPosIter(seq, iStartElement, iEndElement + 1);
-            
+
             iStartElement = lbp.getLeafPos() + 1;
             if (iStartElement == seq.size()) {
                 // advance to next paragraph
                 iStartElement = 0;
             }
-            
+
             LayoutContext lc = new LayoutContext(0);
             lc.setAlignmentContext(alignmentContext);
             lc.setSpaceAdjust(lbp.dAdjust);
@@ -1692,7 +1692,7 @@
             lc.setLeadingSpace(new SpaceSpecifier(true));
             lc.setTrailingSpace(new SpaceSpecifier(false));
             lc.setFlags(LayoutContext.RESOLVE_LEADING_SPACE, true);
-            
+
             /*
              * extension (not in the XSL FO recommendation): if the left and right margins
              * have been optimized, recompute indents and / or adjust ratio, according
@@ -1718,11 +1718,11 @@
                 lineArea.addTrait(Trait.START_INDENT, new Integer(updatedIndent));
             } else if (false && textAlignment == EN_END) {
                 // re-compute indent
-                int updatedIndent = lbp.startIndent 
+                int updatedIndent = lbp.startIndent
                                     + (context.getStackLimitIP().opt - lbp.lineWidth);
                 lineArea.addTrait(Trait.START_INDENT, new Integer(updatedIndent));
             }
-            
+
             setCurrentArea(lineArea);
             setChildContext(lc);
             LayoutManager childLM;
@@ -1732,9 +1732,9 @@
                 lc.setLeadingSpace(lc.getTrailingSpace());
                 lc.setTrailingSpace(new SpaceSpecifier(false));
             }
-            
+
             // when can this be null?
-            // if display-align is distribute, add space after 
+            // if display-align is distribute, add space after
             if (context.getSpaceAfter() > 0
                     && (!context.isLastArea() || !isLastPosition)) {
                 lineArea.setBPD(lineArea.getBPD() + context.getSpaceAfter());
@@ -1742,7 +1742,7 @@
             lineArea.finalise();
             parentLM.addChildArea(lineArea);
     }
-    
+
     /**
      * Add a line with block content
      * @param context the context for adding areas
@@ -1766,13 +1766,13 @@
         if (isLastPosition) {
             lastLM = innerPosition.getLM();
         }
-        
+
         LineArea lineArea = new LineArea();
         setCurrentArea(lineArea);
         LayoutContext lc = new LayoutContext(0);
         lc.setAlignmentContext(alignmentContext);
         setChildContext(lc);
-        
+
         PositionIterator childPosIter = new StackingIter(positionList.listIterator());
         LayoutContext blocklc = new LayoutContext(0);
         blocklc.setLeadingSpace(new SpaceSpecifier(true));
@@ -1810,14 +1810,14 @@
     }
 
     // --------- Property Resolution related functions --------- //
-    
+
     /**
      * {@inheritDoc}
      */
     public boolean getGeneratesBlockArea() {
         return true;
     }
-   
+
     /**
      * {@inheritDoc}
      */

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutPossibilities.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutPossibilities.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutPossibilities.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutPossibilities.java Thu Jul 24 02:35:34 2008
@@ -29,7 +29,7 @@
 
     /** logger instance */
     protected static Log log = LogFactory.getLog(LineLayoutPossibilities.class);
-    
+
     private class Possibility {
         private int lineCount;
         private double demerits;
@@ -50,8 +50,8 @@
         }
 
         private void addBreakPosition(Position pos) {
-            // Positions are always added with index 0 because 
-            // they are created backward, from the last one to 
+            // Positions are always added with index 0 because
+            // they are created backward, from the last one to
             // the first one
             breakPositions.add(0, pos);
         }
@@ -74,7 +74,7 @@
         savedPossibilities = new java.util.ArrayList();
         optimumIndex = -1;
     }
- 
+
     public void addPossibility(int ln, double dem) {
         possibilitiesList.add(new Possibility(ln, dem));
         if (possibilitiesList.size() == 1) {
@@ -145,8 +145,8 @@
                 } else {
                     // this should not happen
                     log.error("LineLayoutPossibilities restorePossibilities(),"
-                        + " min= " + getMinLineCount() 
-                        + " max= " + getMaxLineCount() 
+                        + " min= " + getMinLineCount()
+                        + " max= " + getMaxLineCount()
                         + " restored= " + restoredPossibility.getLineCount());
                     return;
                 }
@@ -158,7 +158,7 @@
                 chosenIndex = optimumIndex;
             }
         }
-        //log.debug(">> minLineCount = " + getMinLineCount() 
+        //log.debug(">> minLineCount = " + getMinLineCount()
         //  + " optLineCount = " + getOptLineCount() + " maxLineCount() = " + getMaxLineCount());
     }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLastLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLastLayoutManager.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLastLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLastLayoutManager.java Thu Jul 24 02:35:34 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.
@@ -43,13 +43,13 @@
         super(node);
         fobj = node;
     }
-    
+
     /** {@inheritDoc} */
     public InlineArea get(LayoutContext context) {
         curArea = getPageNumberCitationLastInlineArea(parentLM);
         return curArea;
     }
-    
+
     /**
      * if id can be resolved then simply return a word, otherwise
      * return a resolvable area
@@ -71,12 +71,12 @@
             int width = getStringWidth(str);
             text.addWord(str, 0);
             text.setIPD(width);
-            
+
             resolved = true;
         }
-        
+
         updateTextAreaTraits(text);
-        
+
         return text;
     }
 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLayoutManager.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberCitationLayoutManager.java Thu Jul 24 02:35:34 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.
@@ -41,13 +41,13 @@
     public PageNumberCitationLayoutManager(PageNumberCitation node) {
         super(node);
     }
-    
+
     /** {@inheritDoc} */
     public InlineArea get(LayoutContext context) {
         curArea = getPageNumberCitationInlineArea();
         return curArea;
     }
-    
+
     /**
      * if id can be resolved then simply return a word, otherwise
      * return a resolvable area
@@ -71,9 +71,9 @@
             text.setIPD(width);
         }
         updateTextAreaTraits(text);
-        
+
         return text;
     }
-    
+
 }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberLayoutManager.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/PageNumberLayoutManager.java Thu Jul 24 02:35:34 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,10 +34,10 @@
  * LayoutManager for the fo:page-number formatting object
  */
 public class PageNumberLayoutManager extends LeafNodeLayoutManager {
-    
+
     private PageNumber fobj;
     private Font font;
-    
+
     /**
      * Constructor
      *
@@ -48,7 +48,7 @@
         super(node);
         fobj = node;
     }
-    
+
     /** {@inheritDoc} */
     public void initialize() {
         FontInfo fi = fobj.getFOEventHandler().getFontInfo();
@@ -84,13 +84,13 @@
         text.setBPD(font.getAscender() - font.getDescender());
         text.setBaselineOffset(font.getAscender());
         TraitSetter.addFontTraits(text, font);
-        text.addTrait(Trait.COLOR, fobj.getColor());        
+        text.addTrait(Trait.COLOR, fobj.getColor());
 
         TraitSetter.addTextDecoration(text, fobj.getTextDecoration());
 
         return text;
     }
-    
+
     /** {@inheritDoc} */
     protected InlineArea getEffectiveArea() {
         TextArea baseArea = (TextArea)curArea;
@@ -108,7 +108,7 @@
         updateContent(ta);
         return ta;
     }
-    
+
     private void updateContent(TextArea area) {
         // get the page number of the page actually being built
         area.removeText();
@@ -130,6 +130,6 @@
         }
         return width;
     }
-    
+
 }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/ScaledBaselineTable.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/ScaledBaselineTable.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/ScaledBaselineTable.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/ScaledBaselineTable.java Thu Jul 24 02:35:34 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,19 +23,19 @@
 
 /**
  * The FOP specific incarnation of the XSL-FO scaled baseline table.
- * All baseline tables are scaled to the font size of the font they 
- * apply to. This interface uses a coordinate system with its origin 
+ * All baseline tables are scaled to the font size of the font they
+ * apply to. This interface uses a coordinate system with its origin
  * where the dominant baseline intersects the start edge of the box.
  * All measurements are in mpt.
  */
 public interface ScaledBaselineTable {
-    
+
     /**
      * Return the dominant baseline identifer for this alignment context.
      * @return the dominant baseline identifier
      */
     int getDominantBaselineIdentifier();
-    
+
     /**
      * Return the writing mode for this aligment context.
      * @return the writing mode
@@ -49,7 +49,7 @@
      * @return the baseline offset
      */
     int getBaseline(int baselineIdentifier);
-    
+
     /**
      * Sets the position of the before and after baselines.
      * This is usually only done for line areas. For other
@@ -59,7 +59,7 @@
      * @param afterBaseline the offset of the after-edge baseline from the dominant baseline
      */
     void setBeforeAndAfterBaselines(int beforeBaseline, int afterBaseline);
-    
+
     /**
      * Return a new baseline table for the given baseline based
      * on the current baseline table.

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/ScaledBaselineTableFactory.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/ScaledBaselineTableFactory.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/ScaledBaselineTableFactory.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/ScaledBaselineTableFactory.java Thu Jul 24 02:35:34 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.
@@ -44,7 +44,7 @@
         return new BasicScaledBaselineTable(font.getAscender(), font.getDescender()
                                     , font.getXHeight(), dominantBaselineIdentifier, writingMode);
     }
-    
+
     /**
      * Creates a new instance of BasicScaledBaselineTable for the given
      * font and writingmode. It assumes an alphabetic baseline.
@@ -55,7 +55,7 @@
     public static ScaledBaselineTable makeFontScaledBaselineTable(Font font, int writingMode) {
         return makeFontScaledBaselineTable(font, EN_ALPHABETIC, writingMode);
     }
-    
+
     /**
      * Creates a new instance of BasicScaledBaselineTable for the given
      * height, baseline and writingmode. This is used for non font based areas like
@@ -71,5 +71,5 @@
         return new BasicScaledBaselineTable(height, 0, height
                                             , dominantBaselineIdentifier, writingMode);
     }
-    
+
 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/TextLayoutManager.java Thu Jul 24 02:35:34 2008
@@ -203,7 +203,7 @@
     public void initialize() {
 
         this.foText.resetBuffer();
-        
+
         this.spaceFont = FontSelector.selectFontForCharacterInText(' ', this.foText, this);
 
         // With CID fonts, space isn't neccesary currentFontState.width(32)

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/WrapperLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/WrapperLayoutManager.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/WrapperLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/WrapperLayoutManager.java Thu Jul 24 02:35:34 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 @@
  * This is the layout manager for the fo:wrapper formatting object.
  */
 public class WrapperLayoutManager extends LeafNodeLayoutManager {
-    
+
     /**
      * Creates a new LM for fo:wrapper.
      * @param node the fo:wrapper

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListBlockLayoutManager.java Thu Jul 24 02:35:34 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.list;
 
 import java.util.Iterator;
@@ -48,7 +48,7 @@
  * A list block contains list items which are stacked within
  * the list block area..
  */
-public class ListBlockLayoutManager extends BlockStackingLayoutManager 
+public class ListBlockLayoutManager extends BlockStackingLayoutManager
                 implements ConditionalElementListener {
 
     /**
@@ -102,38 +102,38 @@
         foSpaceAfter = new SpaceVal(
                 getListBlockFO().getCommonMarginBlock().spaceAfter, this).getSpace();
         startIndent = getListBlockFO().getCommonMarginBlock().startIndent.getValue(this);
-        endIndent = getListBlockFO().getCommonMarginBlock().endIndent.getValue(this); 
+        endIndent = getListBlockFO().getCommonMarginBlock().endIndent.getValue(this);
     }
 
     private void resetSpaces() {
-        this.discardBorderBefore = false;        
-        this.discardBorderAfter = false;        
-        this.discardPaddingBefore = false;        
+        this.discardBorderBefore = false;
+        this.discardBorderAfter = false;
+        this.discardPaddingBefore = false;
         this.discardPaddingAfter = false;
         this.effSpaceBefore = null;
         this.effSpaceAfter = null;
     }
-    
+
     /** {@inheritDoc} */
     public List getNextKnuthElements(LayoutContext context, int alignment) {
-        resetSpaces(); 
+        resetSpaces();
         List returnList = super.getNextKnuthElements(context, alignment);
 
         //fox:widow-content-limit
-        int widowRowLimit = getListBlockFO().getWidowContentLimit().getValue(); 
+        int widowRowLimit = getListBlockFO().getWidowContentLimit().getValue();
         if (widowRowLimit != 0) {
             ElementListUtils.removeLegalBreaks(returnList, widowRowLimit);
         }
 
         //fox:orphan-content-limit
-        int orphanRowLimit = getListBlockFO().getOrphanContentLimit().getValue(); 
+        int orphanRowLimit = getListBlockFO().getOrphanContentLimit().getValue();
         if (orphanRowLimit != 0) {
             ElementListUtils.removeLegalBreaksFromEnd(returnList, orphanRowLimit);
         }
 
         return returnList;
     }
-   
+
     /** {@inheritDoc} */
     public List getChangedKnuthElements(List oldList, int alignment) {
         //log.debug("LBLM.getChangedKnuthElements>");
@@ -169,7 +169,7 @@
         Position lastPos = null;
 
         // "unwrap" the NonLeafPositions stored in parentIter
-        // and put them in a new list; 
+        // and put them in a new list;
         LinkedList positionList = new LinkedList();
         Position pos;
         while (parentIter.hasNext()) {
@@ -208,17 +208,17 @@
         addMarkersToPage(false, isFirst(firstPos), isLast(lastPos));
 
         // We are done with this area add the background
-        TraitSetter.addBackground(curBlockArea, 
+        TraitSetter.addBackground(curBlockArea,
                 getListBlockFO().getCommonBorderPaddingBackground(),
                 this);
-        TraitSetter.addSpaceBeforeAfter(curBlockArea, layoutContext.getSpaceAdjust(), 
+        TraitSetter.addSpaceBeforeAfter(curBlockArea, layoutContext.getSpaceAdjust(),
                 effSpaceBefore, effSpaceAfter);
 
         flush();
 
         curBlockArea = null;
         resetSpaces();
-        
+
         checkEndOfLayout(lastPos);
     }
 
@@ -238,30 +238,30 @@
     public Area getParentArea(Area childArea) {
         if (curBlockArea == null) {
             curBlockArea = new Block();
-            
+
             // Set up dimensions
             // Must get dimensions from parent area
             /*Area parentArea =*/ parentLM.getParentArea(curBlockArea);
 
             // set traits
             TraitSetter.setProducerID(curBlockArea, getListBlockFO().getId());
-            TraitSetter.addBorders(curBlockArea, 
-                    getListBlockFO().getCommonBorderPaddingBackground(), 
+            TraitSetter.addBorders(curBlockArea,
+                    getListBlockFO().getCommonBorderPaddingBackground(),
                     discardBorderBefore, discardBorderAfter, false, false, this);
-            TraitSetter.addPadding(curBlockArea, 
-                    getListBlockFO().getCommonBorderPaddingBackground(), 
+            TraitSetter.addPadding(curBlockArea,
+                    getListBlockFO().getCommonBorderPaddingBackground(),
                     discardPaddingBefore, discardPaddingAfter, false, false, this);
             TraitSetter.addMargins(curBlockArea,
-                    getListBlockFO().getCommonBorderPaddingBackground(), 
+                    getListBlockFO().getCommonBorderPaddingBackground(),
                     getListBlockFO().getCommonMarginBlock(),
                     this);
-            TraitSetter.addBreaks(curBlockArea, 
-                    getListBlockFO().getBreakBefore(), 
+            TraitSetter.addBreaks(curBlockArea,
+                    getListBlockFO().getBreakBefore(),
                     getListBlockFO().getBreakAfter());
-            
+
             int contentIPD = referenceIPD - getIPIndents();
             curBlockArea.setIPD(contentIPD);
-            
+
             setCurrentArea(curBlockArea);
         }
         return curBlockArea;
@@ -285,7 +285,7 @@
         strength = Math.max(strength, getParentKeepTogetherStrength());
         return strength;
     }
-    
+
     /** {@inheritDoc} */
     public int getKeepWithNextStrength() {
         return KeepUtil.getCombinedBlockLevelKeepStrength(getListBlockFO().getKeepWithNext());
@@ -300,13 +300,13 @@
     public void notifySpace(RelSide side, MinOptMax effectiveLength) {
         if (RelSide.BEFORE == side) {
             if (log.isDebugEnabled()) {
-                log.debug(this + ": Space " + side + ", " 
+                log.debug(this + ": Space " + side + ", "
                         + this.effSpaceBefore + "-> " + effectiveLength);
             }
             this.effSpaceBefore = effectiveLength;
         } else {
             if (log.isDebugEnabled()) {
-                log.debug(this + ": Space " + side + ", " 
+                log.debug(this + ": Space " + side + ", "
                         + this.effSpaceAfter + "-> " + effectiveLength);
             }
             this.effSpaceAfter = effectiveLength;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListItemContentLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListItemContentLayoutManager.java?rev=679326&r1=679325&r2=679326&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListItemContentLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListItemContentLayoutManager.java Thu Jul 24 02:35:34 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.list;
 
 import java.util.Iterator;
@@ -85,7 +85,7 @@
     protected AbstractListItemPart getPartFO() {
         return (AbstractListItemPart)fobj;
     }
-    
+
     /**
      * Set the x offset of this list item.
      * This offset is used to set the absolute position
@@ -114,7 +114,7 @@
     public void addAreas(PositionIterator parentIter,
                          LayoutContext layoutContext) {
         getParentArea(null);
-        
+
         addId();
 
         LayoutManager childLM;
@@ -125,7 +125,7 @@
         Position lastPos = null;
 
         // "unwrap" the NonLeafPositions stored in parentIter
-        // and put them in a new list; 
+        // and put them in a new list;
         LinkedList positionList = new LinkedList();
         Position pos;
         while (parentIter.hasNext()) {
@@ -154,7 +154,7 @@
         }
 
         addMarkersToPage(true, isFirst(firstPos), isLast(lastPos));
-        
+
         StackingIter childPosIter = new StackingIter(positionList.listIterator());
         while ((childLM = childPosIter.getNextChildLM()) != null) {
             // Add the block areas to Area
@@ -167,11 +167,11 @@
         }
 
         addMarkersToPage(false, isFirst(firstPos), isLast(lastPos));
-        
+
         flush();
 
         curBlockArea = null;
-        
+
         checkEndOfLayout(lastPos);
     }
 
@@ -198,7 +198,7 @@
             //curBlockArea.setHeight();
 
             TraitSetter.setProducerID(curBlockArea, getPartFO().getId());
-            
+
             // Set up dimensions
             Area parentArea = parentLM.getParentArea(curBlockArea);
             int referenceIPD = parentArea.getIPD();
@@ -226,7 +226,7 @@
         strength = Math.max(strength, getParentKeepTogetherStrength());
         return strength;
     }
-    
+
     /** {@inheritDoc} */
     public int getKeepWithNextStrength() {
         return KEEP_AUTO;



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