[Okular-devel] Review Request: table selection tool - semi-automatic dividers
Jiri Baum
jiri at baum.com.au
Tue Oct 18 23:32:51 UTC 2011
> On Oct. 17, 2011, 5:14 p.m., Albert Astals Cid wrote:
> > ui/pageview.cpp, line 2552
> > <http://git.reviewboard.kde.org/r/102788/diff/2/?file=38808#file38808line2552>
> >
> > I am confused about you doing tally+=thing and then asserting that tally is equal to 0. Is this to verify the algorithm is working?
The assert is more to isolate any bugs to the correct code block... Each array contains a balanced number of +1 and -1 entries — they're inserted in pairs — so tally will be back at zero after each of the for loops. It felt superfluous to reset it back to zero to be sure, but I didn't feel quite comfortable just assuming that it's zero, either, so I put in an assert.
- Jiri
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/102788/#review7439
-----------------------------------------------------------
On Oct. 14, 2011, 3:25 a.m., Jiri Baum wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/102788/
> -----------------------------------------------------------
>
> (Updated Oct. 14, 2011, 3:25 a.m.)
>
>
> Review request for Okular.
>
>
> Description
> -------
>
> Automatic row and column dividers for the table selection tool, as per the bug description.
>
> The table selection tool as per bug #279859 requires the user to manually indicate all the column and row dividers. However, in many situations it's trivial for the tool to detect the rows and columns automatically. It can't get it right every time, but it can get it right often and some of the remaining times it can at least get close. As long as the automatically-detected column and row dividers are easy to clear, they will save more time than they will cost.
>
> Dividers are placed in any place where they will not intersect any letter and the gap is not zero-width. A special case is made for selections spanning multiple pages to avoid placing dividers that cannot be seen (instead of a divider in the gap between pages, two dividers are placed, one each side).
>
>
> This addresses bug 283440.
> http://bugs.kde.org/show_bug.cgi?id=283440
>
>
> Diffs
> -----
>
> core/page.h 67bcf97
> core/page.cpp eaab64e
> core/textpage.h 2bdc09d
> core/textpage.cpp 7096e90
> ui/pageview.h cd88b99
> ui/pageview.cpp 25da571
>
> Diff: http://git.reviewboard.kde.org/r/102788/diff/diff
>
>
> Testing
> -------
>
> Works for me...
>
>
> Thanks,
>
> Jiri Baum
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20111018/57441274/attachment-0001.html>
More information about the Okular-devel
mailing list