← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 882: Quickly fixed

 

------------------------------------------------------------
revno: 882
committer: hieu <hieu.hispvietnam@xxxxxxxxx>
branch nick: trunk
timestamp: Mon 2009-10-19 13:15:27 +0700
message:
  Quickly fixed
modified:
  dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/preview/action/GeneratePreviewReportExcelSupport.java


--
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-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/preview/action/GeneratePreviewReportExcelSupport.java'
--- dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/preview/action/GeneratePreviewReportExcelSupport.java	2009-10-18 22:44:41 +0000
+++ dhis-2/dhis-web/dhis-web-excel-reporting/src/main/java/org/hisp/dhis/reportexcel/preview/action/GeneratePreviewReportExcelSupport.java	2009-10-19 06:15:27 +0000
@@ -125,11 +125,11 @@
     DataMartStore dataMartStore;
 
     InitializePOIStylesManager initPOIStylesManager;
-    
+
     protected StatementManager statementManager;
-    
+
     protected SelectionManager selectionManager;
-    
+
     protected ReportExcelService reportService;
 
     protected PeriodService periodService;
@@ -141,7 +141,7 @@
     String outputXLS;
 
     InputStream inputStream;
-    
+
     protected Integer sheetId;
 
     // -------------------------------------------
@@ -193,6 +193,11 @@
         this.statementManager = statementManager;
     }
 
+    public void setCategoryService( DataElementCategoryService categoryService )
+    {
+        this.categoryService = categoryService;
+    }
+
     public void setDataElementService( DataElementService dataElementService )
     {
         this.dataElementService = dataElementService;
@@ -320,7 +325,7 @@
     @SuppressWarnings( "static-access" )
     protected void installDefaultExcelFormat()
         throws Exception
-    {        
+    {
         initPOIStylesManager.initDefaultHeader( header );
         initPOIStylesManager.initDefaultFont( csFont );
         initPOIStylesManager.initDefaultCellStyle( csText, csFont );
@@ -337,7 +342,7 @@
         initPOIStylesManager.initCellStyle( csNumber, csFont, this.CELLSTYLE_BORDER, this.CELLSTYLE_BORDER_COLOR,
             this.CELLSTYLE_BORDER, this.CELLSTYLE_BORDER_COLOR, this.CELLSTYLE_BORDER, this.CELLSTYLE_BORDER_COLOR,
             this.CELLSTYLE_BORDER, this.CELLSTYLE_BORDER_COLOR, this.CELLSTYLE_ALIGN_CENTER );
-        
+
     }
 
     protected void installPeriod( Period period )
@@ -628,23 +633,23 @@
         Calendar calendar = Calendar.getInstance();
 
         File reportTempDir = reportLocationManager.getReportExcelTempDirectory();
-       
+
         this.inputStreamExcelTemplate = new FileInputStream( reportLocationManager.getReportExcelTemplateDirectory()
             + File.separator + reportExcel.getExcelTemplateFile() );
-       
+
         this.outputReportFile = new File( reportTempDir, currentUserService.getCurrentUsername()
             + this.dateformatter.format( calendar.getTime() ) + reportExcel.getExcelTemplateFile() );
-       
+
         this.outputStreamExcelTemplate = new FileOutputStream( outputReportFile );
-       
+
         this.templateWorkbook = new HSSFWorkbook( inputStreamExcelTemplate );
- 
+
         this.templateWorkbook.setSheetName( 0, reportExcel.getName().replaceAll( " ", "" ) );
- 
+
         this.initExcelFormat();
- 
+
         this.installDefaultExcelFormat();
-       
+
         ExcelUtils.writeValueByPOI( reportExcel.getOrganisationRow(), reportExcel.getOrganisationColumn(),
             organisationUnitGroup.getName(), ExcelUtils.TEXT, templateWorkbook.getSheetAt( 0 ), csText );
 
@@ -666,5 +671,4 @@
         // this.outputReportFile ) );
         // outputReportFile.delete();
     }
-
 }