Tag: cws_dev300_rptchart02 User: oj Date: 2008-04-25 06:38:01+0000 Modified: dba/reportdesign/java/com/sun/star/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java
Log: #i85660# remove table-cell-properties when the background is transparent File Changes: Directory: /dba/reportdesign/java/com/sun/star/report/pentaho/output/spreadsheet/ ================================================================================= File [changed]: SpreadsheetRawReportTarget.java Url: http://dba.openoffice.org/source/browse/dba/reportdesign/java/com/sun/star/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java?r1=1.5.4.5&r2=1.5.4.6 Delta lines: +20 -3 -------------------- --- SpreadsheetRawReportTarget.java 2008-04-24 11:34:50+0000 1.5.4.5 +++ SpreadsheetRawReportTarget.java 2008-04-25 06:37:59+0000 1.5.4.6 @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: SpreadsheetRawReportTarget.java,v $ - * $Revision: 1.5.4.5 $ + * $Revision: 1.5.4.6 $ * * This file is part of OpenOffice.org. * @@ -211,7 +211,6 @@ if (isElementBoundaryCollectionPass() && getCurrentRole() != ROLE_TEMPLATE) { final LengthCalculator len = new LengthCalculator(); - double val = 0.0; for (int i = 0; i < rowHeights.size(); i++) { len.add((CSSNumericValue) rowHeights.get(i)); @@ -410,6 +409,24 @@ else if (ReportTargetUtil.isElementOfType(OfficeNamespaces.TABLE_NS, OfficeToken.TABLE_CELL, attrs)) { columnCounter++; + final String styleName = (String) attrs.getAttribute(OfficeNamespaces.TABLE_NS, OfficeToken.STYLE_NAME); + if (styleName != null) + { + OfficeStyle cellStyle = getPredefinedStylesCollection().getStyle(OfficeToken.TABLE_CELL, styleName); + if (cellStyle != null) + { + final Element props = cellStyle.getTableCellProperties(); + if (props != null) + { + final Object raw = props.getAttribute(OfficeNamespaces.FO_NS, OfficeToken.BACKGROUND_COLOR); + if (raw == null || "transparent".equals(raw)) + { + cellStyle.removeNode(props); + } + } + } + } + final String numColSpanStr = (String) attrs.getAttribute(namespace, "number-columns-spanned"); int initialColumnSpan = columnSpanCounter = 1; if (numColSpanStr != null) @@ -640,7 +657,7 @@ if (OfficeNamespaces.TEXT_NS.equals(namespace) && OfficeToken.P.equals(elementType)) { - if ( !paragraphHandled ) + if (!paragraphHandled) { return; } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
