You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2014/06/13 09:58:49 UTC
svn commit: r1602334 - in /ofbiz/trunk/specialpurpose/birt:
data/helpdata/HELP_BIRT.xml src/org/ofbiz/birt/BirtWorker.java
webapp/birt/WEB-INF/controller.xml
Author: jleroux
Date: Fri Jun 13 07:58:48 2014
New Revision: 1602334
URL: http://svn.apache.org/r1602334
Log:
A patch from Leon for "Birt 4.2, export report as MS 2007 document format" https://issues.apache.org/jira/browse/OFBIZ-5653
One of the new features of Birt 4.2 is the capability to export report as MS 2007 format, such as .docx, .xlsx and .pptx.
Birt library in OFBiz trunk has already been upgrade to version 4.3.1. So it's ready to introduce this new feature into ofbiz.
patch: 3 new content types for MS 2007 word, excel and ppt. Also update the help xml and comments in controll.xml.
Modified:
ofbiz/trunk/specialpurpose/birt/data/helpdata/HELP_BIRT.xml
ofbiz/trunk/specialpurpose/birt/src/org/ofbiz/birt/BirtWorker.java
ofbiz/trunk/specialpurpose/birt/webapp/birt/WEB-INF/controller.xml
Modified: ofbiz/trunk/specialpurpose/birt/data/helpdata/HELP_BIRT.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/birt/data/helpdata/HELP_BIRT.xml?rev=1602334&r1=1602333&r2=1602334&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/birt/data/helpdata/HELP_BIRT.xml (original)
+++ ofbiz/trunk/specialpurpose/birt/data/helpdata/HELP_BIRT.xml Fri Jun 13 07:58:48 2014
@@ -82,5 +82,8 @@ under the License.
<para>application/vnd.oasis.opendocument.text</para>
<para>application/vnd.oasis.opendocument.spreadsheet</para>
<para>application/vnd.oasis.opendocument.presentation</para>
+ <para>application/vnd.openxmlformats-officedocument.wordprocessingml.document</para>
+ <para>application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</para>
+ <para>application/vnd.openxmlformats-officedocument.presentationml.presentation</para>
</section>
</section>
Modified: ofbiz/trunk/specialpurpose/birt/src/org/ofbiz/birt/BirtWorker.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/birt/src/org/ofbiz/birt/BirtWorker.java?rev=1602334&r1=1602333&r2=1602334&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/birt/src/org/ofbiz/birt/BirtWorker.java (original)
+++ ofbiz/trunk/specialpurpose/birt/src/org/ofbiz/birt/BirtWorker.java Fri Jun 13 07:58:48 2014
@@ -124,6 +124,12 @@ public class BirtWorker {
options.setOutputFormat("ods");
} else if ("application/vnd.oasis.opendocument.presentation".equalsIgnoreCase(contentType)) { // Open Document Presentation
options.setOutputFormat("odp");
+ } else if ("application/vnd.openxmlformats-officedocument.wordprocessingml.document".equalsIgnoreCase(contentType)) { // MS Word 2007
+ options.setOutputFormat("docx");
+ } else if ("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet".equalsIgnoreCase(contentType)) { // MS Excel 2007
+ options.setOutputFormat("xlsx");
+ } else if ("application/vnd.openxmlformats-officedocument.presentationml.presentation".equalsIgnoreCase(contentType)) { // MS Word 2007
+ options.setOutputFormat("pptx");
} else {
throw new GeneralException("Unknown content type : " + contentType);
}
Modified: ofbiz/trunk/specialpurpose/birt/webapp/birt/WEB-INF/controller.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/birt/webapp/birt/WEB-INF/controller.xml?rev=1602334&r1=1602333&r2=1602334&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/birt/webapp/birt/WEB-INF/controller.xml (original)
+++ ofbiz/trunk/specialpurpose/birt/webapp/birt/WEB-INF/controller.xml Fri Jun 13 07:58:48 2014
@@ -105,6 +105,9 @@ under the License.
application/vnd.oasis.opendocument.text
application/vnd.oasis.opendocument.spreadsheet
application/vnd.oasis.opendocument.presentation
+ application/vnd.openxmlformats-officedocument.wordprocessingml.document
+ application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
+ application/vnd.openxmlformats-officedocument.presentationml.presentation
-->
<view-map name="ViewHandler" type="birt" page="component://birt/webapp/birt/report/example.rptdesign" content-type="application/pdf"/>
<view-map name="chartViewHandler" type="birt" page="component://birt/webapp/birt/report/chart.rptdesign" content-type="application/pdf"/>