cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: [SOLUTION] FOP/HSSFSerializer's and non-english characters
Date Thu, 29 May 2003 17:42:22 GMT
Hello Yury,

I hope you see the little problem with your solution: You change the 
library to make it work with Cocoon. So this is not a solution we can 
use for or integrate in Cocoon in general.

In the future these very POI specific java files will go back to the POI 
project and will be maintained there. So it will be easier to replace 
one version with another. But I can't say how long this takes. They seem 
to work on their 2.0 release at the moment.

Joerg

Yury Mikhienko wrote:
>>>YM> Ok, the PDF serializer works properly (but with .ttf fonts only), but what
about the HSSFSerializer?
>>>YM> I still does not properly generate the exel document with russian characters
:((
>>>
>>>There is the "jakarta-poi-1.7.0-dev-20020624.jar" library in the
>>>"cocoon-2.1/src/blocks/poi/lib". It does not support russian
>>>characters. The support begins from version "1.8-dev".
>>>See "http://jakarta.apache.org/poi/changes.html#1.8-dev"
>>>The current version of POI is "2.0-pre1".
> 
> For using the jakarta-poi-1.8.0-dev library in cocoon2.0.4 and Russian support implementation,
> I have implemented the several changes in  jakarta-poi-1.8.0-dev and in cocoon's hssf
element processor classes:
> (POI -1.8.0-dev )
> In jakarta-poi-1.8.0/src/java/org/apache/poi/hssf/usermodel/HSSFDataFormat.java
> change the following
> [122]    private  Vector formats = new Vector();
> [123]    private Workbook workbook;
> [124]    private boolean movedBuiltins = false;  
> to
> [122]    private static Vector formats = new Vector();
> [123]    private static Workbook workbook;
> [124]   private static boolean movedBuiltins = false;  
> 
> and following
> [251]  public  short getFormat(String format)
> to
> [251]  public static short getFormat(String format)
> 
> (cocoon2.0.4)
> In cocoon-2.0.4/src/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/Row.java

> change the following
> [137] retval.setStyle(_sheet.getCellStyleForRegion(_row.getRowNum(), (short)column));
> to
> [137] retval.setStyle(_sheet.getCellStyleForRegion((short)_row.getRowNum(), (short)column));
> 
> and
> in cocoon-2.0.4/src/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/Sheet.java
> change the 
> [341] return new Row(_sheet.createRow(rowNo), this);
> to
> [341] return new Row(_sheet.createRow((int) rowNo), this);
> 
> and
> in cocoon-2.0.4/src/java/org/apache/cocoon/components/elementprocessor/impl/poi/hssf/elements/Cell.java
> add the 
> [120] _cell.setEncoding(HSSFCell.ENCODING_UTF_16);


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message