![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <cpdf_parser.h>
Classes | |
class | ParsedObjectsHolder |
Public Types | |
enum | Error { SUCCESS = 0 , FILE_ERROR , FORMAT_ERROR , PASSWORD_ERROR , HANDLER_ERROR } |
Static Public Attributes | |
static constexpr uint32_t | kMaxObjectNumber = 4 * 1024 * 1024 |
static constexpr size_t | kInvalidPos = std::numeric_limits<size_t>::max() |
Protected Member Functions | |
bool | LoadCrossRefV4 (FX_FILESIZE pos, bool bSkip) |
bool | RebuildCrossRef () |
Error | StartParseInternal () |
FX_FILESIZE | ParseStartXRef () |
std::unique_ptr< CPDF_LinearizedHeader > | ParseLinearizedHeader () |
void | SetSyntaxParserForTesting (std::unique_ptr< CPDF_SyntaxParser > parser) |
Friends | |
class | CPDF_DataAvail |
Definition at line 37 of file cpdf_parser.h.
enum CPDF_Parser::Error |
Enumerator | |
---|---|
SUCCESS | |
FILE_ERROR | |
FORMAT_ERROR | |
PASSWORD_ERROR | |
HANDLER_ERROR |
Definition at line 44 of file cpdf_parser.h.
|
explicit |
Definition at line 155 of file cpdf_parser.cpp.
References CPDF_Parser().
Referenced by CPDF_Parser(), and CPDF_Parser().
CPDF_Parser::CPDF_Parser | ( | ) |
Definition at line 164 of file cpdf_parser.cpp.
References CPDF_Parser().
|
default |
RetainPtr< CPDF_Dictionary > CPDF_Parser::GetCombinedTrailer | ( | ) | const |
Definition at line 978 of file cpdf_parser.cpp.
|
inline |
Definition at line 117 of file cpdf_parser.h.
Referenced by TEST(), TEST(), and TEST().
FX_FILESIZE CPDF_Parser::GetDocumentSize | ( | ) | const |
Definition at line 1083 of file cpdf_parser.cpp.
ByteString CPDF_Parser::GetEncodedPassword | ( | ) | const |
Definition at line 962 of file cpdf_parser.cpp.
RetainPtr< const CPDF_Dictionary > CPDF_Parser::GetEncryptDict | ( | ) | const |
Definition at line 943 of file cpdf_parser.cpp.
References GetTrailer().
|
inline |
Definition at line 105 of file cpdf_parser.h.
Referenced by FPDF_GetFileVersion().
uint32_t CPDF_Parser::GetFirstPageNo | ( | ) | const |
Definition at line 1087 of file cpdf_parser.cpp.
Referenced by FPDFAvail_GetFirstPageNum().
RetainPtr< const CPDF_Array > CPDF_Parser::GetIDArray | ( | ) | const |
Definition at line 933 of file cpdf_parser.cpp.
References CPDF_Dictionary::GetArrayFor(), and GetTrailer().
uint32_t CPDF_Parser::GetInfoObjNum | ( | ) | const |
Definition at line 984 of file cpdf_parser.cpp.
References CPDF_Object::kInvalidObjNum.
uint32_t CPDF_Parser::GetLastObjNum | ( | ) | const |
Definition at line 168 of file cpdf_parser.cpp.
Referenced by IsValidObjectNumber(), and StartLinearizedParse().
|
inline |
Definition at line 85 of file cpdf_parser.h.
|
inline |
Definition at line 113 of file cpdf_parser.h.
CPDF_Dictionary * CPDF_Parser::GetMutableTrailerForTesting | ( | ) |
Definition at line 970 of file cpdf_parser.cpp.
Referenced by CPDFSecurityHandlerEmbedderTest::RemoveTrailerIdFromDocument().
FX_FILESIZE CPDF_Parser::GetObjectPositionOrZero | ( | uint32_t | objnum | ) | const |
Definition at line 178 of file cpdf_parser.cpp.
References CPDF_CrossRefTable::kNormal.
Referenced by ParseIndirectObject().
|
inline |
Definition at line 71 of file cpdf_parser.h.
uint32_t CPDF_Parser::GetPermissions | ( | bool | get_owner_perms | ) | const |
Definition at line 1103 of file cpdf_parser.cpp.
RetainPtr< const CPDF_Dictionary > CPDF_Parser::GetRoot | ( | ) | const |
Definition at line 937 of file cpdf_parser.cpp.
Referenced by StartParseInternal().
uint32_t CPDF_Parser::GetRootObjNum | ( | ) | const |
Definition at line 992 of file cpdf_parser.cpp.
References CPDF_Object::kInvalidObjNum.
Referenced by StartLinearizedParse(), and StartParseInternal().
|
inline |
Definition at line 100 of file cpdf_parser.h.
const CPDF_Dictionary * CPDF_Parser::GetTrailer | ( | ) | const |
Definition at line 966 of file cpdf_parser.cpp.
Referenced by GetEncryptDict(), GetIDArray(), and StartLinearizedParse().
std::vector< unsigned int > CPDF_Parser::GetTrailerEnds | ( | ) |
Definition at line 1252 of file cpdf_parser.cpp.
References CPDF_SyntaxParser::WordResult::is_number.
uint32_t CPDF_Parser::GetTrailerObjectNumber | ( | ) | const |
Definition at line 974 of file cpdf_parser.cpp.
bool CPDF_Parser::IsObjectFree | ( | uint32_t | objnum | ) | const |
Definition at line 201 of file cpdf_parser.cpp.
References CPDF_CrossRefTable::kFree.
bool CPDF_Parser::IsObjectFreeOrNull | ( | uint32_t | objnum | ) | const |
Definition at line 189 of file cpdf_parser.cpp.
References CPDF_CrossRefTable::kCompressed, CPDF_CrossRefTable::kFree, CPDF_CrossRefTable::kNormal, and CPDF_CrossRefTable::kNull.
bool CPDF_Parser::IsValidObjectNumber | ( | uint32_t | objnum | ) | const |
Definition at line 174 of file cpdf_parser.cpp.
References GetLastObjNum().
Referenced by ParseIndirectObject().
|
inline |
Definition at line 106 of file cpdf_parser.h.
|
protected |
Definition at line 636 of file cpdf_parser.cpp.
Referenced by StartLinearizedParse(), and TEST().
RetainPtr< CPDF_Object > CPDF_Parser::ParseIndirectObject | ( | uint32_t | objnum | ) |
Definition at line 1000 of file cpdf_parser.cpp.
References GetObjectPositionOrZero(), IsValidObjectNumber(), CPDF_CrossRefTable::kCompressed, CPDF_CrossRefTable::kNormal, and ParseIndirectObjectAt().
RetainPtr< CPDF_Object > CPDF_Parser::ParseIndirectObjectAt | ( | FX_FILESIZE | pos, |
uint32_t | objnum ) |
Definition at line 1062 of file cpdf_parser.cpp.
Referenced by ParseIndirectObject().
|
protected |
Definition at line 1109 of file cpdf_parser.cpp.
|
protected |
Definition at line 304 of file cpdf_parser.cpp.
References CPDF_SyntaxParser::WordResult::is_number.
Referenced by StartParseInternal(), TEST(), and TEST().
|
protected |
Definition at line 695 of file cpdf_parser.cpp.
References CPDF_SyntaxParser::WordResult::is_number, kMaxObjectNumber, and fxcrt::ByteString::operator==().
Referenced by StartLinearizedParse(), StartParseInternal(), TEST(), and TEST().
void CPDF_Parser::SetLinearizedHeaderForTesting | ( | std::unique_ptr< CPDF_LinearizedHeader > | pLinearized | ) |
Definition at line 1091 of file cpdf_parser.cpp.
|
inline |
Definition at line 70 of file cpdf_parser.h.
Referenced by StartLinearizedParse(), and StartParse().
|
protected |
Definition at line 1247 of file cpdf_parser.cpp.
CPDF_Parser::Error CPDF_Parser::StartLinearizedParse | ( | RetainPtr< CPDF_ReadValidator > | validator, |
const ByteString & | password ) |
Definition at line 1113 of file cpdf_parser.cpp.
References FORMAT_ERROR, CPDF_Dictionary::GetDirectIntegerFor(), GetLastObjNum(), GetRootObjNum(), GetTrailer(), CPDF_Object::kInvalidObjNum, LoadCrossRefV4(), RebuildCrossRef(), SetPassword(), StartParseInternal(), and SUCCESS.
CPDF_Parser::Error CPDF_Parser::StartParse | ( | RetainPtr< IFX_SeekableReadStream > | pFile, |
const ByteString & | password ) |
Definition at line 234 of file cpdf_parser.cpp.
References FORMAT_ERROR, SetPassword(), and StartParseInternal().
|
protected |
Definition at line 244 of file cpdf_parser.cpp.
References FORMAT_ERROR, GetRoot(), GetRootObjNum(), CPDF_Object::kInvalidObjNum, ParseStartXRef(), RebuildCrossRef(), and SUCCESS.
Referenced by StartLinearizedParse(), StartParse(), and TEST().
bool CPDF_Parser::WriteToArchive | ( | IFX_ArchiveStream * | archive, |
FX_FILESIZE | src_size ) |
Definition at line 1296 of file cpdf_parser.cpp.
|
inline |
Definition at line 121 of file cpdf_parser.h.
|
friend |
Definition at line 139 of file cpdf_parser.h.
|
staticconstexpr |
Definition at line 59 of file cpdf_parser.h.
|
staticconstexpr |
Definition at line 57 of file cpdf_parser.h.
Referenced by CPDF_CrossRefTable::AddCompressed(), CPDF_CrossRefTable::AddNormal(), CPDF_HintTables::ReadPageHintTable(), CPDF_HintTables::ReadSharedObjHintTable(), RebuildCrossRef(), CPDF_CrossRefTable::SetFree(), and TEST_F().