gmazza      2004/01/08 19:26:00

  Modified:    src/java/org/apache/fop/layoutmgr AddLMVisitor.java
               src/java/org/apache/fop/layoutmgr/table Body.java
  Log:
  Bug 25809 (Patch by Finn Bock) NPE for incorrectly created tables fixed.
  Also changed text of warning message.
  
  Revision  Changes    Path
  1.27      +9 -6      xml-fop/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java
  
  Index: AddLMVisitor.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/AddLMVisitor.java,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- AddLMVisitor.java 29 Dec 2003 23:28:47 -0000      1.26
  +++ AddLMVisitor.java 9 Jan 2004 03:26:00 -0000       1.27
  @@ -842,12 +842,15 @@
            TableLayoutManager tlm = new TableLayoutManager();
            tlm.setUserAgent(node.getUserAgent());
            tlm.setFObj(node);
  -         ArrayList columnLMs = new ArrayList();
  -         ListIterator iter = node.getColumns().listIterator();
  -         while (iter.hasNext()) {
  -             columnLMs.add(getTableColumnLayoutManager((TableColumn)iter.next()));
  +         ArrayList columns = node.getColumns();
  +         if (columns != null) {
  +             ArrayList columnLMs = new ArrayList();
  +             ListIterator iter = columns.listIterator();
  +             while (iter.hasNext()) {
  +                 
columnLMs.add(getTableColumnLayoutManager((TableColumn)iter.next()));
  +             }
  +             tlm.setColumns(columnLMs);
            }
  -         tlm.setColumns(columnLMs);
            if (node.getTableHeader() != null) {
                tlm.setTableHeader(getTableBodyLayoutManager(node.getTableHeader()));
            }
  
  
  
  1.4       +1 -1      xml-fop/src/java/org/apache/fop/layoutmgr/table/Body.java
  
  Index: Body.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/layoutmgr/table/Body.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Body.java 28 Aug 2003 19:08:59 -0000      1.3
  +++ Body.java 9 Jan 2004 03:26:00 -0000       1.4
  @@ -128,7 +128,7 @@
   
           if (columns == null) {
               setFinished(true);
  -            getLogger().warn("ignoring table body with undefined columns");
  +            getLogger().warn("ignoring fo:table-body with undefined 
fo:table-columns");
               return null;
           }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to