Review Request 120733: Pass more data between layout and RootAreaProvider

Camilla Boemann cbr at boemann.dk
Thu Nov 27 09:39:59 GMT 2014


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



libs/textlayout/KoTextDocumentLayout.cpp
<https://git.reviewboard.kde.org/r/120733/#comment49593>

    don't think this is your doing, but just thinking that rootFrme->end() is not the right thing to test against (in case we have notes this will never be true)



libs/textlayout/KoTextDocumentLayout.cpp
<https://git.reviewboard.kde.org/r/120733/#comment49596>

    uhm if shouldLayout==false then newRootArea has to be also false, so this if-check can surely be skipped, and we can jump right into doing the work



libs/textlayout/KoTextDocumentLayout.cpp
<https://git.reviewboard.kde.org/r/120733/#comment49594>

    same
    
    Also this line looks very weird



libs/textlayout/KoTextDocumentLayout.cpp
<https://git.reviewboard.kde.org/r/120733/#comment49595>

    same


- Camilla Boemann


On Nov. 26, 2014, 10:08 p.m., Pierre Ducroquet wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120733/
> -----------------------------------------------------------
> 
> (Updated Nov. 26, 2014, 10:08 p.m.)
> 
> 
> Review request for Calligra and Camilla Boemann.
> 
> 
> Repository: calligra
> 
> 
> Description
> -------
> 
> This patch refactors a bit the KoTextLayoutRootAreaProvider.
> It extends the provideNext call by adding a constraints structure.
> This structure contains so far the masterPageName and the page
> number of the requested new rootArea.
> This way, the provider don't have to sneak in layout specific data.
> It also adds a way for KoTextLayoutRootAreaProvider to help the
> layout and fix inserting a new page (by adding lines to a paragraph
> for instance) before a page break changing the page style.
> 
> Some more explanations regarding this bug :
> - Page 1, style AAA
> * page break, requesting style BBB
> - Page 2, style BBB
> 
> If you add more data to the page 1, then dynamically the layout should
> do :
> - Page 1, style AAA
> - Page 2, style AAA
> * page break, requesting style BBB
> - Page 3, style BBB
> 
> But the layout did recycle the page 2, leading to :
> - Page 1, style AAA
> - Page 2, style BBB
> * page break, requesting style BBB
> - Page 3, style BBB
> 
> Reloading the document leads to a correct layout.
> 
> 
> Diffs
> -----
> 
>   libs/textlayout/KoTextDocumentLayout.cpp 757bc338fcb8b5978fad19fe3da48eef06ac3a3d 
>   libs/textlayout/KoTextLayoutRootAreaProvider.h 23b91bc519761eef2861fc6fc4546294271389cc 
>   libs/textlayout/tests/MockRootAreaProvider.h 23056384fb55918ae360ad062d5dfd13ee7c4837 
>   libs/textlayout/tests/MockRootAreaProvider.cpp 0402528998c26cfb586f297abe7c879459adda50 
>   plugins/textshape/SimpleRootAreaProvider.h afada40af1ea3341a820dc0d275a2db5bbb5a3f8 
>   plugins/textshape/SimpleRootAreaProvider.cpp 42df2ecd30aa744780642618556a7013a9ff27da 
>   words/part/KWDocument.cpp e287829329f5026e455081978e8f345c4883617d 
>   words/part/KWRootAreaProvider.h 8fb9b5e379a0561fceb7ba32935084df46ce6fd9 
>   words/part/KWRootAreaProvider.cpp ce039219c1a044b13ae81420832eb894346b88db 
> 
> Diff: https://git.reviewboard.kde.org/r/120733/diff/
> 
> 
> Testing
> -------
> 
> A simple document with page styles (changing the background color to help speed up the development) now doesn't exhibit the wrong layout behaviour.
> 
> 
> Thanks,
> 
> Pierre Ducroquet
> 
>

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


More information about the calligra-devel mailing list