Commit 1ab07faf authored by Hib Eris's avatar Hib Eris Committed by Albert Astals Cid
Browse files

Add PDFDoc::ErrorPDFDoc

parent efc7e5ef
......@@ -88,6 +88,11 @@ void PDFDoc::init()
#endif
}
PDFDoc::PDFDoc()
{
init();
}
PDFDoc::PDFDoc(GooString *fileNameA, GooString *ownerPassword,
GooString *userPassword, void *guiDataA) {
Object obj;
......@@ -902,3 +907,12 @@ void PDFDoc::writeTrailer (Guint uxrefOffset, int uxrefSize, OutStream* outStr,
delete trailerDict;
}
PDFDoc *PDFDoc::ErrorPDFDoc(int errorCode, GooString *fileNameA)
{
PDFDoc *doc = new PDFDoc();
doc->errCode = errorCode;
doc->fileName = fileNameA;
return doc;
}
......@@ -74,6 +74,8 @@ public:
GooString *userPassword = NULL, void *guiDataA = NULL);
~PDFDoc();
static PDFDoc *ErrorPDFDoc(int errorCode, GooString *fileNameA = NULL);
// Was PDF document successfully opened?
GBool isOk() { return ok; }
......@@ -227,6 +229,7 @@ private:
void saveIncrementalUpdate (OutStream* outStr);
void saveCompleteRewrite (OutStream* outStr);
PDFDoc();
void init();
GBool setup(GooString *ownerPassword, GooString *userPassword);
GBool checkFooter();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment