Hi! In this story I’m going to share the technical details about the project that I have undertaken this summer with LibreOffice.
The project objective is to move the gallery code to use ZIP files — hence the name. Previously, the software used its custom built binary formats to store the information of gallery themes. These formats(like .sdg, .sdv, .thm, .str) have data stored inside of them which is not present in human friendly language. For example, arrows.str stores the name of the theme called Arrows, as shown below.
arrows.str
This example is the “most friendly” that binary files can get with user. If you don’t believe me, look at the figure below. It’s not readable by human, because it’s a binary file!
arrows.thm
So the primary objective of the project is to transform the binary files to human readable formats and enclose them into a ZIP file altogether. ZIP format is the standard encapsulation format and supports lossless data compression. This project will be a great improvement in the LibreOffice source code as gallery themes will finally be easily read and written. The developers will be benefited greatly from the project because it will be easier to resolve bugs, add improvements and features to the gallery. Let’s discuss the project phases.
While writing the proposal for the project, Tomaž Vajngerl (my mentor) and I had discussed a layout of the structure and how the project would be divided in different phases.
Phase 1: Unit Testing
Phase 2: Refactoring of code
Phase 3: Implementation of XML+ZIP Engine
“It is to be observed that the refactoring phase should not affect the behaviour of the code. This will only be done to make the current code cleaner and easier to work with. To make sure that refactoring is done right, tests must be written.” -GSoC Proposal
To know the reason why the unit testing phase exists in the first place, it’s important to know a little bit about the following phase — refactoring of code.
A snapshot of the LibreOffice Gallery is shown below:
#libreoffice #gsoc #open-source #google #google-summer-of-code