Review Request: User defined variables

Thorsten Zachmann t.zachmann at zagge.de
Sun Oct 16 17:56:51 BST 2011


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/102890/#review7392
-----------------------------------------------------------


Looking at the patch it does not support loading of the user defined variables for kopageapp. Also I think support for tables should be added.

I think loading/saving should be done as the saving is done in kopageapp as it is not realy text content and therefore it does not belong into the text loading. It works for words as the main text is loaded with the same mechanism.

- Thorsten Zachmann


On Oct. 16, 2011, 9:47 a.m., Sebastian Sauer wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/102890/
> -----------------------------------------------------------
> 
> (Updated Oct. 16, 2011, 9:47 a.m.)
> 
> 
> Review request for Calligra.
> 
> 
> Description
> -------
> 
> Following patch implements user defined variables. This solves bug https://bugs.kde.org/show_bug.cgi?id=282972
> 
> What I did;
> * extended the KoVariableManager to handle now also such user defined variables.
> * the KoVariableManager now has loadOdf and saveOdf methods to load and save user defined variables declarations.
> * the user defined variables are implemented using the new plugins/variables/User* classes.
> * KoVariable::manager() can now be used even on KoVariable::createOptionsWidget
> * replaced the previous unused KoInlineObject::User with KoInlineObject::UserGet and KoInlineObject::UserInput and make use of them
> * extended KoTextLoader.cpp to proper load user defined variables into the KoVariableManager. Instances are created using the new UserVariable plugin.
> * extended KoOdfNumberStyles with the formatFraction method. Ideally I would also move the other format (e.g. formatDate, formatTime, etc.) methods from the plugin to the KoOdfNumberStyles class to have it reusable (we at least need formatDate and KoOdfNumberStyles also in the DateVariable later).
> * added the KoOdfNumberStyles::saveOdfBooleanStyle to also save boolean formattings proper back.
> * introduced the KoOdfNumberStyles::saveOdfNumberStyle method to handle choosing the proper KoOdfNumberStyles::saveOdf*Style methods.
> * extended KWOdfWriter.cpp to proper save the user defined variable declarations back to the ODT.
> 
> Remaining problems;
> * atm libs/kopageapp/KoPADocument.cpp contains in the patch code to variableManager->saveOdf(bodyWriter); but that is probably not the correct place to do that. In any case this needs more testing with Stage to look if it works as expected. Stage is mostly untested yet but only Words got tested.
> * also I ask myself what other applications beside Stage and Words are able to deal with user-defined variables. Logically it would be any application where we are able to add a textshape too but I am not sure there. This needs more investigation and testing as well.
> * the UI still misses a way to set/modify custom formatings.
> * support for formulas... but this is another beast and partly already covered at bug 283816. I do not plan to work on this anytime soon.
> 
> I plan to address the remaining problems before merging but are already asking for a review to get that patch in asap to a) prevent merge probs in the near future (it's rather large already) and b) get the working solution for bug 282972 into master asap.
> 
> 
> This addresses bug 282972.
>     http://bugs.kde.org/show_bug.cgi?id=282972
> 
> 
> Diffs
> -----
> 
>   libs/kopageapp/KoPADocument.cpp 43e002a 
>   libs/kotext/InsertVariableAction.cpp de68bbf 
>   libs/kotext/KoInlineObject.h fbd1795 
>   libs/kotext/KoVariableManager.h 680a29b 
>   libs/kotext/KoVariableManager.cpp a915b77 
>   libs/kotext/opendocument/KoTextLoader.cpp af29fb7 
>   libs/kotext/tests/TestKoInlineTextObjectManager.cpp 70e18ef 
>   libs/odf/KoOdfNumberStyles.h 536408d 
>   libs/odf/KoOdfNumberStyles.cpp 5611465 
>   plugins/variables/CMakeLists.txt cca8198 
>   plugins/variables/UserVariable.h PRE-CREATION 
>   plugins/variables/UserVariable.cpp PRE-CREATION 
>   plugins/variables/UserVariableFactory.h PRE-CREATION 
>   plugins/variables/UserVariableFactory.cpp PRE-CREATION 
>   plugins/variables/VariablesPlugin.cpp 913aebc 
>   words/part/KWAboutData.h 1cdc87e 
>   words/part/KWOdfLoader.cpp f292ea6 
>   words/part/KWOdfWriter.cpp 3c1c019 
> 
> Diff: http://git.reviewboard.kde.org/r/102890/diff/diff
> 
> 
> Testing
> -------
> 
> see the documents attached to bug 282972
> 
> 
> Thanks,
> 
> Sebastian Sauer
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20111016/4d57b8bb/attachment.htm>


More information about the calligra-devel mailing list