Development/Calc
TDF LibreOffice Document Liberation Project Community Blogs Weblate Nextcloud Redmine Ask LibreOffice Donate
This page provides an overview of Calc development.
Random ideas
Some random collection of what's to be done in Calc.
Core
Drawing object storage rework
Currently, all drawing objects that can be inserted into Calc are stored with absolute coordinates independently from the underlying sheet geometry. In other words, each drawing object has no clue what cell or cells it overlaps. Each time a row or column changes its height or width, Calc re-calculates the positions of all affected drawing object to adjust for that change for each row height change. However, when the heights of multiple rows change at the same time, Calc has to re-calculate the positions of the objects for each row change. This has a huge performance implication especially when filtering a sheet that contains many drawing objects, since their positions needs to be adjusted for each row height change. Note that cell comments are also drawing objects, and the same issue applies to them.
As you can see, this is terribly inefficient. To rectify this, we need to change how the drawing objects' geometries are stored so that they know the start and end cells that they anchor, and the offsets within those two cells. This way, Calc needs to re-calculate their positions only once after the filtering is complete.
Update: Caolan did a preliminary work on this which is already in the master branch.
Draw border around current selection
We need to draw a distinct border around current selection in order to allow different drag mode than we can currently provide. Right now, we rely on a presence of selected range to trigger a drag, but because of this, dragging of a single cell is a pain. Providing a border to grab and start dragging will improve this situation.
Additionally, having a distinct drag border will allow us to implement right-click dragging for special dragging needs.
Multiple sheet types
Currently, a sheet can only contain data grid where you enter values, formulas etc in a 2-dimensional grid layout. We need to add support for other sheet types, such as chart, to allow charts to be embedded as sheets. This could later be extended to go beyond just the data grid and chart types.
Removal of hacks to reduce cyclomatic complexity
Calc's code contains a fair amount of hacks, or suboptimal designs that unnecessarily increase the complexity of the code. Some examples are:
- branching of code paths by IsImportingXML() call. The core shouldn't need to know whether we are loading a document or not. It's the job of the filter code to call the right method, not the job of the core to do things differently depending on whether it's loading a file or handling user input. Also, using the term 'XML' here is mis-guiding, since this is strictly meant for ODS loading only. And having the core do something special just for the ODS file format is a bad design.
- SetStreamValid() etc for ScTable. This applies to Calc's trick to save the XML stream for a given sheet and re-uses it on export if the sheet is not modified. Again, the core shouldn't need to do anything special just for ODS file stream; ScTable should introduce a 'sheet modified' flag, and tie this functionality to that flag. That would be a more appropriate general approach. Also, investigate the additional lock semantics of this StreamValid flag. That's truly ugly and should be investigated and be removed from the core.
- more to come...
Enterprises love standadized documents layouts and brand logos on the header or footer is a must for their spreadsheets. Today LibreOffice does not allow to insert a graphic in the header or footer of a spreadsheet. To overcome, you have to put it in the header/footer background image with little control on size and position.
ODF Import
Unimplemented Chart ODF Elements lists a number of chart ODF elements that have been added for better OOXML roundtripping support but have no implementation besides import and export yet
Unsupported MS Excel Functions
A list of Microsoft Excel functions currently not supported in LibreOffice has been created and is located here: Excel Functions Not Supported in LO.