You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Danny Mui <da...@muibros.com> on 2002/12/19 00:05:51 UTC

HSSF Serializer Questions

I'm currently in the process of enhancing the serializer to support more 
features (one pending patch in bugzilla for gnumeric merged regions..) 
and was wondering one thing.  Is there a reason why the latest 1.9 dev 
snapshot is not being used as the target?  There's a minor API break 
(getFormat -> getBuiltinFormat for 1.9) but everything seems to work in 
1.9 as it did in 1.7.

Another question,  when gnumeric generates a lot of styles to interpret 
the fonts/styles, a fontrecord is added for each and every style/font. 
 Excel '97 Complains it is out of memory with a filesize of 133kb,  so i 
tried to reuse FontRecords when appropriate.  

Steps:

1. Created a duplicate object called Font that is really just HSSFFont 
with a public constructor
2. Created a toString representation of the font record so it can be 
added to a hashmap (basically concatenates all the properties)
3. Added another method to the serializer representation of the workbook 
(createFont(Font)) so that fonts aren't created all the time and reused.

Does this method look correct (algorithm/approach wise)?  I'd like to do 
this for styles as well since this approach cut the filesize down to 103kb.


Thanks!

danny


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


Re: HSSF Serializer Questions

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Andrew C. Oliver wrote:
> Danny Mui wrote:
> 
>>
>> I'm currently in the process of enhancing the serializer to support 
>> more features (one pending patch in bugzilla for gnumeric merged 
>> regions..) and was wondering one thing.  Is there a reason why the 
>> latest 1.9 dev snapshot is not being used as the target?  There's a 
>> minor API break (getFormat -> getBuiltinFormat for 1.9) but everything 
>> seems to work in 1.9 as it did in 1.7.
> 
> 
> I haven't gotten around to it.  I was waiting to see what happened with 
> Morphos but I think that effort is effectively suffering from the 
> jakarta-commons effect, so the show should go on.  Proceed. 

Yes, please do. I'm the main Morphos developer, and my intention is to 
bring it to Cocoon. For those that have seen Morphos, this is the idea:

1) use the Cocoon pipelines as MorpherPipelines
2) use Cocoon blocks as "Morphers"

This means that Morphos could easily become a simple frontend to Cocoon 
pipelines without the sitemap, to be used programmatically.

Bottom line: please end in stuff :-)

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


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


Re: HSSF Serializer Questions

Posted by "Andrew C. Oliver" <ac...@apache.org>.
Danny Mui wrote:

>
> I'm currently in the process of enhancing the serializer to support 
> more features (one pending patch in bugzilla for gnumeric merged 
> regions..) and was wondering one thing.  Is there a reason why the 
> latest 1.9 dev snapshot is not being used as the target?  There's a 
> minor API break (getFormat -> getBuiltinFormat for 1.9) but everything 
> seems to work in 1.9 as it did in 1.7.

I haven't gotten around to it.  I was waiting to see what happened with 
Morphos but I think that effort is effectively suffering from the 
jakarta-commons effect, so the show should go on.  Proceed.  

My stepsons are going to their dad's for christmas so I'll have more 
time soon.  There should be relatively low latency on patches, but you 
might want to put me in the cc: because then they get sorted in my "to 
me" box...

>
> Another question,  when gnumeric generates a lot of styles to 
> interpret the fonts/styles, a fontrecord is added for each and every 
> style/font. Excel '97 Complains it is out of memory with a filesize of 
> 133kb,  so i tried to reuse FontRecords when appropriate. 
> Steps:

Yes.  

>
> 1. Created a duplicate object called Font that is really just HSSFFont 
> with a public constructor
> 2. Created a toString representation of the font record so it can be 
> added to a hashmap (basically concatenates all the properties)
> 3. Added another method to the serializer representation of the 
> workbook (createFont(Font)) so that fonts aren't created all the time 
> and reused.
>
> Does this method look correct (algorithm/approach wise)?  I'd like to 
> do this for styles as well since this approach cut the filesize down 
> to 103kb.

Well you kinda want the fonts to match to the style regions in theory. 
 But it sounds right.

-Andy

>
>
> Thanks!
>
> danny
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>
>




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