[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: Kword tables + patches
From:       David Faure <dfaure () klaralvdalens-datakonsult ! se>
Date:       2003-05-05 13:47:20
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 04 May 2003 12:39, Carl G Lewis wrote:
> Hello, 
> 
> There are some kword patches here:
> http://members.optushome.com.au/carll

Wow, it feels like Christmas :)
Very good patches, I'm happy with all of them.
Do you want a CVS account, to commit those changes yourself and keep working
on the code? See http://developer.kde.org/documentation/other/developer-faq.html#q8

> I have also written a TableIterator class, which makes the m_cells  conversion  
> easier because all simple traversals of m_cells can be changed with just 1 
> line of code. The TableIterator makes use of the fact that the Cell members 
> are private, but it's not ready yet.
This is an excellent idea too.

> Not all the changes are so easy. m_pageBoundaries is a big hassle because it 
> contains indexes into m_cells, so every bit of code that uses it has to be 
> touched. 
Ouch indeed. Didn't realize that.

> I presume I should just change it to index into m_rowArray?
Good and easy solution.

> I think there are better solutions but they would require larger changes to 
> more code.  David, if you have a particular scheme in mind let me know and 
> I'll do that.
I wonder what Thomas Zander (who coded the page boundaries stuff) thinks about it...
Personnally, I can't think of another solution. A boolean in the Row object would 
require much more linear iteration, whereas the "array of indexes" is much faster.
A more OO solution like a PageArray with a RowArray in each Page object sounds
much more difficult to handle, and would be wrong design IMHO (mixing contents
and presentation). So an array of indexes into m_rowArray looks like the only
solution, unless someone has a better idea.

(Would an array of pointers to Row objects be better? This would avoid having to
shift all the indexes when deleting/inserting a row... but since doing that invalidates
the layout of the table anyway, the page-breaking has to be recalculated anyway.)

- -- 
David Faure -- faure@kde.org, dfaure@klaralvdalens-datakonsult.se
Qt/KDE/KOffice developer
Klarälvdalens Datakonsult AB, Platform-independent software solutions
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+tmto72KcVAmwbhARAvDmAJ9yevOWGMvPELQTbAbYrdxwasVFpwCghs48
pjkSSqYvApmwayi3biCV85o=
=G6XN
-----END PGP SIGNATURE-----

_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic