User: kz Date: 2008-05-05 14:01:53+0000 Modified: dba/reportdesign/java/com/sun/star/report/pentaho/layoutprocessor/OfficeTableTemplateLayoutController.java
Log: INTEGRATION: CWS dba30beta (1.5.6); FILE MERGED 2008/04/22 10:30:26 oj 1.5.6.1: #i88503# merge changes from rptchart02 File Changes: Directory: /dba/reportdesign/java/com/sun/star/report/pentaho/layoutprocessor/ ============================================================================== File [changed]: OfficeTableTemplateLayoutController.java Url: http://dba.openoffice.org/source/browse/dba/reportdesign/java/com/sun/star/report/pentaho/layoutprocessor/OfficeTableTemplateLayoutController.java?r1=1.5&r2=1.6 Delta lines: +40 -43 --------------------- --- OfficeTableTemplateLayoutController.java 2008-04-10 17:26:19+0000 1.5 +++ OfficeTableTemplateLayoutController.java 2008-05-05 14:01:50+0000 1.6 @@ -34,6 +34,7 @@ import com.sun.star.report.pentaho.OfficeNamespaces; import com.sun.star.report.pentaho.model.OfficeGroup; import com.sun.star.report.pentaho.model.OfficeReport; +import java.util.List; import org.jfree.report.DataSourceException; import org.jfree.report.ReportDataFactoryException; import org.jfree.report.ReportProcessingException; @@ -107,30 +108,29 @@ this.nodes = (Node[]) tables.toArray(new Node[tables.size()]); } - private void addPBody(final ArrayList tables, final Section section) + private void addPBody(final List tables, final Section section) { if (section != null) { - tables.add(section); + // tables.add(section); + final Node[] nodeArray = section.getNodeArray(); + for (int i = 0; i < nodeArray.length; i++) + { + final Node node = nodeArray[i]; + tables.add(node); + } + } -// final Node[] nodeArray = section.getNodeArray(); -// for (int i = 0; i < nodeArray.length; i++) -// { -// final Node node = nodeArray[i]; -// tables.add(node); -// } } - private void addFromBody(final ArrayList tables, final Section section) + private void addFromBody(final List tables, final Section section) { final Node[] nodeArray = section.getNodeArray(); for (int i = 0; i < nodeArray.length; i++) { final Node node = nodeArray[i]; - if (node instanceof Section == false) + if (node instanceof Section) { - continue; - } final Section child = (Section) node; if (node instanceof OfficeGroup) { @@ -142,18 +142,16 @@ } } } + } - private void addFromGroup(final ArrayList tables, final Section section) + private void addFromGroup(final List tables, final Section section) { final Node[] nodeArray = section.getNodeArray(); for (int i = 0; i < nodeArray.length; i++) { final Node node = nodeArray[i]; - if (node instanceof Section == false) + if (node instanceof Section) { - continue; - } - final Section element = (Section) node; if (OfficeNamespaces.INTERNAL_NS.equals(element.getNamespace()) && "group-body".equals(element.getType())) { @@ -165,18 +163,16 @@ } } } + } - private void addFromSection(final ArrayList tables, final Section section) + private void addFromSection(final List tables, final Section section) { final Node[] nodeArray = section.getNodeArray(); for (int i = 0; i < nodeArray.length; i++) { final Node node = nodeArray[i]; - if (node instanceof Element == false) + if (node instanceof Element) { - continue; - } - final Element element = (Element) node; if (OfficeNamespaces.TABLE_NS.equals(element.getNamespace()) && "table".equals(element.getType())) @@ -185,6 +181,7 @@ } } } + } public Node[] getNodes() { --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
