[poppler] poppler/TextOutputDev.cc

Carlos Garcia Campos carlosgc at kemper.freedesktop.org
Mon Jan 24 00:45:39 PST 2011


 poppler/TextOutputDev.cc |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

New commits:
commit 5056e33e01ce0f7db1a5401b7b38d30e84eedf69
Author: Sam Liao <phyomh at gmail.com>
Date:   Mon Jan 17 13:07:22 2011 +0800

    Poppler: Fix line selection, dont check y for Line selection
    
    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.

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;
       }


More information about the poppler mailing list