Projects/Summer of Code/2009/Projects/Basic tables support for KWord
In this project I will implement basic support for tables in KOffice's text shape. See my original proposal at the end of this page.
Brief Activity Log
- 2009-04-23 - Currently very busy with school :)
See my my blog where I will write about my progress in more detail.
Motivation for Proposal / Goal
Tables are common in many documents, and can be considered a key feature of a word processor. KWord currently lacks a competitive implementation of tables in its latest iteration, the upcoming 2.0 release. In this project, I will try to build a basic and robust implementation of editable tables, including loading and saving, that can later be extended to a more competitive implementation.
I'm fully aware that this is an ambitious task that might be more suited for one of the core developers, but I think this year's Summer of Code could be a good opportunity to get the ball rolling on this, because let's face it; it will have to be done at one point or another.
My implementation will use the built-in support for tables in Qt's Scribe framework. I will modify the text layout engine in KOffice's kotext library to support layout of text into table cells instead of into the normal document flow of the text shape.
I'll also add loading and saving code and will try to map as many of the ODF table related style attributes in the ODF specification to properties of KOffice's and Qt's style (/format) classes as possible, extending them where necessary. I'll do this in order of importance, starting with the attributes required for a very basic table implementation first.
I will ensure correct cursor and selection behavior during keyboard/mouse interaction as well as correct table breaking at page boundaries. The table editing functionality will most likely be part of one or several tools working with the text shape and will allow the user to split/merge cells, resize rows/columns, edit the table heading et.c.
I'll put quite some focus on documenting my implementation and, together with my mentor and other KOffice developers, making sure that it will scale well to meet the demands of a future full implementation of ODF tables, and possibly also taking into account the requirements of tables as they are specified by the Microsoft Office .DOC format.
Unit tests for both loading and saving as well as layout of the tables will be added to the existing infrastructure in libs/kotext/opendocument/tests/ and plugins/textshape/tests/ respectively. I'll take care to keep the tests passing as my work progresses and make sure any new features I add along the way will be covered by unit tests.
June 1-June 30 - Basic functionality
I will begin by implementing minimal loading/saving as well as basic display and editing. Using this first iteration, the user should be able to load a document containing a very basic 3x3 table , and remove and add columns and rows to it and save the document. More specifically I will add basic support for the following ODF elements:
along with a basic subset of the properties of their corresponding style families:
- <style:style ... style:family="table">
- <style:style ... style:family="table-column">
- <style:style ... style:family="table-row">
Such as e.g. <style:table-row-properties fo:background-color="..."/>.
July 1-August 10 - Extended functionality
In this second step, I will:
- Add support for row and column span.
- Add support for splitting/merging of cells.
- Improve the behavior of tables breaking across multiple pages by duplicating the cell position/size calculations performed inside Qt in order to determine where the break will occur and be able to do the break myself at a desired location.
- Make sure shapes can be put into table cells, possibly by creating a new kind of anchoring mechanism in kotext for cells which are not allowed to contain any text.
- Add support for more of the table related style properties of the ODF specification.
August 10-August 16 - Finishing up
Fix any outstanding bugs and write missing unit tests and documentation.
My name is Elvis Stansvik. I'm 25 years old. Most of you probably know me as 'estan' on Freenode. I live in the nice little town Örebro, about 200 km west of Stockholm, Sweden. I've been tinkering with free software for about 10 years and I've had an increased interest in programming in the last 4-5 years. I already have a handful of commits to KOffice. They would be many more had I not been so busy with work and studies. Last year I won the KDE 4.0 Release Event Competition together with Kyle Cunningham, and was flown out to Mountain View CA where I met Inge Wallin and a bunch of other KDE developers for the first time.
My past experiences are quite varied and include working with a small non profit wireless ISP in the small town Nora, running my own book shop and later book café and working as an IT technician at a book publishing company.
Currently I'm brushing up my old high school (gymnasium) grades at a local school, and after this summer I'll be in uni. Things I enjoy other than free software include traveling, swimming, the occasional painting session (oil or acrylics on canvas), hiking the Swedish mountains and hanging out with friends in my home town.
My studies ends on May 31, so I can't really start full time coding until then, but I'll definitely be available in my free time up until then for planning and maybe even do some preliminary coding. During the summer I may have to do a little bit of part time work for a publishing company to be able to pay my June rent, but it's flexible hours and I can do that work from anywhere, so I'll essentially be able to work 100% with my project throughout the summer.
- Roughly the minimal example at the very end of 8.1 Basic Table Model in the ODF (v1.1) specification.