7#ifndef CORE_FXCODEC_JBIG2_JBIG2_DOCUMENTCONTEXT_H_
8#define CORE_FXCODEC_JBIG2_JBIG2_DOCUMENTCONTEXT_H_
17using CJBig2_CompoundKey =
std::pair<uint64_t, uint32_t>;
18using CJBig2_CachePair =
19 std::pair<CJBig2_CompoundKey, std::unique_ptr<CJBig2_SymbolDict>>;
28 return &m_SymbolDictCache;
32 std::list<CJBig2_CachePair> m_SymbolDictCache;
bool KeyExist(const ByteString &key) const
int GetIntegerFor(const ByteString &key) const
RetainPtr< const CPDF_Dictionary > GetDictFor(const ByteString &key) const
virtual bool ContainsExtensionForm() const =0
virtual ~RenderDataIface()
~CPDF_Document() override
JBig2_DocumentContext * GetOrCreateCodecContext()
CPDF_Parser::Error LoadLinearizedDoc(RetainPtr< CPDF_ReadValidator > validator, const ByteString &password)
RetainPtr< CPDF_Object > ParseIndirectObject(uint32_t objnum) override
bool IsPageLoaded(int iPage) const
RetainPtr< const CPDF_Dictionary > GetPageDictionary(int iPage)
RetainPtr< CPDF_Dictionary > CreateNewPage(int iPage)
void DeletePage(int iPage)
bool IsModifiedAPStream(const CPDF_Stream *stream) const
RetainPtr< const CPDF_Array > GetFileIdentifier() const
void MaybePurgeImage(uint32_t objnum)
void MaybePurgeFontFileStreamAcc(RetainPtr< CPDF_StreamAcc > &&pStreamAcc)
RetainPtr< CPDF_Dictionary > GetInfo()
CPDF_Document(std::unique_ptr< RenderDataIface > pRenderData, std::unique_ptr< PageDataIface > pPageData)
CPDF_Parser::Error LoadDoc(RetainPtr< IFX_SeekableReadStream > pFileAccess, const ByteString &password)
void ResizePageListForTesting(size_t size)
RetainPtr< CPDF_Dictionary > GetMutablePageDictionary(int iPage)
bool MovePages(pdfium::span< const int > page_indices, int dest_page_index)
int GetPageIndex(uint32_t objnum)
Extension * GetExtension() const
uint32_t GetUserPermissions(bool get_owner_perms) const
RetainPtr< CPDF_StreamAcc > GetFontFileStreamAcc(RetainPtr< const CPDF_Stream > pFontStream)
void SetRootForTesting(RetainPtr< CPDF_Dictionary > root)
static bool IsValidPageObject(const CPDF_Object *obj)
const CPDF_Dictionary * GetRoot() const
void SetParser(std::unique_ptr< CPDF_Parser > pParser)
static constexpr int kPageMaxNum
void SetPageObjNum(int iPage, uint32_t objNum)
RetainPtr< CPDF_Stream > CreateModifiedAPStream()
void DeleteIndirectObject(uint32_t objnum)
RetainPtr< CPDF_Object > GetOrParseIndirectObject(uint32_t objnum)
uint32_t GetObjNum() const
std::list< CJBig2_CachePair > * GetSymbolDictCache()
bool operator==(const char *ptr) const
const CPDF_Dictionary * ToDictionary(const CPDF_Object *obj)