dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #16398
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 6232: Using UTF-8 encoding for Xls workbook generation. Fixed compilation error.
------------------------------------------------------------
revno: 6232
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-03-09 12:46:58 +0100
message:
Using UTF-8 encoding for Xls workbook generation. Fixed compilation error.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageSender.java
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/GridUtils.java
dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ExcelUtils.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/GetPatientHistoryAction.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GenerateTabularReportAction.java
dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties
dhis-2/pom.xml
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageSender.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageSender.java 2012-03-09 09:40:27 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/message/MessageSender.java 2012-03-09 11:46:58 +0000
@@ -39,8 +39,9 @@
/**
* Sends a message. The given message will be sent to the given set of users.
*
- * @param message the message to send.
+ * @param subject the message subject.
+ * @param text the message text.
* @param users the users to send the message to.
*/
- void sendMessage( String subject, String text, User sender, Set<User> users, String gatewayId );
+ void sendMessage( String subject, String text, User sender, Set<User> users );
}
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/GridUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/GridUtils.java 2012-03-07 11:53:00 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/grid/GridUtils.java 2012-03-09 11:46:58 +0000
@@ -47,7 +47,6 @@
import java.util.List;
import java.util.Map;
-import jxl.Workbook;
import jxl.write.Label;
import jxl.write.Number;
import jxl.write.WritableCellFormat;
@@ -66,6 +65,7 @@
import org.hisp.dhis.common.GridHeader;
import org.hisp.dhis.system.util.CodecUtils;
import org.hisp.dhis.system.util.Encoder;
+import org.hisp.dhis.system.util.ExcelUtils;
import org.hisp.dhis.system.util.MathUtils;
import org.hisp.dhis.system.util.StreamUtils;
import org.hisp.dhis.system.velocity.VelocityManager;
@@ -180,8 +180,8 @@
public static void toXls( List<Grid> grids, OutputStream out )
throws Exception
{
- WritableWorkbook workbook = Workbook.createWorkbook( out );
-
+ WritableWorkbook workbook = ExcelUtils.openWorkbook( out );
+
for ( int i = 0; i < grids.size(); i++ )
{
Grid grid = grids.get( i );
@@ -201,7 +201,7 @@
public static void toXls( Grid grid, OutputStream out )
throws Exception
{
- WritableWorkbook workbook = Workbook.createWorkbook( out );
+ WritableWorkbook workbook = ExcelUtils.openWorkbook( out );
String sheetName = CodecUtils.filenameEncode( StringUtils.defaultIfEmpty( grid.getTitle(), XLS_SHEET_PREFIX + 1 ) );
=== modified file 'dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ExcelUtils.java'
--- dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ExcelUtils.java 2012-02-02 09:39:35 +0000
+++ dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/ExcelUtils.java 2012-03-09 11:46:58 +0000
@@ -35,6 +35,7 @@
import java.util.Map;
import jxl.Workbook;
+import jxl.WorkbookSettings;
import jxl.format.Alignment;
import jxl.format.Border;
import jxl.format.BorderLineStyle;
@@ -399,7 +400,10 @@
{
try
{
- return Workbook.createWorkbook( outputStream );
+ WorkbookSettings ws = new WorkbookSettings();
+ ws.setEncoding( "UTF-8" );
+
+ return Workbook.createWorkbook( outputStream, ws );
}
catch ( IOException e )
{
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/GetPatientHistoryAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/GetPatientHistoryAction.java 2012-03-08 04:56:36 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/GetPatientHistoryAction.java 2012-03-09 11:46:58 +0000
@@ -27,7 +27,6 @@
package org.hisp.dhis.caseentry.action.patient;
-import java.util.ArrayList;
import java.util.List;
import org.hisp.dhis.common.Grid;
@@ -35,7 +34,6 @@
import org.hisp.dhis.i18n.I18nFormat;
import org.hisp.dhis.patient.Patient;
import org.hisp.dhis.patient.PatientService;
-import org.hisp.dhis.program.ProgramInstance;
import org.hisp.dhis.program.ProgramInstanceService;
import com.opensymphony.xwork2.Action;
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GenerateTabularReportAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GenerateTabularReportAction.java 2012-03-09 04:46:32 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GenerateTabularReportAction.java 2012-03-09 11:46:58 +0000
@@ -28,7 +28,6 @@
package org.hisp.dhis.caseentry.action.report;
import java.util.ArrayList;
-import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
@@ -46,8 +45,6 @@
import org.hisp.dhis.organisationunit.OrganisationUnitHierarchy;
import org.hisp.dhis.organisationunit.OrganisationUnitService;
import org.hisp.dhis.paging.ActionPagingSupport;
-import org.hisp.dhis.program.ProgramInstance;
-import org.hisp.dhis.program.ProgramInstanceService;
import org.hisp.dhis.program.ProgramStage;
import org.hisp.dhis.program.ProgramStageInstance;
import org.hisp.dhis.program.ProgramStageInstanceService;
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties 2012-03-07 14:05:05 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties 2012-03-09 11:46:58 +0000
@@ -292,6 +292,7 @@
web_api=Web API
system_overview=System Overview
server_date=Server date
+online_release_page=online release page
#-- Change Log------------------------------------------------------------------#
=== modified file 'dhis-2/pom.xml'
--- dhis-2/pom.xml 2012-03-06 07:34:56 +0000
+++ dhis-2/pom.xml 2012-03-09 11:46:58 +0000
@@ -674,7 +674,7 @@
<dependency>
<groupId>net.sourceforge.jexcelapi</groupId>
<artifactId>jxl</artifactId>
- <version>2.6</version>
+ <version>2.6.12</version>
</dependency>
<dependency>
<groupId>org.codehaus.woodstox</groupId>