Review Request: Simplify / speed up table hit test by using qLowerBound() instead of looping
Casper Boemann
cbr at boemann.dk
Fri Jul 22 19:23:40 BST 2011
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/102049/#review4984
-----------------------------------------------------------
Ship it!
thanks
libs/textlayout/KoTextLayoutTableArea.cpp
<http://git.reviewboard.kde.org/r/102049/#comment4369>
just remove
- Casper
On July 22, 2011, 2:27 p.m., Elvis Stansvik wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/102049/
> -----------------------------------------------------------
>
> (Updated July 22, 2011, 2:27 p.m.)
>
>
> Review request for Calligra and Casper Boemann.
>
>
> Summary
> -------
>
> Simplify and speed up the hit test for table layout areas by using qLowerBound() instead of looping. Possible since rowPositions/columnPositions are sorted vectors. Complexity should now be O(log(N) + log(M)) instead of O(N + M) for a NxM table. There were some dead unfinished no-op code in there as well, which I've #if 0'ed out. Could Casper/Sebastian take a look what was intended with that?
>
>
> Diffs
> -----
>
> libs/textlayout/KoTextLayoutTableArea.cpp a11e24b
>
> Diff: http://git.reviewboard.kde.org/r/102049/diff
>
>
> Testing
> -------
>
> Checked that the behavior of the hit test is the same as before, i.e. that:
>
> * Clicking left/right of table will select first/last cell in row.
> * Works with merged cells.
> * Works with header rows.
> * Works for tables spanning multiple pages.
>
>
> Thanks,
>
> Elvis
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20110722/f8420d8f/attachment.htm>
More information about the calligra-devel
mailing list