summaryrefslogtreecommitdiff
path: root/reportbuilder
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2010-10-06 13:35:21 +0200
committerJan Holesovsky <kendy@suse.cz>2010-10-06 13:35:21 +0200
commit542a0e91f425b05bc4fb402777f0068c2a8159f4 (patch)
tree778fad1d2f39e3b54584d2643cddf0fdc78a9d86 /reportbuilder
parent9cdba569d3b93b8b6ca6f655816236db503784a9 (diff)
parent1bf218731b864f73403a2cf653d8fd231f6e392f (diff)
Merge commit 'ooo/OOO330_m9'
Conflicts: swext/mediawiki/build.xml swext/prj/build.lst
Diffstat (limited to 'reportbuilder')
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/layoutprocessor/TableCellLayoutController.java10
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java7
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/output/StylesWriter.java9
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/output/spreadsheet/SpreadsheetRawReportTarget.java4
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/output/text/TextRawReportTarget.java3
-rwxr-xr-xreportbuilder/util/description.xml2
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 74fe1728fc5f..f3c5ef383057 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 d4046424e07d..b41252a17089 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 9b2e6b33b5f7..54b7d0d0159c 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 11351b656ea1..d2c4ebd96e3c 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 7c90bf1fd0ec..9f3746086b87 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 06c9adc0aa66..4b0372d53de9 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>
<version value="#VERSION#"/>