Review Request: Moving anchor strategy into text shape

Thorsten Zachmann t.zachmann at zagge.de
Thu Jan 27 05:13:50 GMT 2011


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


I just added some small comments mostly about the style. Would be nice if you could fix those before committing.


plugins/textshape/Layout.h
<http://git.reviewboard.kde.org/r/100442/#comment887>

    the destructor should be marked virtual



plugins/textshape/TextAnchorStrategy.h
<http://git.reviewboard.kde.org/r/100442/#comment888>

    the opening { should be moved to the next line



plugins/textshape/TextAnchorStrategy.cpp
<http://git.reviewboard.kde.org/r/100442/#comment889>

    the indention of the switch and case is wrong here



words/part/frames/KWTextDocumentLayout.cpp
<http://git.reviewboard.kde.org/r/100442/#comment890>

    is it worth to keep the commented out code. If so please add a comment on why it is commented out, if not please delete it. That will make it easier later to figure out why the code is commented out


- Thorsten


On Jan. 25, 2011, 2:04 p.m., Matus Hanzes wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/100442/
> -----------------------------------------------------------
> 
> (Updated Jan. 25, 2011, 2:04 p.m.)
> 
> 
> Review request for Calligra and Casper Boemann.
> 
> 
> Summary
> -------
> 
> This patch moves KWAnchorStrategy into text shape.
> 
> The reason is that it is not possible to do advanced shape anchor logic outside Layout.cpp.
> 
> The main idea is to register the shapes into Layout.cpp and layout handles all the necessary things.
> 
> The registration is done in KWTextDocumentLayout::positionInlineObject where all the words dependent data are set. (pageRectangle,pageContentRectangle,pageNumber)
> 
> If the document or anchored shape changes KoTextDocumentLayout::resetInlineObject is called which resets all the shapes that are not valid and layout finds the right place for them.
> 
> Any comments are welcome
>    
> 
> 
> Diffs
> -----
> 
>   libs/flake/KoShape.h f7179d7 
>   libs/flake/KoShape.cpp c5aee86 
>   libs/kotext/KoTextAnchor.h 2bbbf9a 
>   libs/kotext/KoTextAnchor.cpp ece23d6 
>   libs/kotext/KoTextDocumentLayout.h 4284d37 
>   libs/kotext/KoTextDocumentLayout.cpp 6b66e0f 
>   libs/kotext/KoTextShapeContainerModel.h ce3a6ae 
>   libs/kotext/KoTextShapeContainerModel.cpp 00ca9b5 
>   plugins/textshape/CMakeLists.txt a23ecc3 
>   plugins/textshape/Layout.h 5e42b7a 
>   plugins/textshape/Layout.cpp e1228e4 
>   plugins/textshape/TextAnchorStrategy.h PRE-CREATION 
>   plugins/textshape/TextAnchorStrategy.cpp PRE-CREATION 
>   words/part/CMakeLists.txt 2d5c667 
>   words/part/frames/KWAnchorStrategy.h b39f377 
>   words/part/frames/KWAnchorStrategy.cpp c168962 
>   words/part/frames/KWTextDocumentLayout.h 59add4f 
>   words/part/frames/KWTextDocumentLayout.cpp 15a8803 
> 
> Diff: http://git.reviewboard.kde.org/r/100442/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Matus
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20110127/61b74685/attachment.htm>


More information about the calligra-devel mailing list