jferard / fastods

A very fast and lightweight (no dependency) library for creating ODS (Open Document Spreadsheet, mainly for Calc) files in Java. It's a Martin Schulz's SimpleODS fork
GNU General Public License v3.0
36 stars 6 forks source link

Make OdsFileWriter flushable #56

Closed jferard closed 7 years ago

jferard commented 7 years ago

This is a fork from #33.

The state was:

  • [x] make all styles and configuration accessible to static creation in ods elements. Currently, styles are dynamically added to ods elements when used. It's a good thing, but we should be able to create styles in ods elements before using them.
  • [x] implement the flush method without freeing memory or using a distinct thread. Just create a "write on demand" feature.
  • [ ] implement the memory release of flushed rows. A rolling list could be a solution here.
  • [ ] removed, see #33

The current implementation is very tedious:

  • the user has to declare each style
  • the user must call each flush method at the right time

The goal is:

  1. the user chooses a number of lines in the "buffer";
  2. when the lines are filled with data, the flush method is automatically called.
  3. if a new style appears after the first flush, an error is sent to log.
jferard commented 7 years ago

This has been really fixed in https://github.com/jferard/fastods/commit/9c54947cdce178d207238a81a183f1d7da4311cd.