D19717: Search function fails to find phrases split over two lines

Albert Astals Cid noreply at phabricator.kde.org
Tue Mar 26 23:30:06 GMT 2019


aacid added a comment.


  I'm not very convinced with the tests.
  
  You have \n but the rects are all one after the other, so the algorithm that does the line partition doesn't really see a line there, you should have them in different row rects so that they are actually different physical lines.
  
  The "Across Lines not find" doesn't really test what you want, you "want" to test that it finds the last entry, but since the only thing you're checking is that it finds stuff and not in which rects it finds them, it may very well be finding "ab\na"
  
  Same thing for Hyphen doesn't count
  
  Am i making sense?

INLINE COMMENTS

> textpage.cpp:867
> +        int len = stringLengthAdaptedWithHyphen(strNotUsed, it, m_words.constEnd());
> +        QString str = QString(strNotUsed).replace('\n', ' ');
>  

const

> textpage.cpp:986
> +        int len = stringLengthAdaptedWithHyphen(strNotUsed, it, m_words.constEnd());
> +        QString str = QString(strNotUsed).replace('\n', ' ');
>  

const

REPOSITORY
  R223 Okular

REVISION DETAIL
  https://phabricator.kde.org/D19717

To: joaonetto, #okular
Cc: aacid, ngraham, okular-devel, joaonetto, tfella, darcyshen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20190326/c67e2498/attachment.html>


More information about the Okular-devel mailing list