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 je...@apache.org on 2005/11/14 13:56:54 UTC

svn commit: r344111 [1/2] - in /xmlgraphics/fop/trunk: ./ lib/ src/java/org/apache/fop/area/ src/java/org/apache/fop/fo/ src/java/org/apache/fop/fo/properties/ src/java/org/apache/fop/fonts/ src/java/org/apache/fop/fonts/truetype/ src/java/org/apache/f...

Author: jeremias
Date: Mon Nov 14 04:55:46 2005
New Revision: 344111

URL: http://svn.apache.org/viewcvs?rev=344111&view=rev
Log:
Updated from Jakarta Commons IO 1.0 to 1.1. CopyUtils.copy() becomes IOUtils.copy() again. CopyUtils in 1.0 was not ideal design decision.
Fixed most of the unappropriate System.err/System.out/Exception.printStackTrace(). Those that aren't fixed and are not legitimate calls (in main() methods etc.) are marked with a TODO item.
Some Javadocs and style updates.

Added:
    xmlgraphics/fop/trunk/lib/commons-io-1.1.jar   (with props)
    xmlgraphics/fop/trunk/lib/commons-io.NOTICE.txt   (with props)
Removed:
    xmlgraphics/fop/trunk/lib/commons-io-1.0.jar
Modified:
    xmlgraphics/fop/trunk/fop.bat
    xmlgraphics/fop/trunk/lib/README.txt
    xmlgraphics/fop/trunk/lib/commons-io.LICENSE.txt
    xmlgraphics/fop/trunk/src/java/org/apache/fop/area/CachedRenderPagesModel.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/area/RenderPagesModel.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Trait.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOText.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOTreeBuilder.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/XMLObj.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/PropertyMaker.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/StringProperty.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontReader.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontSetup.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/LazyFont.java   (contents, props changed)
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/MultiByteFont.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/TTFDirTabEntry.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractBaseLayoutManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PositionIterator.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LineLayoutPossibilities.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/list/ListItemLayoutManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableContentLayoutManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFDocument.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFEncryptionManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFState.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/PDFStream.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/pdf/TempFileStreamCache.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/bitmap/TIFFRenderer.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/java2d/Java2DRenderer.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderer.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/print/PrintRenderer.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSFontUtils.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSGraphics2D.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSTextPainter.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/xml/XMLXMLHandler.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFANode.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFGraphics2D.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFGraphicsConfiguration.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFImageElementBridge.java   (contents, props changed)
    xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFTextPainter.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/util/ASCII85InputStream.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/util/ASCII85OutputStream.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/util/CloseBlockerOutputStream.java
    xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/pcl/PCLRenderer.java
    xmlgraphics/fop/trunk/src/sandbox/org/apache/fop/render/pcl/PCLStream.java
    xmlgraphics/fop/trunk/test/java/org/apache/fop/util/ASCII85InputStreamTestCase.java

Modified: xmlgraphics/fop/trunk/fop.bat
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/fop.bat?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/fop.bat (original)
+++ xmlgraphics/fop/trunk/fop.bat Mon Nov 14 04:55:46 2005
@@ -47,7 +47,7 @@
 set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\serializer-2.7.0.jar
 set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\batik-all-1.6.jar
 set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\avalon-framework-4.2.0.jar
-set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\commons-io-1.0.jar
+set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\commons-io-1.1.jar
 set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\commons-logging-1.0.3.jar
 set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jimi-1.0.jar
 set LOCALCLASSPATH=%LOCALCLASSPATH%;%LIBDIR%\jai_core.jar

Modified: xmlgraphics/fop/trunk/lib/README.txt
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/lib/README.txt?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/lib/README.txt (original)
+++ xmlgraphics/fop/trunk/lib/README.txt Mon Nov 14 04:55:46 2005
@@ -17,7 +17,7 @@
     http://jakarta.apache.org/commons/io/
     (I/O routines)
     
-    Apache License v1.1
+    Apache License v2.0
     
 - Apache Jakarta Commons Logging
 

Added: xmlgraphics/fop/trunk/lib/commons-io-1.1.jar
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/lib/commons-io-1.1.jar?rev=344111&view=auto
==============================================================================
Binary file - no diff available.

Propchange: xmlgraphics/fop/trunk/lib/commons-io-1.1.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: xmlgraphics/fop/trunk/lib/commons-io.LICENSE.txt
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/lib/commons-io.LICENSE.txt?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/lib/commons-io.LICENSE.txt (original)
+++ xmlgraphics/fop/trunk/lib/commons-io.LICENSE.txt Mon Nov 14 04:55:46 2005
@@ -1,56 +1,203 @@
-/*
- * ====================================================================
- *
- * The Apache Software License, Version 1.1
- *
- * Copyright (c) 1999-2003 The Apache Software Foundation.  All rights
- * reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- *
- * 3. The end-user documentation included with the redistribution, if
- *    any, must include the following acknowlegement:
- *       "This product includes software developed by the
- *        Apache Software Foundation (http://www.apache.org/)."
- *    Alternately, this acknowlegement may appear in the software itself,
- *    if and wherever such third-party acknowlegements normally appear.
- *
- * 4. The names "The Jakarta Project", "Commons", and "Apache Software
- *    Foundation" must not be used to endorse or promote products derived
- *    from this software without prior written permission. For written
- *    permission, please contact apache@apache.org.
- *
- * 5. Products derived from this software may not be called "Apache"
- *    nor may "Apache" appear in their names without prior written
- *    permission of the Apache Group.
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
- * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- * ====================================================================
- *
- * This software consists of voluntary contributions made by many
- * individuals on behalf of the Apache Software Foundation.  For more
- * information on the Apache Software Foundation, please see
- * <http://www.apache.org/>.
- *
- */
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed 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.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+

Added: xmlgraphics/fop/trunk/lib/commons-io.NOTICE.txt
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/lib/commons-io.NOTICE.txt?rev=344111&view=auto
==============================================================================
--- xmlgraphics/fop/trunk/lib/commons-io.NOTICE.txt (added)
+++ xmlgraphics/fop/trunk/lib/commons-io.NOTICE.txt Mon Nov 14 04:55:46 2005
@@ -0,0 +1,3 @@
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+

Propchange: xmlgraphics/fop/trunk/lib/commons-io.NOTICE.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/CachedRenderPagesModel.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/CachedRenderPagesModel.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/CachedRenderPagesModel.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/CachedRenderPagesModel.java Mon Nov 14 04:55:46 2005
@@ -65,7 +65,7 @@
                         // load page from cache
                         String name = (String)pageMap.get(p);
                         File temp = new File(name);
