![]() |
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 | LoadCrossRefTable (FX_FILESIZE pos, bool skip) |
| 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 158 of file cpdf_parser.cpp.
References CPDF_Parser().
Referenced by CPDF_Parser(), and CPDF_Parser().
| CPDF_Parser::CPDF_Parser | ( | ) |
Definition at line 167 of file cpdf_parser.cpp.
References CPDF_Parser().
|
default |
| RetainPtr< CPDF_Dictionary > CPDF_Parser::GetCombinedTrailer | ( | ) | const |
Definition at line 977 of file cpdf_parser.cpp.
|
inline |
Definition at line 115 of file cpdf_parser.h.
Referenced by TEST(), TEST(), and TEST().
| FX_FILESIZE CPDF_Parser::GetDocumentSize | ( | ) | const |
Definition at line 1091 of file cpdf_parser.cpp.
| ByteString CPDF_Parser::GetEncodedPassword | ( | ) | const |
Definition at line 961 of file cpdf_parser.cpp.
| RetainPtr< const CPDF_Dictionary > CPDF_Parser::GetEncryptDict | ( | ) | const |
Definition at line 942 of file cpdf_parser.cpp.
References GetTrailer().
|
inline |
Definition at line 101 of file cpdf_parser.h.
Referenced by FPDF_GetFileVersion().
| uint32_t CPDF_Parser::GetFirstPageNo | ( | ) | const |
Definition at line 1095 of file cpdf_parser.cpp.
Referenced by FPDFAvail_GetFirstPageNum().
| RetainPtr< const CPDF_Array > CPDF_Parser::GetIDArray | ( | ) | const |
Definition at line 932 of file cpdf_parser.cpp.
References CPDF_Dictionary::GetArrayFor(), and GetTrailer().
| uint32_t CPDF_Parser::GetInfoObjNum | ( | ) | const |
Definition at line 983 of file cpdf_parser.cpp.
References CPDF_Object::kInvalidObjNum.
| uint32_t CPDF_Parser::GetLastObjNum | ( | ) | const |
Definition at line 171 of file cpdf_parser.cpp.
Referenced by IsValidObjectNumber(), and StartLinearizedParse().
|
inline |
Definition at line 83 of file cpdf_parser.h.
|
inline |
Definition at line 106 of file cpdf_parser.h.
| CPDF_Dictionary * CPDF_Parser::GetMutableTrailerForTesting | ( | ) |
Definition at line 969 of file cpdf_parser.cpp.
Referenced by CPDFSecurityHandlerEmbedderTest::RemoveTrailerIdFromDocument().
| FX_FILESIZE CPDF_Parser::GetObjectPositionOrZero | ( | uint32_t | objnum | ) | const |
Definition at line 181 of file cpdf_parser.cpp.
References CPDF_CrossRefTable::kNormal.
|
inline |
Definition at line 70 of file cpdf_parser.h.
| uint32_t CPDF_Parser::GetPermissions | ( | bool | get_owner_perms | ) | const |
Definition at line 1111 of file cpdf_parser.cpp.
| uint32_t CPDF_Parser::GetRootObjNum | ( | ) | const |
Definition at line 991 of file cpdf_parser.cpp.
References CPDF_Object::kInvalidObjNum.
Referenced by StartLinearizedParse(), and StartParseInternal().
|
inline |
Definition at line 96 of file cpdf_parser.h.
| const CPDF_Dictionary * CPDF_Parser::GetTrailer | ( | ) | const |
Definition at line 965 of file cpdf_parser.cpp.
Referenced by GetEncryptDict(), GetIDArray(), and StartLinearizedParse().
| std::vector< unsigned int > CPDF_Parser::GetTrailerEnds | ( | ) |
Definition at line 1258 of file cpdf_parser.cpp.
References CPDF_SyntaxParser::WordResult::is_number.
| uint32_t CPDF_Parser::GetTrailerObjectNumber | ( | ) | const |
Definition at line 973 of file cpdf_parser.cpp.
| bool CPDF_Parser::IsObjectFree | ( | uint32_t | objnum | ) | const |
Definition at line 186 of file cpdf_parser.cpp.
References CPDF_CrossRefTable::kFree.
| bool CPDF_Parser::IsValidObjectNumber | ( | uint32_t | objnum | ) | const |
Definition at line 177 of file cpdf_parser.cpp.
References GetLastObjNum().
Referenced by ParseIndirectObject().
|
inline |
Definition at line 102 of file cpdf_parser.h.
|
protected |
Definition at line 617 of file cpdf_parser.cpp.
Referenced by StartLinearizedParse(), and TEST().
| RetainPtr< CPDF_Object > CPDF_Parser::ParseIndirectObject | ( | uint32_t | objnum | ) |
Definition at line 999 of file cpdf_parser.cpp.
References IsValidObjectNumber(), CPDF_CrossRefTable::kCompressed, CPDF_CrossRefTable::kFree, and CPDF_CrossRefTable::kNormal.
|
inline |
Definition at line 121 of file cpdf_parser.h.
|
protected |
Definition at line 1117 of file cpdf_parser.cpp.
|
protected |
Definition at line 290 of file cpdf_parser.cpp.
References CPDF_SyntaxParser::WordResult::is_number.
Referenced by StartParseInternal(), TEST(), and TEST().
|
protected |
Definition at line 703 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 1099 of file cpdf_parser.cpp.
|
protected |
Definition at line 1253 of file cpdf_parser.cpp.
| CPDF_Parser::Error CPDF_Parser::StartLinearizedParse | ( | RetainPtr< CPDF_ReadValidator > | validator, |
| const ByteString & | password ) |
Definition at line 1121 of file cpdf_parser.cpp.
References FORMAT_ERROR, CPDF_Dictionary::GetDirectIntegerFor(), GetLastObjNum(), GetRootObjNum(), GetTrailer(), CPDF_Object::kInvalidObjNum, LoadCrossRefTable(), RebuildCrossRef(), StartParseInternal(), and SUCCESS.
| CPDF_Parser::Error CPDF_Parser::StartParse | ( | RetainPtr< IFX_SeekableReadStream > | pFile, |
| const ByteString & | password ) |
Definition at line 221 of file cpdf_parser.cpp.
References FORMAT_ERROR, and StartParseInternal().
|
protected |
Definition at line 231 of file cpdf_parser.cpp.
References FORMAT_ERROR, 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 1302 of file cpdf_parser.cpp.
|
inline |
Definition at line 110 of file cpdf_parser.h.
|
friend |
Definition at line 138 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().