Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[calligra] Add optimisations for importing readonly XLSX docs. Contri…
…butes to JB#13262

This adds a number of optimisations when importing readonly XLSX format
speadsheets.

1. Use the pre-calculated cell content values rather than performing a
full recalculation using the cell formulae.

2. Calculate a minimal containing rectangle around the cells with
content and import only those cells + a fixed border (5 cells by
default). Cells with only a background colour are ignored. This avoids
having to import large areas of empty cells (which are a common
occurrence in Excel files, since they're generate if the user selects an
entire column/row and applies a style to it).

The following additional compile-time cmake flags are also added.

MSOOXML_MAX_SPREADSHEET_COLS=<integer>

Controls the maximum number of columns to import. Defaults to 0x7FFF,
the maximum supported by Calligra.

MSOOXML_MAX_SPREADSHEET_ROWS=<integer>

Controls the maximum number of rows to import. Defaults to 0xFFFFF, the
maximum supported by Calligra.

MSOOXML_SPREADSHEET_CONTENT_BORDER=<integer>

The size of border to add around the minimal containing rectangle for
read only documents. Defaults to 5.
  • Loading branch information
llewelld committed Jun 23, 2020
1 parent cab4cfa commit 957e602
Show file tree
Hide file tree
Showing 2 changed files with 568 additions and 5 deletions.

0 comments on commit 957e602

Please sign in to comment.