[poppler] poppler/poppler: Annot.cc, 1.3, 1.4 Catalog.cc, 1.13,
1.14 Catalog.h, 1.7, 1.8 Dict.cc, 1.3, 1.4 Dict.h, 1.2,
1.3 FontInfo.cc, 1.6, 1.7 Function.cc, 1.3, 1.4 Gfx.cc, 1.5,
1.6 GfxFont.cc, 1.5, 1.6 GfxState.cc, 1.8, 1.9 Link.cc, 1.3,
1.4 Link.h, 1.1.1.1, 1.2 Makefile.am, 1.18, 1.19 Object.h,
1.1.1.1, 1.2 Outline.cc, 1.4, 1.5 PDFDoc.cc, 1.9,
1.10 PDFDoc.h, 1.6, 1.7 PSOutputDev.cc, 1.7, 1.8 Page.cc, 1.10,
1.11 PageLabelInfo.cc, 1.2, 1.3 Parser.cc, 1.4,
1.5 SecurityHandler.cc, 1.1, 1.2 Stream.cc, 1.10, 1.11 XRef.cc,
1.11, 1.12
Albert Astals Cid
aacid at freedesktop.org
Wed Jan 18 14:32:15 PST 2006
- Previous message: [poppler]
poppler/utils: HtmlOutputDev.cc, 1.2, 1.3 pdffonts.cc, 1.1,
1.2 pdfinfo.cc, 1.1, 1.2 pdftohtml.cc, 1.1, 1.2 pdftotext.cc,
1.1, 1.2
- Next message: [poppler] poppler: ChangeLog,1.290,1.291
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvs/poppler/poppler/poppler
In directory gabe:/tmp/cvs-serv28869/poppler
Modified Files:
Annot.cc Catalog.cc Catalog.h Dict.cc Dict.h FontInfo.cc
Function.cc Gfx.cc GfxFont.cc GfxState.cc Link.cc Link.h
Makefile.am Object.h Outline.cc PDFDoc.cc PDFDoc.h
PSOutputDev.cc Page.cc PageLabelInfo.cc Parser.cc
SecurityHandler.cc Stream.cc XRef.cc
Log Message:
Brad patch for embedded document extraction, only has Qt4 bindings for now, needs Qt3 and glib work
Index: Annot.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/Annot.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Annot.cc 16 Oct 2005 14:54:17 -0000 1.3
+++ Annot.cc 18 Jan 2006 22:32:13 -0000 1.4
@@ -18,6 +18,7 @@
#include "Catalog.h"
#include "Gfx.h"
#include "Lexer.h"
+#include "UGooString.h"
#include "Annot.h"
//------------------------------------------------------------------------
Index: Catalog.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/Catalog.cc,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- Catalog.cc 15 Sep 2005 12:52:36 -0000 1.13
+++ Catalog.cc 18 Jan 2006 22:32:13 -0000 1.14
@@ -23,6 +23,7 @@
#include "Error.h"
#include "Link.h"
#include "PageLabelInfo.h"
+#include "UGooString.h"
#include "Catalog.h"
//------------------------------------------------------------------------
@@ -83,11 +84,14 @@
// read named destination dictionary
catDict.dictLookup("Dests", &dests);
- // read root of named destination tree
+ // read root of named destination tree - PDF1.6 table 3.28
if (catDict.dictLookup("Names", &obj)->isDict()) {
obj.dictLookup("Dests", &obj2);
destNameTree.init(xref, &obj2);
obj2.free();
+ obj.dictLookup("EmbeddedFiles", &obj2);
+ embeddedFileNameTree.init(xref, &obj2);
+ obj2.free();
}
obj.free();
@@ -178,6 +182,7 @@
}
dests.free();
destNameTree.free();
+ embeddedFileNameTree.free();
if (baseURI) {
delete baseURI;
}
@@ -291,7 +296,7 @@
return 0;
}
-LinkDest *Catalog::findDest(GooString *name) {
+LinkDest *Catalog::findDest(UGooString *name) {
LinkDest *dest;
Object obj1, obj2;
GBool found;
@@ -299,7 +304,7 @@
// try named destination dictionary then name tree
found = gFalse;
if (dests.isDict()) {
- if (!dests.dictLookup(name->getCString(), &obj1)->isNull())
+ if (!dests.dictLookup(*name, &obj1)->isNull())
found = gTrue;
else
obj1.free();
@@ -335,6 +340,97 @@
return dest;
}
+EmbFile *Catalog::embeddedFile(int i)
+{
+ Object efDict;
+ Object fileSpec;
+ Object fileDesc;
+ Object paramDict;
+ Object paramObj;
+ Object strObj;
+ Object obj, obj2;
+ obj = embeddedFileNameTree.getValue(i);
+ GooString *fileName = new GooString();
+ char *descString = embeddedFileNameTree.getName(i)->getCString();
+ GooString *desc = new GooString(descString);
+ delete[] descString;
+ GooString *createDate = new GooString();
+ GooString *modDate = new GooString();
+ Stream *efStream;
+ if (obj.isRef()) {
+ if (obj.fetch(xref, &efDict)->isDict()) {
+ // efDict matches Table 3.40 in the PDF1.6 spec
+ efDict.dictLookup("F", &fileSpec);
+ if (fileSpec.isString()) {
+ delete fileName;
+ fileName = new GooString(fileSpec.getString());
+ }
+ fileSpec.free();
+
+ // the logic here is that the description from the name
+ // dictionary is used if we don't have a more specific
+ // description - see the Note: on page 157 of the PDF1.6 spec
+ efDict.dictLookup("Desc", &fileDesc);
+ if (fileDesc.isString()) {
+ delete desc;
+ desc = new GooString(fileDesc.getString());
+ } else {
+ efDict.dictLookup("Description", &fileDesc);
+ if (fileDesc.isString()) {
+ delete desc;
+ desc = new GooString(fileDesc.getString());
+ }
+ }
+ fileDesc.free();
+
+ efDict.dictLookup("EF", &obj2);
+ if (obj2.isDict()) {
+ // This gives us the raw data stream bytes
+
+ obj2.dictLookup("F", &strObj);
+ if (strObj.isStream()) {
+ efStream = strObj.getStream();
+ }
+
+ // dataDict corresponds to Table 3.41 in the PDF1.6 spec.
+ Dict *dataDict = efStream->getDict();
+
+ // subtype is normally mimetype. You can extract it with code like this:
+ // Object subtypeName;
+ // dataDict->lookup( "Subtype", &subtypeName );
+ // It is optional, so this will sometimes return a null object
+ // if (subtypeName.isName()) {
+ // std::cout << "got subtype name: " << subtypeName.getName() << std::endl;
+ // }
+
+ // paramDict corresponds to Table 3.42 in the PDF1.6 spec
+ Object paramDict;
+ dataDict->lookup( "Params", ¶mDict );
+ if (paramDict.isDict()) {
+ paramDict.dictLookup("ModDate", ¶mObj);
+ if (paramObj.isString()) {
+ delete modDate;
+ modDate = new GooString(paramObj.getString());
+ }
+ paramObj.free();
+ paramDict.dictLookup("CreationDate", ¶mObj);
+ if (paramObj.isString()) {
+ delete createDate;
+ createDate = new GooString(paramObj.getString());
+ }
+ paramObj.free();
+ }
+ paramDict.free();
+ }
+ efDict.free();
+ obj2.free();
+ }
+ }
+ EmbFile *embeddedFile = new EmbFile(fileName, desc, createDate, modDate, strObj);
+ strObj.free();
+ return embeddedFile;
+}
+
NameTree::NameTree(void)
{
size = 0;
@@ -343,12 +439,15 @@
}
NameTree::Entry::Entry(Array *array, int index) {
- if (!array->getString(index, &name) || !array->getNF(index + 1, &value))
- error(-1, "Invalid page tree");
+ GooString n;
+ if (!array->getString(index, &n) || !array->getNF(index + 1, &value))
+ error(-1, "Invalid page tree");
+ name = new UGooString(n);
}
NameTree::Entry::~Entry() {
value.free();
+ delete name;
}
void NameTree::addEntry(Entry *entry)
@@ -402,13 +501,13 @@
int NameTree::Entry::cmp(const void *voidKey, const void *voidEntry)
{
- GooString *key = (GooString *) voidKey;
+ UGooString *key = (UGooString *) voidKey;
Entry *entry = *(NameTree::Entry **) voidEntry;
- return key->cmp(&entry->name);
+ return key->cmp(entry->name);
}
-GBool NameTree::lookup(GooString *name, Object *obj)
+GBool NameTree::lookup(UGooString *name, Object *obj)
{
Entry **entry;
@@ -424,6 +523,24 @@
}
}
+Object NameTree::getValue(int index)
+{
+ if (index < length) {
+ return entries[index]->value;
+ } else {
+ return Object();
+ }
+}
+
+UGooString *NameTree::getName(int index)
+{
+ if (index < length) {
+ return entries[index]->name;
+ } else {
+ return NULL;
+ }
+}
+
void NameTree::free()
{
int i;
Index: Catalog.h
===================================================================
RCS file: /cvs/poppler/poppler/poppler/Catalog.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- Catalog.h 15 Sep 2005 12:52:36 -0000 1.7
+++ Catalog.h 18 Jan 2006 22:32:13 -0000 1.8
@@ -19,6 +19,7 @@
class PageAttrs;
struct Ref;
class LinkDest;
+class UGooString;
class PageLabelInfo;
//------------------------------------------------------------------------
@@ -30,14 +31,18 @@
NameTree();
void init(XRef *xref, Object *tree);
void parse(Object *tree);
- GBool lookup(GooString *name, Object *obj);
+ GBool lookup(UGooString *name, Object *obj);
void free();
+ int numEntries() { return length; };
+ // iterator accessor
+ Object getValue(int i);
+ UGooString *getName(int i);
private:
struct Entry {
Entry(Array *array, int index);
~Entry();
- GooString name;
+ UGooString *name;
Object value;
void free();
static int cmp(const void *key, const void *entry);
@@ -48,7 +53,45 @@
XRef *xref;
Object *root;
Entry **entries;
- int size, length;
+ int size, length; // size is the number of entries in
+ // the array of Entry*
+ // length is the number of real Entry
+};
+
+class EmbFile {
+public:
+ EmbFile(GooString *name, GooString *description,
+ GooString *createDate,
+ GooString *modDate, Object objStr) :
+ m_name(name),
+ m_description(description),
+ m_createDate(createDate),
+ m_modDate(modDate)
+ {
+ objStr.copy(&m_objStr);
+ }
+
+ ~EmbFile()
+ {
+ delete m_name;
+ delete m_description;
+ delete m_modDate;
+ delete m_createDate;
+ m_objStr.free();
+ }
+
+ GooString *name() { return m_name; }
+ GooString *description() { return m_description; }
+ GooString *modDate() { return m_modDate; }
+ GooString *createDate() { return m_createDate; }
+ Object &streamObject() { return m_objStr; }
+
+private:
+ GooString *m_name;
+ GooString *m_description;
+ GooString *m_createDate;
+ GooString *m_modDate;
+ Object m_objStr;
};
//------------------------------------------------------------------------
@@ -92,7 +135,13 @@
// Find a named destination. Returns the link destination, or
// NULL if <name> is not a destination.
- LinkDest *findDest(GooString *name);
+ LinkDest *findDest(UGooString *name);
+
+ // Get the number of embedded files
+ int numEmbeddedFiles() { return embeddedFileNameTree.numEntries(); }
+
+ // Get the i'th file embedded (at the Document level) in the document
+ EmbFile *embeddedFile(int i);
// Convert between page indices and page labels.
GBool labelToIndex(GooString *label, int *index);
@@ -132,7 +181,8 @@
int numPages; // number of pages
int pagesSize; // size of pages array
Object dests; // named destination dictionary
- NameTree destNameTree; // name tree
+ NameTree destNameTree; // named destination name-tree
+ NameTree embeddedFileNameTree; // embedded file name-tree
GooString *baseURI; // base URI for URI-type links
Object metadata; // metadata stream
Object structTreeRoot; // structure tree root dictionary
Index: Dict.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/Dict.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Dict.cc 27 Aug 2005 08:43:43 -0000 1.3
+++ Dict.cc 18 Jan 2006 22:32:13 -0000 1.4
@@ -16,6 +16,7 @@
#include <string.h>
#include "goo/gmem.h"
#include "Object.h"
+#include "UGooString.h"
#include "XRef.h"
#include "Dict.h"
@@ -34,13 +35,13 @@
int i;
for (i = 0; i < length; ++i) {
- gfree(entries[i].key);
+ delete entries[i].key;
entries[i].val.free();
}
gfree(entries);
}
-void Dict::add(char *key, Object *val) {
+void Dict::add(const UGooString &key, Object *val) {
if (length == size) {
if (length == 0) {
size = 8;
@@ -49,16 +50,16 @@
}
entries = (DictEntry *)greallocn(entries, size, sizeof(DictEntry));
}
- entries[length].key = key;
+ entries[length].key = new UGooString(key);
entries[length].val = *val;
++length;
}
-inline DictEntry *Dict::find(char *key) {
+inline DictEntry *Dict::find(const UGooString &key) {
int i;
for (i = 0; i < length; ++i) {
- if (!strcmp(key, entries[i].key))
+ if (!key.cmp(entries[i].key))
return &entries[i];
}
return NULL;
@@ -70,13 +71,13 @@
return (e = find("Type")) && e->val.isName(type);
}
-Object *Dict::lookup(char *key, Object *obj) {
+Object *Dict::lookup(const UGooString &key, Object *obj) {
DictEntry *e;
return (e = find(key)) ? e->val.fetch(xref, obj) : obj->initNull();
}
-Object *Dict::lookupNF(char *key, Object *obj) {
+Object *Dict::lookupNF(const UGooString &key, Object *obj) {
DictEntry *e;
return (e = find(key)) ? e->val.copy(obj) : obj->initNull();
@@ -102,7 +103,7 @@
return success;
}
-char *Dict::getKey(int i) {
+UGooString *Dict::getKey(int i) {
return entries[i].key;
}
Index: Dict.h
===================================================================
RCS file: /cvs/poppler/poppler/poppler/Dict.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- Dict.h 28 Mar 2005 07:49:55 -0000 1.2
+++ Dict.h 18 Jan 2006 22:32:13 -0000 1.3
@@ -15,12 +15,13 @@
#include "Object.h"
+class UGooString;
//------------------------------------------------------------------------
// Dict
//------------------------------------------------------------------------
struct DictEntry {
- char *key;
+ UGooString *key;
Object val;
};
@@ -40,20 +41,20 @@
// Get number of entries.
int getLength() { return length; }
- // Add an entry. NB: does not copy key.
- void add(char *key, Object *val);
+ // Add an entry
+ void add(const UGooString &key, Object *val);
// Check if dictionary is of specified type.
GBool is(char *type);
// Look up an entry and return the value. Returns a null object
// if <key> is not in the dictionary.
- Object *lookup(char *key, Object *obj);
- Object *lookupNF(char *key, Object *obj);
+ Object *lookup(const UGooString &key, Object *obj);
+ Object *lookupNF(const UGooString &key, Object *obj);
GBool lookupInt(const char *key, const char *alt_key, int *value);
// Iterative accessors.
- char *getKey(int i);
+ UGooString *getKey(int i);
Object *getVal(int i, Object *obj);
Object *getValNF(int i, Object *obj);
@@ -70,7 +71,7 @@
int length; // number of entries in dictionary
int ref; // reference count
- DictEntry *find(char *key);
+ DictEntry *find(const UGooString &key);
};
#endif
Index: FontInfo.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/FontInfo.cc,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- FontInfo.cc 16 Oct 2005 14:54:17 -0000 1.6
+++ FontInfo.cc 18 Jan 2006 22:32:13 -0000 1.7
@@ -12,6 +12,7 @@
#include "PDFDoc.h"
#include "config.h"
#include "FontInfo.h"
+#include "UGooString.h"
FontInfoScanner::FontInfoScanner(PDFDoc *docA) {
doc = docA;
Index: Function.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/Function.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Function.cc 16 Oct 2005 14:58:14 -0000 1.3
+++ Function.cc 18 Jan 2006 22:32:13 -0000 1.4
@@ -22,6 +22,7 @@
#include "Stream.h"
#include "Error.h"
#include "Function.h"
+#include "UGooString.h"
//------------------------------------------------------------------------
// Function
Index: Gfx.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/Gfx.cc,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- Gfx.cc 8 Dec 2005 18:17:42 -0000 1.5
+++ Gfx.cc 18 Jan 2006 22:32:13 -0000 1.6
@@ -35,6 +35,7 @@
#include "Error.h"
#include "Gfx.h"
#include "ProfileData.h"
+#include "UGooString.h"
// the MSVC math.h doesn't define this
#ifndef M_PI
Index: GfxFont.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/GfxFont.cc,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- GfxFont.cc 16 Oct 2005 15:11:32 -0000 1.5
+++ GfxFont.cc 18 Jan 2006 22:32:13 -0000 1.6
@@ -28,6 +28,7 @@
#include <fofi/FoFiType1.h>
#include <fofi/FoFiType1C.h>
#include <fofi/FoFiTrueType.h>
+#include "UGooString.h"
#include "GfxFont.h"
//------------------------------------------------------------------------
@@ -1549,8 +1550,10 @@
r.gen = 999999;
}
}
- fonts[i] = GfxFont::makeFont(xref, fontDict->getKey(i),
+ char *aux = fontDict->getKey(i)->getCString();
+ fonts[i] = GfxFont::makeFont(xref, aux,
r, obj2.getDict());
+ delete[] aux;
if (fonts[i] && !fonts[i]->isOk()) {
delete fonts[i];
fonts[i] = NULL;
Index: GfxState.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/GfxState.cc,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- GfxState.cc 9 Dec 2005 20:49:59 -0000 1.8
+++ GfxState.cc 18 Jan 2006 22:32:13 -0000 1.9
@@ -21,6 +21,7 @@
#include "Array.h"
#include "Page.h"
#include "GfxState.h"
+#include "UGooString.h"
//------------------------------------------------------------------------
Index: Link.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/Link.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- Link.cc 20 Sep 2005 14:34:31 -0000 1.3
+++ Link.cc 18 Jan 2006 22:32:13 -0000 1.4
@@ -21,6 +21,7 @@
#include "Array.h"
#include "Dict.h"
#include "Link.h"
+#include "UGooString.h"
//------------------------------------------------------------------------
// LinkAction
@@ -421,9 +422,9 @@
// named destination
if (destObj->isName()) {
- namedDest = new GooString(destObj->getName());
+ namedDest = new UGooString(destObj->getName());
} else if (destObj->isString()) {
- namedDest = destObj->getString()->copy();
+ namedDest = new UGooString(*destObj->getString());
// destination dictionary
} else if (destObj->isArray()) {
@@ -459,9 +460,9 @@
// named destination
if (destObj->isName()) {
- namedDest = new GooString(destObj->getName());
+ namedDest = new UGooString(destObj->getName());
} else if (destObj->isString()) {
- namedDest = destObj->getString()->copy();
+ namedDest = new UGooString(*destObj->getString());
// destination dictionary
} else if (destObj->isArray()) {
Index: Link.h
===================================================================
RCS file: /cvs/poppler/poppler/poppler/Link.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- Link.h 3 Mar 2005 19:46:01 -0000 1.1.1.1
+++ Link.h 18 Jan 2006 22:32:13 -0000 1.2
@@ -16,6 +16,7 @@
#include "Object.h"
class GooString;
+class UGooString;
class Array;
class Dict;
@@ -134,13 +135,13 @@
// Accessors.
virtual LinkActionKind getKind() { return actionGoTo; }
LinkDest *getDest() { return dest; }
- GooString *getNamedDest() { return namedDest; }
+ UGooString *getNamedDest() { return namedDest; }
private:
LinkDest *dest; // regular destination (NULL for remote
// link with bad destination)
- GooString *namedDest; // named destination (only one of dest and
+ UGooString *namedDest; // named destination (only one of dest and
// and namedDest may be non-NULL)
};
@@ -165,14 +166,14 @@
virtual LinkActionKind getKind() { return actionGoToR; }
GooString *getFileName() { return fileName; }
LinkDest *getDest() { return dest; }
- GooString *getNamedDest() { return namedDest; }
+ UGooString *getNamedDest() { return namedDest; }
private:
GooString *fileName; // file name
LinkDest *dest; // regular destination (NULL for remote
// link with bad destination)
- GooString *namedDest; // named destination (only one of dest and
+ UGooString *namedDest; // named destination (only one of dest and
// and namedDest may be non-NULL)
};
Index: Makefile.am
===================================================================
RCS file: /cvs/poppler/poppler/poppler/Makefile.am,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- Makefile.am 6 Jan 2006 10:05:58 -0000 1.18
+++ Makefile.am 18 Jan 2006 22:32:13 -0000 1.19
@@ -146,6 +146,7 @@
PSOutputDev.h \
TextOutputDev.h \
SecurityHandler.h \
+ UGooString.h \
UTF8.h \
XpdfPluginAPI.h \
poppler-config.h
@@ -199,4 +200,5 @@
PageLabelInfo.h \
PageLabelInfo.cc \
SecurityHandler.cc \
+ UGooString.cc \
XpdfPluginAPI.cc
Index: Object.h
===================================================================
RCS file: /cvs/poppler/poppler/poppler/Object.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- Object.h 3 Mar 2005 19:46:01 -0000 1.1.1.1
+++ Object.h 18 Jan 2006 22:32:13 -0000 1.2
@@ -23,6 +23,7 @@
class Array;
class Dict;
class Stream;
+class UGooString;
//------------------------------------------------------------------------
// Ref
@@ -163,11 +164,11 @@
// Dict accessors.
int dictGetLength();
- void dictAdd(char *key, Object *val);
+ void dictAdd(const UGooString &key, Object *val);
GBool dictIs(char *dictType);
- Object *dictLookup(char *key, Object *obj);
- Object *dictLookupNF(char *key, Object *obj);
- char *dictGetKey(int i);
+ Object *dictLookup(const UGooString &key, Object *obj);
+ Object *dictLookupNF(const UGooString &key, Object *obj);
+ UGooString *dictGetKey(int i);
Object *dictGetVal(int i, Object *obj);
Object *dictGetValNF(int i, Object *obj);
@@ -238,7 +239,7 @@
inline int Object::dictGetLength()
{ return dict->getLength(); }
-inline void Object::dictAdd(char *key, Object *val)
+inline void Object::dictAdd(const UGooString &key, Object *val)
{ dict->add(key, val); }
inline GBool Object::dictIs(char *dictType)
@@ -247,13 +248,13 @@
inline GBool Object::isDict(char *dictType)
{ return type == objDict && dictIs(dictType); }
-inline Object *Object::dictLookup(char *key, Object *obj)
+inline Object *Object::dictLookup(const UGooString &key, Object *obj)
{ return dict->lookup(key, obj); }
-inline Object *Object::dictLookupNF(char *key, Object *obj)
+inline Object *Object::dictLookupNF(const UGooString &key, Object *obj)
{ return dict->lookupNF(key, obj); }
-inline char *Object::dictGetKey(int i)
+inline UGooString *Object::dictGetKey(int i)
{ return dict->getKey(i); }
inline Object *Object::dictGetVal(int i, Object *obj)
Index: Outline.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/Outline.cc,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Outline.cc 15 Sep 2005 12:32:25 -0000 1.4
+++ Outline.cc 18 Jan 2006 22:32:13 -0000 1.5
@@ -18,6 +18,7 @@
#include "Link.h"
#include "PDFDocEncoding.h"
#include "Outline.h"
+#include "UGooString.h"
//------------------------------------------------------------------------
Index: PDFDoc.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/PDFDoc.cc,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- PDFDoc.cc 7 Dec 2005 08:42:21 -0000 1.9
+++ PDFDoc.cc 18 Jan 2006 22:32:13 -0000 1.10
@@ -38,6 +38,7 @@
#include "Outline.h"
#endif
#include "PDFDoc.h"
+#include "UGooString.h"
//------------------------------------------------------------------------
Index: PDFDoc.h
===================================================================
RCS file: /cvs/poppler/poppler/poppler/PDFDoc.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- PDFDoc.h 30 Oct 2005 20:29:05 -0000 1.6
+++ PDFDoc.h 18 Jan 2006 22:32:13 -0000 1.7
@@ -123,7 +123,7 @@
// Find a named destination. Returns the link destination, or
// NULL if <name> is not a destination.
- LinkDest *findDest(GooString *name)
+ LinkDest *findDest(UGooString *name)
{ return catalog->findDest(name); }
#ifndef DISABLE_OUTLINE
Index: PSOutputDev.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/PSOutputDev.cc,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- PSOutputDev.cc 30 Oct 2005 20:29:05 -0000 1.7
+++ PSOutputDev.cc 18 Jan 2006 22:32:13 -0000 1.8
@@ -35,6 +35,7 @@
#include "Stream.h"
#include "Annot.h"
#include "PSOutputDev.h"
+#include "UGooString.h"
#ifdef MACOS
// needed for setting type/creator of MacOS files
@@ -2188,7 +2189,9 @@
t3Cacheable = gFalse;
for (i = 0; i < charProcs->getLength(); ++i) {
writePS("/");
- writePSName(charProcs->getKey(i));
+ char *aux = charProcs->getKey(i)->getCString();
+ writePSName(aux);
+ delete[] aux;
writePS(" {\n");
gfx->display(charProcs->getVal(i, &charProc));
charProc.free();
Index: Page.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/Page.cc,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- Page.cc 8 Jan 2006 22:51:17 -0000 1.10
+++ Page.cc 18 Jan 2006 22:32:13 -0000 1.11
@@ -29,6 +29,7 @@
#endif
#include "Error.h"
#include "Page.h"
+#include "UGooString.h"
//------------------------------------------------------------------------
// PageAttrs
Index: PageLabelInfo.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/PageLabelInfo.cc,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- PageLabelInfo.cc 28 Jul 2005 22:56:17 -0000 1.2
+++ PageLabelInfo.cc 18 Jan 2006 22:32:13 -0000 1.3
@@ -2,6 +2,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
+#include "UGooString.h"
#include "PageLabelInfo.h"
Index: Parser.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/Parser.cc,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Parser.cc 17 Jan 2006 21:35:31 -0000 1.4
+++ Parser.cc 18 Jan 2006 22:32:13 -0000 1.5
@@ -20,6 +20,7 @@
#include "XRef.h"
#include "Error.h"
#include "Decrypt.h"
+#include "UGooString.h"
Parser::Parser(XRef *xrefA, Lexer *lexerA) {
xref = xrefA;
@@ -82,6 +83,7 @@
break;
}
obj->dictAdd(key, getObj(&obj2, fileKey, keyLength, objNum, objGen));
+ gfree(key);
}
}
if (buf1.isEOF())
Index: SecurityHandler.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/SecurityHandler.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- SecurityHandler.cc 16 Sep 2005 18:29:18 -0000 1.1
+++ SecurityHandler.cc 18 Jan 2006 22:32:13 -0000 1.2
@@ -26,6 +26,7 @@
# include "XpdfPluginAPI.h"
#endif
#include "SecurityHandler.h"
+#include "UGooString.h"
//------------------------------------------------------------------------
// SecurityHandler
Index: Stream.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/Stream.cc,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- Stream.cc 11 Jan 2006 16:52:58 -0000 1.10
+++ Stream.cc 18 Jan 2006 22:32:13 -0000 1.11
@@ -33,6 +33,7 @@
#include "JBIG2Stream.h"
#include "JPXStream.h"
#include "Stream-CCITT.h"
+#include "UGooString.h"
#ifdef ENABLE_LIBJPEG
#include "DCTStream.h"
Index: XRef.cc
===================================================================
RCS file: /cvs/poppler/poppler/poppler/XRef.cc,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- XRef.cc 17 Jan 2006 21:35:31 -0000 1.11
+++ XRef.cc 18 Jan 2006 22:32:13 -0000 1.12
@@ -24,6 +24,7 @@
#include "Dict.h"
#include "Error.h"
#include "ErrorCodes.h"
+#include "UGooString.h"
#include "XRef.h"
//------------------------------------------------------------------------
- Previous message: [poppler]
poppler/utils: HtmlOutputDev.cc, 1.2, 1.3 pdffonts.cc, 1.1,
1.2 pdfinfo.cc, 1.1, 1.2 pdftohtml.cc, 1.1, 1.2 pdftotext.cc,
1.1, 1.2
- Next message: [poppler] poppler: ChangeLog,1.290,1.291
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the poppler
mailing list