summaryrefslogtreecommitdiff
path: root/reportbuilder
diff options
context:
space:
mode:
authorOcke Janssen [oj] <Ocke.Janssen@oracle.com>2010-08-30 11:26:49 +0200
committerOcke Janssen [oj] <Ocke.Janssen@oracle.com>2010-08-30 11:26:49 +0200
commit2ba3b618bea27646eec902ac33f0b713eddf47a3 (patch)
tree5e60f33f01bfa95af8cdd231953e7094a440a60d /reportbuilder
parent2a44c3167e5f24b5e8fa620be479c506c8a607be (diff)
dba33h: #i114105# fix version number
Diffstat (limited to 'reportbuilder')
-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.java3
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/output/text/TextRawReportTarget.java3
3 files changed, 10 insertions, 3 deletions
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..7c2671921d3f 100644
--- a/reportbuilder/java/com/sun/star/report/pentaho/output/StylesWriter.java
+++ b/reportbuilder/java/com/sun/star/report/pentaho/output/StylesWriter.java
@@ -374,7 +374,8 @@ 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,
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);