Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
Poppler 0.73.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Jan 15, 2019
1 parent b64fc0a commit be21f0d
Show file tree
Hide file tree
Showing 86 changed files with 404 additions and 608 deletions.
10 changes: 5 additions & 5 deletions include/poppler/Annot.h
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ class Annot {
virtual void setContents(GooString *new_content);
void setName(GooString *new_name);
void setModified(GooString *new_date);
void setFlags(Guint new_flags);
void setFlags(unsigned int new_flags);

void setBorder(std::unique_ptr<AnnotBorder> &&new_border);
void setColor(std::unique_ptr<AnnotColor> &&new_color);
Expand All @@ -701,7 +701,7 @@ class Annot {
int getPageNum() const { return page; }
const GooString *getName() const { return name.get(); }
const GooString *getModified() const { return modified.get(); }
Guint getFlags() const { return flags; }
unsigned int getFlags() const { return flags; }
AnnotAppearance *getAppearStreams() const { return appearStreams.get(); }
const GooString *getAppearState() const { return appearState.get(); }
AnnotBorder *getBorder() const { return border.get(); }
Expand Down Expand Up @@ -755,7 +755,7 @@ class Annot {
std::unique_ptr<GooString> name; // NM
std::unique_ptr<GooString> modified; // M
int page; // P
Guint flags; // F (must be a 32 bit unsigned int)
unsigned int flags; // F (must be a 32 bit unsigned int)
std::unique_ptr<AnnotAppearance> appearStreams; // AP
Object appearance; // a reference to the Form XObject stream
// for the normal appearance
Expand Down Expand Up @@ -832,15 +832,15 @@ class AnnotMarkup: public Annot {
protected:
void removeReferencedObjects() override;

std::unique_ptr<GooString> label; // T (Default autor)
std::unique_ptr<GooString> label; // T (Default author)
std::unique_ptr<AnnotPopup> popup; // Popup
double opacity; // CA (Default 1.0)
// RC
std::unique_ptr<GooString> date; // CreationDate
Ref inReplyTo; // IRT
std::unique_ptr<GooString> subject; // Subj
AnnotMarkupReplyType replyTo; // RT (Default R)
// this object is overrided by the custom intent fields defined in some
// this object is overridden by the custom intent fields defined in some
// annotation types.
//GooString *intent; // IT
AnnotExternalDataType exData; // ExData
Expand Down
2 changes: 1 addition & 1 deletion include/poppler/Array.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class Array {
void remove(int i);

// Accessors.
Object get(int i, int resursion = 0) const;
Object get(int i, int recursion = 0) const;
Object getNF(int i) const;
bool getString(int i, GooString *string) const;

Expand Down
6 changes: 2 additions & 4 deletions include/poppler/BuiltinFont.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
#ifndef BUILTINFONT_H
#define BUILTINFONT_H

#include "goo/gtypes.h"

struct BuiltinFont;
class BuiltinFontWidths;

Expand All @@ -43,7 +41,7 @@ struct BuiltinFont {

struct BuiltinFontWidth {
const char *name;
Gushort width;
unsigned short width;
BuiltinFontWidth *next;
};

Expand All @@ -56,7 +54,7 @@ class BuiltinFontWidths {
BuiltinFontWidths(const BuiltinFontWidths &) = delete;
BuiltinFontWidths& operator=(const BuiltinFontWidths &) = delete;

bool getWidth(const char *name, Gushort *width);
bool getWidth(const char *name, unsigned short *width);

private:

Expand Down
9 changes: 4 additions & 5 deletions include/poppler/CMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include <atomic>

#include "poppler-config.h"
#include "goo/gtypes.h"
#include "CharTypes.h"

class GooString;
Expand Down Expand Up @@ -89,7 +88,7 @@ class CMap {
// Return the writing mode (0=horizontal, 1=vertical).
int getWMode() { return wMode; }

void setReverseMap(Guint *rmap, Guint rmapSize, Guint ncand);
void setReverseMap(unsigned int *rmap, unsigned int rmapSize, unsigned int ncand);

private:

Expand All @@ -99,10 +98,10 @@ class CMap {
void useCMap(CMapCache *cache, char *useName);
void useCMap(CMapCache *cache, Object *obj);
void copyVector(CMapVectorEntry *dest, CMapVectorEntry *src);
void addCIDs(Guint start, Guint end, Guint nBytes, CID firstCID);
void addCIDs(unsigned int start, unsigned int end, unsigned int nBytes, CID firstCID);
void freeCMapVector(CMapVectorEntry *vec);
void setReverseMapVector(Guint startCode, CMapVectorEntry *vec,
Guint *rmap, Guint rmapSize, Guint ncand);
void setReverseMapVector(unsigned int startCode, CMapVectorEntry *vec,
unsigned int *rmap, unsigned int rmapSize, unsigned int ncand);

GooString *collection;
GooString *cMapName;
Expand Down
5 changes: 2 additions & 3 deletions include/poppler/CachedFile.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

#include "poppler-config.h"

#include "goo/gtypes.h"
#include "Object.h"
#include "Stream.h"

Expand Down Expand Up @@ -50,7 +49,7 @@ friend class CachedFileWriter;
CachedFile(const CachedFile &) = delete;
CachedFile& operator=(const CachedFile &) = delete;

Guint getLength() { return length; }
unsigned int getLength() { return length; }
long int tell();
int seek(long int offset, int origin);
size_t read(void * ptr, size_t unitsize, size_t count);
Expand Down Expand Up @@ -141,7 +140,7 @@ class CachedFileLoader {
// The caller is responsible for deleting uri and cachedFile.
virtual size_t init(GooString *uri, CachedFile *cachedFile) = 0;

// Loads speficified byte ranges and passes it to the writer to store them.
// Loads specified byte ranges and passes it to the writer to store them.
// Returns 0 on success, Anything but 0 on failure.
// The caller is responsible for deleting the writer.
virtual int load(const std::vector<ByteRange> &ranges, CachedFileWriter *writer) = 0;
Expand Down
4 changes: 2 additions & 2 deletions include/poppler/Catalog.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class Catalog {
markInfoUserProperties = 1 << 2,
markInfoSuspects = 1 << 3,
};
Guint getMarkInfo();
unsigned int getMarkInfo();

// Find a page, given its object ID. Returns page number, or 0 if
// not found.
Expand Down Expand Up @@ -266,7 +266,7 @@ class Catalog {
GooString *baseURI; // base URI for URI-type links
Object metadata; // metadata stream
StructTreeRoot *structTreeRoot; // structure tree root
Guint markInfo; // Flags from MarkInfo dictionary
unsigned int markInfo; // Flags from MarkInfo dictionary
Object outline; // outline dictionary
Object acroForm; // AcroForm dictionary
Object viewerPreferences; // ViewerPreference dictionary
Expand Down
1 change: 0 additions & 1 deletion include/poppler/CharCodeToUnicode.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@

#include "poppler-config.h"
#include "CharTypes.h"
#include "goo/gtypes.h"

struct CharCodeToUnicodeString;
class GooString;
Expand Down
8 changes: 3 additions & 5 deletions include/poppler/CompactFontTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@
#ifndef COMPACTFONTINFO_H
#define COMPACTFONTINFO_H

#include "goo/gtypes.h"

static char *type1CStdStrings[391] = {
".notdef",
"space",
Expand Down Expand Up @@ -419,7 +417,7 @@ static char *type1CStdStrings[391] = {
"Semibold"
};

static Gushort type1CISOAdobeCharset[229] = {
static unsigned short type1CISOAdobeCharset[229] = {
0, 1, 2, 3, 4, 5, 6, 7, 8, 9,
10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
Expand All @@ -445,7 +443,7 @@ static Gushort type1CISOAdobeCharset[229] = {
220, 221, 222, 223, 224, 225, 226, 227, 228
};

static const Gushort type1CExpertCharset[166] = {
static const unsigned short type1CExpertCharset[166] = {
0, 1, 229, 230, 231, 232, 233, 234, 235, 236,
237, 238, 13, 14, 15, 99, 239, 240, 241, 242,
243, 244, 245, 246, 247, 248, 27, 28, 249, 250,
Expand All @@ -465,7 +463,7 @@ static const Gushort type1CExpertCharset[166] = {
373, 374, 375, 376, 377, 378
};

static Gushort type1CExpertSubsetCharset[87] = {
static unsigned short type1CExpertSubsetCharset[87] = {
0, 1, 231, 232, 235, 236, 237, 238, 13, 14,
15, 99, 239, 240, 241, 242, 243, 244, 245, 246,
247, 248, 27, 28, 249, 250, 251, 253, 254, 255,
Expand Down
1 change: 0 additions & 1 deletion include/poppler/DateInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#ifndef DATE_INFO_H
#define DATE_INFO_H

#include "goo/gtypes.h"
#include "goo/GooString.h"
#include <time.h>

Expand Down
35 changes: 17 additions & 18 deletions include/poppler/Decrypt.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#ifndef DECRYPT_H
#define DECRYPT_H

#include "goo/gtypes.h"
#include "goo/GooString.h"
#include "Object.h"
#include "Stream.h"
Expand All @@ -50,15 +49,15 @@ class Decrypt {
const GooString *ownerEnc, const GooString *userEnc,
int permissions, const GooString *fileID,
const GooString *ownerPassword, const GooString *userPassword,
Guchar *fileKey, bool encryptMetadata,
unsigned char *fileKey, bool encryptMetadata,
bool *ownerPasswordOk);

private:

static bool makeFileKey2(int encVersion, int encRevision, int keyLength,
const GooString *ownerKey, const GooString *userKey,
int permissions, const GooString *fileID,
const GooString *userPassword, Guchar *fileKey,
const GooString *userPassword, unsigned char *fileKey,
bool encryptMetadata);
};

Expand All @@ -74,32 +73,32 @@ class Decrypt {
* previous output is kept in buf. The paddingReached field is only used in
* case of encryption. */
struct DecryptRC4State {
Guchar state[256];
Guchar x, y;
unsigned char state[256];
unsigned char x, y;
};

struct DecryptAESState {
Guint w[44];
Guchar state[16];
Guchar cbc[16];
Guchar buf[16];
unsigned int w[44];
unsigned char state[16];
unsigned char cbc[16];
unsigned char buf[16];
bool paddingReached; // encryption only
int bufIdx;
};

struct DecryptAES256State {
Guint w[60];
Guchar state[16];
Guchar cbc[16];
Guchar buf[16];
unsigned int w[60];
unsigned char state[16];
unsigned char cbc[16];
unsigned char buf[16];
bool paddingReached; // encryption only
int bufIdx;
};

class BaseCryptStream : public FilterStream {
public:

BaseCryptStream(Stream *strA, const Guchar *fileKey, CryptAlgorithm algoA,
BaseCryptStream(Stream *strA, const unsigned char *fileKey, CryptAlgorithm algoA,
int keyLength, int objNum, int objGen);
~BaseCryptStream();
StreamKind getKind() override { return strCrypt; }
Expand All @@ -114,7 +113,7 @@ class BaseCryptStream : public FilterStream {
protected:
CryptAlgorithm algo;
int objKeyLength;
Guchar objKey[32];
unsigned char objKey[32];
Goffset charactersRead; // so that getPos() can be correct
int nextCharBuff; // EOF means not read yet
bool autoDelete;
Expand All @@ -133,7 +132,7 @@ class BaseCryptStream : public FilterStream {
class EncryptStream : public BaseCryptStream {
public:

EncryptStream(Stream *strA, const Guchar *fileKey, CryptAlgorithm algoA,
EncryptStream(Stream *strA, const unsigned char *fileKey, CryptAlgorithm algoA,
int keyLength, int objNum, int objGen);
~EncryptStream();
void reset() override;
Expand All @@ -143,7 +142,7 @@ class EncryptStream : public BaseCryptStream {
class DecryptStream : public BaseCryptStream {
public:

DecryptStream(Stream *strA, const Guchar *fileKey, CryptAlgorithm algoA,
DecryptStream(Stream *strA, const unsigned char *fileKey, CryptAlgorithm algoA,
int keyLength, int objNum, int objGen);
~DecryptStream();
void reset() override;
Expand All @@ -152,6 +151,6 @@ class DecryptStream : public BaseCryptStream {

//------------------------------------------------------------------------

extern void md5(const Guchar *msg, int msgLen, Guchar *digest);
extern void md5(const unsigned char *msg, int msgLen, unsigned char *digest);

#endif
2 changes: 1 addition & 1 deletion include/poppler/Error.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#include <stdarg.h>
#include "poppler-config.h"
#include "goo/gtypes.h"
#include "goo/gfile.h"
#include "goo/GooString.h"

enum ErrorCategory {
Expand Down
1 change: 0 additions & 1 deletion include/poppler/FontInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#define FONT_INFO_H

#include "Object.h"
#include "goo/gtypes.h"
#include "goo/GooList.h"

class GfxFont;
Expand Down
1 change: 0 additions & 1 deletion include/poppler/Function.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#ifndef FUNCTION_H
#define FUNCTION_H

#include "goo/gtypes.h"
#include "Object.h"
#include <set>

Expand Down
1 change: 0 additions & 1 deletion include/poppler/Gfx.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#define GFX_H

#include "poppler-config.h"
#include "goo/gtypes.h"
#include "goo/GooList.h"
#include "GfxState.h"
#include "Object.h"
Expand Down
3 changes: 1 addition & 2 deletions include/poppler/GfxFont.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#ifndef GFXFONT_H
#define GFXFONT_H

#include "goo/gtypes.h"
#include "goo/GooString.h"
#include "Object.h"
#include "CharTypes.h"
Expand Down Expand Up @@ -346,7 +345,7 @@ class Gfx8BitFont: public GfxFont {
bool getUsesMacRomanEnc() const { return usesMacRomanEnc; }

// Get width of a character.
double getWidth(Guchar c) const { return widths[c]; }
double getWidth(unsigned char c) const { return widths[c]; }

// Return a char code-to-GID mapping for the provided font file.
// (This is only useful for TrueType fonts.)
Expand Down
Loading

0 comments on commit be21f0d

Please sign in to comment.