-                        System.out.println("page serialized to: " + temp.length());
+                        log.debug("page serialized to: " + temp.length());
                         ObjectInputStream in = new ObjectInputStream(
                                              new BufferedInputStream(
                                                new FileInputStream(temp)));
@@ -74,7 +74,7 @@
                         temp.delete();
                         pageMap.remove(p);
                     } catch (Exception e) {
-                        e.printStackTrace();
+                        log.error(e);
                     }
                 }
 
@@ -90,7 +90,7 @@
                     }
                 } catch (Exception e) {
                     // use error handler to handle this FOP or IO Exception
-                    e.printStackTrace();
+                    log.error(e);
                 }
                 p.clear();
                 iter.remove();
@@ -123,7 +123,7 @@
             tempstream.close();
             pageMap.put(page, fname);
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error(e);
         }
     }
 }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/RenderPagesModel.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/RenderPagesModel.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/RenderPagesModel.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/RenderPagesModel.java Mon Nov 14 04:55:46 2005
@@ -115,7 +115,7 @@
                 renderer.renderPage(page);
             } catch (Exception e) {
                 // use error handler to handle this FOP or IO Exception
-                e.printStackTrace();
+                log.error(e);
             }
             page.clear();
         } else {
@@ -159,7 +159,7 @@
                     }
                 } catch (Exception e) {
                     // use error handler to handle this FOP or IO Exception
-                    e.printStackTrace();
+                    log.error(e);
                 }
                 p.clear();
                 iter.remove();

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Trait.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Trait.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Trait.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Trait.java Mon Nov 14 04:55:46 2005
@@ -18,6 +18,9 @@
 
 package org.apache.fop.area;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 import org.apache.fop.datatypes.ColorType;
 import org.apache.fop.fo.Constants;
 import org.apache.fop.image.FopImage;
