-
Notifications
You must be signed in to change notification settings - Fork 56
Description
This issue is very closely related to #64. A fix for that issue would most likely also fix this one. The root problem is how LibreOffice handles setting formatting for an entire spreadsheet and how this library interacts with such spreadsheets.
Steps to reproduce:
- Create a new spreadsheet document in LibreOffice Calc
- Select all cells (Ctrl-A, or click to the left of the column letter list)
- Set any kind of formatting (e.g. change the font)
- Save
This creates a content.xml with the following inner content:
<table:table-column table:style-name="co1" table:number-columns-repeated="16384" table:default-cell-style-name="ce1" />
<table:table-row table:style-name="ro1" table:number-rows-repeated="1048575">
<table:table-cell table:number-columns-repeated="16384" />
</table:table-row>
<table:table-row table:style-name="ro1">
<table:table-cell table:number-columns-repeated="16384" />
</table:table-row>getColumnCount() and getRowCount() then respectively return 16384 and 1048576. This is a problem for functions like getCellRangeByName(...) and getCellRangeByPosition(...) that eventually call getCellCoverInfos(), which will then attempt to iterate over every cell in the table multiple times.
It might be possible to fix this by patching getOwnerCellByPosition() without having to deal with the spreadsheet size issue. I'll try to do so and submit a pull request if I can figure out what a covered cell is.