In this branch, I have attempted to fix at least one of these limitations without destroying too much. The problem is simple: KWord doesn't support page styles. So, what are page styles? Page styles, in an OpenDocument Text file, defines the layout used for a page (margins, page size, etc), the headers/footers, the columns, and so on. Up to the present, KWord supported only one page style for a whole document. In KWord 1, there was a feature (but I prefer calling it a "hack" or a "dirty patch") to hide this issue when manipulating headers/footers: the "first page header/footer". It's nonsense, can't really be mapped from/to OpenDocument, and it just can't meet the expectations of the user.
Adding support for this feature in KWord is hard. Really hard. To put it simply, the layout code in KWord is, from our point of view, under-documented and over-complex. So we spent a lot of time just browsing the code, playing with it, trying to understand how it works... I didn't count the number of hours spent just reading this code and discussing about how it could work, but it took a lot of time!
The final result is:
- documentation i'm writing to explain people how the layout works in KWord.
- this branch to implement support for page styles.
- several mental diseases because of too high C++ usage.
You want to see what it looks like? Well... it looks like the main branch, except that the engine is moving, and less stable. But with the piece of code I discovered tonight, i'm getting quite confident it may work soon...