[poppler] [PATCH] Poppler: Fix line selection, dont check y for Line selection
Carlos Garcia Campos
carlosgc at gnome.org
Fri Jan 21 00:57:54 PST 2011
Excerpts from Albert Astals Cid's message of jue ene 20 20:26:01 +0100 2011:
> A Dijous, 20 de gener de 2011, Marek Kasik va escriure:
> > Hi Sam,
> >
> > the patch looks good to me. You are right that Y values should be
> > neglected in this case.
> > The patch is similar to the second part of the patch in
> > https://bugs.freedesktop.org/show_bug.cgi?id=22506 (unfortunately, I
> > haven't fixed the first part of the patch yet...).
>
> Ok, if noone comments otherwise i'll be commiting this patch to master on the
> weekend. I'll leave it to Carlos to decide if he wants it on the 0.16 branch.
Yeah, I was going to push it to both branches this weekend too :-)
> Albert
>
> >
> > Regards
> >
> > Marek
> >
> > On 01/19/2011 06:40 AM, Sam Liao wrote:
> > > Hi,
> > >
> > > Is there anyone can help me to review this fix or find a more
> > > reasonable solution?
> > >
> > > Thanks,
> > > -Sam
> > >
> > > On Mon, Jan 17, 2011 at 5:26 PM, Sam Liao <phyomh at gmail.com> wrote:
> > >> When a line is selected while the Y values of selection is
> > >> not in the y range of words, the render will render the
> > >> line with reverse color while the words does not show up.
> > >>
> > >> This fix neglect the Y vaules to make sure that the words
> > >> also displayed when line is selected.
> > >> ---
> > >> poppler/TextOutputDev.cc | 16 ++++++++--------
> > >> 1 files changed, 8 insertions(+), 8 deletions(-)
> > >>
> > >> diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc
> > >> index 576bcc9..71b946e 100644
> > >> --- a/poppler/TextOutputDev.cc
> > >> +++ b/poppler/TextOutputDev.cc
> > >> @@ -4249,24 +4249,24 @@ void
> > >> TextLine::visitSelection(TextSelectionVisitor *visitor,
> > >>
> > >> current = NULL;
> > >> for (p = words; p != NULL; p = p->next) {
> > >>
> > >> if (blk->page->primaryLR) {
> > >>
> > >> - if ((selection->x1 < p->xMax && selection->y1 < p->yMax) ||
> > >> - (selection->x2 < p->xMax && selection->y2 < p->yMax))
> > >> + if ((selection->x1 < p->xMax) ||
> > >> + (selection->x2 < p->xMax))
> > >>
> > >> if (begin == NULL)
> > >>
> > >> begin = p;
> > >>
> > >> - if (((selection->x1 > p->xMin && selection->y1 > p->yMin) ||
> > >> - (selection->x2 > p->xMin && selection->y2 > p->yMin)) && (begin !=
> > >> NULL)) { + if (((selection->x1 > p->xMin) ||
> > >> + (selection->x2 > p->xMin)) && (begin != NULL)) {
> > >>
> > >> end = p->next;
> > >> current = p;
> > >>
> > >> }
> > >>
> > >> } else {
> > >>
> > >> - if ((selection->x1 > p->xMin && selection->y1 < p->yMax) ||
> > >> - (selection->x2 > p->xMin && selection->y2 < p->yMax))
> > >> + if ((selection->x1 > p->xMin) ||
> > >> + (selection->x2 > p->xMin))
> > >>
> > >> if (begin == NULL)
> > >>
> > >> begin = p;
> > >>
> > >> - if (((selection->x1 < p->xMax && selection->y1 > p->yMin) ||
> > >> - (selection->x2 < p->xMax && selection->y2 > p->yMin)) && (begin !=
> > >> NULL)) { + if (((selection->x1 < p->xMax) ||
> > >> + (selection->x2 < p->xMax)) && (begin != NULL)) {
> > >>
> > >> end = p->next;
> > >> current = p;
> > >>
> > >> }
> > >>
> > >
> > > _______________________________________________
> > > poppler mailing list
> > > poppler at lists.freedesktop.org
> > > http://lists.freedesktop.org/mailman/listinfo/poppler
> >
> > _______________________________________________
> > poppler mailing list
> > poppler at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/poppler
--
Carlos Garcia Campos
PGP key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x523E6462
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20110121/53510cf9/attachment.pgp>
More information about the poppler
mailing list