Hello Thomas, honestly I believe the design of ODF could be improved at this point as the "eternity" of rows and columns is being mapped to a fixed integer: 1024 columns and 20^10 rows.
The reason why this occurs is the default cell style in the column. The default cell style is only applied to those cells, where an XML exists and no existing style. An ODF programmer should NOT iterate over the repeated and even split them to real cell elements (as I once incidentally did). In the end I realized spreadsheet works best when I split the spreadsheet functionality in two functions. 1) Range Selection: Traverse the table and identifies columns, rows and cell elements required for the given range. A range is a cell, column, row, an arbitrary rectangle of cells, even the complete table. Repeated columns/rows/cells are split on demand. 2) Change Appliance: For every given element (from prior range selection) a change is being executed/applied. Might be a style, addition of rows/columns using Excel format inheritance rules or a new surrounding border. I am sorry, I was still not yet able to convince my employer to merge the branch back to Apache. Hopefully I will succeed before the EU Con in Budapest. Although there is some clean-up required before returning (as often on code created under time constraints) you may find it under https://code.open-xchange.com/git/office the directory of our odfdom is mapped to com.openexchange.office.odf/odfdom/ Hope that helps you, Thomas! Svante Am 07/09/14 um 14:21 schrieb Thomas Kellerer: > Hello, > > I'm using the ODF toolkit in my tool SQL Workbench/J > (http://www.sql-workbench.net) to import ODS spreadsheets into the > database. > > I got a report from a user that when importing his spreadsheet my > application hangs and stops respsonding. > > I tracked this down to Row.getCellCount() which I use to determine the > real number of columns in the spreadsheet before importing it. > > For some reason the ODS file claims to have 1024 columns and 1048576 > rows and the above mentioned function uses two nested loop over the > rows and columns. So while the application does not really "hang" it > will probably take a long time to count the number of columns in the > spreadsheet > (I killed it after 10 minutes running on a Intel Core i7 CPU). > > I have attached the ODS file in question (I hope the mailing list > allows this). > > Kind regards > Thomas Kellerer
