Ignore:
Timestamp:
Mar 6, 2011, 12:41:38 AM (11 years ago)
Author:
Silvan Scherrer
Message:

poppler, jpeg, freetype lib updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/poppler/mypoppler/poppler/TextOutputDev.cc

    r461 r470  
    2424// Copyright (C) 2009 Kovid Goyal <kovid@kovidgoyal.net>
    2525// Copyright (C) 2010 Brian Ewins <brian.ewins@gmail.com>
     26// Copyright (C) 2010 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp>
    2627//
    2728// To see a description of the changes please see the Changelog file that
     
    36063607  s = new GooString();
    36073608
    3608   if (rawOrder) {
    3609     return s;
    3610   }
    3611 
    36123609  // get the output encoding
    36133610  if (!(uMap = globalParams->getTextEncoding())) {
    36143611    return s;
    36153612  }
     3613
     3614  if (rawOrder) {
     3615    TextWord*  word;
     3616    char mbc[16];
     3617    int  mbc_len;
     3618
     3619    for (word = rawWords; word && word <= rawLastWord; word = word->next) {
     3620      for (j = 0; j < word->getLength(); ++j) {
     3621        double gXMin, gXMax, gYMin, gYMax;
     3622        word->getCharBBox(j, &gXMin, &gYMin, &gXMax, &gYMax);
     3623        if (xMin <= gXMin && gXMax <= xMax && yMin <= gYMin && gYMax <= yMax)
     3624        {
     3625          mbc_len = uMap->mapUnicode( *(word->getChar(j)), mbc, sizeof(mbc) );
     3626          s->append(mbc, mbc_len);
     3627        }
     3628      }
     3629    }
     3630    return s;
     3631  }
     3632
    36163633  isUnicode = uMap->isUnicode();
    36173634  spaceLen = uMap->mapUnicode(0x20, space, sizeof(space));
     
    42334250  for (p = words; p != NULL; p = p->next) {
    42344251    if (blk->page->primaryLR) {
    4235       if ((selection->x1 < p->xMax && selection->y1 < p->yMax) ||
    4236           (selection->x2 < p->xMax && selection->y2 < p->yMax))
     4252      if ((selection->x1 < p->xMax) ||
     4253          (selection->x2 < p->xMax))
    42374254        if (begin == NULL)
    42384255          begin = p;
    42394256
    4240       if (((selection->x1 > p->xMin && selection->y1 > p->yMin) ||
    4241            (selection->x2 > p->xMin && selection->y2 > p->yMin)) && (begin != NULL)) {
     4257      if (((selection->x1 > p->xMin) ||
     4258           (selection->x2 > p->xMin)) && (begin != NULL)) {
    42424259        end = p->next;
    42434260        current = p;
    42444261      }
    42454262    } else {
    4246       if ((selection->x1 > p->xMin && selection->y1 < p->yMax) ||
    4247           (selection->x2 > p->xMin && selection->y2 < p->yMax))
     4263      if ((selection->x1 > p->xMin) ||
     4264          (selection->x2 > p->xMin))
    42484265        if (begin == NULL)
    42494266          begin = p;
    42504267
    4251       if (((selection->x1 < p->xMax && selection->y1 > p->yMin) ||
    4252            (selection->x2 < p->xMax && selection->y2 > p->yMin)) && (begin != NULL)) {
     4268      if (((selection->x1 < p->xMax) ||
     4269           (selection->x2 < p->xMax)) && (begin != NULL)) {
    42534270        end = p->next;
    42544271        current = p;
Note: See TracChangeset for help on using the changeset viewer.