Changeset 290 for trunk


Ignore:
Timestamp:
Mar 3, 2010, 8:25:22 PM (11 years ago)
Author:
rbri
Message:

PDF plugin: Poppler library updated to version 0.12.4

Location:
trunk/poppler/mypoppler
Files:
1 added
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/poppler/mypoppler/goo/GooMutex.h

    r277 r290  
    4848#define gUnlockMutex(m) LeaveCriticalSection(m)
    4949
     50/* Lucide */
    5051#elif defined(OS2)
    5152
  • trunk/poppler/mypoppler/goo/gfile.cc

    r277 r290  
    4242#  include <limits.h>
    4343#  include <string.h>
     44/* Lucide */
    4445#  if !defined(VMS) && !defined(ACORN) && !defined(MACOS) && !defined(OS2)
    4546#    include <pwd.h>
     
    6566  return new GooString("SYS$LOGIN:");
    6667
     68/* Lucide */
    6769#elif defined(__EMX__) || defined(_WIN32) || defined(OS2)
    6870  //---------- OS/2+EMX and Win32 ----------
     
    138140      for (p2 = p1; p2 > p0 && *p2 != '.' && *p2 != '['; --p2) ;
    139141      if (*p2 == '[')
    140         ++p2;
     142        ++p2;
    141143      path->del(p2 - p0, p1 - p2);
    142144    } else if (*p1 == ':') {
     
    214216  return path;
    215217
     218/* Lucide */
    216219#elif defined(__EMX__) || defined(OS2)
    217220  //---------- OS/2+EMX ----------
     
    226229    for (i = path->getLength() - 2; i >= 0; --i) {
    227230      if (path->getChar(i) == '/' || path->getChar(i) == '\\' ||
    228           path->getChar(i) == ':')
    229         break;
     231          path->getChar(i) == ':')
     232        break;
    230233    }
    231234    if (i <= 0) {
    232235      if (path->getChar(0) == '/' || path->getChar(0) == '\\') {
    233         path->del(1, path->getLength() - 1);
     236        path->del(1, path->getLength() - 1);
    234237      } else if (path->getLength() >= 2 && path->getChar(1) == ':') {
    235         path->del(2, path->getLength() - 2);
     238        path->del(2, path->getLength() - 2);
    236239      } else {
    237         path->clear();
    238         path->append("..");
     240        path->clear();
     241        path->append("..");
    239242      }
    240243    } else {
    241244      if (path->getChar(i-1) == ':')
    242         ++i;
     245        ++i;
    243246      path->del(i, path->getLength() - i);
    244247    }
     
    266269    for (i = path->getLength() - 2; i >= 0; --i) {
    267270      if (path->getChar(i) == '/')
    268         break;
     271        break;
    269272    }
    270273    if (i <= 0) {
    271274      if (path->getChar(0) == '/') {
    272         path->del(1, path->getLength() - 1);
     275        path->del(1, path->getLength() - 1);
    273276      } else {
    274         path->clear();
    275         path->append("..");
     277        path->clear();
     278        path->append("..");
    276279      }
    277280    } else {
     
    301304  return new GooString();
    302305
     306/* Lucide */
    303307#elif defined(__EMX__) || defined(_WIN32) || defined(OS2)
    304308  //---------- OS/2+EMX and Win32 ----------
     
    343347  //---------- VMS ----------
    344348  return strchr(path, ':') ||
    345         (path[0] == '[' && path[1] != '.' && path[1] != '-');
    346 
    347 #elif defined(__EMX__) || defined(_WIN32) || defined(OS2)
     349        (path[0] == '[' && path[1] != '.' && path[1] != '-');
     350
     351#elif defined(__EMX__) || defined(_WIN32)
    348352  //---------- OS/2+EMX and Win32 ----------
    349353  return path[0] == '/' || path[0] == '\\' || path[1] == ':';
     
    399403  return path;
    400404
     405  /* Lucide */
    401406#elif defined(OS2)
    402407  //---------- OS/2 -----------
     
    422427    if (path->getChar(1) == '/' ||
    423428#ifdef __EMX__
    424         path->getChar(1) == '\\' ||
    425 #endif
    426         path->getLength() == 1) {
     429        path->getChar(1) == '\\' ||
     430#endif
     431        path->getLength() == 1) {
    427432      path->del(0, 1);
    428433      s = getHomeDir();
     
    437442#endif
    438443      if ((n = p2 - p1) > PATH_MAX)
    439         n = PATH_MAX;
     444        n = PATH_MAX;
    440445      strncpy(buf, p1, n);
    441446      buf[n] = '\0';
    442447      if ((pw = getpwnam(buf))) {
    443         path->del(0, p2 - p1 + 1);
    444         path->insert(0, pw->pw_dir);
     448        path->del(0, p2 - p1 + 1);
     449        path->insert(0, pw->pw_dir);
    445450      }
    446451    }
     
    496501    if (!(f2 = fopen(s2->getCString(), "r"))) {
    497502      if (!(f2 = fopen(s2->getCString(), mode))) {
    498         delete s2;
    499         delete s;
     503        delete s2;
     504        delete s;
    500505        return gFalse;
    501506      }
     
    510515  delete s;
    511516  return gFalse;
    512 #elif defined(VMS) || defined(__EMX__) || defined(ACORN) || defined(MACOS) || defined(OS2)
     517#elif defined(VMS) || defined(__EMX__) || defined(ACORN) || defined(MACOS)
    513518  //---------- non-Unix ----------
    514519  char *s;
     
    578583      c = fgetc(f);
    579584      if (c == '\x0a' && i < size - 1) {
    580         buf[i++] = (char)c;
     585        buf[i++] = (char)c;
    581586      } else if (c != EOF) {
    582         ungetc(c, f);
     587        ungetc(c, f);
    583588      }
    584589      break;
     
    613618#ifdef VMS
    614619    if (!strcmp(nameA, "-") ||
    615         ((p = strrchr(nameA, '.')) && !strncmp(p, ".DIR;", 5)))
     620        ((p = strrchr(nameA, '.')) && !strncmp(p, ".DIR;", 5)))
    616621      dir = gTrue;
    617622#elif defined(ACORN)
  • trunk/poppler/mypoppler/goo/gfile.h

    r277 r290  
    6262#      include <ndir.h>
    6363#    endif
     64/* Lucide */
    6465#    if HAVE_DIRECT_H
    6566#      include <direct.h>
     
    129130private:
    130131
    131   GooString *name;              // dir/file name
     132  GooString *name;              // dir/file name
    132133  GooString *fullPath;
    133   GBool dir;                    // is it a directory?
     134  GBool dir;                    // is it a directory?
    134135};
    135136
     
    144145private:
    145146
    146   GooString *path;              // directory path
    147   GBool doStat;                 // call stat() for each entry?
     147  GooString *path;              // directory path
     148  GBool doStat;                 // call stat() for each entry?
    148149#if defined(_WIN32)
    149150  WIN32_FIND_DATA ffd;
     
    152153#elif defined(MACOS)
    153154#else
    154   DIR *dir;                     // the DIR structure from opendir()
     155  DIR *dir;                     // the DIR structure from opendir()
    155156#ifdef VMS
    156   GBool needParent;             // need to return an entry for [-]
     157  GBool needParent;             // need to return an entry for [-]
    157158#endif
    158159#endif
  • trunk/poppler/mypoppler/goo/gstrtod.cc

    r277 r290  
    11/* This file is part of Libspectre.
    2  *
     2 * 
    33 * Copyright (C) 2007 Albert Astals Cid <aacid@kde.org>
    44 * Copyright (C) 2007 Carlos Garcia Campos <carlosgc@gnome.org>
     
    2323#include "gstrtod.h"
    2424
     25/* Lucide */
    2526#include <locale.h>
    2627#include <errno.h>
     
    3233#define ascii_isdigit(c) \
    3334  (c >= '0' && c <= '9')
    34 
     35 
    3536double gatof(const char *nptr)
    3637{
     
    6364    while (ascii_isspace (*p))
    6465      p++;
    65 
     66   
    6667    /* Skip leading optional sign */
    6768    if (*p == '+' || *p == '-')
    6869      p++;
    69 
     70   
    7071    if (ascii_isdigit (*p) || *p == '.') {
    7172      while (ascii_isdigit (*p))
    7273        p++;
    73 
     74     
    7475      if (*p == '.')
    7576        decimal_point_pos = p++;
     
    9293  if (decimal_point_pos) {
    9394    char *copy, *c;
    94 
     95   
    9596    /* We need to convert the '.' to the locale specific decimal point */
    9697    copy = (char *) malloc (end - nptr + 1 + decimal_point_len);
    97 
     98   
    9899    c = copy;
    99100    memcpy (c, nptr, decimal_point_pos - nptr);
     
    119120  } else if (end) {
    120121    char *copy;
    121 
     122   
    122123    copy = (char *) malloc (end - (char *)nptr + 1);
    123124    memcpy (copy, nptr, end - nptr);
    124125    *(copy + (end - (char *)nptr)) = 0;
    125 
     126   
    126127    errno = 0;
    127128    val = strtod (copy, &fail_pos);
  • trunk/poppler/mypoppler/poppler/CairoFontEngine.cc

    r277 r290  
    490490      codeToGIDLen = 256;
    491491    }
     492    delete ff;
    492493    if (! _ft_new_face (lib, fileName->getCString(), &face, &font_face)) {
    493494      error(-1, "could not create truetype face\n");
  • trunk/poppler/mypoppler/poppler/CairoOutputDev.cc

    r277 r290  
    17081708  cairo_pattern_t *maskPattern, *pattern;
    17091709  cairo_matrix_t matrix;
     1710  cairo_matrix_t maskMatrix;
    17101711  Guchar *pix;
    17111712  int x, y;
     
    17911792  cairo_matrix_init_translate (&matrix, 0, height);
    17921793  cairo_matrix_scale (&matrix, width, -height);
    1793 
    17941794  cairo_pattern_set_matrix (pattern, &matrix);
    1795   cairo_pattern_set_matrix (maskPattern, &matrix);
     1795
     1796  cairo_matrix_init_translate (&maskMatrix, 0, maskHeight);
     1797  cairo_matrix_scale (&maskMatrix, maskWidth, -maskHeight);
     1798  cairo_pattern_set_matrix (maskPattern, &maskMatrix);
    17961799
    17971800  cairo_save (cairo);
  • trunk/poppler/mypoppler/poppler/GfxState.cc

    r277 r290  
    1717// Copyright (C) 2006, 2007 Jeff Muizelaar <jeff@infidigm.net>
    1818// Copyright (C) 2006 Carlos Garcia Campos <carlosgc@gnome.org>
    19 // Copyright (C) 2006-2009 Albert Astals Cid <aacid@kde.org>
     19// Copyright (C) 2006-2010 Albert Astals Cid <aacid@kde.org>
    2020// Copyright (C) 2009 Koji Otani <sho@bbr.jp>
    2121// Copyright (C) 2009 Thomas Freitag <Thomas.Freitag@alfa.de>
     
    28942894  r1 = shading->r1;
    28952895  t0 = shading->t0;
    2896   y1 = shading->t1;
     2896  t1 = shading->t1;
    28972897  nFuncs = shading->nFuncs;
    28982898  for (i = 0; i < nFuncs; ++i) {
  • trunk/poppler/mypoppler/poppler/GlobalParams.cc

    r277 r290  
    10921092  }
    10931093  else lang = "xx";
    1094  
     1094
     1095/* Lucide */ 
    10951096  /*p = FcPatternBuild(NULL,
    10961097                    FC_FAMILY, FcTypeString, family,
  • trunk/poppler/mypoppler/poppler/OptionalContent.cc

    r261 r290  
    66// Copyright 2008 Pino Toscano <pino@kde.org>
    77// Copyright 2008 Carlos Garcia Campos <carlosgc@gnome.org>
    8 // Copyright 2008 Albert Astals Cid <aacid@kde.org>
     8// Copyright 2008, 2010 Albert Astals Cid <aacid@kde.org>
    99// Copyright 2008 Mark Kaplan <mkaplan@finjan.com>
    1010//
     
    200200    } else if (ocg.isRef()) {
    201201      OptionalContentGroup* oc = findOcgByRef( ocg.getRef() );     
    202       if ( !oc || oc->getState() == OptionalContentGroup::Off ) {
     202      if ( oc && oc->getState() == OptionalContentGroup::Off ) {
    203203        result = false;
    204204      } else {
  • trunk/poppler/mypoppler/poppler/PageTransition.cc

    r250 r290  
    11/* PageTransition.cc
    22 * Copyright (C) 2005, Net Integration Technologies, Inc.
     3 * Copyright (C) 2010, Albert Astals Cid <aacid@kde.org>
    34 *
    45 * This program is free software; you can redistribute it and/or modify
     
    7273      type = transitionCover;
    7374    else if (strcmp("Uncover", s) == 0)
    74       type = transitionPush;
     75      type = transitionUncover;
    7576    else if (strcmp("Fade", s) == 0)
    76       type = transitionCover;
     77      type = transitionFade;
    7778  }
    7879  obj.free();
  • trunk/poppler/mypoppler/splash/SplashBitmap.cc

    r277 r290  
    3434#include "SplashBitmap.h"
    3535#include "poppler/Error.h"
     36/* Lucide */
    3637#include "goo/PNGWriter.h"
    3738
     
    4142
    4243SplashBitmap::SplashBitmap(int widthA, int heightA, int rowPad,
    43                            SplashColorMode modeA, GBool alphaA,
    44                            GBool topDown) {
     44                           SplashColorMode modeA, GBool alphaA,
     45                           GBool topDown) {
    4546  width = widthA;
    4647  height = heightA;
     
    122123
    123124  e = this->writePNMFile(f);
    124 
     125 
    125126  fclose(f);
    126127  return e;
     
    140141      p = row;
    141142      for (x = 0; x < width; x += 8) {
    142         fputc(*p ^ 0xff, f);
    143         ++p;
     143        fputc(*p ^ 0xff, f);
     144        ++p;
    144145      }
    145146      row += rowSize;
     
    153154      p = row;
    154155      for (x = 0; x < width; ++x) {
    155         fputc(*p, f);
    156         ++p;
     156        fputc(*p, f);
     157        ++p;
    157158      }
    158159      row += rowSize;
     
    166167      p = row;
    167168      for (x = 0; x < width; ++x) {
    168         fputc(splashRGB8R(p), f);
    169         fputc(splashRGB8G(p), f);
    170         fputc(splashRGB8B(p), f);
    171         p += 3;
     169        fputc(splashRGB8R(p), f);
     170        fputc(splashRGB8G(p), f);
     171        fputc(splashRGB8B(p), f);
     172        p += 3;
    172173      }
    173174      row += rowSize;
     
    181182      p = row;
    182183      for (x = 0; x < width; ++x) {
    183         fputc(splashBGR8R(p), f);
    184         fputc(splashBGR8G(p), f);
    185         fputc(splashBGR8B(p), f);
    186         p += 4;
     184        fputc(splashBGR8R(p), f);
     185        fputc(splashBGR8G(p), f);
     186        fputc(splashBGR8B(p), f);
     187        p += 4;
    187188      }
    188189      row += rowSize;
     
    197198      p = row;
    198199      for (x = 0; x < width; ++x) {
    199         fputc(splashBGR8R(p), f);
    200         fputc(splashBGR8G(p), f);
    201         fputc(splashBGR8B(p), f);
    202         p += 3;
     200        fputc(splashBGR8R(p), f);
     201        fputc(splashBGR8G(p), f);
     202        fputc(splashBGR8B(p), f);
     203        p += 3;
    203204      }
    204205      row += rowSize;
     
    277278
    278279  e = writePNGFile(f);
    279 
     280 
    280281  fclose(f);
    281282  return e;
     
    317318    }
    318319    break;
    319 
     320   
    320321    case splashModeMono8:
    321322    {
     
    338339    }
    339340    break;
    340 
     341   
    341342    case splashModeMono1:
    342343    {
     
    359360    }
    360361    break;
    361 
     362   
    362363    default:
    363364    // can't happen
    364365    break;
    365366  }
    366 
     367 
    367368  if (writer->close()) {
    368369    delete writer;
  • trunk/poppler/mypoppler/splash/SplashFTFont.cc

    r277 r290  
    1212// under GPL version 2 or later
    1313//
    14 // Copyright (C) 2005, 2007-2009 Albert Astals Cid <aacid@kde.org>
     14// Copyright (C) 2005, 2007-2010 Albert Astals Cid <aacid@kde.org>
    1515// Copyright (C) 2006 Kristian HÞgsberg <krh@bitplanet.net>
    1616// Copyright (C) 2009 Petr Gajdos <pgajdos@novell.com>
     
    241241  }
    242242  bitmap->data = (Guchar *)gmallocn_checkoverflow(rowSize, bitmap->h);
     243  if (!bitmap->data) {
     244    return gFalse;
     245  }
    243246  bitmap->freeData = gTrue;
    244247  for (i = 0, p = bitmap->data, q = slot->bitmap.buffer;
Note: See TracChangeset for help on using the changeset viewer.