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

List:       koffice-devel
Subject:    Re: patch: (preliminary) fix for #31732
From:       David Faure <david () mandrakesoft ! com>
Date:       2002-01-13 12:20:59
[Download RAW message or body]

On Saturday 12 January 2002 21:19, Emmanuel Touzery wrote:
> just remade the patch using the proper parameters for cvs diff.

Thanks for the patch... but allow me to comment on it : I totally hate code 
duplication. It makes maintainance and debugging very difficult.

Please use an approach similar to KPresenter's use of KoTextFormatInterface.
That interface is in libkotext, so KWord can use it. All it needs to do is to 
define an object that inherits KoTextFormatInterface, implements "applying 
the change to the whole document inside the textframeset". Then you need
a method that returns a list of textformatinterfaces, i.e. either a single 
kotextobject in the normal case, or a list of interfaces for the selected 
frames. See kpresenter's Page::applicableTextInterfaces().
Then you need to port the setBlah() methods to use applicationTextInterfaces,
see e.g. kpresenter's Page::setTextFamily() etc.

This is all done in KPresenter, since there too, we want to apply changes to 
the whole textobject at once - even more often than in KWord.

Thanks!

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://people.mandrakesoft.com/~david, http://www.konqueror.org
KDE 3.0: Konquering the Desktops

_______________________________________________
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