Review Request: renaming style and add new style

C. Boemann cbo at boemann.dk
Wed May 23 13:52:23 BST 2012


On Wednesday 23 May 2012 14:42:52 Pierre Stirnweiss wrote:
> I am not now in a position to do a proper review for the moment. However a
> couple of questions:
> 
> - what is it you are trying to do with these "other" paragraph styles?
> - why inserting them is not done through the kotext's styleManager like the
> "standard" paragraph styles and directly into the model?
> - playing around with the model's returned data (from 2 different style
> lists) should be done with extreme care (inside beginInsert, beginMove,...
> and the like). You might get updating problems in the views otherwise
> 
> PierreSt

Basically because the styles are not supposed to be in the KoStyleManager 
until the user presses Apply/Ok

We could have a pre insert list in KoStyleManager but that just sounds even 
weirder. They would then be available from other dialogs to be inserted into 
the document, and if the user then selects Cancel we have a problem. Not to 
speak of the undo commands being generated.

I'm convinced this is the right approach - to do it in the model.

We may have to protect like you say, but as addNew* calls the normal method 
and just makes sure that any fetching also tries this alternative way of 
fetching the style I don't see how this can be any worse than fetching from 
the styleManager alone

boemann



More information about the calligra-devel mailing list