@@ -34,6 +37,10 @@
  * This class represents an area trait that specifies a value for rendering.
  */
 public class Trait implements Serializable {
+
+    /** Logger instance */
+    private static Log log = LogFactory.getLog(Trait.class);
+    
     /**
      * Id reference line, not resolved.
      * not sure if this is needed.
@@ -402,11 +409,11 @@
             Object o = tclass.newInstance();
             //return o.fromString(sTraitValue);
         } catch (IllegalAccessException e1) {
-            System.err.println("Can't create instance of "
+            log.error("Can't create instance of "
                                + tclass.getName());
             return null;
         } catch (InstantiationException e2) {
-            System.err.println("Can't create instance of "
+            log.error("Can't create instance of "
                                + tclass.getName());
             return null;
         }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOText.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOText.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOText.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOText.java Mon Nov 14 04:55:46 2005
@@ -500,7 +500,7 @@
         
         public boolean hasNext() {
            if (curIndex == 0) {
-//             System.out.println("->" + new String(ca) + "<-");
+//             log.debug("->" + new String(ca) + "<-");
           }
            return (curIndex < endIndex);
         }
@@ -519,16 +519,16 @@
             if (curIndex < endIndex && nextCharCalled < 2) {
                 startIndex++;
                 nextCharCalled = 0;
-//              System.out.println("removeA: " + new String(ca, startIndex, endIndex - startIndex));
+//              log.debug("removeA: " + new String(ca, startIndex, endIndex - startIndex));
             } else if (curIndex < endIndex) {
                 // copy from curIndex to end to curIndex-1
                 System.arraycopy(ca, curIndex, ca, curIndex - 1, 
                     endIndex - curIndex);
                 endIndex--;
                 curIndex--;
-//              System.out.println("removeB: " + new String(ca, startIndex, endIndex - startIndex));
+//              log.debug("removeB: " + new String(ca, startIndex, endIndex - startIndex));
             } else if (curIndex == endIndex) {
-//              System.out.println("removeC: " + new String(ca, startIndex, endIndex - startIndex));
+//              log.debug("removeC: " + new String(ca, startIndex, endIndex - startIndex));
                 endIndex--;
                 curIndex--;
             }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOTreeBuilder.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOTreeBuilder.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOTreeBuilder.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/FOTreeBuilder.java Mon Nov 14 04:55:46 2005
@@ -265,7 +265,7 @@
         }
         
         ElementMapping.Maker fobjMaker = findFOMaker(namespaceURI, localName);
-//      System.out.println("found a " + fobjMaker.toString());
+//      log.debug("found a " + fobjMaker.toString());
 
         try {
             foNode = fobjMaker.make(currentFObj);

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/XMLObj.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/XMLObj.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/XMLObj.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/XMLObj.java Mon Nov 14 04:55:46 2005
@@ -173,7 +173,7 @@
             element = doc.getDocumentElement();
             buildTopLevel(doc, element);
         } catch (Exception e) {
-            e.printStackTrace();
+            log.error("Error while trying to instantiate a DOM Document", e);
         }
         return doc;
     }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/PropertyMaker.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/PropertyMaker.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/PropertyMaker.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/PropertyMaker.java Mon Nov 14 04:55:46 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -38,15 +38,22 @@
 
 /**
  * Base class for all property makers
- * @author unascribed
  */
 public class PropertyMaker implements Cloneable {
+
+    /** Logger instance */
+    private static Log log = LogFactory.getLog(PropertyMaker.class);
+
+    /** the property ID */
     protected int propId;
     private boolean inherited = true;
     private Map enums = null;
     private Map keywords = null;
+    /** the default value for the maker */
     protected String defaultValue = null;
+    /** Indicates whether the property is context-dependant and therefore can't be cached. */
     protected boolean contextDep = false;
+    /** Indicates whether the property is set through a shorthand. */
     protected boolean setByShorthand = false;
     private int percentBase = -1;
     private PropertyMaker[] shorthands = null;
@@ -55,8 +62,6 @@
     protected Property defaultProperty;
     protected CorrespondingPropertyMaker corresponding;
 
-    private static Log log = LogFactory.getLog(PropertyMaker.class);
-
     /**
      * @return the name of the property for this Maker
      */
@@ -95,7 +100,7 @@
 
     /**
      * Set the inherited flag.
-     * @param inherited
+     * @param inherited true if this is an inherited property
      */
     public void setInherited(boolean inherited) {
         this.inherited = inherited;
@@ -103,8 +108,8 @@
 
     /**
      * Add a keyword-equiv to the maker.
-     * @param keyword
-     * @param value
+     * @param keyword the keyword
+     * @param value the value to be used when the keyword is specified
      */
     public void addKeyword(String keyword, String value) {
         if (keywords == null) {
@@ -115,8 +120,8 @@
 
     /**
      * Add a enum constant.
-     * @param constant
-     * @param value
+     * @param constant the enum constant 
+     * @param value the Property value to use when the constant is specified 
      */
     public void addEnum(String constant, Property value) {
         if (enums == null) {
@@ -127,7 +132,7 @@
 
     /**
      * Add a subproperty to this maker.
-     * @param subproperty
+     * @param subproperty the PropertyMaker for the subproperty
      */
     public void addSubpropMaker(PropertyMaker subproperty) {
         throw new RuntimeException("Unable to add subproperties " + getClass()); 
@@ -179,7 +184,7 @@
 
     /**
      * Set the default value for this maker.
-     * @param defaultValue
+     * @param defaultValue the default value
      * @param contextDep true when the value context dependent and
      *        must not be cached.
      */
@@ -190,7 +195,7 @@
 
     /**
      * Set the percent base identifier for this maker. 
-     * @param percentBase
+     * @param percentBase the percent base (ex. LengthBase.FONTSIZE)
      */
     public void setPercentBase(int percentBase) {
         this.percentBase = percentBase;
@@ -201,7 +206,7 @@
      * makers. It should be true for the subproperties which must be 
      * assigned a value when the base property is assigned a attribute 
      * value directly.
-     * @param setByShorthand
+     * @param setByShorthand true if this subproperty must be set when the base property is set
      */
     public void setByShorthand(boolean setByShorthand) {
         this.setByShorthand = setByShorthand;
@@ -225,18 +230,21 @@
         return null;
     }
 
-    /*
+    /**
      * If the property is a relative property with a corresponding absolute
      * value specified, the absolute value is used. This is also true of
      * the inheritance priority (I think...)
      * If the property is an "absolute" property and it isn't specified, then
      * we try to compute it from the corresponding relative property: this
      * happens in computeProperty.
+     * @param propertyList the applicable property list
+     * @param tryInherit true if inherited properties should be examined.
+     * @return the property value
+     * @throws PropertyException if there is a problem evaluating the property 
      */
     public Property findProperty(PropertyList propertyList, 
                                  boolean tryInherit)
-        throws PropertyException
-    {
+                throws PropertyException {
         Property p = null;
         
         if (log.isTraceEnabled()) {
@@ -275,12 +283,13 @@
      *        Is 0 when retriving a base property.
      * @param propertyList The PropertyList object being built for this FO.
      * @param tryInherit true if inherited properties should be examined.
-     * @param tryDefault true if the default value should be returned. 
+     * @param tryDefault true if the default value should be returned.
+     * @return the property value 
+     * @throws PropertyException if there is a problem evaluating the property 
      */
     public Property get(int subpropertyId, PropertyList propertyList,
                         boolean tryInherit, boolean tryDefault)
-        throws PropertyException
-    {
+                    throws PropertyException {
         Property p = findProperty(propertyList, tryInherit);
 
         if (p == null && tryDefault) {    // default value for this FO!
@@ -307,11 +316,14 @@
      * @param pl the PropertyList containing the property. (TODO: explain
      * what this is used for, or remove it from the signature.)
      * @return an object implementing the PercentBase interface.
+     * @throws PropertyException if there is a problem while evaluating the base property
      */
     public PercentBase getPercentBase(FObj fo, PropertyList pl) throws PropertyException {
-        if (percentBase == -1)
+        if (percentBase == -1) {
             return null;
-        return new LengthBase(fo, pl, percentBase);
+        } else {
+            return new LengthBase(fo, pl, percentBase);
+        }
     }
 
     /**
@@ -414,7 +426,8 @@
                 newProp = convertProperty(newProp, propertyList, fo);
             }
             if (newProp == null) {
-                throw new org.apache.fop.fo.expr.PropertyException("No conversion defined " + pvalue);
+                throw new org.apache.fop.fo.expr.PropertyException(
+                        "No conversion defined " + pvalue);
             }
             return newProp;
         } catch (PropertyException propEx) {
@@ -448,23 +461,21 @@
 
     public Property convertShorthandProperty(PropertyList propertyList,
                                              Property prop, FObj fo)
-        throws PropertyException
-    {
+        throws PropertyException {
         Property pret = convertProperty(prop, propertyList, fo);
         if (pret == null) {
             // If value is a name token, may be keyword or Enum
             String sval = prop.getNCname();
             if (sval != null) {
-                // System.err.println("Convert shorthand ncname " + sval);
+                //log.debug("Convert shorthand ncname " + sval);
                 pret = checkEnumValues(sval);
                 if (pret == null) {
                     /* Check for keyword shorthand values to be substituted. */
                     String pvalue = checkValueKeywords(sval);
                     if (!pvalue.equals(sval)) {
-                        // System.err.println("Convert shorthand keyword" + pvalue);
+                        // log.debug("Convert shorthand keyword" + pvalue);
                         // Substituted a value: must parse it
-                        Property p =
-                            PropertyParser.parse(pvalue,
+                        Property p = PropertyParser.parse(pvalue,
                                                  new PropertyInfo(this,
                                                                   propertyList,
                                                                   fo));
@@ -475,7 +486,7 @@
         }
         if (pret != null) {
             /*
-             * System.err.println("Return shorthand value " + pret.getString() +
+             * log.debug("Return shorthand value " + pret.getString() +
              * " for " + getPropName());
              */
         }
@@ -584,10 +595,10 @@
      * return an appropriate border-right-width Property object.
      * @param propertyList the collection of properties to be considered
      * @return the Property, if found, the correspons, otherwise, null
+     * @throws PropertyException if there is a problem while evaluating the shorthand
      */
     public Property getShorthand(PropertyList propertyList)
-        throws PropertyException
-    {
+                throws PropertyException {
         if (shorthands == null) {
             return null;
         }
@@ -608,6 +619,7 @@
         return null;
     }
     
+    /** @return the name of the property this maker is used for. */
     public String getName() {
         return FOPropertyMapping.getPropertyName(propId);
     }
@@ -615,6 +627,7 @@
     /**
      * Return a clone of the makers. Used by useGeneric() to clone the
      * subproperty makers of the generic compound makers. 
+     * @see java.lang.Object#clone()
      */
     public Object clone() {
         try {

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/StringProperty.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/StringProperty.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/StringProperty.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/properties/StringProperty.java Mon Nov 14 04:55:46 2005
@@ -61,7 +61,7 @@
                     if (value.charAt(vlen) == q1) {
                         return new StringProperty(value.substring(1, vlen));
                     }
-                    System.err.println("Warning String-valued property starts with quote"
+                    log.warn("String-valued property starts with quote"
                                        + " but doesn't end with quote: "
                                        + value);
                     // fall through and use the entire value, including first quote
@@ -83,7 +83,7 @@
      */
     public StringProperty(String str) {
         this.str = str;
-        // System.err.println("Set StringProperty: " + str);
+        // log.debug("Set StringProperty: " + str);
     }
 
     /**

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontReader.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontReader.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontReader.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontReader.java Mon Nov 14 04:55:46 2005
@@ -147,7 +147,7 @@
      * @see org.xml.sax.ContentHandler#startElement(String, String, String, Attributes)
      */
     public void startElement(String uri, String localName, String qName,
-                             Attributes attributes) {
+                             Attributes attributes) throws SAXException {
         if (localName.equals("font-metrics")) {
             if ("TYPE0".equals(attributes.getValue("type"))) {
                 multiFont = new MultiByteFont();
@@ -190,8 +190,8 @@
                 singleFont.setWidth(Integer.parseInt(attributes.getValue("idx")),
                         Integer.parseInt(attributes.getValue("wdt")));
             } catch (NumberFormatException ne) {
-                System.out.println("Malformed width in metric file: "
-                                   + ne.getMessage());
+                throw new SAXException("Malformed width in metric file: "
+                                   + ne.getMessage(), ne);
             }
         } else if ("pair".equals(localName)) {
             currentKerning.put(new Integer(attributes.getValue("kpx2")),
@@ -199,12 +199,12 @@
         }
     }
 
-    private int getInt(String str) {
+    private int getInt(String str) throws SAXException {
         int ret = 0;
         try {
             ret = Integer.parseInt(str);
         } catch (Exception e) {
-            /**@todo log this exception */
+            throw new SAXException("Error while parsing integer value: " + str, e);
         }
         return ret;
     }
@@ -212,7 +212,7 @@
     /**
      * @see org.xml.sax.ContentHandler#endElement(String, String, String)
      */
-    public void endElement(String uri, String localName, String qName) {
+    public void endElement(String uri, String localName, String qName) throws SAXException {
         String content = text.toString().trim();
         if ("font-name".equals(localName)) {
             returnFont.setFontName(content);

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontSetup.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontSetup.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontSetup.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontSetup.java Mon Nov 14 04:55:46 2005
@@ -200,7 +200,9 @@
                     FontTriplet triplet = (FontTriplet) triplets.get(c);
 
                     int weight = FontUtil.parseCSS2FontWeight(triplet.getWeight());
-                    //System.out.println("Registering: "+triplet+" weight="+weight);
+                    if (log.isDebugEnabled()) {
+                        log.debug("Registering: " + triplet + " weight=" + weight);
+                    }
                     fontInfo.addFontProperties(internalName,
                                                triplet.getName(),
                                                triplet.getStyle(),

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/LazyFont.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/LazyFont.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/LazyFont.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/LazyFont.java Mon Nov 14 04:55:46 2005
@@ -1,5 +1,5 @@
 /*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,17 +18,18 @@
 
 package org.apache.fop.fonts;
 
-//Java
 import java.util.Map;
 
-//FOP
-
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * This class is used to defer the loading of a font until it is really used.
  */
 public class LazyFont extends Typeface implements FontDescriptor {
 
+    private static Log log = LogFactory.getLog(LazyFont.class);
+    
     private String metricsFileName = null;
     private String fontEmbedPath = null;
     private boolean useKerning = false;
@@ -62,13 +63,10 @@
                 if (realFont instanceof FontDescriptor) {
                     realFontDescriptor = (FontDescriptor) realFont;
                 }
-                // System.out.println("Metrics " + metricsFileName + " loaded.");
+                // log.debug("Metrics " + metricsFileName + " loaded.");
             } catch (Exception ex) {
-                ex.printStackTrace();
-                /**@todo Log this exception */
-                //log.error("Failed to read font metrics file "
-                //                     + metricsFileName
-                //                     + " : " + ex.getMessage());
+                log.error("Failed to read font metrics file "
+                                     + metricsFileName, ex);
             }
         }
     }

Propchange: xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/LazyFont.java
------------------------------------------------------------------------------
    svn:keywords = Id

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/MultiByteFont.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/MultiByteFont.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/MultiByteFont.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/MultiByteFont.java Mon Nov 14 04:55:46 2005
@@ -223,7 +223,6 @@
                 usedGlyphsIndex.put(new Integer(usedGlyphsCount),
                                     new Integer(retIdx));
                 retIdx = usedGlyphsCount;
-                // System.out.println(c+"("+(int)c+") = "+retIdx);
                 usedGlyphsCount++;
             } else {
                 retIdx = newIdx.intValue();

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/TTFDirTabEntry.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/TTFDirTabEntry.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/TTFDirTabEntry.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/truetype/TTFDirTabEntry.java Mon Nov 14 04:55:46 2005
@@ -46,9 +46,7 @@
         offset = in.readTTFULong();
         length = in.readTTFULong();
         String tagStr = new String(tag, "ISO-8859-1");
-        // System.err.println("tag='" + tagStr + "'");
 
-        //System.out.println(this.toString());
         return tagStr;
     }
 

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractBaseLayoutManager.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractBaseLayoutManager.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractBaseLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractBaseLayoutManager.java Mon Nov 14 04:55:46 2005
@@ -81,8 +81,7 @@
             case LengthBase.CONTAINING_REFAREA_WIDTH:
                 return getReferenceAreaIPD();
             default:
-                log.error("Unknown base type for LengthBase:" + lengthBase);
-                new Exception().printStackTrace();
+                log.error(new Exception("Unknown base type for LengthBase:" + lengthBase));
                 return 0;
             }
         } else {

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/AbstractBreaker.java Mon Nov 14 04:55:46 2005
@@ -174,12 +174,14 @@
         ElementListObserver.observe(elementList, "breaker", null);
     }
     
+    /**
+     * Starts the page breaking process.
+     * @param flowBPD the constant available block-progression-dimension (used for every part)
+     */
     public void doLayout(int flowBPD) {
         LayoutContext childLC = createLayoutContext();
         childLC.setStackLimit(new MinOptMax(flowBPD));
 
-        //System.err.println("Vertical alignment: " +
-        // currentSimplePageMaster.getRegion(FO_REGION_BODY).getDisplayAlign());
         if (getCurrentDisplayAlign() == Constants.EN_X_FILL) {
             //EN_FILL is non-standard (by LF)
             alignment = Constants.EN_JUSTIFY;
@@ -492,7 +494,6 @@
     private int optimizeLineLength(KnuthSequence effectiveList, int startElementIndex, int endElementIndex) {
         ListIterator effectiveListIterator;
         // optimize line length
-        //System.out.println(" ");
         int boxCount = 0;
         int accumulatedLineLength = 0;
         int greatestMinimumLength = 0;
@@ -520,10 +521,10 @@
         int averageLineLength = 0;
         if (accumulatedLineLength > 0 && boxCount > 0) {
             averageLineLength = (int) (accumulatedLineLength / boxCount);
-            //System.out.println("PSLM> lunghezza media = " + averageLineLength);
+            log.debug("Average line length = " + averageLineLength);
             if (averageLineLength < greatestMinimumLength) {
                 averageLineLength = greatestMinimumLength;
-                //System.out.println("      correzione, ora e' = " + averageLineLength);
+                log.debug("  Correction to: " + averageLineLength);
             }
         }
         return averageLineLength;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java Mon Nov 14 04:55:46 2005
@@ -690,7 +690,6 @@
         Position lastPos = null;
         while (parentIter.hasNext()) {
             pos = (Position) parentIter.next();
-            //System.out.println("pos = " + pos.getClass().getName());
             if (pos.getIndex() >= 0) {
                 if (firstPos == null) {
                     firstPos = pos;
@@ -728,13 +727,10 @@
                 // pos was created by this BlockLM and was inside a penalty
                 // allowing or forbidding a page break
                 // nothing to do
-                /* LF *///System.out.println(" penalty");
             } else {
                 // innerPosition was created by another LM
                 positionList.add(innerPosition);
                 lastLM = innerPosition.getLM();
-                /* LF *///System.out.println(" " +
-                      // innerPosition.getClass().getName());
             }
         }
 
@@ -756,7 +752,6 @@
                 //    // the last item inside positionList is a LeafPosition
                 //    // (a LineBreakPosition, more precisely); this means that
                 //    // the whole paragraph is on the same page
-                //    System.out.println("paragrafo intero");
                 //    childPosIter = new KnuthPossPosIter(storedList, 0,
                       // storedList.size());
                 //} else {
@@ -781,11 +776,11 @@
                         lastLM = element.getLayoutManager();
                     }
                 }
-                //System.out.println("addAreas riferito a storedList da " +
-                      // iFirst + " a " + iLast);
-                //System.out.println("splitLength= " + splitLength
-                //                   + " (" + neededUnits(splitLength) + " unita') "
-                //                   + (neededUnits(splitLength) * bpUnit - splitLength) + " spazi");
+                //log.debug("Adding areas from " + iFirst + " to " + iLast);
+                //log.debug("splitLength= " + splitLength
+                //                   + " (" + neededUnits(splitLength) + " units') "
+                //                   + (neededUnits(splitLength) * bpUnit - splitLength) 
+                //                   + " spacing");
                 // add space before and / or after the paragraph
                 // to reach a multiple of bpUnit
                 if (bSpaceBefore && bSpaceAfter) {
@@ -810,8 +805,8 @@
                             + foBlockSpaceAfter.min)
                             * bpUnit - splitLength;
                 }
-                //System.out.println("spazio prima = " + adjustedSpaceBefore
-                      // + " spazio dopo = " + adjustedSpaceAfter + " totale = " +
+                //log.debug("space before = " + adjustedSpaceBefore
+                      // + " space after = " + adjustedSpaceAfter + " total = " +
                       // (adjustedSpaceBefore + adjustedSpaceAfter + splitLength));
                 childPosIter = new KnuthPossPosIter(splitList, 0, splitList
                         .size());

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockLayoutManager.java Mon Nov 14 04:55:46 2005
@@ -232,7 +232,6 @@
      */
     public void addAreas(PositionIterator parentIter,
             LayoutContext layoutContext) {
-        //System.out.println(" BLM.addAreas>");
         getParentArea(null);
 
         // if this will create the first block area in a page
@@ -316,7 +315,6 @@
             //    // the last item inside positionList is a LeafPosition
             //    // (a LineBreakPosition, more precisely); this means that
             //    // the whole paragraph is on the same page
-            //    System.out.println("paragrafo intero");
             //    childPosIter = new KnuthPossPosIter(storedList, 0,
                   // storedList.size());
             //} else {
@@ -341,11 +339,11 @@
                     lastLM = element.getLayoutManager();
                 }
             }
-            //System.out.println("addAreas riferito a storedList da " +
-                  // iFirst + " a " + iLast);
-            //System.out.println("splitLength= " + splitLength
-            //                   + " (" + neededUnits(splitLength) + " unita') "
-            //                   + (neededUnits(splitLength) * bpUnit - splitLength) + " spazi");
+            //log.debug("Adding areas from " + iFirst + " to " + iLast);
+            //log.debug("splitLength= " + splitLength
+            //                   + " (" + neededUnits(splitLength) + " units') "
+            //                   + (neededUnits(splitLength) * bpUnit - splitLength) 
+            //                   + " spacing");
             // add space before and / or after the paragraph
             // to reach a multiple of bpUnit
             if (bSpaceBefore && bSpaceAfter) {
@@ -370,7 +368,7 @@
                         + foSpaceAfter.min)
                         * bpUnit - splitLength;
                 }
-            //System.out.println("spazio prima = " + adjustedSpaceBefore
+            //log.debug("spazio prima = " + adjustedSpaceBefore
                   // + " spazio dopo = " + adjustedSpaceAfter + " totale = " +
                   // (adjustedSpaceBefore + adjustedSpaceAfter + splitLength));
             childPosIter = new KnuthPossPosIter(splitList, 0, splitList

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/BlockStackingLayoutManager.java Mon Nov 14 04:55:46 2005
@@ -178,11 +178,11 @@
      * @see LayoutManager#getNextKnuthElements(LayoutContext, int)
      */
     public LinkedList getNextKnuthElements(LayoutContext context, int alignment) {
-        /* LF *///System.err.println("BLM.getNextKnuthElements> keep-together = "
+        //log.debug("BLM.getNextKnuthElements> keep-together = "
               // + layoutProps.keepTogether.getType());
-        /* LF *///System.err.println(" keep-with-previous = " +
+        //log.debug(" keep-with-previous = " +
               // layoutProps.keepWithPrevious.getType());
-        /* LF *///System.err.println(" keep-with-next = " +
+        //log.debug(" keep-with-next = " +
               // layoutProps.keepWithNext.getType());
         BlockLevelLayoutManager curLM; // currently active LM
         BlockLevelLayoutManager prevLM = null; // previously active LM
@@ -388,11 +388,11 @@
      * @see org.apache.fop.layoutmgr.BlockLevelLayoutManager#negotiateBPDAdjustment(int, org.apache.fop.layoutmgr.KnuthElement)
      */
     public int negotiateBPDAdjustment(int adj, KnuthElement lastElement) {
-/*LF*/  //System.out.println("  BLM.negotiateBPDAdjustment> " + adj);
-/*LF*/  //System.out.println("  lastElement e' " + (lastElement.isPenalty() 
+/*LF*/  //log.debug("  BLM.negotiateBPDAdjustment> " + adj);
+/*LF*/  //log.debug("  lastElement e' " + (lastElement.isPenalty() 
         //      ? "penalty" : (lastElement.isGlue() ? "glue" : "box" )));
-/*LF*/  //System.out.println("  position e' " + lastElement.getPosition().getClass().getName());
-/*LF*/  //System.out.println("  " + (bpUnit > 0 ? "unit" : ""));
+/*LF*/  //log.debug("  position e' " + lastElement.getPosition().getClass().getName());
+/*LF*/  //log.debug("  " + (bpUnit > 0 ? "unit" : ""));
         Position innerPosition = ((NonLeafPosition) lastElement.getPosition()).getPosition();
 
         if (innerPosition == null && lastElement.isGlue()) {
@@ -400,11 +400,11 @@
             if (((KnuthGlue) lastElement).getAdjustmentClass() == SPACE_BEFORE_ADJUSTMENT) {
                 // this adjustment applies to space-before
                 adjustedSpaceBefore += adj;
-/*LF*/          //System.out.println("  BLM.negotiateBPDAdjustment> spazio prima: " + adj);
+/*LF*/          //log.debug("  BLM.negotiateBPDAdjustment> spazio prima: " + adj);
             } else {
                 // this adjustment applies to space-after
                 adjustedSpaceAfter += adj;
-/*LF*/          //System.out.println("  BLM.negotiateBPDAdjustment> spazio dopo: " + adj);
+/*LF*/          //log.debug("  BLM.negotiateBPDAdjustment> spazio dopo: " + adj);
             }
             return adj;
         } else if (innerPosition instanceof MappingPosition) {
@@ -414,7 +414,7 @@
             MappingPosition mappingPos = (MappingPosition)innerPosition; 
             if (lastElement.isGlue()) {
                 // lastElement is a glue
-/*LF*/          //System.out.println("  BLM.negotiateBPDAdjustment> bpunit con glue");
+/*LF*/          //log.debug("  BLM.negotiateBPDAdjustment> bpunit con glue");
                 ListIterator storedListIterator = storedList.listIterator(
                         mappingPos.getFirstIndex());
                 int newAdjustment = 0;
@@ -424,7 +424,7 @@
                         newAdjustment += ((BlockLevelLayoutManager)storedElement
                                 .getLayoutManager()).negotiateBPDAdjustment(
                                         adj - newAdjustment, storedElement);
-/*LF*/                  //System.out.println("  BLM.negotiateBPDAdjustment> (progressivo) righe: " 
+/*LF*/                  //log.debug("  BLM.negotiateBPDAdjustment> (progressivo) righe: " 
                         //  + newAdjustment);
                     }
                 }
@@ -435,19 +435,19 @@
                 // lastElement is a penalty: this means that the paragraph
                 // has been split between consecutive pages:
                 // this may involve a change in the number of lines
-/*LF*/          //System.out.println("  BLM.negotiateBPDAdjustment> bpunit con penalty");
+/*LF*/          //log.debug("  BLM.negotiateBPDAdjustment> bpunit con penalty");
                 KnuthPenalty storedPenalty = (KnuthPenalty)
                                              storedList.get(mappingPos.getLastIndex());
                 if (storedPenalty.getW() > 0) {
                     // the original penalty has width > 0
-/*LF*/              //System.out.println("  BLM.negotiateBPDAdjustment> chiamata passata");
+/*LF*/              //log.debug("  BLM.negotiateBPDAdjustment> chiamata passata");
                     return ((BlockLevelLayoutManager)storedPenalty.getLayoutManager())
                            .negotiateBPDAdjustment(storedPenalty.getW(), 
                                    (KnuthElement)storedPenalty);
                 } else {
                     // the original penalty has width = 0
                     // the adjustment involves only the spaces before and after
-/*LF*/              //System.out.println("  BLM.negotiateBPDAdjustment> chiamata gestita");
+/*LF*/              //log.debug("  BLM.negotiateBPDAdjustment> chiamata gestita");
                     return adj;
                 }
             }
@@ -458,7 +458,7 @@
             int returnValue = ((BlockLevelLayoutManager)lastElement.getLayoutManager())
                     .negotiateBPDAdjustment(adj, lastElement);
             lastElement.setPosition(savedPos);
-/*LF*/      //System.out.println("  BLM.negotiateBPDAdjustment> righe: " + returnValue);
+/*LF*/      //log.debug("  BLM.negotiateBPDAdjustment> righe: " + returnValue);
             return returnValue;
         } else {
             // this should never happen
@@ -471,7 +471,7 @@
      * @see BlockLevelLayoutManager#discardSpace(KnuthGlue)
      */
     public void discardSpace(KnuthGlue spaceGlue) {
-        //System.out.println("  BLM.discardSpace> " + spaceGlue.getPosition().getClass().getName());
+        //log.debug("  BLM.discardSpace> " + spaceGlue.getPosition().getClass().getName());
         Position innerPosition = ((NonLeafPosition) spaceGlue.getPosition()).getPosition();
 
         if (innerPosition == null || innerPosition.getLM() == this) {
@@ -501,8 +501,8 @@
      * @see LayoutManager#getChangedKnuthElements(List, int)
      */
     public LinkedList getChangedKnuthElements(List oldList, int alignment) {
-/*LF*/  //System.out.println("");
-/*LF*/  //System.out.println("  BLM.getChangedKnuthElements> inizio: oldList.size() = " 
+/*LF*/  //log.debug("");
+/*LF*/  //log.debug("  BLM.getChangedKnuthElements> inizio: oldList.size() = " 
         //  + oldList.size());
         ListIterator oldListIterator = oldList.listIterator();
         KnuthElement returnedElement;
@@ -517,10 +517,10 @@
         while (oldListIterator.hasNext()) {
             oldElement = (KnuthElement)oldListIterator.next();
             Position innerPosition = ((NonLeafPosition) oldElement.getPosition()).getPosition();
-            //System.out.println(" BLM> unwrapping: " 
+            //log.debug(" BLM> unwrapping: " 
             //  + (oldElement.isBox() ? "box    " : (oldElement.isGlue() ? "glue   " : "penalty")) 
             //  + " creato da " + oldElement.getLayoutManager().getClass().getName());
-            //System.out.println(" BLM> unwrapping:         " 
+            //log.debug(" BLM> unwrapping:         " 
             //  + oldElement.getPosition().getClass().getName());
             if (innerPosition != null) {
                 // oldElement was created by a descendant of this BlockLM
@@ -557,19 +557,18 @@
             }
             int iLast = ((MappingPosition) el.getPosition()).getLastIndex();
 
-            //System.out.println("  si usa storedList da " + iFirst + " a " + iLast 
+            //log-debug("  si usa storedList da " + iFirst + " a " + iLast 
             //  + " compresi su " + storedList.size() + " elementi totali");
             workList = storedList.subList(iFirst, iLast + 1);
         }
         ListIterator workListIterator = workList.listIterator();
 
-        //System.out.println("");
-        //System.out.println("  BLM.getChangedKnuthElements> workList.size() = " 
+        //log.debug("  BLM.getChangedKnuthElements> workList.size() = " 
         //  + workList.size() + " da 0 a " + (workList.size() - 1));
 
         while (workListIterator.hasNext()) {
             currElement = (KnuthElement) workListIterator.next();
-            //System.out.println("elemento n. " + workListIterator.previousIndex() 
+            //log.debug("elemento n. " + workListIterator.previousIndex() 
             //  + " nella workList");
             if (prevElement != null
                 && prevElement.getLayoutManager() != currElement.getLayoutManager()) {
@@ -580,7 +579,7 @@
                                                  currElement.getLayoutManager();
                 boolean bSomethingAdded = false;
                 if (prevLM != this) {
-                    //System.out.println(" BLM.getChangedKnuthElements> chiamata da " 
+                    //log.debug(" BLM.getChangedKnuthElements> chiamata da " 
                     //    + fromIndex + " a " + workListIterator.previousIndex() + " su " 
                     //    + prevLM.getClass().getName());
                     returnedList.addAll(prevLM.getChangedKnuthElements(workList.subList(
@@ -589,7 +588,7 @@
                 } else {
                     // prevLM == this
                     // do nothing
-                    //System.out.println(" BLM.getChangedKnuthElements> elementi propri, "
+                    //log.debug(" BLM.getChangedKnuthElements> elementi propri, "
                     //  + "ignorati, da " + fromIndex + " a " + workListIterator.previousIndex() 
                     //  + " su " + prevLM.getClass().getName());
                 }
@@ -614,7 +613,7 @@
             BlockLevelLayoutManager currLM = (BlockLevelLayoutManager)
                                              currElement.getLayoutManager();
             if (currLM != this) {
-                //System.out.println(" BLM.getChangedKnuthElements> chiamata da " + fromIndex 
+                //log.debug(" BLM.getChangedKnuthElements> chiamata da " + fromIndex 
                 //  + " a " + oldList.size() + " su " + currLM.getClass().getName());
                 returnedList.addAll(currLM.getChangedKnuthElements(
                         workList.subList(fromIndex, workList.size()), alignment));
@@ -625,7 +624,7 @@
                 if (returnedList.size() > 0) {
                     returnedList.removeLast();
                 }
-                //System.out.println(" BLM.getChangedKnuthElements> elementi propri, ignorati, da " 
+                //log.debug(" BLM.getChangedKnuthElements> elementi propri, ignorati, da " 
                 //  + fromIndex + " a " + workList.size());
             }
         }
@@ -654,7 +653,7 @@
             }
         }
 
-        //System.out.println("  BLM.getChangedKnuthElements> intermedio: returnedList.size() = " 
+        //log.debug("  BLM.getChangedKnuthElements> intermedio: returnedList.size() = " 
         //    + returnedList.size());
 
 /* estensione: conversione complessiva */
@@ -702,7 +701,7 @@
             }
         }
 
-        //System.out.println("  BLM.getChangedKnuthElements> finished: returnList.size() = " 
+        //log.debug("  BLM.getChangedKnuthElements> finished: returnList.size() = " 
         //  + returnList.size());
         return returnList;
     }
@@ -875,13 +874,6 @@
                                 CommonBorderPaddingBackground.BEFORE), 
                         RelSide.BEFORE, isFirst, false, this));
             }
-            //TODO Handle conditionality
-            /*
-            int bpBefore = borderAndPadding.getBorderBeforeWidth(false)
-                         + borderAndPadding.getPaddingBefore(false, this);
-            if (bpBefore > 0) {
-                returnList.add(new KnuthBox(bpBefore, getAuxiliaryPosition(), true));
-            }*/
         }
     }
 
@@ -907,13 +899,6 @@
                                 .getWidth(),
                         RelSide.AFTER, false, isLast, this));
             }
-            //TODO Handle conditionality
-            /*
-            int bpAfter = borderAndPadding.getBorderAfterWidth(false)
-                        + borderAndPadding.getPaddingAfter(false, this);
-            if (bpAfter > 0) {
-                returnList.add(new KnuthBox(bpAfter, getAuxiliaryPosition(), true));
-            }*/
         }
     }
 
@@ -1077,8 +1062,7 @@
     }
 
     protected LinkedList createUnitElements(LinkedList oldList) {
-        //System.out.println(" ");
-        //System.out.println("Start conversion: " + oldList.size() 
+        //log.debug("Start conversion: " + oldList.size() 
         //  + " elements, space-before.min=" + layoutProps.spaceBefore.getSpace().min
         //  + " space-after.min=" + layoutProps.spaceAfter.getSpace().min);
         // add elements at the beginning and at the end of oldList
@@ -1101,23 +1085,22 @@
         MinOptMax totalUnits = new MinOptMax(0);
         LinkedList newList = new LinkedList();
 
-        //System.out.println(" ");
-        //System.out.println(" Prima scansione");
+        //log.debug(" Prima scansione");
         // scan the list once to compute total min, opt and max length
         ListIterator oldListIterator = oldList.listIterator();
         while (oldListIterator.hasNext()) {
             KnuthElement element = (KnuthElement) oldListIterator.next();
             if (element.isBox()) {
                 totalLength.add(new MinOptMax(element.getW()));
-                //System.out.println("box " + element.getW());               
+                //log.debug("box " + element.getW());               
             } else if (element.isGlue()) {
                 totalLength.min -= ((KnuthGlue) element).getZ();
                 totalLength.max += ((KnuthGlue) element).getY();
                 //leafValue = ((LeafPosition) element.getPosition()).getLeafPos();
-                //System.out.println("glue " + element.getW() + " + " 
+                //log.debug("glue " + element.getW() + " + " 
                 //    + ((KnuthGlue) element).getY() + " - " + ((KnuthGlue) element).getZ());
             } else {
-                //System.out.println((((KnuthPenalty)element).getP() == KnuthElement.INFINITE 
+                //log.debug((((KnuthPenalty)element).getP() == KnuthElement.INFINITE 
                 //    ? "PENALTY " : "penalty ") + element.getW());
             }
         }
@@ -1125,11 +1108,10 @@
         totalUnits = new MinOptMax(neededUnits(totalLength.min),
                                    neededUnits(totalLength.opt),
                                    neededUnits(totalLength.max));
-        //System.out.println(" totalLength= " + totalLength);
-        //System.out.println(" unita'= " + totalUnits);
+        //log.debug(" totalLength= " + totalLength);
+        //log.debug(" unita'= " + totalUnits);
 
-        //System.out.println(" ");
-        //System.out.println(" Seconda scansione");
+        //log.debug(" Seconda scansione");
         // scan the list once more, stopping at every breaking point
         // in order to compute partial min, opt and max length
         // and create the new elements
@@ -1212,7 +1194,7 @@
                 int uNewShrink = (unitsBeforeBreak.opt - unitsBeforeBreak.min)
                                  - (unsuppressibleUnits.opt - unsuppressibleUnits.min);
 
-                //System.out.println("(" 
+                //log.debug("(" 
                 //    + unsuppressibleUnits.min + "-" + unsuppressibleUnits.opt + "-" 
                 //         + unsuppressibleUnits.max + ") "
                 //    + " -> " + unitsBeforeBreak.min + "-" + unitsBeforeBreak.opt + "-" 
@@ -1245,7 +1227,7 @@
                                          mappingPos,
                                          false));
                 unsuppressibleUnits.add(new MinOptMax(uNewNormal - uLengthChange));
-                //System.out.println("        box " + (uNewNormal - uLengthChange));
+                //log.debug("        box " + (uNewNormal - uLengthChange));
 
                 // new infinite penalty, glue and box, if necessary
                 if (uNewStretch - uStretchChange > 0
@@ -1263,15 +1245,15 @@
                                               LINE_NUMBER_ADJUSTMENT,
                                               mappingPos,
                                               false));
-                    //System.out.println("        PENALTY");
-                    //System.out.println("        glue 0 " + iStretchUnits + " " + iShrinkUnits);
+                    //log.debug("        PENALTY");
+                    //log.debug("        glue 0 " + iStretchUnits + " " + iShrinkUnits);
                     unsuppressibleUnits.max += iStretchUnits;
                     unsuppressibleUnits.min -= iShrinkUnits;
                     if (!oldListIterator.hasNext()) {
                         newList.add(new KnuthBox(0,
                                                  mappingPos,
                                                  false));
-                        //System.out.println("        box 0");
+                        //log.debug("        box 0");
                     }
                 }
 
@@ -1296,10 +1278,10 @@
                                               LINE_NUMBER_ADJUSTMENT,
                                               mappingPos,
                                               false));
-                    //System.out.println("        PENALTY");
-                    //System.out.println("        glue 0 " + uStretchChange + " " + uShrinkChange);
-                    //System.out.println("        penalty " + uLengthChange + " * unit");
-                    //System.out.println("        glue 0 " + (- uStretchChange) + " " 
+                    //log.debug("        PENALTY");
+                    //log.debug("        glue 0 " + uStretchChange + " " + uShrinkChange);
+                    //log.debug("        penalty " + uLengthChange + " * unit");
+                    //log.debug("        glue 0 " + (- uStretchChange) + " " 
                     //      + (- uShrinkChange));
                 } else if (oldListIterator.hasNext()) {
                     // new penalty
@@ -1307,7 +1289,7 @@
                                                  0, false,
                                                  mappingPos,
                                                  false));
-                    //System.out.println("        penalty " + uLengthChange + " * unit");
+                    //log.debug("        penalty " + uLengthChange + " * unit");
                 }
                 // update firstIndex
                 firstIndex = lastIndex + 1;
@@ -1347,9 +1329,9 @@
                                           wrongBox.getPosition(), false));
             newList.addFirst(new KnuthGlue(decreasedLength, 0, 0, SPACE_BEFORE_ADJUSTMENT,
                                            wrongBox.getPosition(), false));
-            //System.out.println("        rimosso box " + neededUnits(wrongBox.getW()));
-            //System.out.println("        aggiunto glue " + neededUnits(decreasedLength) + " 0 0");
-            //System.out.println("        aggiunto box " + neededUnits(
+            //log.debug("        rimosso box " + neededUnits(wrongBox.getW()));
+            //log.debug("        aggiunto glue " + neededUnits(decreasedLength) + " 0 0");
+            //log.debug("        aggiunto box " + neededUnits(
             //       wrongBox.getW() - decreasedLength));
         }
 
@@ -1388,10 +1370,10 @@
             // insert the correct glue
             newList.addLast(new KnuthGlue(decreasedLength, 0, 0, SPACE_AFTER_ADJUSTMENT,
                                           wrongBox.getPosition(), false));
-            //System.out.println("        rimosso box " + neededUnits(wrongBox.getW()));
-            //System.out.println("        aggiunto box " + neededUnits(
+            //log.debug("        rimosso box " + neededUnits(wrongBox.getW()));
+            //log.debug("        aggiunto box " + neededUnits(
             //      wrongBox.getW() - decreasedLength));
-            //System.out.println("        aggiunto glue " + neededUnits(decreasedLength) + " 0 0");
+            //log.debug("        aggiunto glue " + neededUnits(decreasedLength) + " 0 0");
         }
 
         return newList;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PositionIterator.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PositionIterator.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PositionIterator.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/PositionIterator.java Mon Nov 14 04:55:46 2005
@@ -84,7 +84,6 @@
         if (bHasNext) {
             Object retObj = getPos(nextObj);
             lookAhead();
-            //System.out.println(retObj);
             return retObj;
         } else {
             throw new NoSuchElementException("PosIter");

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java?rev=344111&r1=344110&r2=344111&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/StaticContentLayoutManager.java Mon Nov 14 04:55:46 2005
@@ -108,7 +108,7 @@
 
             // get elements from curLM
             returnedList = curLM.getNextKnuthElements(childLC, alignment);
-            //System.out.println("FLM.getNextKnuthElements> returnedList.size() = " 
+            //log.debug("FLM.getNextKnuthElements> returnedList.size() = " 
             //    + returnedList.size());
 
             // "wrap" the Position inside each element
@@ -148,7 +148,7 @@
                             && ((KnuthPenalty)returnedList.getLast()).getP() 
                                     == -KnuthElement.INFINITE) {
                         // a descendant of this flow has break-after
-/*LF*/                  //System.out.println("FLM - break after!!");
+/*LF*/                  //log.debug("FLM - break after!!");
                         return returnList;
                     }
 /*LF*/          }



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