You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2005/12/01 22:56:10 UTC

svn commit: r351491 - in /xmlgraphics/fop/trunk/src/java/org/apache/fop: fo/flow/TableCell.java layoutmgr/table/TableStepper.java

Author: jeremias
Date: Thu Dec  1 13:56:02 2005
New Revision: 351491

URL: http://svn.apache.org/viewcvs?rev=351491&view=rev
Log:
Fixing two NPEs occurring with a completely empty table where not even the table-cell has at least one block element and relaxed validation is enabled.

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableCell.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableStepper.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableCell.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableCell.java?rev=351491&r1=351490&r2=351491&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableCell.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/TableCell.java Thu Dec  1 13:56:02 2005
@@ -171,7 +171,7 @@
         if (!blockItemFound) {
             if (getUserAgent().validateStrictly()) {
                 missingChildElementError("marker* (%block;)+");
-            } else if (childNodes.size() > 0) {
+            } else if (childNodes != null && childNodes.size() > 0) {
                 getLogger().warn("fo:table-cell content that is not enclosed by a "
                         + "fo:block will be dropped/ignored.");
             }

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableStepper.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableStepper.java?rev=351491&r1=351490&r2=351491&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableStepper.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/table/TableStepper.java Thu Dec  1 13:56:02 2005
@@ -380,7 +380,9 @@
         if (isBreakCondition()) {
             ((BreakElement)returnList.getLast()).setPenaltyValue(-KnuthPenalty.INFINITE);
         }
-        lastTCPos.setFlag(TableContentPosition.LAST_IN_ROWGROUP, true);
+        if (lastTCPos != null) {
+            lastTCPos.setFlag(TableContentPosition.LAST_IN_ROWGROUP, true);
+        }
         return returnList;
     }
     



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