diff options
author | obo <obo@openoffice.org> | 2010-09-14 08:56:44 +0200 |
---|---|---|
committer | obo <obo@openoffice.org> | 2010-09-14 08:56:44 +0200 |
commit | 75492890fcba4ea273639e8d44820ef1badb0757 (patch) | |
tree | 8c1412d7088643b85b55bfde276f1170cb48ef05 | |
parent | 89ba628baeac602f71f4b096e08d50b16c715c47 (diff) | |
parent | bedf0cc12cf628517b40c169a6a458cf5baf4aff (diff) |
CWS-TOOLING: integrate CWS dba33h
6 files changed, 26 insertions, 9 deletions
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/TableCellLayoutController.java b/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/TableCellLayoutController.java index 8b56dd1..3ce77c6 100644 --- a/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/TableCellLayoutController.java +++ b/reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/TableCellLayoutController.java @@ -81,7 +81,15 @@ public class TableCellLayoutController extends SectionLayoutController } else if ( "float".equals(valueType)) { - attributeMap.setAttribute(OfficeNamespaces.OFFICE_NS, FormatValueUtility.VALUE, "1.#NAN"); + attributeMap.setAttribute(OfficeNamespaces.OFFICE_NS, + FormatValueUtility.VALUE, "NaN"); + } + // #i114108#: except on form elements, the only value-type that can + // occur without an accomanying value attribute is "string" + else if (!"string".equals(valueType)) + { + attributeMap.setAttribute(OfficeNamespaces.OFFICE_NS, + FormatValueUtility.VALUE_TYPE, "string"); } } catch (Exception e) diff --git a/reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java b/reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java index 00ca09c..68bf323 100644 --- a/reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java +++ b/reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java @@ -138,6 +138,10 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget public static final String VERTICAL_POS = "vertical-pos"; private static final String ZERO_CM = "0cm"; + /** the verison of the ODF specification to which generated documents + * shall conform. */ + public static final String ODF_VERSION = "1.2"; + protected static class BufferState { @@ -376,7 +380,8 @@ public abstract class OfficeDocumentReportTarget extends AbstractReportTarget rootAttributes.addNamespaceDeclaration("xsd", OfficeNamespaces.XSD_NS); rootAttributes.addNamespaceDeclaration("xsi", OfficeNamespaces.XSI_NS); rootAttributes.addNamespaceDeclaration("grddl", OfficeNamespaces.GRDDL_NS); - rootAttributes.setAttribute(OfficeNamespaces.OFFICE_NS, "version", "1.2"); + rootAttributes.setAttribute(OfficeNamespaces.OFFICE_NS, "version", + ODF_VERSION); this.rootXmlWriter.writeXmlDeclaration("UTF-8"); this.rootXmlWriter.writeTag(OfficeNamespaces.OFFICE_NS, "document-content", rootAttributes, XmlWriterSupport.OPEN); diff --git a/reportbuilder/java/com/sun/star/report/pentaho/output/StylesWriter.java b/reportbuilder/java/com/sun/star/report/pentaho/output/StylesWriter.java index 6844ab2..5ab27b4 100644 --- a/reportbuilder/java/com/sun/star/report/pentaho/output/StylesWriter.java +++ b/reportbuilder/java/com/sun/star/report/pentaho/output/StylesWriter.java @@ -117,11 +117,11 @@ public class StylesWriter { globals }); - writeAutomaticStylesSection(new OfficeStylesCollection[] + writeCommonStylesSection(new OfficeStylesCollection[] { globals }); - writeCommonStylesSection(new OfficeStylesCollection[] + writeAutomaticStylesSection(new OfficeStylesCollection[] { globals }); @@ -374,11 +374,12 @@ public class StylesWriter rootAttributes.addNamespaceDeclaration("xsd", OfficeNamespaces.XSD_NS); rootAttributes.addNamespaceDeclaration("xsi", OfficeNamespaces.XSI_NS); rootAttributes.addNamespaceDeclaration("grddl", OfficeNamespaces.GRDDL_NS); - rootAttributes.setAttribute(OfficeNamespaces.OFFICE_NS, "version", "1.2"); + rootAttributes.setAttribute(OfficeNamespaces.OFFICE_NS, "version", + OfficeDocumentReportTarget.ODF_VERSION); this.xmlWriter.writeXmlDeclaration("UTF-8"); this.xmlWriter.writeTag(OfficeNamespaces.OFFICE_NS, - "document-content", rootAttributes, XmlWriterSupport.OPEN); + "document-styles", rootAttributes, XmlWriterSupport.OPEN); } public void close() diff --git a/reportbuilder/java/com/sun/star/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java b/reportbuilder/java/com/sun/star/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java index d3629a5..f163029 100644 --- a/reportbuilder/java/com/sun/star/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java +++ b/reportbuilder/java/com/sun/star/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java @@ -624,7 +624,9 @@ public class SpreadsheetRawReportTarget extends OfficeDocumentReportTarget final Section tableColumnProperties = new Section(); tableColumnProperties.setType("table-column-properties"); tableColumnProperties.setNamespace(style.getNamespace()); - tableColumnProperties.setAttribute(style.getNamespace(), "column-width", columnWidth + getUnitsOfMeasure(null)); + final String width = String.format("%f", columnWidth); + tableColumnProperties.setAttribute(style.getNamespace(), + "column-width", width + getUnitsOfMeasure(null)); style.addNode(tableColumnProperties); final AttributeList myAttrList = new AttributeList(); diff --git a/reportbuilder/java/com/sun/star/report/pentaho/output/text/TextRawReportTarget.java b/reportbuilder/java/com/sun/star/report/pentaho/output/text/TextRawReportTarget.java index d6ee542..a780e0a 100644 --- a/reportbuilder/java/com/sun/star/report/pentaho/output/text/TextRawReportTarget.java +++ b/reportbuilder/java/com/sun/star/report/pentaho/output/text/TextRawReportTarget.java @@ -1269,7 +1269,8 @@ public class TextRawReportTarget extends OfficeDocumentReportTarget rootAttributes.addNamespaceDeclaration("office", OfficeNamespaces.OFFICE_NS); rootAttributes.addNamespaceDeclaration("config", OfficeNamespaces.CONFIG); rootAttributes.addNamespaceDeclaration("ooo", OfficeNamespaces.OO2004_NS); - rootAttributes.setAttribute(OfficeNamespaces.OFFICE_NS, "version", "1.0"); + rootAttributes.setAttribute(OfficeNamespaces.OFFICE_NS, "version", + OfficeDocumentReportTarget.ODF_VERSION); final OutputStream outputStream = getOutputRepository().createOutputStream("settings.xml", "text/xml"); final XmlWriter xmlWriter = new XmlWriter(new OutputStreamWriter(outputStream, "UTF-8"), createTagDescription()); xmlWriter.setAlwaysAddNamespace(true); diff --git a/reportbuilder/util/description.xml b/reportbuilder/util/description.xml index 22f95ef..454656d 100755 --- a/reportbuilder/util/description.xml +++ b/reportbuilder/util/description.xml @@ -3,7 +3,7 @@ xmlns:d="http://openoffice.org/extensions/description/2006" xmlns:xlink="http://www.w3.org/1999/xlink"> <display-name> - <name lang="en-US">Oracle Report Builder</name> + <name lang="en-US">Report Builder</name> <!-- <name lang="en-US">Oracle(TM) Report Builder</name> --> </display-name> <registration> |