User: hr Date: 2007-11-02 11:24:33+0000 Modified: dba/reportdesign/java/com/sun/star/report/pentaho/layoutprocessor/ImageElementLayoutController.java
Log: INTEGRATION: CWS dba231a_SRC680 (1.2.36); FILE MERGED 2007/10/22 06:49:34 oj 1.2.36.1: #i79167# merge changs from reportdesign01 into this one File Changes: Directory: /dba/reportdesign/java/com/sun/star/report/pentaho/layoutprocessor/ ============================================================================== File [changed]: ImageElementLayoutController.java Url: http://dba.openoffice.org/source/browse/dba/reportdesign/java/com/sun/star/report/pentaho/layoutprocessor/ImageElementLayoutController.java?r1=1.2&r2=1.3 Delta lines: +10 -8 -------------------- --- ImageElementLayoutController.java 2007-07-09 11:56:05+0000 1.2 +++ ImageElementLayoutController.java 2007-11-02 11:24:30+0000 1.3 @@ -141,7 +141,7 @@ final int rowSpan = TextUtilities.parseInt ((String) tableCell.getAttribute(OfficeNamespaces.TABLE_NS, "number-rows-spanned"), 1); final int colSpan = TextUtilities.parseInt - ((String) tableCell.getAttribute(OfficeNamespaces.TABLE_NS, "number-cols-spanned"), 1); + ((String) tableCell.getAttribute(OfficeNamespaces.TABLE_NS, "number-columns-spanned"), 1); if (rowSpan < 1 || colSpan < 1) { Log.warn("Rowspan or colspan for image-size calculation was invalid."); @@ -158,7 +158,7 @@ // we are now making the assumption, that the row is a section, that contains the table-cell. // This breaks the ability to return nodes or to construct reports on the fly, but the OO-report format // is weird anyway and wont support such advanced techniques for the next few centuries .. - final int columnPos = findNodeInSection(tableRow, tableCell); + final int columnPos = findNodeInSection(tableRow, tableCell,"covered-table-cell"); if (columnPos == -1) { Log.warn("Table-Cell is not a direct child of the table-row. Unable to calculate the image-size."); @@ -212,7 +212,7 @@ } // finally search the styles for the row now. - final int rowPos = findNodeInSection(table, tableRow); + final int rowPos = findNodeInSection(table, tableRow,null); if (rowPos == -1) { Log.warn("Table-Cell is not a direct child of the table-row. Unable to calculate the image-size."); @@ -249,7 +249,8 @@ } private int findNodeInSection(final Section tableRow, - final Element tableCell) + final Element tableCell, + final String secondType) { int retval = 0; final Node[] nodes = tableRow.getNodeArray(); @@ -264,7 +265,8 @@ } final Element child = (Element) node; if (ObjectUtilities.equal(child.getNamespace(), namespace) == false || - ObjectUtilities.equal(child.getType(), type) == false) + (ObjectUtilities.equal(child.getType(), type) == false + && (secondType == null || ObjectUtilities.equal(child.getType(), secondType) == false)) ) { continue; } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
