Review Request 122278: Additional changes in section handling

Denis Kuplyakov dener.kup at gmail.com
Tue Jan 27 17:56:24 GMT 2015


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

Review request for Calligra, Camilla Boemann and Inge Wallin.


Repository: calligra


Description
-------

This all things that I have done after GSoC, but they seems not be in master by now.

1) Added special functions to retrive startings and endings. Changed all accesses to use this functions from KoSectionUtils. Also extracted some section related functionality to KoSectionUtils.

2) Fixed wrong indication of section level.

3) There were no invalidate send to KoSectionManager after paste to update section level.

4) Added KoSection and KoSectionEnd to Metatype system
   
   This allowed to reduce number of QVariant casts allwhere
   sections are used. Also fixed some missing usings of
   KoSectionUtils functions.
   
5) Deleted unused code somewhere.

6) KoSectionManager doesn't store QStandardItemModel now, but can generate it on update. Extracted KoSectionManagerPrivate to cpp file back and changed QScopedPointer to usual pointer for MS VC compiler. Now there is a set of all ever registered sections in KoSectionManager, cuz there are sections that store in memory but cannot be deleted due to possible undo.

7) Bug with "Incorrect name" is fixed, if you try to rename section with name that existed before.


Diffs
-----

  libs/kotext/KoSectionUtils.h 1bd5eb3 
  libs/kotext/KoSectionUtils.cpp cbcefd5 
  libs/kotext/KoTextPaste.cpp 08c6cf8 
  libs/kotext/commands/DeleteCommand.cpp 7c69df7 
  libs/kotext/commands/NewSectionCommand.cpp 50ba14d 
  libs/kotext/opendocument/KoTextLoader.cpp fe4713a 
  libs/kotext/opendocument/KoTextWriter_p.cpp 0e4ea11 
  libs/kotext/tests/TestKoTextEditor.cpp a4b02c0 
  libs/textlayout/KoTextLayoutArea_paint.cpp d6fa3b8 
  plugins/textshape/dialogs/SectionFormatDialog.cpp c825fd2 
  plugins/textshape/dialogs/SimpleInsertWidget.cpp b5500ae 
  words/part/KWOdfLoader.cpp ffb00e1 
  words/part/dockers/KWDebugWidget.cpp 2aa53c0 
  libs/kotext/KoSection.h 8183958 
  libs/kotext/KoSection.cpp a651fd4 
  libs/kotext/KoSectionEnd.h 0005851 
  libs/kotext/KoSectionEnd.cpp 0d7cf83 
  libs/kotext/KoSectionManager.h dc4821f 
  libs/kotext/KoSectionManager.cpp df4e535 

Diff: https://git.reviewboard.kde.org/r/122278/diff/


Testing
-------

Have played with sections a bit (deleting, inserting, renaming, undo). And DeleteCommand for sections unittest is passing. Seems to be OK.


Thanks,

Denis Kuplyakov

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20150127/494e3dc6/attachment.htm>


More information about the calligra-devel mailing list