Review Request 129557: [okular] Enable searching for a phrase split by a newline character in a PDF

Marduk Bolanos mardukbp at mac.com
Thu Jan 19 22:32:55 UTC 2017



> On Jan. 8, 2017, 4:32 p.m., Albert Astals Cid wrote:
> > This is starting to look acceptable.
> > 
> > Could you please add an autotest that fails without this code and works with it?
> 
> Marduk Bolanos wrote:
>     I looked at `SearchTest::testHyphenAtEndOfLineWithoutYOverlap()` for inspiration. I do not understand the magic numbers for the coordinates of the rectangles. It would be great if you could explain that to me.
> 
> Albert Astals Cid wrote:
>     what is there about the coordinates of the rectangles being magic? They are just creating the textpage, no?

My understanding is that one needs a vector of words and a vector of rectangles, one for each word. Then the rectangles are strung together and the resulting area is compared with the area produced by Okular's find function. How do you choose the sizes of the rectangles? Why did you use precisely those coordinates?


- Marduk


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


On Jan. 8, 2017, 1:26 p.m., Marduk Bolanos wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/129557/
> -----------------------------------------------------------
> 
> (Updated Jan. 8, 2017, 1:26 p.m.)
> 
> 
> Review request for Okular and Oliver Sander.
> 
> 
> Repository: okular
> 
> 
> Description
> -------
> 
> A blank space in the query is matched against a newline character in the PDF.
> 
> 
> Diffs
> -----
> 
>   okular/core/textpage.cpp 44dfa14 
> 
> Diff: https://git.reviewboard.kde.org/r/129557/diff/
> 
> 
> Testing
> -------
> 
> Tried a few PDF files. It works.
> 
> 
> Thanks,
> 
> Marduk Bolanos
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20170119/1b08bf39/attachment.html>


More information about the Okular-devel mailing list