Review Request: Move several commands from TextTool to the KoTextEditor interface

Boudewijn Rempt boud at valdyas.org
Thu Sep 29 10:26:23 BST 2011


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

(Updated Sept. 29, 2011, 9:26 a.m.)


Review request for Calligra.


Changes
-------

Fixed all issues Zagge pointed out.


Description
-------

KoTextEditor is meant to be the one and only interface we allow to editing a QTextDocument. TextTool breaks this encapsulation in many ways. This patch improves the situation but doesn't solve it completely yet. Several commands have been moved to kotext and encapsulated in KoTextEditor. This simplifies the code in the textshape quite a bit. The other bits will follow later on.

In order to make it possible to test this code, I wanted to be able to create a KoShapeController without a canvas, so KoShapeController was refactored a bit as well. Because KoShapeControllerBase was confusingly named, I renamed that class after irc discussion.


Diffs (updated)
-----

  libs/flake/CMakeLists.txt 4311bd0 
  libs/flake/KoCanvasBase.h 5f8f0ab 
  libs/flake/KoCanvasBase.cpp 2361bc1 
  libs/flake/KoCanvasController.h 3fc370e 
  libs/flake/KoDataCenterBase.h de447fa 
  libs/flake/KoResourceManager.h f8fd13c 
  libs/flake/KoShape.h 84bdbfc 
  libs/flake/KoShapeBasedDocumentBase.h PRE-CREATION 
  libs/flake/KoShapeBasedDocumentBase.cpp PRE-CREATION 
  libs/flake/KoShapeController.h e3c65ab 
  libs/flake/KoShapeController.cpp 27722b3 
  libs/flake/KoShapeControllerBase.h 5d1db1f 
  libs/flake/KoShapeControllerBase.cpp 3f9d9a2 
  libs/flake/KoShapeLoadingContext.h b0e0358 
  libs/flake/KoShapeLoadingContext.cpp 50d50bb 
  libs/flake/KoShapePaste.cpp d94dc11 
  libs/flake/KoToolBase.h 13dc3c7 
  libs/flake/KoToolBase.cpp 627591e 
  libs/flake/KoToolManager.h 48cbaa8 
  libs/flake/KoToolManager.cpp 8c612b0 
  libs/flake/commands/KoPathCombineCommand.h a34edb5 
  libs/flake/commands/KoPathCombineCommand.cpp 72aaed4 
  libs/flake/commands/KoPathPointRemoveCommand.cpp fa748a6 
  libs/flake/commands/KoPathSeparateCommand.h 4b52a60 
  libs/flake/commands/KoPathSeparateCommand.cpp a7b0ab7 
  libs/flake/commands/KoShapeClipCommand.h 883402c 
  libs/flake/commands/KoShapeClipCommand.cpp 7159c91 
  libs/flake/commands/KoShapeCreateCommand.h 4a9f3b8 
  libs/flake/commands/KoShapeCreateCommand.cpp 6322c8d 
  libs/flake/commands/KoShapeDeleteCommand.h 1d1eac4 
  libs/flake/commands/KoShapeDeleteCommand.cpp 452ffea 
  libs/flake/commands/KoShapeUnclipCommand.h 8903e33 
  libs/flake/commands/KoShapeUnclipCommand.cpp 94d2308 
  libs/flake/tests/MockShapes.h 3f7ba47 
  libs/flake/tests/TestSnapStrategy.cpp 7f2b63b 
  libs/kopageapp/KoPADocument.h cfc9822 
  libs/kopageapp/KoPADocumentModel.cpp b968182 
  libs/kopageapp/KoPADocumentStructureDocker.cpp 15c3224 
  libs/kotext/CMakeLists.txt b174f5d 
  libs/kotext/KoDocumentRdfBase.h 165f8fd 
  libs/kotext/KoDocumentRdfBase.cpp f6445e6 
  libs/kotext/KoTextCommandBase.h PRE-CREATION 
  libs/kotext/KoTextCommandBase.cpp PRE-CREATION 
  libs/kotext/KoTextDocument.cpp 4d8c992 
  libs/kotext/KoTextEditor.h 7a51591 
  libs/kotext/KoTextEditor.cpp 9ff740c 
  libs/kotext/KoTextOdfSaveHelper.h 4e247c2 
  libs/kotext/KoTextOdfSaveHelper.cpp 9d5add8 
  libs/kotext/KoTextPaste.h 61321d9 
  libs/kotext/KoTextPaste.cpp 067d238 
  libs/kotext/commands/ChangeListCommand.h PRE-CREATION 
  libs/kotext/commands/ChangeListCommand.cpp PRE-CREATION 
  libs/kotext/commands/ChangeTrackedDeleteCommand.h PRE-CREATION 
  libs/kotext/commands/ChangeTrackedDeleteCommand.cpp PRE-CREATION 
  libs/kotext/commands/DeleteCommand.h PRE-CREATION 
  libs/kotext/commands/DeleteCommand.cpp PRE-CREATION 
  libs/kotext/commands/ListItemNumberingCommand.h PRE-CREATION 
  libs/kotext/commands/ListItemNumberingCommand.cpp PRE-CREATION 
  libs/kotext/commands/TextPasteCommand.h PRE-CREATION 
  libs/kotext/commands/TextPasteCommand.cpp PRE-CREATION 
  libs/kotext/opendocument/KoTextWriter.h 04ea489 
  libs/kotext/opendocument/KoTextWriter.cpp 5d530b7 
  libs/kotext/tests/TestKoTextEditor.h 8013086 
  libs/kotext/tests/TestKoTextEditor.cpp 85fab42 
  libs/main/rdf/KoDocumentRdf.h 219ff42 
  libs/main/rdf/KoDocumentRdf.cpp bc5322a 
  libs/pigment/KoColorSpaceTraits.h 4bdd16b 
  plugins/dockers/shapecollection/CollectionShapeFactory.h 870fe2e 
  plugins/dockers/shapecollection/CollectionShapeFactory.cpp 020e1af 
  plugins/pictureshape/PictureShapeFactory.cpp 9ae730c 
  plugins/pluginshape/PluginShapeFactory.cpp ee5f508 
  plugins/textshape/CMakeLists.txt 87d59f4 
  plugins/textshape/TextShapeFactory.cpp 4100b47 
  plugins/textshape/TextTool.h 6aaef61 
  plugins/textshape/TextTool.cpp 142d934 
  plugins/textshape/commands/AcceptChangeCommand.h 2945d9e 
  plugins/textshape/commands/AcceptChangeCommand.cpp 66b121c 
  plugins/textshape/commands/ChangeListCommand.h a7c2f7e 
  plugins/textshape/commands/ChangeListCommand.cpp 8981a1b 
  plugins/textshape/commands/ChangeListLevelCommand.h f657ee1 
  plugins/textshape/commands/ChangeListLevelCommand.cpp bad0b68 
  plugins/textshape/commands/ChangeTrackedDeleteCommand.h 6acf4bd 
  plugins/textshape/commands/ChangeTrackedDeleteCommand.cpp f155681 
  plugins/textshape/commands/DeleteCommand.h b85bbb9 
  plugins/textshape/commands/DeleteCommand.cpp cd741dc 
  plugins/textshape/commands/ListItemNumberingCommand.h 4457d84 
  plugins/textshape/commands/ListItemNumberingCommand.cpp f00162b 
  plugins/textshape/commands/RejectChangeCommand.h 925138d 
  plugins/textshape/commands/RejectChangeCommand.cpp 3338875 
  plugins/textshape/commands/ShowChangesCommand.h cacd86a 
  plugins/textshape/commands/ShowChangesCommand.cpp e61f883 
  plugins/textshape/commands/TextCommandBase.h d6306db 
  plugins/textshape/commands/TextCommandBase.cpp be52032 
  plugins/textshape/commands/TextCutCommand.cpp 31776f9 
  plugins/textshape/commands/TextPasteCommand.h 90f4c3d 
  plugins/textshape/commands/TextPasteCommand.cpp 36a1f76 
  plugins/textshape/dialogs/ParagraphSettingsDialog.cpp cdddbe3 
  plugins/textshape/dialogs/SimpleParagraphWidget.cpp 5b843ba 
  plugins/textshape/tests/CMakeLists.txt e6ab42a 
  plugins/videoshape/VideoShapeFactory.cpp f1c8d79 
  words/part/KWDocument.h 4143803 
  words/part/commands/KWFrameCreateCommand.h 354486d 
  words/part/commands/KWFrameCreateCommand.cpp b4a4fb1 
  words/part/commands/KWFrameDeleteCommand.h 1bc79b8 
  words/part/commands/KWFrameDeleteCommand.cpp c5d3c4b 

Diff: http://git.reviewboard.kde.org/r/102679/diff/diff


Testing
-------

manual gui test + ran the unittests. Added more testing.


Thanks,

Boudewijn Rempt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20110929/47178a6c/attachment.htm>


More information about the calligra-devel mailing list