summaryrefslogtreecommitdiff
path: root/noncore/unsupported/qpdf/xpdf/PDFDoc.cc
Side-by-side diff
Diffstat (limited to 'noncore/unsupported/qpdf/xpdf/PDFDoc.cc') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/qpdf/xpdf/PDFDoc.cc16
1 files changed, 12 insertions, 4 deletions
diff --git a/noncore/unsupported/qpdf/xpdf/PDFDoc.cc b/noncore/unsupported/qpdf/xpdf/PDFDoc.cc
index 4bbe9b7..97dfa55 100644
--- a/noncore/unsupported/qpdf/xpdf/PDFDoc.cc
+++ b/noncore/unsupported/qpdf/xpdf/PDFDoc.cc
@@ -4,3 +4,3 @@
//
-// Copyright 1996 Derek B. Noonburg
+// Copyright 1996-2002 Glyph & Cog, LLC
//
@@ -26,2 +26,3 @@
#include "Error.h"
+#include "ErrorCodes.h"
#include "Lexer.h"
@@ -45,2 +46,3 @@ PDFDoc::PDFDoc(GString *fileNameA, GString *ownerPassword,
ok = gFalse;
+ errCode = errNone;
@@ -59,2 +61,3 @@ PDFDoc::PDFDoc(GString *fileNameA, GString *ownerPassword,
error(-1, "Couldn't open file '%s'", fileName->getCString());
+ errCode = errOpenFile;
return;
@@ -70,2 +73,3 @@ PDFDoc::PDFDoc(GString *fileNameA, GString *ownerPassword,
delete fileName2;
+ errCode = errOpenFile;
return;
@@ -79,3 +83,3 @@ PDFDoc::PDFDoc(GString *fileNameA, GString *ownerPassword,
obj.initNull();
- str = new FileStream(file, 0, -1, &obj);
+ str = new FileStream(file, 0, gFalse, 0, &obj);
@@ -87,2 +91,3 @@ PDFDoc::PDFDoc(BaseStream *strA, GString *ownerPassword,
ok = gFalse;
+ errCode = errNone;
fileName = NULL;
@@ -105,2 +110,3 @@ GBool PDFDoc::setup(GString *ownerPassword, GString *userPassword) {
error(-1, "Couldn't read xref table");
+ errCode = xref->getErrorCode();
return gFalse;
@@ -112,2 +118,3 @@ GBool PDFDoc::setup(GString *ownerPassword, GString *userPassword) {
error(-1, "Couldn't read page catalog");
+ errCode = errBadCatalog;
return gFalse;
@@ -206,4 +213,5 @@ GBool PDFDoc::isLinearized() {
obj1.initNull();
- parser = new Parser(xref, new Lexer(xref, str->makeSubStream(str->getStart(),
- -1, &obj1)));
+ parser = new Parser(xref,
+ new Lexer(xref,
+ str->makeSubStream(str->getStart(), gFalse, 0, &obj1)));
parser->getObj(&obj1);