summaryrefslogtreecommitdiff
path: root/Build/source/libs
diff options
context:
space:
mode:
authorHartmut Henkel <hartmut_henkel@gmx.de>2010-04-06 21:04:12 +0000
committerHartmut Henkel <hartmut_henkel@gmx.de>2010-04-06 21:04:12 +0000
commit20433427e63ae84544e3a314f2345cb5b7d51b1c (patch)
tree08a64b972d363aa6dfc4aebf0975280be9edafa8 /Build/source/libs
parent8df732286e6f6d11222d83f90b15ec42f7059d7c (diff)
add local xpdf patch needed by luatex in pdftoepdf.cc
(reported to Derek) git-svn-id: svn://tug.org/texlive/trunk@17734 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs')
-rw-r--r--Build/source/libs/xpdf/xpdf-3.02-PATCHES/ChangeLog4
-rw-r--r--Build/source/libs/xpdf/xpdf-3.02-PATCHES/patch-45-getmetadatanf103
-rw-r--r--Build/source/libs/xpdf/xpdf-3.02/xpdf/Page.cc10
-rw-r--r--Build/source/libs/xpdf/xpdf-3.02/xpdf/Page.h15
4 files changed, 132 insertions, 0 deletions
diff --git a/Build/source/libs/xpdf/xpdf-3.02-PATCHES/ChangeLog b/Build/source/libs/xpdf/xpdf-3.02-PATCHES/ChangeLog
index 6d64ef89fd0..f21b732be73 100644
--- a/Build/source/libs/xpdf/xpdf-3.02-PATCHES/ChangeLog
+++ b/Build/source/libs/xpdf/xpdf-3.02-PATCHES/ChangeLog
@@ -1,3 +1,7 @@
+2010-04-06 Hartmut Henkel <hartmut_henkel@gmx.de>
+
+ * patch-45-getmetadatanf needed by pdftoepdf.cc
+
2009-09-15 Peter Breitenlohner <peb@mppmu.mpg.de>
* patch-04-pl4 (new): Official 3.02pl4 patch plus change of
diff --git a/Build/source/libs/xpdf/xpdf-3.02-PATCHES/patch-45-getmetadatanf b/Build/source/libs/xpdf/xpdf-3.02-PATCHES/patch-45-getmetadatanf
new file mode 100644
index 00000000000..b40b0915795
--- /dev/null
+++ b/Build/source/libs/xpdf/xpdf-3.02-PATCHES/patch-45-getmetadatanf
@@ -0,0 +1,103 @@
+--- xpdf-orig/xpdf/Page.cc 2007-02-27 23:05:52.000000000 +0100
++++ xpdf-3.02/xpdf/Page.cc 2010-04-06 21:22:17.000000000 +0200
+@@ -5,6 +5,9 @@
+ // Copyright 1996-2007 Glyph & Cog, LLC
+ //
+ //========================================================================
++//
++// Copyright 2009 Hartmut Henkel <hartmut_henkel@gmx.de>
++// for added metadataNF and resourcesNF needed by luatex
+
+ #include <aconf.h>
+
+@@ -126,6 +129,10 @@
+ dict->lookup("BoxColorInfo", &boxColorInfo);
+ dict->lookup("Group", &group);
+ dict->lookup("Metadata", &metadata);
++
++ // much better would be to get direct access to the page dictionary, but how?
++ dict->lookupNF("Metadata", &metadataNF);
++
+ dict->lookup("PieceInfo", &pieceInfo);
+ dict->lookup("SeparationInfo", &separationInfo);
+
+@@ -136,6 +143,7 @@
+ obj1.copy(&resources);
+ }
+ obj1.free();
++ dict->lookupNF("Resources", &resourcesNF);
+ }
+
+ PageAttrs::~PageAttrs() {
+@@ -143,9 +151,11 @@
+ boxColorInfo.free();
+ group.free();
+ metadata.free();
++ metadataNF.free();
+ pieceInfo.free();
+ separationInfo.free();
+ resources.free();
++ resourcesNF.free();
+ }
+
+ GBool PageAttrs::readBox(Dict *dict, char *key, PDFRectangle *box) {
+--- xpdf-orig/xpdf/Page.h 2007-02-27 23:05:52.000000000 +0100
++++ xpdf-3.02/xpdf/Page.h 2010-04-06 21:21:51.000000000 +0200
+@@ -5,6 +5,10 @@
+ // Copyright 1996-2003 Glyph & Cog, LLC
+ //
+ //========================================================================
++//
++// Copyright 2009 Hartmut Henkel <hartmut_henkel@gmx.de>
++// for added metadataNF, resourcesNF, getMetadataNF, and getResourcesNF
++// needed by luatex
+
+ #ifndef PAGE_H
+ #define PAGE_H
+@@ -68,6 +72,10 @@
+ { return group.isDict() ? group.getDict() : (Dict *)NULL; }
+ Stream *getMetadata()
+ { return metadata.isStream() ? metadata.getStream() : (Stream *)NULL; }
++
++ // much better would be to get direct access to the page dictionary, but how?
++ Object * getMetadataNF() { return &metadataNF; }
++
+ Dict *getPieceInfo()
+ { return pieceInfo.isDict() ? pieceInfo.getDict() : (Dict *)NULL; }
+ Dict *getSeparationInfo()
+@@ -76,6 +84,9 @@
+ Dict *getResourceDict()
+ { return resources.isDict() ? resources.getDict() : (Dict *)NULL; }
+
++ // much better would be to get direct access to the page dictionary, but how?
++ Object *getResourcesNF() { return &resourcesNF; }
++
+ private:
+
+ GBool readBox(Dict *dict, char *key, PDFRectangle *box);
+@@ -91,9 +102,11 @@
+ Object boxColorInfo;
+ Object group;
+ Object metadata;
++ Object metadataNF;
+ Object pieceInfo;
+ Object separationInfo;
+ Object resources;
++ Object resourcesNF;
+ };
+
+ //------------------------------------------------------------------------
+@@ -133,11 +146,13 @@
+ Dict *getBoxColorInfo() { return attrs->getBoxColorInfo(); }
+ Dict *getGroup() { return attrs->getGroup(); }
+ Stream *getMetadata() { return attrs->getMetadata(); }
++ Object *getMetadataNF() { return attrs->getMetadataNF(); }
+ Dict *getPieceInfo() { return attrs->getPieceInfo(); }
+ Dict *getSeparationInfo() { return attrs->getSeparationInfo(); }
+
+ // Get resource dictionary.
+ Dict *getResourceDict() { return attrs->getResourceDict(); }
++ Object *getResourcesNF() { return attrs->getResourcesNF(); }
+
+ // Get annotations array.
+ Object *getAnnots(Object *obj) { return annots.fetch(xref, obj); }
diff --git a/Build/source/libs/xpdf/xpdf-3.02/xpdf/Page.cc b/Build/source/libs/xpdf/xpdf-3.02/xpdf/Page.cc
index 6b52ba936ff..ebf13b9e8bb 100644
--- a/Build/source/libs/xpdf/xpdf-3.02/xpdf/Page.cc
+++ b/Build/source/libs/xpdf/xpdf-3.02/xpdf/Page.cc
@@ -5,6 +5,9 @@
// Copyright 1996-2007 Glyph & Cog, LLC
//
//========================================================================
+//
+// Copyright 2009 Hartmut Henkel <hartmut_henkel@gmx.de>
+// for added metadataNF and resourcesNF needed by luatex
#include <aconf.h>
@@ -126,6 +129,10 @@ PageAttrs::PageAttrs(PageAttrs *attrs, Dict *dict) {
dict->lookup("BoxColorInfo", &boxColorInfo);
dict->lookup("Group", &group);
dict->lookup("Metadata", &metadata);
+
+ // much better would be to get direct access to the page dictionary, but how?
+ dict->lookupNF("Metadata", &metadataNF);
+
dict->lookup("PieceInfo", &pieceInfo);
dict->lookup("SeparationInfo", &separationInfo);
@@ -136,6 +143,7 @@ PageAttrs::PageAttrs(PageAttrs *attrs, Dict *dict) {
obj1.copy(&resources);
}
obj1.free();
+ dict->lookupNF("Resources", &resourcesNF);
}
PageAttrs::~PageAttrs() {
@@ -143,9 +151,11 @@ PageAttrs::~PageAttrs() {
boxColorInfo.free();
group.free();
metadata.free();
+ metadataNF.free();
pieceInfo.free();
separationInfo.free();
resources.free();
+ resourcesNF.free();
}
GBool PageAttrs::readBox(Dict *dict, char *key, PDFRectangle *box) {
diff --git a/Build/source/libs/xpdf/xpdf-3.02/xpdf/Page.h b/Build/source/libs/xpdf/xpdf-3.02/xpdf/Page.h
index 2b011756e85..3526c65e3bc 100644
--- a/Build/source/libs/xpdf/xpdf-3.02/xpdf/Page.h
+++ b/Build/source/libs/xpdf/xpdf-3.02/xpdf/Page.h
@@ -5,6 +5,10 @@
// Copyright 1996-2003 Glyph & Cog, LLC
//
//========================================================================
+//
+// Copyright 2009 Hartmut Henkel <hartmut_henkel@gmx.de>
+// for added metadataNF, resourcesNF, getMetadataNF, and getResourcesNF
+// needed by luatex
#ifndef PAGE_H
#define PAGE_H
@@ -68,6 +72,10 @@ public:
{ return group.isDict() ? group.getDict() : (Dict *)NULL; }
Stream *getMetadata()
{ return metadata.isStream() ? metadata.getStream() : (Stream *)NULL; }
+
+ // much better would be to get direct access to the page dictionary, but how?
+ Object * getMetadataNF() { return &metadataNF; }
+
Dict *getPieceInfo()
{ return pieceInfo.isDict() ? pieceInfo.getDict() : (Dict *)NULL; }
Dict *getSeparationInfo()
@@ -76,6 +84,9 @@ public:
Dict *getResourceDict()
{ return resources.isDict() ? resources.getDict() : (Dict *)NULL; }
+ // much better would be to get direct access to the page dictionary, but how?
+ Object *getResourcesNF() { return &resourcesNF; }
+
private:
GBool readBox(Dict *dict, char *key, PDFRectangle *box);
@@ -91,9 +102,11 @@ private:
Object boxColorInfo;
Object group;
Object metadata;
+ Object metadataNF;
Object pieceInfo;
Object separationInfo;
Object resources;
+ Object resourcesNF;
};
//------------------------------------------------------------------------
@@ -133,11 +146,13 @@ public:
Dict *getBoxColorInfo() { return attrs->getBoxColorInfo(); }
Dict *getGroup() { return attrs->getGroup(); }
Stream *getMetadata() { return attrs->getMetadata(); }
+ Object *getMetadataNF() { return attrs->getMetadataNF(); }
Dict *getPieceInfo() { return attrs->getPieceInfo(); }
Dict *getSeparationInfo() { return attrs->getSeparationInfo(); }
// Get resource dictionary.
Dict *getResourceDict() { return attrs->getResourceDict(); }
+ Object *getResourcesNF() { return attrs->getResourcesNF(); }
// Get annotations array.
Object *getAnnots(Object *obj) { return annots.fetch(xref, obj); }