Hi Sylvain: 1st: Thank You for a prompt fix!
2nd: I wouldn't know how to apply this patch. I have no java development environment installed. I do my development on the octave side through an (I suppose) octave- java "bridge". Could you send the updated classes (if a simple swap of the classes in a jar file is at all possible)? Changing files in zips/archives/etc is straightforward but -although AFAIK jar files are not much different- I've never tried this with jars. Thanks, Philip On Apr 26, 4:41 pm, Sylvain Cuaz <[email protected]> wrote: > Le 24/04/2010 22:19, Philip a écrit : > > > Hi there, > > > (jOpenDocument 1.2.b3) > > > 1. When I create a new sheet using sh.addSheet () and then invoke > > sh.ensureColumnCount(), > > the last method always fails the *first* time with a null pointer > > error message. Just trying the same method with the same arguments > > again (using a try-catch construct) makes the method work. > > Uninitialized data or pointers somewhere? > > BTW I don't see this behaviour on existing sheets. > > That was caused by the method not handling the lack of styles. I've > attached a patch that should > fix the issue. > > > 2. When creating a sheet using addSheet, followed by invoking > > ensureColumnCount (twice, see above), trying to add data (e.g., a 100 > > rows x 1024 columns numerical array) fails. > > If I try-catch each sh.getCellAt().setValue() method, in the end I get > > a 100 rows by 1024 columns sheet, but the upper row only contains 1 > > single cell at A1. Trying to access the next cells (at B1, C1, ...) > > always fails with java errors ("out of bound"). > > All the other rows (A2:AMJ1024) are complete and look good, however. > > Perhaps this one is related to the first bug (above). > > Yes, after ensureColumnCount() throws the NPE the data isn't valid > anymore. > > HTH, > Sylvain > > -- > Subscription > settings:http://groups.google.com/group/jopendocument/subscribe?hl=en > > addSheet NPE.patch > 5KViewDownload
