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

List:       koffice-devel
Subject:    Re: Updating styles in kwtextframeset
From:       David Faure <david () mandrakesoft ! com>
Date:       2001-05-24 19:51:51
[Download RAW message or body]

On Thursday 24 May 2001 21:57, Thomas Zander wrote:
> After exiting the stylist all parags that use the changed styles are updated,
> this is done by selecting the parag and doing an update-style.
> 
> Updating the flatland document took some 4 minutes on my 850Mhz machine, I 
> think the concept needs some fine-tuning. :)
:)

> First of all, simply updating the paragraph settings and not the formatting
> per char is enough. (maybe asking the user if he wants to remove overrides
> can be done, which also changes the formatting per char)

The way I did is: formats are only updated if the user actually changed a formatting
related option in the stylist. If you only change e.g. an alignment, or margin etc.,
then the formats aren't changed.

> Second, the undo info saved is saved per paragraph. The undo info that is NOT
> saved is the changes made to the style itself. So pressing undo changes the
> text back to what it was, but the style is not changed back.

Right. That's missing in the stylist, so I think you know where to add that :)
[Just derive KWCommand, and implement execute()/unexecute(), and use
doc->addCommand(yourCommand)].
Obviously, saving the parag and format flags in the command would help
only undoing what was changed - and calling the update-all-the-related-parags
code again. This way we wouldn't have to store the undo/redo for each paragraph
at all ! That would be nice.

> Last, the changing of a style (use the menu: Format->Style->StyleName) of a 
> parag should set all of the parag to that style _except_ for Bold/Italic/
> Underline/strikethrough/ super/subscript changes.

I don't quite agree here. Applying a style applies its formatting.
What's the point about having formatting settings as part of the style, otherwise ?
If I write a title, make it bold, then change my mind and use "Head 1", if Head 1
has a big font without bold, then that's what I want to use for my title, no ?

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://perso.mandrakesoft.com/~david/, http://www.konqueror.org/
KDE, Making The Future of Computing Available Today

_______________________________________________
Koffice-devel mailing list
Koffice-devel@master.kde.org
http://master.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