X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;ds=sidebyside;f=pdf%2Fxpdf%2FXRef.h;h=bec487a114756674f828afd31ff071b2b7f0fc16;hb=9e920bcf5162b7f187cd3ed5026baa2bd155631c;hp=ebe5b5434b731e07227b32cea58ee03b714aeab5;hpb=64676031423465996e83c4a685290f0c3d97a249;p=evince.git diff --git a/pdf/xpdf/XRef.h b/pdf/xpdf/XRef.h index ebe5b543..bec487a1 100644 --- a/pdf/xpdf/XRef.h +++ b/pdf/xpdf/XRef.h @@ -2,7 +2,7 @@ // // XRef.h // -// Copyright 1996-2002 Glyph & Cog, LLC +// Copyright 1996-2003 Glyph & Cog, LLC // //======================================================================== @@ -20,15 +20,23 @@ class Dict; class Stream; +class Parser; +class ObjectStream; //------------------------------------------------------------------------ // XRef //------------------------------------------------------------------------ +enum XRefEntryType { + xrefEntryFree, + xrefEntryUncompressed, + xrefEntryCompressed +}; + struct XRefEntry { Guint offset; int gen; - GBool used; + XRefEntryType type; }; class XRef { @@ -103,6 +111,7 @@ private: Guint *streamEnds; // 'endstream' positions - only used in // damaged files int streamEndsLen; // number of valid entries in streamEnds + ObjectStream *objStr; // cached object stream #ifndef NO_DECRYPTION GBool encrypted; // true if file is encrypted int encVersion; // encryption algorithm @@ -113,8 +122,11 @@ private: GBool ownerPasswordOk; // true if owner password is correct #endif - Guint readTrailer(); + Guint getStartXref(); GBool readXRef(Guint *pos); + GBool readXRefTable(Parser *parser, Guint *pos); + GBool readXRefStreamSection(Stream *xrefStr, int *w, int first, int n); + GBool readXRefStream(Stream *xrefStr, Guint *pos); GBool constructXRef(); GBool checkEncrypted(GString *ownerPassword, GString *userPassword); Guint strToUnsigned(char *s);