#i114105#: reportbuilder: write same office:version in all streams diff -r dcf2c71b02bd -r 55f17db2ca40 reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java --- a/reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java Wed Aug 25 18:57:27 2010 +0200 +++ b/reportbuilder/java/com/sun/star/report/pentaho/output/OfficeDocumentReportTarget.java Wed Aug 25 19:23:01 2010 +0200 @@ -138,6 +138,10 @@ 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 @@ 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 -r dcf2c71b02bd -r 55f17db2ca40 reportbuilder/java/com/sun/star/report/pentaho/output/StylesWriter.java --- a/reportbuilder/java/com/sun/star/report/pentaho/output/StylesWriter.java Wed Aug 25 18:57:27 2010 +0200 +++ b/reportbuilder/java/com/sun/star/report/pentaho/output/StylesWriter.java Wed Aug 25 19:23:01 2010 +0200 @@ -374,7 +374,8 @@ 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 -r dcf2c71b02bd -r 55f17db2ca40 reportbuilder/java/com/sun/star/report/pentaho/output/text/TextRawReportTarget.java --- a/reportbuilder/java/com/sun/star/report/pentaho/output/text/TextRawReportTarget.java Wed Aug 25 18:57:27 2010 +0200 +++ b/reportbuilder/java/com/sun/star/report/pentaho/output/text/TextRawReportTarget.java Wed Aug 25 19:23:01 2010 +0200 @@ -1269,7 +1269,8 @@ 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);