Changeset 261 for trunk


Ignore:
Timestamp:
Dec 21, 2008, 8:03:13 AM (12 years ago)
Author:
Eugene Romanenko
Message:

PDF plugin: Poppler library updated to version 0.10.2

Location:
trunk
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk/Lucide/SOURCE/plugins/lupoppler/lupoppler.cpp

    r258 r261  
    103103extern "C" char * EXPENTRY getDescription()
    104104{
    105     return "PDF plugin, based on poppler library v0.10.0";
     105    return "PDF plugin, based on poppler library v0.10.2";
    106106}
    107107
  • trunk/Lucide/changelog

    r257 r261  
    111.XX:
    2   - PDF plugin: Poppler (pdf rendering) library updated to version 0.10.0.
     2  - PDF plugin: Poppler (pdf rendering) library updated to version 0.10.2.
    33  - PDF plugin: freetype library updated to version 2.3.7.
    44
  • trunk/poppler/mypoppler/poppler/Annot.cc

    r257 r261  
    958958  }
    959959  obj1.free();
    960  
    961   if (dict->lookup("OC", &obj1)->isDict()) {
    962     optionalContent = new OCGs(&obj1, xrefA);
    963   } else {
    964     optionalContent = NULL;
    965   }
    966   obj1.free();
     960
     961  optContentConfig = catalog ? catalog->getOptContentConfig() : NULL;
     962  dict->lookupNF("OC", &oc);
     963  if (!oc.isRef() && !oc.isNull()) {
     964    error (-1, "Annotation OC value not null or dict: %i", oc.getType());
     965  }
    967966}
    968967
     
    10141013    delete color;
    10151014
    1016   if (optionalContent)
    1017     delete optionalContent;
     1015  oc.free();
    10181016}
    10191017
     
    11481146      (!printing && (flags & annotFlagNoView))) {
    11491147    return;
     1148  }
     1149
     1150  // check the OC
     1151  if (optContentConfig && oc.isRef()) {
     1152    if (! optContentConfig->optContentIsVisible(&oc))
     1153      return;
    11501154  }
    11511155
  • trunk/poppler/mypoppler/poppler/Annot.h

    r257 r261  
    510510  AnnotColor *getColor() const { return color; }
    511511  int getTreeKey() const { return treeKey; }
    512   OCGs *getOptionalContent() const { return optionalContent; }
    513512
    514513  int getId() { return ref.num; }
     
    543542  GooString *appearState;           // AS
    544543  int treeKey;                      // Struct Parent;
    545   OCGs *optionalContent;            // OC
     544  OCGs *optContentConfig;           // Optional content config
     545  Object oc;                        // OC
    546546
    547547  XRef *xref;                   // the xref table for this PDF file
  • trunk/poppler/mypoppler/poppler/CairoOutputDev.cc

    r257 r261  
    400400void CairoOutputDev::updateFont(GfxState *state) {
    401401  cairo_font_face_t *font_face;
    402   cairo_matrix_t matrix;
     402  cairo_matrix_t matrix, invert_matrix;
    403403
    404404  LOG(printf ("updateFont() font=%s\n", state->getFont()->getName()->getCString()));
     
    431431  matrix.x0 = 0;
    432432  matrix.y0 = 0;
     433
     434 /* Make sure the font matrix is invertible before setting it.  cairo
     435  * will blow up if we give it a matrix that's not invertible, so we
     436  * need to check before passing it to cairo_set_font_matrix. Ignoring it
     437  * is likely to give better results than not rendering anything at
     438  * all. See #18254.
     439  */
     440  invert_matrix = matrix;
     441  if (cairo_matrix_invert(&invert_matrix)) {
     442    warning("font matrix not invertible\n");
     443    return;
     444  }
     445
    433446  cairo_set_font_matrix (cairo, &matrix);
    434447}
  • trunk/poppler/mypoppler/poppler/Catalog.cc

    r257 r261  
    203203  if (catDict.dictLookup("OCProperties", &optContentProps)->isDict()) {
    204204    optContent = new OCGs(&optContentProps, xref);
     205    if (!optContent->isOk ()) {
     206      delete optContent;
     207      optContent = NULL;
     208    }
    205209  }
    206210  optContentProps.free();
  • trunk/poppler/mypoppler/poppler/CharCodeToUnicode.cc

    r257 r261  
    127127
    128128  if (!(f = fopen(fileName->getCString(), "r"))) {
     129    gfree(uBuf);
    129130    error(-1, "Couldn't open unicodeToUnicode file '%s'",
    130131          fileName->getCString());
  • trunk/poppler/mypoppler/poppler/Form.cc

    r257 r261  
    66//
    77// Copyright 2006-2008 Julien Rebetez <julienr@svn.gnome.org>
    8 // Copyright 2007 Albert Astals Cid <aacid@kde.org>
     8// Copyright 2007-2008 Albert Astals Cid <aacid@kde.org>
    99// Copyright 2007-2008 Carlos Garcia Campos <carlosgc@gnome.org>
    1010// Copyright 2007 Adrian Johnson <ajohnson@redneon.com>
     
    453453        }
    454454        obj2.arrayGet(0, &obj3);
    455         obj2.arrayGet(0, &obj4);
     455        obj2.arrayGet(1, &obj4);
    456456        parent->_setChoiceExportVal(i, obj3.getString()->copy());
    457457        parent->_setChoiceOptionName(i, obj4.getString()->copy());
  • trunk/poppler/mypoppler/poppler/Gfx.cc

    r257 r261  
    497497  printCommands = globalParams->getPrintCommands();
    498498  profileCommands = globalParams->getProfileCommands();
     499  mcStack = NULL;
    499500
    500501  // start the resource stack
     
    540541  subPage = gTrue;
    541542  printCommands = globalParams->getPrintCommands();
     543  mcStack = NULL;
    542544
    543545  // start the resource stack
     
    582584  if (state) {
    583585    delete state;
     586  }
     587  while (mcStack) {
     588    popMarkedContent();
    584589  }
    585590}
     
    15631568    return;
    15641569  }
    1565   if (state->isPath()) {
     1570  if (state->isPath() && !contentIsHidden()) {
    15661571    if (state->getStrokeColorSpace()->getMode() == csPattern) {
    15671572      doPatternStroke();
     
    15791584  }
    15801585  state->closePath();
    1581   if (state->isPath()) {
     1586  if (state->isPath() && !contentIsHidden()) {
    15821587    if (state->getStrokeColorSpace()->getMode() == csPattern) {
    15831588      doPatternStroke();
     
    15941599    return;
    15951600  }
    1596   if (state->isPath()) {
     1601  if (state->isPath() && !contentIsHidden()) {
    15971602    if (state->getFillColorSpace()->getMode() == csPattern) {
    15981603      doPatternFill(gFalse);
     
    16091614    return;
    16101615  }
    1611   if (state->isPath()) {
     1616  if (state->isPath() && !contentIsHidden()) {
    16121617    if (state->getFillColorSpace()->getMode() == csPattern) {
    16131618      doPatternFill(gTrue);
     
    16241629    return;
    16251630  }
    1626   if (state->isPath()) {
     1631  if (state->isPath() && !contentIsHidden()) {
    16271632    if (state->getFillColorSpace()->getMode() == csPattern) {
    16281633      doPatternFill(gFalse);
     
    16441649    return;
    16451650  }
    1646   if (state->isPath()) {
     1651  if (state->isPath() && !contentIsHidden()) {
    16471652    state->closePath();
    16481653    if (state->getFillColorSpace()->getMode() == csPattern) {
     
    16651670    return;
    16661671  }
    1667   if (state->isPath()) {
     1672  if (state->isPath() && !contentIsHidden()) {
    16681673    if (state->getFillColorSpace()->getMode() == csPattern) {
    16691674      doPatternFill(gTrue);
     
    16851690    return;
    16861691  }
    1687   if (state->isPath()) {
     1692  if (state->isPath() && !contentIsHidden()) {
    16881693    state->closePath();
    16891694    if (state->getFillColorSpace()->getMode() == csPattern) {
     
    19121917    m1[4] = m[4];
    19131918    m1[5] = m[5];
    1914     out->tilingPatternFill(state, tPat->getContentStream(),
    1915                            tPat->getPaintType(), tPat->getResDict(),
    1916                            m1, tPat->getBBox(),
    1917                            xi0, yi0, xi1, yi1, xstep, ystep);
     1919    if (!contentIsHidden()) {
     1920      out->tilingPatternFill(state, tPat->getContentStream(),
     1921                             tPat->getPaintType(), tPat->getResDict(),
     1922                             m1, tPat->getBBox(),
     1923                             xi0, yi0, xi1, yi1, xstep, ystep);
     1924    }
    19181925  } else {
    19191926    for (yi = yi0; yi < yi1; ++yi) {
     
    19841991    state->setFillColor(shading->getBackground());
    19851992    out->updateFillColor(state);
    1986     out->fill(state);
     1993    if (!contentIsHidden())
     1994      out->fill(state);
    19871995  }
    19881996  state->clearPath();
     
    21972205                  x0 * matrix[1] + y1 * matrix[3] + matrix[5]);
    21982206    state->closePath();
    2199     out->fill(state);
     2207    if (!contentIsHidden())
     2208      out->fill(state);
    22002209    state->clearPath();
    22012210
     
    24862495    state->lineTo(ux1, uy1);
    24872496    state->closePath();
    2488     out->fill(state);
     2497    if (!contentIsHidden())
     2498      out->fill(state);
    24892499    state->clearPath();
    24902500
     
    27622772
    27632773    // fill the path
    2764     out->fill(state);
     2774    if (!contentIsHidden())
     2775      out->fill(state);
    27652776    state->clearPath();
    27662777
     
    27992810      }
    28002811      state->closePath();
    2801       out->fill(state);
     2812      if (!contentIsHidden())
     2813        out->fill(state);
    28022814      state->clearPath();
    28032815    }
     
    28312843      }
    28322844      state->closePath();
    2833       out->fill(state);
     2845      if (!contentIsHidden())
     2846        out->fill(state);
    28342847      state->clearPath();
    28352848    }
     
    28722885    state->lineTo(x2, y2);
    28732886    state->closePath();
    2874     out->fill(state);
     2887    if (!contentIsHidden())
     2888      out->fill(state);
    28752889    state->clearPath();
    28762890  } else {
     
    29522966                   patch->x[0][0], patch->y[0][0]);
    29532967    state->closePath();
    2954     out->fill(state);
     2968    if (!contentIsHidden())
     2969      out->fill(state);
    29552970    state->clearPath();
    29562971  } else {
     
    34123427      originY *= state->getFontSize();
    34133428      state->textTransformDelta(originX, originY, &tOriginX, &tOriginY);
    3414       out->drawChar(state, state->getCurX() + riseX, state->getCurY() + riseY,
    3415                     tdx, tdy, tOriginX, tOriginY, code, n, u, uLen);
     3429      if (!contentIsHidden()) {
     3430        out->drawChar(state, state->getCurX() + riseX, state->getCurY() + riseY,
     3431                      tdx, tdy, tOriginX, tOriginY, code, n, u, uLen);
     3432      }
    34163433      state->shift(tdx, tdy);
    34173434      p += n;
     
    34503467    }
    34513468    state->textTransformDelta(dx, dy, &tdx, &tdy);
    3452     out->drawString(state, s);
     3469    if (!contentIsHidden())
     3470      out->drawString(state, s);
    34533471    state->shift(tdx, tdy);
    34543472  }
     
    36443662
    36453663    // draw it
    3646     out->drawImageMask(state, ref, str, width, height, invert, inlineImg);
     3664    if (!contentIsHidden())
     3665      out->drawImageMask(state, ref, str, width, height, invert, inlineImg);
    36473666
    36483667  } else {
     
    38343853    // draw it
    38353854    if (haveSoftMask) {
    3836       out->drawSoftMaskedImage(state, ref, str, width, height, colorMap,
    3837                                maskStr, maskWidth, maskHeight, maskColorMap);
     3855      if (!contentIsHidden()) {
     3856        out->drawSoftMaskedImage(state, ref, str, width, height, colorMap,
     3857                                 maskStr, maskWidth, maskHeight, maskColorMap);
     3858      }
    38383859      delete maskColorMap;
    3839     } else if (haveExplicitMask) {
     3860    } else if (haveExplicitMask && !contentIsHidden ()) {
    38403861      out->drawMaskedImage(state, ref, str, width, height, colorMap,
    38413862                           maskStr, maskWidth, maskHeight, maskInvert);
    3842     } else {
     3863    } else if (!contentIsHidden()) {
    38433864      out->drawImage(state, ref, str, width, height, colorMap,
    38443865                     haveColorKeyMask ? maskColors : (int *)NULL, inlineImg);
     
    41544175//------------------------------------------------------------------------
    41554176
     4177struct MarkedContentStack {
     4178  GBool ocSuppressed;       // are we ignoring content based on OptionalContent?
     4179  MarkedContentStack *next; // next object on stack
     4180};
     4181
     4182void Gfx::popMarkedContent() {
     4183  MarkedContentStack *mc = mcStack;
     4184  mcStack = mc->next;
     4185  delete mc;
     4186}
     4187
     4188void Gfx::pushMarkedContent() {
     4189  MarkedContentStack *mc = new MarkedContentStack();
     4190  mc->ocSuppressed = gFalse;
     4191  mc->next = mcStack;
     4192  mcStack = mc;
     4193}
     4194
     4195GBool Gfx::contentIsHidden() {
     4196  return mcStack && mcStack->ocSuppressed;
     4197}
     4198
    41564199void Gfx::opBeginMarkedContent(Object args[], int numArgs) {
    4157   // TODO: we really need to be adding this to the markedContentStack
     4200  // push a new stack entry
     4201  pushMarkedContent();
     4202 
    41584203  OCGs *contentConfig = catalog->getOptContentConfig();
    4159        
    41604204  char* name0 = args[0].getName();
    41614205  if ( strncmp( name0, "OC", 2) == 0 && contentConfig) {
     
    41694213        if ( markedContent.isRef() ) {
    41704214          bool visible = contentConfig->optContentIsVisible( &markedContent );
    4171           ocSuppressed = !(visible);
     4215          MarkedContentStack *mc = mcStack;
     4216          mc->ocSuppressed = !(visible);
    41724217       }
    41734218      } else {
     
    41784223    }
    41794224  }
    4180 
    41814225
    41824226  if (printCommands) {
     
    41964240
    41974241void Gfx::opEndMarkedContent(Object args[], int numArgs) {
    4198   // TODO: we should turn this off based on the markedContentStack
    4199   ocSuppressed = false;
     4242  // pop the stack
     4243  if (mcStack)
     4244    popMarkedContent();
    42004245  out->endMarkedContent(state);
    42014246}
     
    42104255  }
    42114256
    4212   if(numArgs == 2) {
     4257  if(numArgs == 2 && args[1].isDict()) {
    42134258    out->markPoint(args[0].getName(),args[1].getDict());
    42144259  } else {
  • trunk/poppler/mypoppler/poppler/Gfx.h

    r257 r261  
    1717// Copyright (C) 2007 Iñigo Martínez <inigomartinez@gmail.com>
    1818// Copyright (C) 2008 Brad Hards <bradh@kde.org>
     19// Copyright (C) 2008 Carlos Garcia Campos <carlosgc@gnome.org>
    1920//
    2021// To see a description of the changes please see the Changelog file that
     
    6263class AnnotColor;
    6364class Catalog;
     65struct MarkedContentStack;
    6466
    6567//------------------------------------------------------------------------
     
    172174  GfxResources *res;            // resource stack
    173175  int updateLevel;
    174   GBool ocSuppressed;           // are we ignoring content based on OptionalContent?
    175176
    176177  GfxState *state;              // current graphics state
     
    182183  int formDepth;
    183184
    184   GooList *markedContentStack;  // current BMC/EMC stack
     185  MarkedContentStack *mcStack;  // current BMC/EMC stack
    185186
    186187  Parser *parser;               // parser for page content stream(s)
     
    330331  void opEndMarkedContent(Object args[], int numArgs);
    331332  void opMarkPoint(Object args[], int numArgs);
     333  GBool contentIsHidden();
     334  void pushMarkedContent();
     335  void popMarkedContent();
    332336
    333337  void pushResources(Dict *resDict);
  • trunk/poppler/mypoppler/poppler/GfxState.cc

    r257 r261  
    11231123    // indexHigh is greater than 2^31, the loop below may overwrite
    11241124    // past the end of the array
    1125     error(-1, "Bad Indexed color space (invalid indexHigh value)");
    1126     delete baseA;
    1127     goto err2;
     1125    int previousValue = indexHighA;
     1126    if (indexHighA < 0) indexHighA = 0;
     1127    else indexHighA = 255;
     1128    error(-1, "Bad Indexed color space (invalid indexHigh value, was %d using %d to try to recover)", previousValue, indexHighA);
    11281129  }
    11291130  obj1.free();
  • trunk/poppler/mypoppler/poppler/OptionalContent.cc

    r257 r261  
    2929
    3030OCGs::OCGs(Object *ocgObject, XRef *xref) :
    31   m_orderArray(0), m_rBGroupsArray(), m_xref(xref)
     31  m_xref(xref)
    3232{
    3333  // we need to parse the dictionary here, and build optionalContentGroups
     34  ok = gTrue;
    3435  optionalContentGroups = new GooList();
    3536
     
    3940    error(-1, "Expected the optional content group list, but wasn't able to find it, or it isn't an Array");
    4041    ocgList.free();
     42    ok = gFalse;
    4143    return;
    4244  }
     
    5052      break;
    5153    }
    52     OptionalContentGroup *thisOptionalContentGroup = new OptionalContentGroup(ocg.getDict(), xref);
     54    OptionalContentGroup *thisOptionalContentGroup = new OptionalContentGroup(ocg.getDict());
    5355    ocg.free();
    5456    ocgList.arrayGetNF(i, &ocg);
     
    6769    defaultOcgConfig.free();
    6870    ocgList.free();
     71    ok = gFalse;
    6972    return;
    7073  }
     
    124127  off.free();
    125128
    126   Object order;
    127129  defaultOcgConfig.dictLookup("Order", &order);
    128   if ( (order.isArray()) && (order.arrayGetLength() > 0) ) {
    129     m_orderArray = order.getArray();
    130   }
    131 
    132   Object rbgroups;
    133130  defaultOcgConfig.dictLookup("RBGroups", &rbgroups);
    134   if ( (rbgroups.isArray()) && (rbgroups.arrayGetLength() > 0) ) {
    135     m_rBGroupsArray = rbgroups.getArray();
    136   }
    137131
    138132  ocgList.free();
     
    143137{
    144138  deleteGooList(optionalContentGroups, OptionalContentGroup);
     139  order.free();
     140  rbgroups.free();
    145141}
    146142
     
    157153  for (int i=0; i < optionalContentGroups->getLength(); ++i) {
    158154    ocg = (OptionalContentGroup*)optionalContentGroups->get(i);
    159     if ( (ocg->ref().num == ref.num) && (ocg->ref().gen == ref.gen) ) {
     155    if ( (ocg->getRef().num == ref.num) && (ocg->getRef().gen == ref.gen) ) {
    160156      return ocg;
    161157    }
     
    204200    } else if (ocg.isRef()) {
    205201      OptionalContentGroup* oc = findOcgByRef( ocg.getRef() );     
    206       if ( !oc || oc->state() == OptionalContentGroup::Off ) {
     202      if ( !oc || oc->getState() == OptionalContentGroup::Off ) {
    207203        result = false;
    208204      } else {
     
    214210  } else if ( dictType.isName("OCG") ) {
    215211    OptionalContentGroup* oc = findOcgByRef( dictRef->getRef() );
    216     if ( !oc || oc->state() == OptionalContentGroup::Off ) {
     212    if ( !oc || oc->getState() == OptionalContentGroup::Off ) {
    217213      result=false;
    218214    }
     
    231227    if (ocgItem.isRef()) {
    232228      OptionalContentGroup* oc = findOcgByRef( ocgItem.getRef() );     
    233       if ( oc && oc->state() == OptionalContentGroup::Off ) {
     229      if ( oc && oc->getState() == OptionalContentGroup::Off ) {
    234230        return false;
    235231      }
     
    246242    if (ocgItem.isRef()) {
    247243      OptionalContentGroup* oc = findOcgByRef( ocgItem.getRef() );     
    248       if ( oc && oc->state() == OptionalContentGroup::On ) {
     244      if ( oc && oc->getState() == OptionalContentGroup::On ) {
    249245        return false;
    250246      }
     
    261257    if (ocgItem.isRef()) {
    262258      OptionalContentGroup* oc = findOcgByRef( ocgItem.getRef() );     
    263       if ( oc && oc->state() == OptionalContentGroup::On ) {
     259      if ( oc && oc->getState() == OptionalContentGroup::On ) {
    264260        return true;
    265261      }
     
    276272    if (ocgItem.isRef()) {
    277273      OptionalContentGroup* oc = findOcgByRef( ocgItem.getRef() );     
    278       if ( oc && oc->state() == OptionalContentGroup::Off ) {
     274      if ( oc && oc->getState() == OptionalContentGroup::Off ) {
    279275        return true;
    280276      }
     
    286282//------------------------------------------------------------------------
    287283
    288 OptionalContentGroup::OptionalContentGroup(Dict *ocgDict, XRef *xrefA) : m_name(NULL)
     284OptionalContentGroup::OptionalContentGroup(Dict *ocgDict) : m_name(NULL)
    289285{
    290286  Object ocgName;
    291   ocgDict->lookupNF("Name", &ocgName);
     287  ocgDict->lookup("Name", &ocgName);
    292288  if (!ocgName.isString()) {
    293289    error(-1, "Expected the name of the OCG, but wasn't able to find it, or it isn't a String");
     
    304300}
    305301
    306 GooString* OptionalContentGroup::name() const
     302GooString* OptionalContentGroup::getName() const
    307303{
    308304  return m_name;
     
    314310}
    315311
    316 Ref OptionalContentGroup::ref() const
     312Ref OptionalContentGroup::getRef() const
    317313{
    318314  return m_ref;
  • trunk/poppler/mypoppler/poppler/OptionalContent.h

    r250 r261  
    44//
    55// Copyright 2007 Brad Hards <bradh@kde.org>
     6// Copyright 2008 Carlos Garcia Campos <carlosgc@gnome.org>
    67//
    78// Released under the GPL (version 2, or later, at your option)
     
    3334  ~OCGs();
    3435
     36  // Is OCGS valid?
     37  GBool isOk() { return ok; }
     38 
    3539  bool hasOCGs();
    3640  GooList *getOCGs() const { return optionalContentGroups; }
     
    3842  OptionalContentGroup* findOcgByRef( const Ref &ref);
    3943
    40   Array* getOrderArray() const { return m_orderArray; }
    41   Array* getRBGroupsArray() const { return m_rBGroupsArray; }
     44  Array* getOrderArray()
     45    { return (order.isArray() && order.arrayGetLength() > 0) ? order.getArray() : NULL; }
     46  Array* getRBGroupsArray()
     47    { return (rbgroups.isArray() && rbgroups.arrayGetLength()) ? rbgroups.getArray() : NULL; }
    4248
    4349  bool optContentIsVisible( Object *dictRef );
    4450
    4551private:
     52  GBool ok;
     53 
    4654  bool allOn( Array *ocgArray );
    4755  bool allOff( Array *ocgArray );
     
    5159  GooList *optionalContentGroups;
    5260
    53   Array *m_orderArray;
    54   Array *m_rBGroupsArray;
     61  Object order;
     62  Object rbgroups;
    5563  XRef *m_xref;
    5664};
     
    6270  enum State { On, Off };
    6371
    64   OptionalContentGroup(Dict *dict, XRef *xrefA);
     72  OptionalContentGroup(Dict *dict);
    6573
    6674  OptionalContentGroup(GooString *label);
     
    6876  ~OptionalContentGroup();
    6977
    70   GooString* name() const;
     78  GooString* getName() const;
    7179
    72   Ref ref() const;
     80  Ref getRef() const;
    7381  void setRef(const Ref ref);
    7482
    75   State state() { return m_state; };
     83  State getState() { return m_state; };
    7684  void setState(State state) { m_state = state; };
    7785
  • trunk/poppler/mypoppler/poppler/Page.cc

    r257 r261  
    2424// Copyright (C) 2008 Iñigo Martínez <inigomartinez@gmail.com>
    2525// Copyright (C) 2008 Brad Hards <bradh@kde.org>
     26// Copyright (C) 2008 Ilya Gorenbein <igorenbein@finjan.com>
    2627//
    2728// To see a description of the changes please see the Changelog file that
     
    336337  annots.free();
    337338  contents.free();
     339  trans.free();
     340  thumb.free();
     341  actions.free();
    338342}
    339343
  • trunk/poppler/mypoppler/poppler/TextOutputDev.cc

    r257 r261  
    1313// Copyright (C) 2005-2007 Kristian HÞgsberg <krh@redhat.com>
    1414// Copyright (C) 2005 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
    15 // Copyright (C) 2006, 2007 Carlos Garcia Campos <carlosgc@gnome.org>
     15// Copyright (C) 2006-2008 Carlos Garcia Campos <carlosgc@gnome.org>
    1616// Copyright (C) 2006, 2007 Ed Catmur <ed@catmur.co.uk>
    1717// Copyright (C) 2006 Jeff Muizelaar <jeff@infidigm.net>
     
    19421942
    19431943void TextPage::beginWord(GfxState *state, double x0, double y0) {
     1944  GfxFont *gfxFont;
    19441945  double *fontm;
    19451946  double m[4], m2[4];
     
    19561957  // compute the rotation
    19571958  state->getFontTransMat(&m[0], &m[1], &m[2], &m[3]);
    1958   if (state->getFont()->getType() == fontType3) {
     1959  gfxFont = state->getFont();
     1960  if (gfxFont && gfxFont->getType() == fontType3) {
    19591961    fontm = state->getFont()->getFontMatrix();
    19601962    m2[0] = fontm[0] * m[0] + fontm[1] * m[2];
     
    38113813  child_selection = *selection;
    38123814  if (style == selectionStyleWord) {
    3813     child_selection.x1 = begin->xMin;
     3815    child_selection.x1 = begin ? begin->xMin : xMin;
    38143816    if (end && end->xMax != -1) {
    38153817      child_selection.x2 = current->xMax;
  • trunk/poppler/mypoppler/poppler/UnicodeTypeTable.cc

    r257 r261  
    11681168          u = out[r]; out[r] = out[r - 1]; out[r - 1] = u;
    11691169          swap = classes[r]; classes[r] = classes[r - 1]; classes[r - 1] = swap;
    1170           if (indices)
    1171             swap = idx[r]; idx[r] = idx[r - 1]; idx[r - 1] = swap;
     1170          if (indices) {
     1171            swap = idx[r];
     1172            idx[r] = idx[r - 1];
     1173            idx[r - 1] = swap;
     1174          }
    11721175        }
    11731176      // canonical compose out[o, p)
Note: See TracChangeset for help on using the changeset viewer.