TODO-List
=========

Bugs:
-----
- textformatter: need to check for line-level breaking during the formatting of each line
Currently we do it afterwards, so if the margins differ, where the line ends up, we can't notice.
- Fix drawing of table cell borders
- Add code to ensure that adjacent cells have the same border setting for the borders they share
- Need a routine which renders the table per row in a way that any cellsize is adjusted to fit. [still needed?]
- anything else that http://bugs.kde.org mentions ;)

Missing or incomplete stuff:
----------------------------
- Even/odd pages
 - Add SheetSide config in framedia 
- runAroundGap does nothing
- Tables should get a title (with positioning posibility)
  This will basicly be a new frame placed on top or at bottom of table.
  And it shouldn't be limited to tables - any frame could get that.

Other missing features:

Sideheads (for text)
Split frames needs to be implemented.
Styles have to be saved external (and/or an import/export facility).
Books (collection of documents) should be implemented
Implement complete DCOP interface
Make everything scriptable
Add "TopOfFrame"-TopOfPage" etc to styles.

cleanup:
--------
- All enums should belong to a class, making it safe for namespace clashes. Class::Enum-value 
  should be used everywhere

----------------- Things to keep in mind
- All classes and methods should have proper documentation, in the proper format.
- Try to put any code that relies on pages to be one under the other (as they are
now) in KWCanvas. This will allow for inheriting KWCanvas later and changing
that behaviour, to implement other view modes.

External files:
--------------
Included files (pictures/parts/formula's)
- It should be possible to keep files external. Kword should also notice a changed file
  (preferably at runtime) and reload it.

-> Proposal:

On placing a picture or part we get an insert dialog. This dialog could be changed 
to include a checkbox "keep file external". If changing the file-dia is a problem 
we could show a dialog just after the file-dia.

On placing the picture in the document we should create a thumbnail on screen at the 
screensize. This counts for both internal and external pictures. With todays computers 
I am not really concerned with filesizes anymore, besides; it would probably be about 30k max. 
They will be saved as:
 tar:pictures/

The internal pictures should be read into memory and saved to the tar in a dir like
  tar:raw-pictures/ 
and
  tar:raw-parts/


When another instance of the same picture/part is placed we should just use
the same object we allready use. We could consider creating a newly
scaled thumb if the sizes differ a lot. The raw file will stay untouched.
 
[ TODO: evaluate how the API suggested below integrates with the (more recent) KoImage stuff ]
 
kofficecore/ImageContainer.cc
 manages a picture. You can ask it for thumbs, location, the raw file
 and it has a save function.
 - ImageContainer(QString filename, bool external);
    constructor.
    if filename starts with tar or external is set: store filename.
    otherwise read raw file in mem.
 - int refCount()
    keep internal usage count
 - koImage* thumb(QSize);
    look in tar if there was a thumb. Otherwise create one of selected size.
    note that koImage also does referece checking.
 - void incCount();
    for usage count
 - void decCount();
    for usage count
 - koRawImage* image();
    Return the rawimage (in a stream??) either from mem or from disk.
 - save();
    well, it saves.
 
kofficecore/PartContainer.cc
 manages a part. You can as it for location (key), the part and it
 has a save function
 - PartContainer
    constructor
 - refCount()
 - void incCount()
 - void decCount();
 - koSomething* part();
 - save();
 
kofficeCore/ImageCollection.cc
 - ImageCollection();
 - ImageContainer* image(filename);
    return imageContainer, if one doesnt exist create it first.
 - int count();
    return number of images in the collection
 - void removeImage(filename);
    remove image from collection
 - void load();
    load all imageContainers
 - void save();
    save all imageContainers
 
Note that you can not resize an image, just the thumbs.
Note also that the 'key' is its filename. With full path that makes it http://
or file:// or tar:// for remote, local, internal storage respectively.
 
Last note: this proposal does not propose any gui/printing issues at all.

Thanx to: Reginald Stadlbauer <reggie@kde.org>
Author: Thomas Zander <zander@kde.org>
New maintainer: David Faure <david@mandrakesoft.com>

