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 2003/03/06 23:19:16 UTC

cvs commit: xml-fop/src/org/apache/fop/layout RelativePositionProps.java AreaClass.java AuralProps.java TextState.java AbsolutePositionProps.java BorderAndPadding.java MarginInlineProps.java FontState.java MarginProps.java PageMaster.java AccessibilityProps.java BackgroundProps.java HyphenationProps.java FontInfo.java

jeremias    2003/03/06 14:19:16

  Modified:    src/org/apache/fop/layout/hyphenation PatternParser.java
                        TernaryTree.java Hyphen.java CharVector.java
                        Hyphenator.java PatternConsumer.java
                        HyphenationTree.java ByteVector.java
                        Hyphenation.java HyphenationException.java
               src/org/apache/fop/layout RelativePositionProps.java
                        AreaClass.java AuralProps.java TextState.java
                        AbsolutePositionProps.java BorderAndPadding.java
                        MarginInlineProps.java FontState.java
                        MarginProps.java PageMaster.java
                        AccessibilityProps.java BackgroundProps.java
                        HyphenationProps.java FontInfo.java
  Log:
  Switched to long licence
  Some general checkstyle fixing
  
  Revision  Changes    Path
  1.7       +90 -31    xml-fop/src/org/apache/fop/layout/hyphenation/PatternParser.java
  
  Index: PatternParser.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/hyphenation/PatternParser.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- PatternParser.java	19 Dec 2002 00:35:31 -0000	1.6
  +++ PatternParser.java	6 Mar 2003 22:19:14 -0000	1.7
  @@ -1,10 +1,53 @@
   /*
    * $Id$
  - * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  - * For details on use and redistribution please refer to the
  - * LICENSE file included with these sources.
  - */
  -
  + * ============================================================================
  + *                    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 modifica-
  + * tion, 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 acknowledgment: "This product includes software
  + *    developed by the Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself, if
  + *    and wherever such third-party acknowledgments normally appear.
  + * 
  + * 4. The names "FOP" 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 name, without prior written permission of the
  + *    Apache Software Foundation.
  + * 
  + * 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 (INCLU-
  + * DING, 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 and was originally created by
  + * James Tauber <jt...@jtauber.com>. For more information on the Apache
  + * Software Foundation, please see <http://www.apache.org/>.
  + */ 
   package org.apache.fop.layout.hyphenation;
   
   // SAX
  @@ -118,10 +161,12 @@
           File file = new File(filename);
           String path = file.getAbsolutePath();
           String fSep = System.getProperty("file.separator");
  -        if (fSep != null && fSep.length() == 1)
  +        if (fSep != null && fSep.length() == 1) {
               path = path.replace(fSep.charAt(0), '/');
  -        if (path.length() > 0 && path.charAt(0) != '/')
  +        }
  +        if (path.length() > 0 && path.charAt(0) != '/') {
               path = '/' + path;
  +        }
           try {
               return new InputSource(new URL("file", null, path).toString());
           } catch (java.net.MalformedURLException e) {
  @@ -133,15 +178,18 @@
           String word;
           boolean space = false;
           int i;
  -        for (i = 0; i < chars.length(); i++)
  -            if (Character.isWhitespace(chars.charAt(i)))
  +        for (i = 0; i < chars.length(); i++) {
  +            if (Character.isWhitespace(chars.charAt(i))) {
                   space = true;
  -            else
  +            } else {
                   break;
  +            }
  +        }
           if (space) {
               // chars.delete(0,i);
  -            for (int countr = i; countr < chars.length(); countr++)
  +            for (int countr = i; countr < chars.length(); countr++) {
                   chars.setCharAt(countr - i, chars.charAt(countr));
  +            }
               chars.setLength(chars.length() - i);
               if (token.length() > 0) {
                   word = token.toString();
  @@ -158,8 +206,9 @@
           }
           token.append(chars.toString().substring(0, i));
           // chars.delete(0,i);
  -        for (int countr = i; countr < chars.length(); countr++)
  +        for (int countr = i; countr < chars.length(); countr++) {
               chars.setCharAt(countr - i, chars.charAt(countr));
  +        }
           chars.setLength(chars.length() - i);
           if (space) {
               word = token.toString();
  @@ -173,9 +222,11 @@
       protected static String getPattern(String word) {
           StringBuffer pat = new StringBuffer();
           int len = word.length();
  -        for (int i = 0; i < len; i++)
  -            if (!Character.isDigit(word.charAt(i)))
  +        for (int i = 0; i < len; i++) {
  +            if (!Character.isDigit(word.charAt(i))) {
                   pat.append(word.charAt(i));
  +            }
  +        }
           return pat.toString();
       }
   
  @@ -188,9 +239,9 @@
                   StringBuffer buf = new StringBuffer();
                   for (int j = 0; j < str.length(); j++) {
                       char c = str.charAt(j);
  -                    if (c != hyphenChar)
  +                    if (c != hyphenChar) {
                           buf.append(c);
  -                    else {
  +                    } else {
                           res.add(buf.toString());
                           buf.setLength(0);
                           char[] h = new char[1];
  @@ -200,10 +251,12 @@
                           res.add(new Hyphen(new String(h), null, null));
                       }
                   }
  -                if (buf.length() > 0)
  +                if (buf.length() > 0) {
                       res.add(buf.toString());
  -            } else
  +                }
  +            } else {
                   res.add(item);
  +            }
           }
           return res;
       }
  @@ -212,11 +265,12 @@
           StringBuffer res = new StringBuffer();
           for (int i = 0; i < ex.size(); i++) {
               Object item = ex.get(i);
  -            if (item instanceof String)
  +            if (item instanceof String) {
                   res.append((String)item);
  -            else {
  -                if (((Hyphen)item).noBreak != null)
  +            } else {
  +                if (((Hyphen)item).noBreak != null) {
                       res.append(((Hyphen)item).noBreak);
  +                }
               }
           }
           return res.toString();
  @@ -231,8 +285,9 @@
               if (Character.isDigit(c)) {
                   il.append(c);
                   i++;
  -            } else
  +            } else {
                   il.append('0');
  +            }
           }
           return il.toString();
       }
  @@ -248,13 +303,14 @@
                                Attributes attrs) {
           if (local.equals("hyphen-char")) {
               String h = attrs.getValue("value");
  -            if (h != null && h.length() == 1)
  +            if (h != null && h.length() == 1) {
                   hyphenChar = h.charAt(0);
  -        } else if (local.equals("classes"))
  +            }
  +        } else if (local.equals("classes")) {
               currElement = ELEM_CLASSES;
  -        else if (local.equals("patterns"))
  +        } else if (local.equals("patterns")) {
               currElement = ELEM_PATTERNS;
  -        else if (local.equals("exceptions")) {
  +        } else if (local.equals("exceptions")) {
               currElement = ELEM_EXCEPTIONS;
               exception = new ArrayList();
           } else if (local.equals("hyphen")) {
  @@ -291,13 +347,15 @@
                   // nothing to do
                   break;
               }
  -            if (currElement != ELEM_HYPHEN)
  +            if (currElement != ELEM_HYPHEN) {
                   token.setLength(0);
  +            }
           }
  -        if (currElement == ELEM_HYPHEN)
  +        if (currElement == ELEM_HYPHEN) {
               currElement = ELEM_EXCEPTIONS;
  -        else
  +        } else {
               currElement = 0;
  +        }
   
       }
   
  @@ -368,8 +426,9 @@
           String systemId = ex.getSystemId();
           if (systemId != null) {
               int index = systemId.lastIndexOf('/');
  -            if (index != -1)
  +            if (index != -1) {
                   systemId = systemId.substring(index + 1);
  +            }
               str.append(systemId);
           }
           str.append(':');
  
  
  
  1.7       +109 -42   xml-fop/src/org/apache/fop/layout/hyphenation/TernaryTree.java
  
  Index: TernaryTree.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/hyphenation/TernaryTree.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TernaryTree.java	25 Oct 2002 09:29:44 -0000	1.6
  +++ TernaryTree.java	6 Mar 2003 22:19:15 -0000	1.7
  @@ -1,10 +1,53 @@
   /*
    * $Id$
  - * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  - * For details on use and redistribution please refer to the
  - * LICENSE file included with these sources.
  - */
  -
  + * ============================================================================
  + *                    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 modifica-
  + * tion, 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 acknowledgment: "This product includes software
  + *    developed by the Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself, if
  + *    and wherever such third-party acknowledgments normally appear.
  + * 
  + * 4. The names "FOP" 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 name, without prior written permission of the
  + *    Apache Software Foundation.
  + * 
  + * 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 (INCLU-
  + * DING, 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 and was originally created by
  + * James Tauber <jt...@jtauber.com>. For more information on the Apache
  + * Software Foundation, please see <http://www.apache.org/>.
  + */ 
   package org.apache.fop.layout.hyphenation;
   
   import java.util.Enumeration;
  @@ -128,8 +171,9 @@
           // make sure we have enough room in the arrays
           int len = key.length()
                     + 1;    // maximum number of nodes that may be generated
  -        if (freenode + len > eq.length)
  +        if (freenode + len > eq.length) {
               redimNodeArrays(eq.length + BLOCK_SIZE);
  +        }
           char strkey[] = new char[len--];
           key.getChars(0, len, strkey, 0);
           strkey[len] = 0;
  @@ -138,8 +182,9 @@
   
       public void insert(char[] key, int start, char val) {
           int len = strlen(key) + 1;
  -        if (freenode + len > eq.length)
  +        if (freenode + len > eq.length) {
               redimNodeArrays(eq.length + BLOCK_SIZE);
  +        }
           root = insert(root, key, start, val);
       }
   
  @@ -185,9 +230,10 @@
                       lo[pp] = 0;
                       sc[pp] = 0;
                       hi[pp] = 0;
  -                } else
  -                    sc[pp] =
  -                        0xFFFF;    // we only got first char of key, rest is still there
  +                } else {
  +                    // we only got first char of key, rest is still there
  +                    sc[pp] = 0xFFFF;
  +                }
               } else {
                   // In this case we can save a node by swapping the new node
                   // with the compressed node
  @@ -200,18 +246,18 @@
               }
           }
           char s = key[start];
  -        if (s < sc[p])
  +        if (s < sc[p]) {
               lo[p] = insert(lo[p], key, start, val);
  -        else if (s == sc[p]) {
  -            if (s != 0)
  +        } else if (s == sc[p]) {
  +            if (s != 0) {
                   eq[p] = insert(eq[p], key, start + 1, val);
  -            else {
  +            } else {
                   // key already in tree, overwrite data
                   eq[p] = val;
               }
  -
  -        } else
  +        } else {
               hi[p] = insert(hi[p], key, start, val);
  +        }
           return p;
       }
   
  @@ -219,9 +265,11 @@
        * Compares 2 null terminated char arrays
        */
       public static int strcmp(char[] a, int startA, char[] b, int startB) {
  -        for (; a[startA] == b[startB]; startA++, startB++)
  -            if (a[startA] == 0)
  +        for (; a[startA] == b[startB]; startA++, startB++) {
  +            if (a[startA] == 0) {
                   return 0;
  +            }
  +        }
           return a[startA] - b[startB];
       }
   
  @@ -232,27 +280,32 @@
           int i, d, len = str.length();
           for (i = 0; i < len; i++) {
               d = (int)str.charAt(i) - a[start + i];
  -            if (d != 0)
  +            if (d != 0) {
                   return d;
  -            if (a[start + i] == 0)
  +            }
  +            if (a[start + i] == 0) {
                   return d;
  +            }
           }
  -        if (a[start + i] != 0)
  +        if (a[start + i] != 0) {
               return (int)-a[start + i];
  +        }
           return 0;
   
       }
   
       public static void strcpy(char[] dst, int di, char[] src, int si) {
  -        while (src[si] != 0)
  +        while (src[si] != 0) {
               dst[di++] = src[si++];
  +        }
           dst[di] = 0;
       }
   
       public static int strlen(char[] a, int start) {
           int len = 0;
  -        for (int i = start; i < a.length && a[i] != 0; i++)
  +        for (int i = start; i < a.length && a[i] != 0; i++) {
               len++;
  +        }
           return len;
       }
   
  @@ -277,22 +330,25 @@
   
           while (p != 0) {
               if (sc[p] == 0xFFFF) {
  -                if (strcmp(key, i, kv.getArray(), lo[p]) == 0)
  +                if (strcmp(key, i, kv.getArray(), lo[p]) == 0) {
                       return eq[p];
  -                else
  +                } else {
                       return -1;
  +                }
               }
               c = key[i];
               d = c - sc[p];
               if (d == 0) {
  -                if (c == 0)
  +                if (c == 0) {
                       return eq[p];
  +                }
                   i++;
                   p = eq[p];
  -            } else if (d < 0)
  +            } else if (d < 0) {
                   p = lo[p];
  -            else
  +            } else {
                   p = hi[p];
  +            }
           }
           return -1;
       }
  @@ -344,8 +400,9 @@
        */
       protected void insertBalanced(String[] k, char[] v, int offset, int n) {
           int m;
  -        if (n < 1)
  +        if (n < 1) {
               return;
  +        }
           m = n >> 1;
   
           insert(k[m + offset], v[m + offset]);
  @@ -407,8 +464,9 @@
   
       private void compact(CharVector kx, TernaryTree map, char p) {
           int k;
  -        if (p == 0)
  +        if (p == 0) {
               return;
  +        }
           if (sc[p] == 0xFFFF) {
               k = map.find(kv.getArray(), lo[p]);
               if (k < 0) {
  @@ -419,8 +477,9 @@
               lo[p] = (char)k;
           } else {
               compact(kx, map, lo[p]);
  -            if (sc[p] != 0)
  +            if (sc[p] != 0) {
                   compact(kx, map, eq[p]);
  +            }
               compact(kx, map, hi[p]);
           }
       }
  @@ -494,8 +553,9 @@
           }
   
           public char getValue() {
  -            if (cur >= 0)
  +            if (cur >= 0) {
                   return eq[cur];
  +            }
               return 0;
           }
   
  @@ -510,11 +570,13 @@
               Item i = new Item();
               int res = 0;
   
  -            if (ns.empty())
  +            if (ns.empty()) {
                   return -1;
  +            }
   
  -            if (cur != 0 && sc[cur] == 0)
  +            if (cur != 0 && sc[cur] == 0) {
                   return lo[cur];
  +            }
   
               boolean climb = true;
   
  @@ -538,14 +600,16 @@
                   case 2:
                       res = hi[i.parent];
                       ns.push(i.clone());
  -                    if (ks.length() > 0)
  +                    if (ks.length() > 0) {
                           ks.setLength(ks.length() - 1);    // pop
  +                    }
                       climb = false;
                       break;
   
                   default:
  -                    if (ns.empty())
  +                    if (ns.empty()) {
                           return -1;
  +                    }
                       climb = true;
                       break;
                   }
  @@ -557,11 +621,12 @@
            * traverse the tree to find next key
            */
           private int run() {
  -            if (cur == -1)
  +            if (cur == -1) {
                   return -1;
  +            }
   
               boolean leaf = false;
  -            for (; ; ) {
  +            while (true) {
                   // first go down on low branch until leaf or compressed branch
                   while (cur != 0) {
                       if (sc[cur] == 0xFFFF) {
  @@ -575,9 +640,10 @@
                       }
                       cur = lo[cur];
                   }
  -                if (leaf)
  +                if (leaf) {
                       break;
  -                    // nothing found, go up one node and try again
  +                }
  +                // nothing found, go up one node and try again
                   cur = up();
                   if (cur == -1) {
                       return -1;
  @@ -588,8 +654,9 @@
               StringBuffer buf = new StringBuffer(ks.toString());
               if (sc[cur] == 0xFFFF) {
                   int p = lo[cur];
  -                while (kv.get(p) != 0)
  +                while (kv.get(p) != 0) {
                       buf.append(kv.get(p++));
  +                }
               }
               curkey = buf.toString();
               return 0;
  
  
  
  1.4       +54 -8     xml-fop/src/org/apache/fop/layout/hyphenation/Hyphen.java
  
  Index: Hyphen.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/hyphenation/Hyphen.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Hyphen.java	30 Jul 2001 20:29:28 -0000	1.3
  +++ Hyphen.java	6 Mar 2003 22:19:15 -0000	1.4
  @@ -1,10 +1,53 @@
   /*
    * $Id$
  - * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  - * For details on use and redistribution please refer to the
  - * LICENSE file included with these sources.
  - */
  -
  + * ============================================================================
  + *                    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 modifica-
  + * tion, 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 acknowledgment: "This product includes software
  + *    developed by the Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself, if
  + *    and wherever such third-party acknowledgments normally appear.
  + * 
  + * 4. The names "FOP" 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 name, without prior written permission of the
  + *    Apache Software Foundation.
  + * 
  + * 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 (INCLU-
  + * DING, 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 and was originally created by
  + * James Tauber <jt...@jtauber.com>. For more information on the Apache
  + * Software Foundation, please see <http://www.apache.org/>.
  + */ 
   package org.apache.fop.layout.hyphenation;
   
   import java.io.Serializable;
  @@ -40,9 +83,12 @@
       }
   
       public String toString() {
  -        if (noBreak == null && postBreak == null && preBreak != null
  -                && preBreak.equals("-"))
  +        if (noBreak == null 
  +                && postBreak == null 
  +                && preBreak != null
  +                && preBreak.equals("-")) {
               return "-";
  +                }
           StringBuffer res = new StringBuffer("{");
           res.append(preBreak);
           res.append("}{");
  
  
  
  1.5       +64 -19    xml-fop/src/org/apache/fop/layout/hyphenation/CharVector.java
  
  Index: CharVector.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/hyphenation/CharVector.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- CharVector.java	25 Oct 2002 09:29:44 -0000	1.4
  +++ CharVector.java	6 Mar 2003 22:19:15 -0000	1.5
  @@ -1,10 +1,53 @@
   /*
    * $Id$
  - * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  - * For details on use and redistribution please refer to the
  - * LICENSE file included with these sources.
  - */
  -
  + * ============================================================================
  + *                    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 modifica-
  + * tion, 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 acknowledgment: "This product includes software
  + *    developed by the Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself, if
  + *    and wherever such third-party acknowledgments normally appear.
  + * 
  + * 4. The names "FOP" 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 name, without prior written permission of the
  + *    Apache Software Foundation.
  + * 
  + * 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 (INCLU-
  + * DING, 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 and was originally created by
  + * James Tauber <jt...@jtauber.com>. For more information on the Apache
  + * Software Foundation, please see <http://www.apache.org/>.
  + */ 
   package org.apache.fop.layout.hyphenation;
   
   import java.io.Serializable;
  @@ -21,7 +64,7 @@
        * Capacity increment size
        */
       private static final int DEFAULT_BLOCK_SIZE = 2048;
  -    private int BLOCK_SIZE;
  +    private int blockSize;
   
       /**
        * The encapsulated array
  @@ -38,25 +81,27 @@
       }
   
       public CharVector(int capacity) {
  -        if (capacity > 0)
  -            BLOCK_SIZE = capacity;
  -        else
  -            BLOCK_SIZE = DEFAULT_BLOCK_SIZE;
  -        array = new char[BLOCK_SIZE];
  +        if (capacity > 0) {
  +            blockSize = capacity;
  +        } else {
  +            blockSize = DEFAULT_BLOCK_SIZE;
  +        }
  +        array = new char[blockSize];
           n = 0;
       }
   
       public CharVector(char[] a) {
  -        BLOCK_SIZE = DEFAULT_BLOCK_SIZE;
  +        blockSize = DEFAULT_BLOCK_SIZE;
           array = a;
           n = a.length;
       }
   
       public CharVector(char[] a, int capacity) {
  -        if (capacity > 0)
  -            BLOCK_SIZE = capacity;
  -        else
  -            BLOCK_SIZE = DEFAULT_BLOCK_SIZE;
  +        if (capacity > 0) {
  +            blockSize = capacity;
  +        } else {
  +            blockSize = DEFAULT_BLOCK_SIZE;
  +        }
           array = a;
           n = a.length;
       }
  @@ -69,7 +114,7 @@
       }
   
       public Object clone() {
  -        CharVector cv = new CharVector((char[])array.clone(), BLOCK_SIZE);
  +        CharVector cv = new CharVector((char[])array.clone(), blockSize);
           cv.n = this.n;
           return cv;
       }
  @@ -104,7 +149,7 @@
           int index = n;
           int len = array.length;
           if (n + size >= len) {
  -            char[] aux = new char[len + BLOCK_SIZE];
  +            char[] aux = new char[len + blockSize];
               System.arraycopy(array, 0, aux, 0, len);
               array = aux;
           }
  
  
  
  1.9       +82 -21    xml-fop/src/org/apache/fop/layout/hyphenation/Hyphenator.java
  
  Index: Hyphenator.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/hyphenation/Hyphenator.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- Hyphenator.java	4 Sep 2002 08:36:36 -0000	1.8
  +++ Hyphenator.java	6 Mar 2003 22:19:15 -0000	1.9
  @@ -1,13 +1,61 @@
   /*
    * $Id$
  - * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  - * For details on use and redistribution please refer to the
  - * LICENSE file included with these sources.
  - */
  -
  + * ============================================================================
  + *                    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 modifica-
  + * tion, 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 acknowledgment: "This product includes software
  + *    developed by the Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself, if
  + *    and wherever such third-party acknowledgments normally appear.
  + * 
  + * 4. The names "FOP" 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 name, without prior written permission of the
  + *    Apache Software Foundation.
  + * 
  + * 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 (INCLU-
  + * DING, 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 and was originally created by
  + * James Tauber <jt...@jtauber.com>. For more information on the Apache
  + * Software Foundation, please see <http://www.apache.org/>.
  + */ 
   package org.apache.fop.layout.hyphenation;
   
  -import java.io.*;
  +import java.io.BufferedInputStream;
  +import java.io.File;
  +import java.io.FileInputStream;
  +import java.io.IOException;
  +import java.io.InputStream;
  +import java.io.ObjectInputStream;
   import java.util.Hashtable;
   
   /**
  @@ -17,7 +65,9 @@
    * @author Carlos Villegas <ca...@uniscope.co.jp>
    */
   public class Hyphenator {
  -    static Hashtable hyphenTrees = new Hashtable();
  +    
  +    /**@todo Don't use statics */
  +    private static Hashtable hyphenTrees = new Hashtable();
   
       private HyphenationTree hyphenTree = null;
       private int remainCharCount = 2;
  @@ -35,13 +85,16 @@
               String country) {
           String key = lang;
           // check whether the country code has been used
  -        if (country != null &&!country.equals("none"))
  +        if (country != null && !country.equals("none")) {
               key += "_" + country;
  -            // first try to find it in the cache
  -        if (hyphenTrees.containsKey(key))
  +        }
  +        // first try to find it in the cache
  +        if (hyphenTrees.containsKey(key)) {
               return (HyphenationTree)hyphenTrees.get(key);
  -        if (hyphenTrees.containsKey(lang))
  +        }
  +        if (hyphenTrees.containsKey(lang)) {
               return (HyphenationTree)hyphenTrees.get(lang);
  +        }
   
           HyphenationTree hTree = getFopHyphenationTree(key);
           if (hTree == null) {
  @@ -54,6 +107,7 @@
           if (hTree != null) {
               hyphenTrees.put(key, hTree);
           } else {
  +            /**@todo Proper logging please */
               //log.error("Couldn't find hyphenation pattern "
               //                       + key);
           }
  @@ -73,7 +127,9 @@
                   is = contextClassLoader.getResourceAsStream("hyph/" + key
                                                               + ".hyp");
               }
  -        } catch (Exception e) {}
  +        } catch (Exception e) {
  +            //ignore, fallback further down
  +        }
   
           if (is == null) {
               is = Hyphenator.class.getResourceAsStream("/hyph/" + key
  @@ -118,9 +174,9 @@
               ois = new ObjectInputStream(is);
               hTree = (HyphenationTree)ois.readObject();
           } catch (Exception e) {
  +            /**@todo proper logging please */
               e.printStackTrace();
  -        }
  -        finally {
  +        } finally {
               if (ois != null) {
                   try {
                       ois.close();
  @@ -149,16 +205,19 @@
           if (hyphenFile.exists()) {
               ObjectInputStream ois = null;
               try {
  -                ois = new ObjectInputStream(new BufferedInputStream(new FileInputStream(hyphenFile)));
  +                ois = new ObjectInputStream(new BufferedInputStream(
  +                            new FileInputStream(hyphenFile)));
                   hTree = (HyphenationTree)ois.readObject();
               } catch (Exception e) {
  +                /**@todo Proper logging please */
                   e.printStackTrace();
  -            }
  -            finally {
  +            } finally {
                   if (ois != null) {
                       try {
                           ois.close();
  -                    } catch (IOException e) {}
  +                    } catch (IOException e) {
  +                        //ignore
  +                    }
                   }
               }
               return hTree;
  @@ -236,15 +295,17 @@
       }
   
       public Hyphenation hyphenate(char[] word, int offset, int len) {
  -        if (hyphenTree == null)
  +        if (hyphenTree == null) {
               return null;
  +        }
           return hyphenTree.hyphenate(word, offset, len, remainCharCount,
                                       pushCharCount);
       }
   
       public Hyphenation hyphenate(String word) {
  -        if (hyphenTree == null)
  +        if (hyphenTree == null) {
               return null;
  +        }
           return hyphenTree.hyphenate(word, remainCharCount, pushCharCount);
       }
   
  
  
  
  1.5       +54 -10    xml-fop/src/org/apache/fop/layout/hyphenation/PatternConsumer.java
  
  Index: PatternConsumer.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/hyphenation/PatternConsumer.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PatternConsumer.java	9 Nov 2001 11:32:41 -0000	1.4
  +++ PatternConsumer.java	6 Mar 2003 22:19:15 -0000	1.5
  @@ -1,10 +1,53 @@
   /*
    * $Id$
  - * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  - * For details on use and redistribution please refer to the
  - * LICENSE file included with these sources.
  - */
  -
  + * ============================================================================
  + *                    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 modifica-
  + * tion, 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 acknowledgment: "This product includes software
  + *    developed by the Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself, if
  + *    and wherever such third-party acknowledgments normally appear.
  + * 
  + * 4. The names "FOP" 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 name, without prior written permission of the
  + *    Apache Software Foundation.
  + * 
  + * 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 (INCLU-
  + * DING, 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 and was originally created by
  + * James Tauber <jt...@jtauber.com>. For more information on the Apache
  + * Software Foundation, please see <http://www.apache.org/>.
  + */ 
   package org.apache.fop.layout.hyphenation;
   
   import java.util.ArrayList;
  @@ -22,8 +65,9 @@
        * A character class defines characters that are considered
        * equivalent for the purpose of hyphenation (e.g. "aA"). It
        * usually means to ignore case.
  +     * @param chargroup character group
        */
  -    public void addClass(String chargroup);
  +    void addClass(String chargroup);
   
       /**
        * Add a hyphenation exception. An exception replaces the
  @@ -32,14 +76,14 @@
        * A hyphenatedword is a vector of alternating String's and
        * {@link Hyphen Hyphen} instances
        */
  -    public void addException(String word, ArrayList hyphenatedword);
  +    void addException(String word, ArrayList hyphenatedword);
   
       /**
        * Add hyphenation patterns.
  -     * @param pattern
  +     * @param pattern the pattern
        * @param values interletter values expressed as a string of
        * digit characters.
        */
  -    public void addPattern(String pattern, String values);
  +    void addPattern(String pattern, String values);
   
   }
  
  
  
  1.8       +106 -32   xml-fop/src/org/apache/fop/layout/hyphenation/HyphenationTree.java
  
  Index: HyphenationTree.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/hyphenation/HyphenationTree.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- HyphenationTree.java	13 Feb 2003 21:26:43 -0000	1.7
  +++ HyphenationTree.java	6 Mar 2003 22:19:15 -0000	1.8
  @@ -1,13 +1,63 @@
   /*
    * $Id$
  - * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  - * For details on use and redistribution please refer to the
  - * LICENSE file included with these sources.
  - */
  -
  + * ============================================================================
  + *                    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 modifica-
  + * tion, 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 acknowledgment: "This product includes software
  + *    developed by the Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself, if
  + *    and wherever such third-party acknowledgments normally appear.
  + * 
  + * 4. The names "FOP" 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 name, without prior written permission of the
  + *    Apache Software Foundation.
  + * 
  + * 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 (INCLU-
  + * DING, 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 and was originally created by
  + * James Tauber <jt...@jtauber.com>. For more information on the Apache
  + * Software Foundation, please see <http://www.apache.org/>.
  + */ 
   package org.apache.fop.layout.hyphenation;
   
  -import java.io.*;
  +import java.io.BufferedReader;
  +import java.io.FileInputStream;
  +import java.io.FileOutputStream;
  +import java.io.FileReader;
  +import java.io.IOException;
  +import java.io.ObjectInputStream;
  +import java.io.ObjectOutputStream;
  +import java.io.Serializable;
   import java.util.ArrayList;
   import java.util.HashMap;
   
  @@ -18,8 +68,8 @@
    *
    * @author Carlos Villegas <ca...@uniscope.co.jp>
    */
  -public class HyphenationTree extends TernaryTree implements PatternConsumer,
  -        Serializable {
  +public class HyphenationTree extends TernaryTree 
  +            implements PatternConsumer, Serializable {
   
       /**
        * value space: stores the inteletter values
  @@ -65,10 +115,11 @@
           for (i = 0; i < n; i++) {
               int j = i >> 1;
               byte v = (byte)((values.charAt(i) - '0' + 1) & 0x0f);
  -            if ((i & 1) == 1)
  +            if ((i & 1) == 1) {
                   va[j + offset] = (byte)(va[j + offset] | v);
  -            else
  +            } else {
                   va[j + offset] = (byte)(v << 4);    // big endian
  +            }
           }
           va[m - 1 + offset] = 0;    // terminator
           return offset;
  @@ -81,8 +132,9 @@
               char c = (char)((v >>> 4) - 1 + '0');
               buf.append(c);
               c = (char)(v & 0x0f);
  -            if (c == 0)
  +            if (c == 0) {
                   break;
  +            }
               c = (char)(c - 1 + '0');
               buf.append(c);
               v = vspace.get(k++);
  @@ -111,8 +163,9 @@
   
       public String findPattern(String pat) {
           int k = super.find(pat);
  -        if (k >= 0)
  +        if (k >= 0) {
               return unpackValues(k);
  +        }
           return "";
       }
   
  @@ -121,11 +174,14 @@
        * t is a substring of s
        */
       protected int hstrcmp(char[] s, int si, char[] t, int ti) {
  -        for (; s[si] == t[ti]; si++, ti++)
  -            if (s[si] == 0)
  +        for (; s[si] == t[ti]; si++, ti++) {
  +            if (s[si] == 0) {
                   return 0;
  -        if (t[ti] == 0)
  +            }
  +        }
  +        if (t[ti] == 0) {
               return 0;
  +        }
           return s[si] - t[ti];
       }
   
  @@ -136,15 +192,17 @@
               char c = (char)((v >>> 4) - 1);
               buf.append(c);
               c = (char)(v & 0x0f);
  -            if (c == 0)
  +            if (c == 0) {
                   break;
  +            }
               c = (char)(c - 1);
               buf.append(c);
               v = vspace.get(k++);
           }
           byte[] res = new byte[buf.length()];
  -        for (int i = 0; i < res.length; i++)
  +        for (int i = 0; i < res.length; i++) {
               res[i] = (byte)buf.charAt(i);
  +        }
           return res;
       }
   
  @@ -185,8 +243,9 @@
                       values = getValues(eq[p]);    // data pointer is in eq[]
                       int j = index;
                       for (int k = 0; k < values.length; k++) {
  -                        if (j < il.length && values[k] > il[j])
  +                        if (j < il.length && values[k] > il[j]) {
                               il[j] = values[k];
  +                        }
                           j++;
                       }
                   }
  @@ -227,8 +286,9 @@
                            */
                       }
                   }
  -            } else
  +            } else {
                   p = d < 0 ? lo[p] : hi[p];
  +            }
           }
       }
   
  @@ -288,8 +348,9 @@
                   Object o = hw.get(i);
                   if (o instanceof String) {
                       j += ((String)o).length();
  -                    if (j >= remainCharCount && j < (len - pushCharCount))
  +                    if (j >= remainCharCount && j < (len - pushCharCount)) {
                           result[k++] = j;
  +                    }
                   }
               }
           } else {
  @@ -388,9 +449,17 @@
           HyphenationTree ht = null;
           int minCharCount = 2;
           BufferedReader in =
  -            new BufferedReader(new InputStreamReader(System.in));
  -        for (; ; ) {
  -            System.out.print("l:\tload patterns from XML\nL:\tload patterns from serialized object\ns:\tset minimun character count\nw:\twrite hyphenation tree to object file\nh:\thyphenate\nf:\tfind pattern\nb:\tbenchmark\nq:\tquit\n\nCommand:");
  +            new BufferedReader(new java.io.InputStreamReader(System.in));
  +        while (true) {
  +            System.out.print("l:\tload patterns from XML\n"
  +                    + "L:\tload patterns from serialized object\n"
  +                    + "s:\tset minimun character count\n"
  +                    + "w:\twrite hyphenation tree to object file\n"
  +                    + "h:\thyphenate\n"
  +                    + "f:\tfind pattern\n"
  +                    + "b:\tbenchmark\n"
  +                    + "q:\tquit\n\n"
  +                    + "Command:");
               String token = in.readLine().trim();
               if (token.equals("f")) {
                   System.out.print("Pattern: ");
  @@ -414,12 +483,13 @@
                       ht = (HyphenationTree)ois.readObject();
                   } catch (Exception e) {
                       e.printStackTrace();
  -                }
  -                finally {
  +                } finally {
                       if (ois != null) {
                           try {
                               ois.close();
  -                        } catch (IOException e) {}
  +                        } catch (IOException e) {
  +                            //ignore
  +                        }
                       }
                   }
               } else if (token.equals("w")) {
  @@ -431,15 +501,18 @@
                       oos.writeObject(ht);
                   } catch (Exception e) {
                       e.printStackTrace();
  -                }
  -                finally {
  +                } finally {
                       if (oos != null) {
                           try {
                               oos.flush();
  -                        } catch (IOException e) {}
  +                        } catch (IOException e) {
  +                            //ignore
  +                        }
                           try {
                               oos.close();
  -                        } catch (IOException e) {}
  +                        } catch (IOException e) {
  +                            //ignore
  +                        }
                       }
                   }
               } else if (token.equals("h")) {
  @@ -486,8 +559,9 @@
                   System.out.println(counter + " words in " + result
                                      + " Millisekunden hyphenated");
   
  -            } else if (token.equals("q"))
  +            } else if (token.equals("q")) {
                   break;
  +            }
           }
   
       }
  
  
  
  1.5       +63 -18    xml-fop/src/org/apache/fop/layout/hyphenation/ByteVector.java
  
  Index: ByteVector.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/hyphenation/ByteVector.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ByteVector.java	25 Oct 2002 09:29:44 -0000	1.4
  +++ ByteVector.java	6 Mar 2003 22:19:15 -0000	1.5
  @@ -1,10 +1,53 @@
   /*
    * $Id$
  - * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  - * For details on use and redistribution please refer to the
  - * LICENSE file included with these sources.
  - */
  -
  + * ============================================================================
  + *                    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 modifica-
  + * tion, 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 acknowledgment: "This product includes software
  + *    developed by the Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself, if
  + *    and wherever such third-party acknowledgments normally appear.
  + * 
  + * 4. The names "FOP" 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 name, without prior written permission of the
  + *    Apache Software Foundation.
  + * 
  + * 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 (INCLU-
  + * DING, 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 and was originally created by
  + * James Tauber <jt...@jtauber.com>. For more information on the Apache
  + * Software Foundation, please see <http://www.apache.org/>.
  + */ 
   package org.apache.fop.layout.hyphenation;
   
   import java.io.Serializable;
  @@ -21,7 +64,7 @@
        * Capacity increment size
        */
       private static final int DEFAULT_BLOCK_SIZE = 2048;
  -    private int BLOCK_SIZE;
  +    private int blockSize;
   
       /**
        * The encapsulated array
  @@ -38,25 +81,27 @@
       }
   
       public ByteVector(int capacity) {
  -        if (capacity > 0)
  -            BLOCK_SIZE = capacity;
  -        else
  -            BLOCK_SIZE = DEFAULT_BLOCK_SIZE;
  -        array = new byte[BLOCK_SIZE];
  +        if (capacity > 0) {
  +            blockSize = capacity;
  +        } else {
  +            blockSize = DEFAULT_BLOCK_SIZE;
  +        }
  +        array = new byte[blockSize];
           n = 0;
       }
   
       public ByteVector(byte[] a) {
  -        BLOCK_SIZE = DEFAULT_BLOCK_SIZE;
  +        blockSize = DEFAULT_BLOCK_SIZE;
           array = a;
           n = 0;
       }
   
       public ByteVector(byte[] a, int capacity) {
  -        if (capacity > 0)
  -            BLOCK_SIZE = capacity;
  -        else
  -            BLOCK_SIZE = DEFAULT_BLOCK_SIZE;
  +        if (capacity > 0) {
  +            blockSize = capacity;
  +        } else {
  +            blockSize = DEFAULT_BLOCK_SIZE;
  +        }
           array = a;
           n = 0;
       }
  @@ -94,7 +139,7 @@
           int index = n;
           int len = array.length;
           if (n + size >= len) {
  -            byte[] aux = new byte[len + BLOCK_SIZE];
  +            byte[] aux = new byte[len + blockSize];
               System.arraycopy(array, 0, aux, 0, len);
               array = aux;
           }
  
  
  
  1.4       +53 -11    xml-fop/src/org/apache/fop/layout/hyphenation/Hyphenation.java
  
  Index: Hyphenation.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/hyphenation/Hyphenation.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Hyphenation.java	30 Jul 2001 20:29:28 -0000	1.3
  +++ Hyphenation.java	6 Mar 2003 22:19:15 -0000	1.4
  @@ -1,27 +1,69 @@
   /*
    * $Id$
  - * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  - * For details on use and redistribution please refer to the
  - * LICENSE file included with these sources.
  - */
  -
  + * ============================================================================
  + *                    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 modifica-
  + * tion, 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 acknowledgment: "This product includes software
  + *    developed by the Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself, if
  + *    and wherever such third-party acknowledgments normally appear.
  + * 
  + * 4. The names "FOP" 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 name, without prior written permission of the
  + *    Apache Software Foundation.
  + * 
  + * 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 (INCLU-
  + * DING, 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 and was originally created by
  + * James Tauber <jt...@jtauber.com>. For more information on the Apache
  + * Software Foundation, please see <http://www.apache.org/>.
  + */ 
   package org.apache.fop.layout.hyphenation;
   
  -import java.util.Vector;
  -
   /**
    * This class represents a hyphenated word.
    *
    * @author Carlos Villegas <ca...@uniscope.co.jp>
    */
   public class Hyphenation {
  -    int[] hyphenPoints;
  -    String word;
  +    
  +    private int[] hyphenPoints;
  +    private String word;
   
       /**
        * number of hyphenation points in word
        */
  -    int len;
  +    private int len;
   
       /**
        * rawWord as made of alternating strings and {@link Hyphen Hyphen}
  
  
  
  1.4       +53 -6     xml-fop/src/org/apache/fop/layout/hyphenation/HyphenationException.java
  
  Index: HyphenationException.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/hyphenation/HyphenationException.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- HyphenationException.java	30 Jul 2001 20:29:28 -0000	1.3
  +++ HyphenationException.java	6 Mar 2003 22:19:15 -0000	1.4
  @@ -1,17 +1,64 @@
   /*
    * $Id$
  - * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  - * For details on use and redistribution please refer to the
  - * LICENSE file included with these sources.
  - */
  -
  + * ============================================================================
  + *                    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 modifica-
  + * tion, 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 acknowledgment: "This product includes software
  + *    developed by the Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself, if
  + *    and wherever such third-party acknowledgments normally appear.
  + * 
  + * 4. The names "FOP" 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 name, without prior written permission of the
  + *    Apache Software Foundation.
  + * 
  + * 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 (INCLU-
  + * DING, 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 and was originally created by
  + * James Tauber <jt...@jtauber.com>. For more information on the Apache
  + * Software Foundation, please see <http://www.apache.org/>.
  + */ 
   package org.apache.fop.layout.hyphenation;
   
   /**
    * @author Carlos Villegas <ca...@uniscope.co.jp>
  + * @todo Derive from FOPException
    */
   public class HyphenationException extends Exception {
   
  +    /**
  +     * @see java.lang.Throwable#Throwable(String)
  +     */
       public HyphenationException(String msg) {
           super(msg);
       }
  
  
  
  1.2       +50 -8     xml-fop/src/org/apache/fop/layout/RelativePositionProps.java
  
  Index: RelativePositionProps.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/RelativePositionProps.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RelativePositionProps.java	6 Aug 2001 09:14:24 -0000	1.1
  +++ RelativePositionProps.java	6 Mar 2003 22:19:15 -0000	1.2
  @@ -1,10 +1,53 @@
   /*
    * $Id$
  - * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  - * For details on use and redistribution please refer to the
  - * LICENSE file included with these sources.
  - */
  -
  + * ============================================================================
  + *                    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 modifica-
  + * tion, 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 acknowledgment: "This product includes software
  + *    developed by the Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself, if
  + *    and wherever such third-party acknowledgments normally appear.
  + * 
  + * 4. The names "FOP" 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 name, without prior written permission of the
  + *    Apache Software Foundation.
  + * 
  + * 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 (INCLU-
  + * DING, 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 and was originally created by
  + * James Tauber <jt...@jtauber.com>. For more information on the Apache
  + * Software Foundation, please see <http://www.apache.org/>.
  + */ 
   package org.apache.fop.layout;
   
   /**
  @@ -12,6 +55,7 @@
    * Public "structure" allows direct member access.
    */
   public class RelativePositionProps {
  +    
       public int marginTop;
       public int marginBottom;
       public int marginLeft;
  @@ -20,7 +64,5 @@
       public int spaceAfter;
       public int startIndent;
       public int endIndent;
  -
  -    public RelativePositionProps() {}
   
   }
  
  
  
  1.4       +58 -9     xml-fop/src/org/apache/fop/layout/AreaClass.java
  
  Index: AreaClass.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/AreaClass.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AreaClass.java	19 Dec 2002 00:35:31 -0000	1.3
  +++ AreaClass.java	6 Mar 2003 22:19:15 -0000	1.4
  @@ -1,14 +1,61 @@
   /*
    * $Id$
  - * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  - * For details on use and redistribution please refer to the
  - * LICENSE file included with these sources.
  - */
  -
  + * ============================================================================
  + *                    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 modifica-
  + * tion, 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 acknowledgment: "This product includes software
  + *    developed by the Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself, if
  + *    and wherever such third-party acknowledgments normally appear.
  + * 
  + * 4. The names "FOP" 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 name, without prior written permission of the
  + *    Apache Software Foundation.
  + * 
  + * 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 (INCLU-
  + * DING, 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 and was originally created by
  + * James Tauber <jt...@jtauber.com>. For more information on the Apache
  + * Software Foundation, please see <http://www.apache.org/>.
  + */ 
   package org.apache.fop.layout;
   
   import org.apache.fop.apps.FOPException;
   
  +/**
  + * This class defines area classes.
  + * @todo Would better be replaced by an Enum (Avalon or Commons)
  + */
   public class AreaClass {
       public static final String UNASSIGNED = "unassigned";
   
  @@ -20,13 +67,15 @@
   
       // checker method
       public static String setAreaClass(String areaClass) throws FOPException {
  -        if (areaClass.equals(XSL_NORMAL) || areaClass.equals(XSL_ABSOLUTE)
  +        if (areaClass.equals(XSL_NORMAL) 
  +                || areaClass.equals(XSL_ABSOLUTE)
                   || areaClass.equals(XSL_FOOTNOTE)
                   || areaClass.equals(XSL_SIDE_FLOAT)
  -                || areaClass.equals(XSL_BEFORE_FLOAT))
  +                || areaClass.equals(XSL_BEFORE_FLOAT)) {
               return areaClass;
  -        else
  +        } else {
               throw new FOPException("Unknown area class '" + areaClass + "'");
  +        }
       }
   
   }
  
  
  
  1.2       +50 -8     xml-fop/src/org/apache/fop/layout/AuralProps.java
  
  Index: AuralProps.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/AuralProps.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AuralProps.java	6 Aug 2001 09:14:24 -0000	1.1
  +++ AuralProps.java	6 Mar 2003 22:19:15 -0000	1.2
  @@ -1,10 +1,53 @@
   /*
    * $Id$
  - * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  - * For details on use and redistribution please refer to the
  - * LICENSE file included with these sources.
  - */
  -
  + * ============================================================================
  + *                    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 modifica-
  + * tion, 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 acknowledgment: "This product includes software
  + *    developed by the Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself, if
  + *    and wherever such third-party acknowledgments normally appear.
  + * 
  + * 4. The names "FOP" 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 name, without prior written permission of the
  + *    Apache Software Foundation.
  + * 
  + * 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 (INCLU-
  + * DING, 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 and was originally created by
  + * James Tauber <jt...@jtauber.com>. For more information on the Apache
  + * Software Foundation, please see <http://www.apache.org/>.
  + */ 
   package org.apache.fop.layout;
   
   /**
  @@ -12,6 +55,7 @@
    * Public "structure" allows direct member access.
    */
   public class AuralProps {
  +    
       public int azimuth;
       public String cueAfter;
       public String cueBefore;
  @@ -30,7 +74,5 @@
       public int stress;
       public int voiceFamily;
       public int volume;
  -
  -    public AuralProps() {}
   
   }
  
  
  
  1.6       +66 -14    xml-fop/src/org/apache/fop/layout/TextState.java
  
  Index: TextState.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/TextState.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TextState.java	19 Dec 2002 00:35:31 -0000	1.5
  +++ TextState.java	6 Mar 2003 22:19:15 -0000	1.6
  @@ -1,23 +1,63 @@
   /*
    * $Id$
  - * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  - * For details on use and redistribution please refer to the
  - * LICENSE file included with these sources.
  - */
  -
  + * ============================================================================
  + *                    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 modifica-
  + * tion, 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 acknowledgment: "This product includes software
  + *    developed by the Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself, if
  + *    and wherever such third-party acknowledgments normally appear.
  + * 
  + * 4. The names "FOP" 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 name, without prior written permission of the
  + *    Apache Software Foundation.
  + * 
  + * 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 (INCLU-
  + * DING, 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 and was originally created by
  + * James Tauber <jt...@jtauber.com>. For more information on the Apache
  + * Software Foundation, please see <http://www.apache.org/>.
  + */ 
   package org.apache.fop.layout;
   
   /**
  - * This class holds information about text-decoration
  - *
  + * This class holds information about text-decoration.
    */
   public class TextState {
   
  -    protected boolean underlined;
  -    protected boolean overlined;
  -    protected boolean linethrough;
  -
  -    public TextState() {}
  +    private boolean underlined;
  +    private boolean overlined;
  +    private boolean linethrough;
   
       /**
        * @return true if text should be underlined
  @@ -27,7 +67,8 @@
       }
   
       /**
  -     * set text as underlined
  +     * Set text as underlined.
  +     * @param ul true if underline should be enabled
        */
       public void setUnderlined(boolean ul) {
           this.underlined = ul;
  @@ -40,14 +81,25 @@
           return overlined;
       }
   
  +    /**
  +     * Set text as overlined.
  +     * @param ol true if overline should be enabled
  +     */
       public void setOverlined(boolean ol) {
           this.overlined = ol;
       }
   
  +    /**
  +     * @return true if text should have a line through the middle
  +     */
       public boolean getLineThrough() {
           return linethrough;
       }
   
  +    /**
  +     * Controls if text should have a line through the middle.
  +     * @param lt true if line through should be enabled
  +     */
       public void setLineThrough(boolean lt) {
           this.linethrough = lt;
       }
  
  
  
  1.4       +51 -7     xml-fop/src/org/apache/fop/layout/AbsolutePositionProps.java
  
  Index: AbsolutePositionProps.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/AbsolutePositionProps.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AbsolutePositionProps.java	19 Dec 2002 00:35:31 -0000	1.3
  +++ AbsolutePositionProps.java	6 Mar 2003 22:19:15 -0000	1.4
  @@ -1,10 +1,53 @@
   /*
    * $Id$
  - * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  - * For details on use and redistribution please refer to the
  - * LICENSE file included with these sources.
  - */
  -
  + * ============================================================================
  + *                    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 modifica-
  + * tion, 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 acknowledgment: "This product includes software
  + *    developed by the Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself, if
  + *    and wherever such third-party acknowledgments normally appear.
  + * 
  + * 4. The names "FOP" 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 name, without prior written permission of the
  + *    Apache Software Foundation.
  + * 
  + * 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 (INCLU-
  + * DING, 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 and was originally created by
  + * James Tauber <jt...@jtauber.com>. For more information on the Apache
  + * Software Foundation, please see <http://www.apache.org/>.
  + */ 
   package org.apache.fop.layout;
   
   /**
  @@ -18,6 +61,7 @@
       public int bottom;
       public int left;
   
  -    public AbsolutePositionProps() {}
  +    public AbsolutePositionProps() {
  +    }
   
   }
  
  
  
  1.10      +2 -5      xml-fop/src/org/apache/fop/layout/BorderAndPadding.java
  
  Index: BorderAndPadding.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/BorderAndPadding.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- BorderAndPadding.java	5 Mar 2003 20:38:26 -0000	1.9
  +++ BorderAndPadding.java	6 Mar 2003 22:19:15 -0000	1.10
  @@ -84,7 +84,7 @@
       /**
        * Return a full copy of the BorderAndPadding information. This clones all
        * padding and border information.
  -     * @return The copy.
  +     * @see java.lang.Object#clone()
        */
       public Object clone() throws CloneNotSupportedException {
           BorderAndPadding bp = (BorderAndPadding) super.clone();
  @@ -122,9 +122,6 @@
   
       private BorderInfo[] borderInfo = new BorderInfo[4];
       private ResolvedCondLength[] padding = new ResolvedCondLength[4];
  -
  -    public BorderAndPadding() {
  -    }
   
       public void setBorder(int side, int style, CondLength width,
                             ColorType color) {
  
  
  
  1.3       +50 -9     xml-fop/src/org/apache/fop/layout/MarginInlineProps.java
  
  Index: MarginInlineProps.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/MarginInlineProps.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MarginInlineProps.java	28 Apr 2002 21:28:01 -0000	1.2
  +++ MarginInlineProps.java	6 Mar 2003 22:19:16 -0000	1.3
  @@ -1,25 +1,66 @@
   /*
    * $Id$
  - * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  - * For details on use and redistribution please refer to the
  - * LICENSE file included with these sources.
  - */
  -
  + * ============================================================================
  + *                    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 modifica-
  + * tion, 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 acknowledgment: "This product includes software
  + *    developed by the Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself, if
  + *    and wherever such third-party acknowledgments normally appear.
  + * 
  + * 4. The names "FOP" 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 name, without prior written permission of the
  + *    Apache Software Foundation.
  + * 
  + * 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 (INCLU-
  + * DING, 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 and was originally created by
  + * James Tauber <jt...@jtauber.com>. For more information on the Apache
  + * Software Foundation, please see <http://www.apache.org/>.
  + */ 
   package org.apache.fop.layout;
   
  -
   /**
    * Store all inline "margin" related properties
    * Public "structure" allows direct member access.
    */
   public class MarginInlineProps {
  +    
       public int marginTop;
       public int marginBottom;
       public int marginLeft;
       public int marginRight;
       public int spaceStart;
       public int spaceEnd;
  -
  -    public MarginInlineProps() {}
   
   }
  
  
  
  1.23      +49 -6     xml-fop/src/org/apache/fop/layout/FontState.java
  
  Index: FontState.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/FontState.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- FontState.java	8 Jan 2003 13:56:37 -0000	1.22
  +++ FontState.java	6 Mar 2003 22:19:16 -0000	1.23
  @@ -1,10 +1,53 @@
   /*
    * $Id$
  - * Copyright (C) 2001-2003 The Apache Software Foundation. All rights reserved.
  - * For details on use and redistribution please refer to the
  - * LICENSE file included with these sources.
  - */
  -
  + * ============================================================================
  + *                    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 modifica-
  + * tion, 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 acknowledgment: "This product includes software
  + *    developed by the Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself, if
  + *    and wherever such third-party acknowledgments normally appear.
  + * 
  + * 4. The names "FOP" 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 name, without prior written permission of the
  + *    Apache Software Foundation.
  + * 
  + * 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 (INCLU-
  + * DING, 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 and was originally created by
  + * James Tauber <jt...@jtauber.com>. For more information on the Apache
  + * Software Foundation, please see <http://www.apache.org/>.
  + */ 
   package org.apache.fop.layout;
   
   import java.util.Map;
  
  
  
  1.4       +50 -8     xml-fop/src/org/apache/fop/layout/MarginProps.java
  
  Index: MarginProps.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/MarginProps.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MarginProps.java	23 Feb 2002 16:50:58 -0000	1.3
  +++ MarginProps.java	6 Mar 2003 22:19:16 -0000	1.4
  @@ -1,10 +1,53 @@
   /*
    * $Id$
  - * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  - * For details on use and redistribution please refer to the
  - * LICENSE file included with these sources.
  - */
  -
  + * ============================================================================
  + *                    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 modifica-
  + * tion, 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 acknowledgment: "This product includes software
  + *    developed by the Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself, if
  + *    and wherever such third-party acknowledgments normally appear.
  + * 
  + * 4. The names "FOP" 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 name, without prior written permission of the
  + *    Apache Software Foundation.
  + * 
  + * 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 (INCLU-
  + * DING, 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 and was originally created by
  + * James Tauber <jt...@jtauber.com>. For more information on the Apache
  + * Software Foundation, please see <http://www.apache.org/>.
  + */ 
   package org.apache.fop.layout;
   
   /**
  @@ -12,6 +55,7 @@
    * Public "structure" allows direct member access.
    */
   public class MarginProps {
  +    
       public int marginTop;
       public int marginBottom;
       public int marginLeft;
  @@ -20,7 +64,5 @@
       public int spaceAfter;
       public int startIndent;
       public int endIndent;
  -
  -    public MarginProps() {}
   
   }
  
  
  
  1.15      +50 -7     xml-fop/src/org/apache/fop/layout/PageMaster.java
  
  Index: PageMaster.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/PageMaster.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- PageMaster.java	19 Dec 2002 00:35:31 -0000	1.14
  +++ PageMaster.java	6 Mar 2003 22:19:16 -0000	1.15
  @@ -1,17 +1,60 @@
   /*
    * $Id$
  - * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  - * For details on use and redistribution please refer to the
  - * LICENSE file included with these sources.
  - */
  -
  + * ============================================================================
  + *                    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 modifica-
  + * tion, 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 acknowledgment: "This product includes software
  + *    developed by the Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself, if
  + *    and wherever such third-party acknowledgments normally appear.
  + * 
  + * 4. The names "FOP" 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 name, without prior written permission of the
  + *    Apache Software Foundation.
  + * 
  + * 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 (INCLU-
  + * DING, 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 and was originally created by
  + * James Tauber <jt...@jtauber.com>. For more information on the Apache
  + * Software Foundation, please see <http://www.apache.org/>.
  + */ 
   package org.apache.fop.layout;
   
   import org.apache.fop.area.PageViewport;
   
   public class PageMaster {
   
  -    private PageViewport pageVP ;
  +    private PageViewport pageVP;
   
       public PageMaster(PageViewport pageVP) {
           this.pageVP = pageVP;
  
  
  
  1.2       +51 -7     xml-fop/src/org/apache/fop/layout/AccessibilityProps.java
  
  Index: AccessibilityProps.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/AccessibilityProps.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AccessibilityProps.java	6 Aug 2001 09:14:24 -0000	1.1
  +++ AccessibilityProps.java	6 Mar 2003 22:19:16 -0000	1.2
  @@ -1,10 +1,53 @@
   /*
    * $Id$
  - * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  - * For details on use and redistribution please refer to the
  - * LICENSE file included with these sources.
  - */
  -
  + * ============================================================================
  + *                    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 modifica-
  + * tion, 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 acknowledgment: "This product includes software
  + *    developed by the Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself, if
  + *    and wherever such third-party acknowledgments normally appear.
  + * 
  + * 4. The names "FOP" 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 name, without prior written permission of the
  + *    Apache Software Foundation.
  + * 
  + * 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 (INCLU-
  + * DING, 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 and was originally created by
  + * James Tauber <jt...@jtauber.com>. For more information on the Apache
  + * Software Foundation, please see <http://www.apache.org/>.
  + */ 
   package org.apache.fop.layout;
   
   /**
  @@ -15,6 +58,7 @@
       public String sourceDoc = null;
       public String role = null;
   
  -    public AccessibilityProps() {}
  +    public AccessibilityProps() {
  +    }
   
   }
  
  
  
  1.5       +50 -8     xml-fop/src/org/apache/fop/layout/BackgroundProps.java
  
  Index: BackgroundProps.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/BackgroundProps.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- BackgroundProps.java	1 Nov 2002 10:49:34 -0000	1.4
  +++ BackgroundProps.java	6 Mar 2003 22:19:16 -0000	1.5
  @@ -1,10 +1,53 @@
   /*
    * $Id$
  - * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  - * For details on use and redistribution please refer to the
  - * LICENSE file included with these sources.
  - */
  -
  + * ============================================================================
  + *                    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 modifica-
  + * tion, 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 acknowledgment: "This product includes software
  + *    developed by the Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself, if
  + *    and wherever such third-party acknowledgments normally appear.
  + * 
  + * 4. The names "FOP" 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 name, without prior written permission of the
  + *    Apache Software Foundation.
  + * 
  + * 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 (INCLU-
  + * DING, 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 and was originally created by
  + * James Tauber <jt...@jtauber.com>. For more information on the Apache
  + * Software Foundation, please see <http://www.apache.org/>.
  + */ 
   package org.apache.fop.layout;
   
   import org.apache.fop.datatypes.Length;
  @@ -15,13 +58,12 @@
    * Public "structure" allows direct member access.
    */
   public class BackgroundProps {
  +    
       public int backAttachment;
       public ColorType backColor;
       public String backImage;
       public int backRepeat;
       public Length backPosHorizontal;
       public Length backPosVertical;
  -
  -    public BackgroundProps() {}
   
   }
  
  
  
  1.4       +50 -8     xml-fop/src/org/apache/fop/layout/HyphenationProps.java
  
  Index: HyphenationProps.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/HyphenationProps.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- HyphenationProps.java	30 Jul 2001 20:29:27 -0000	1.3
  +++ HyphenationProps.java	6 Mar 2003 22:19:16 -0000	1.4
  @@ -1,10 +1,53 @@
   /*
    * $Id$
  - * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
  - * For details on use and redistribution please refer to the
  - * LICENSE file included with these sources.
  - */
  -
  + * ============================================================================
  + *                    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 modifica-
  + * tion, 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 acknowledgment: "This product includes software
  + *    developed by the Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself, if
  + *    and wherever such third-party acknowledgments normally appear.
  + * 
  + * 4. The names "FOP" 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 name, without prior written permission of the
  + *    Apache Software Foundation.
  + * 
  + * 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 (INCLU-
  + * DING, 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 and was originally created by
  + * James Tauber <jt...@jtauber.com>. For more information on the Apache
  + * Software Foundation, please see <http://www.apache.org/>.
  + */ 
   package org.apache.fop.layout;
   
   /**
  @@ -12,13 +55,12 @@
    * Public "structure" allows direct member access.
    */
   public class HyphenationProps {
  +
       public int hyphenate;      // Enum true or false: store as boolean!
       public char hyphenationChar;
       public int hyphenationPushCharacterCount;
       public int hyphenationRemainCharacterCount;
       public String language;    // Language code or enum "NONE"
       public String country;     // Country code or enum "NONE"
  -
  -    public HyphenationProps() {}
   
   }
  
  
  
  1.20      +49 -6     xml-fop/src/org/apache/fop/layout/FontInfo.java
  
  Index: FontInfo.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/layout/FontInfo.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- FontInfo.java	8 Jan 2003 13:56:37 -0000	1.19
  +++ FontInfo.java	6 Mar 2003 22:19:16 -0000	1.20
  @@ -1,10 +1,53 @@
   /*
    * $Id$
  - * Copyright (C) 2001-2003 The Apache Software Foundation. All rights reserved.
  - * For details on use and redistribution please refer to the
  - * LICENSE file included with these sources.
  - */
  -
  + * ============================================================================
  + *                    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 modifica-
  + * tion, 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 acknowledgment: "This product includes software
  + *    developed by the Apache Software Foundation (http://www.apache.org/)."
  + *    Alternately, this acknowledgment may appear in the software itself, if
  + *    and wherever such third-party acknowledgments normally appear.
  + * 
  + * 4. The names "FOP" 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 name, without prior written permission of the
  + *    Apache Software Foundation.
  + * 
  + * 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 (INCLU-
  + * DING, 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 and was originally created by
  + * James Tauber <jt...@jtauber.com>. For more information on the Apache
  + * Software Foundation, please see <http://www.apache.org/>.
  + */ 
   package org.apache.fop.layout;
   
   // Java
  
  
  

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