JUN
23
2006

KWord 2.0 progress

After working on Flake for the last couple of weeks I refocussed on KWord earlier this week.
KWord needs an amazing amount of refactors to get the best out of the new features both Qt4 and Flake provide, so this left me with a dilemma on where to start and how to approach this best. I decided to go for the mechanic ways. You know what I mean if you ever saw a mechanic who took a whole car apart, with a garage full of parts and starts to reassemble it afterwards. I am doing the same in software.
Good for me that I don't have to take kword apart first, I'll just copy the parts I need :)

I've started working on the basics, a canvas, a document and pages first. Not only for the obvious reasons but also because they needed to be reworked anyway. In the new revision I put in some new features that we kind of had support for in 1.5
Page Spreads. This is the concept of having 2 pages that the user edits as one. Consider the usage that you have a big image that you want to print over two pages. You would really like to have 1 image in your document and position across the two pages so it gets printed properly. This always was impossible in just about all word-processors. KWord now has this high-end feature. See here:

After pagespreads worked I went on to put text on the pages, as already visible in the previous screenshot this also has a nice new feature. The margins for left/right have gotten a little more intelligent and now allow you to set it to be mirrored between left and right pages. So you get a small border closest to the binding creating a much nicer booklet output.

Last point I want to show today is how KWord 2.0 will benefit from the new Qt text engine by eliminating the most complained about problem; having correct WYSIWYG. See this screenshot for 1 piece of text being shown in two different zoom levels and they both look excellent!

Have a good weekend!

Comments

Let me ask a stupid question: Why two pages? Why not a (table of) arbitrary number pages? Think about leaflets and folded street maps for example.


By carlo at Sat, 06/24/2006 - 00:07

No, its not a stupid question; I never thought about that use before, actually.
I guess the best answer is that at this point there will not be enough users of that feature to warrent the extra complexity needed for this.

Let me explain that a little further;
* The main complexity is that you add text frames to all (page) parts of the sheet. I feel that for a leaflet or street map you don't need the normal text flow anyway.
* You can already create a arbitrary sized page (without the main-text frames) where you can create your texts. Since those kind of output need to be printed on one page and folded afterwards. So just using 1 page thats really wide makes more sense, I think.

Thanks for your thoughts on this!


By Thomas Zander at Sat, 06/24/2006 - 08:22

I've been a bit out of the KOffice loop lately, but last time I built KOffice trunk, KWord crashed as soon as you even clicked on the page. Actually, now I think about it, there wasn't even a page, just a big white space.

It looks like after much initial frustration with porting to Qt4, you're making great progress now!

Well done! Hope to be hacking on KOffice again soon.


By martin ellis at Sat, 06/24/2006 - 07:37

Will the ability to have "sections" with different page layouts (eg first 5 pages A4 portrait, then remaining pages A4 landscape) be a feature of 2.0?
Seems like you've implemented something like this in the "page spreads" feature - but in a "page spread" the resulting double-sized page is not being treated as a single A3 page, because the left and right headers are being output on it.

Great work so far!


By tonyb at Mon, 06/26/2006 - 02:55

Ah, I didn't show that in the screenshot; but thats already possible with this rework :)
If you look at this API page;
http://www.koffice.org/developer/apidocs/kword-part/classKWPage.html
you can see all the settings that can be changed per page; this includes sizes and margins etc.

How we will print it is a whole different matter, though..


By Thomas Zander at Mon, 06/26/2006 - 10:26