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

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.

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

_______________________________________________
calligra-devel mailing list
calligra-devel@kde.org
https://mail.kde.org/mailman/listinfo/calligra-devel

Reply via email to