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 ad...@apache.org on 2008/06/22 11:07:48 UTC
svn commit: r670323 - in
/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/table:
TableBody.java TableFooter.java TableHeader.java TablePart.java
Author: adelmelle
Date: Sun Jun 22 02:07:47 2008
New Revision: 670323
URL: http://svn.apache.org/viewvc?rev=670323&view=rev
Log:
Addition to r670217
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/table/TableBody.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/table/TableFooter.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/table/TableHeader.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/table/TablePart.java
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/table/TableBody.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/table/TableBody.java?rev=670323&r1=670322&r2=670323&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/table/TableBody.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/table/TableBody.java Sun Jun 22 02:07:47 2008
@@ -20,6 +20,7 @@
package org.apache.fop.fo.flow.table;
import org.apache.fop.fo.FONode;
+import org.apache.fop.apps.FOPException;
/**
* Class modelling the <a href="http://www.w3.org/TR/xsl/#fo_table-body">
@@ -36,4 +37,28 @@
super(parent);
}
+ /** {@inheritDoc} */
+ public void startOfNode() throws FOPException {
+ super.startOfNode();
+ getFOEventHandler().startBody(this);
+ }
+
+ /** {@inheritDoc} */
+ public void endOfNode() throws FOPException {
+ super.endOfNode();
+ getFOEventHandler().endBody(this);
+ }
+
+ /** {@inheritDoc} */
+ public String getLocalName() {
+ return "table-body";
+ }
+
+ /**
+ * {@inheritDoc}
+ * @return {@link org.apache.fop.fo.Constants#FO_TABLE_BODY}
+ */
+ public int getNameId() {
+ return FO_TABLE_BODY;
+ }
}
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/table/TableFooter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/table/TableFooter.java?rev=670323&r1=670322&r2=670323&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/table/TableFooter.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/table/TableFooter.java Sun Jun 22 02:07:47 2008
@@ -43,15 +43,13 @@
/** {@inheritDoc} */
public void startOfNode() throws FOPException {
super.startOfNode();
+ getFOEventHandler().startFooter(this);
}
/** {@inheritDoc} */
public void endOfNode() throws FOPException {
- if (!(tableRowsFound || tableCellsFound)) {
- missingChildElementError("marker* (table-row+|table-cell+)");
- } else {
- finishLastRowGroup();
- }
+ super.endOfNode();
+ getFOEventHandler().endFooter(this);
}
/** {@inheritDoc} */
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/table/TableHeader.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/table/TableHeader.java?rev=670323&r1=670322&r2=670323&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/table/TableHeader.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/table/TableHeader.java Sun Jun 22 02:07:47 2008
@@ -42,15 +42,13 @@
/** {@inheritDoc} */
public void startOfNode() throws FOPException {
super.startOfNode();
+ getFOEventHandler().startHeader(this);
}
/** {@inheritDoc} */
public void endOfNode() throws FOPException {
- if (!(tableRowsFound || tableCellsFound)) {
- missingChildElementError("marker* (table-row+|table-cell+)");
- } else {
- finishLastRowGroup();
- }
+ super.endOfNode();
+ getFOEventHandler().endHeader(this);
}
/** {@inheritDoc} */
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/table/TablePart.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/table/TablePart.java?rev=670323&r1=670322&r2=670323&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/table/TablePart.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/table/TablePart.java Sun Jun 22 02:07:47 2008
@@ -58,9 +58,6 @@
private boolean lastCellEndsRow = true;
- /** The last encountered table-row. */
- private TableRow lastRow;
-
private List rowGroups = new LinkedList();
/**
@@ -82,6 +79,7 @@
public void processNode(String elementName, Locator locator,
Attributes attlist, PropertyList pList)
throws FOPException {
+
if (!inMarker()) {
Table t = getTable();
if (t.hasExplicitColumns()) {
@@ -96,35 +94,17 @@
columnNumberManager = new ColumnNumberManager();
}
super.processNode(elementName, locator, attlist, pList);
- }
- /** {@inheritDoc} */
- public void startOfNode() throws FOPException {
- super.startOfNode();
- if (this instanceof TableHeader) {
- getFOEventHandler().startHeader((TableHeader)this);
- } else if (this instanceof TableFooter) {
- getFOEventHandler().startFooter((TableFooter)this);
- } else {
- getFOEventHandler().startBody((TableBody)this);
- }
}
/** {@inheritDoc} */
public void endOfNode() throws FOPException {
+ super.endOfNode();
if (!inMarker()) {
pendingSpans = null;
columnNumberManager = null;
}
- if (this instanceof TableHeader) {
- getFOEventHandler().endHeader((TableHeader)this);
- } else if (this instanceof TableFooter) {
- getFOEventHandler().endFooter((TableFooter)this);
- } else {
- getFOEventHandler().endBody((TableBody)this);
- }
-
if (!(tableRowsFound || tableCellsFound)) {
missingChildElementError("marker* (table-row+|table-cell+)", true);
getParent().removeChild(this);
@@ -198,8 +178,7 @@
getTable().getRowGroupBuilder().endTableRow();
}
rowsStarted = true;
- lastRow = (TableRow) child;
- getTable().getRowGroupBuilder().startTableRow(lastRow);
+ getTable().getRowGroupBuilder().startTableRow((TableRow)child);
break;
case FO_TABLE_CELL:
if (!rowsStarted) {
@@ -239,19 +218,6 @@
return commonBorderPaddingBackground;
}
- /** {@inheritDoc} */
- public String getLocalName() {
- return "table-body";
- }
-
- /**
- * {@inheritDoc}
- * @return {@link org.apache.fop.fo.Constants#FO_TABLE_BODY}
- */
- public int getNameId() {
- return FO_TABLE_BODY;
- }
-
/**
* @param obj table row in question
* @return true if the given table row is the first row of this body.
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org