mirror of
https://github.com/ONLYOFFICE/core.git
synced 2026-07-11 06:22:44 +08:00
git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@62550 954022d7-b5bf-4e40-9824-e11837661b57
51 lines
1.4 KiB
C++
51 lines
1.4 KiB
C++
#ifndef _PDF_READER_PARSER_H
|
||
#define _PDF_READER_PARSER_H
|
||
|
||
#include "Lexer.h"
|
||
|
||
namespace PdfReader
|
||
{
|
||
//------------------------------------------------------------------------
|
||
// Parser
|
||
//------------------------------------------------------------------------
|
||
|
||
class Parser
|
||
{
|
||
public:
|
||
|
||
Parser(XRef *pXref, Lexer *pLexer, bool bAllowStreams);
|
||
|
||
~Parser();
|
||
|
||
// Считываем следующий объект из потока.
|
||
Object *GetObject(Object *pObject, unsigned char *sDecryptKey = NULL, CryptAlgorithm eEncryptAlgorithm = cryptRC4, int nKeyLength = 0, int nObjectNum = 0, int nObjectGen = 0);
|
||
|
||
Stream *GetStream()
|
||
{
|
||
return m_pLexer->GetStream();
|
||
}
|
||
|
||
int GetPos()
|
||
{
|
||
return m_pLexer->GetPos();
|
||
}
|
||
|
||
private:
|
||
|
||
Stream *CreateStream(Object *pDict, unsigned char *sDecryptKey, CryptAlgorithm eEncryptAlgorithm, int nKeyLength, int nObjectNum, int nObjectGen);
|
||
void Shift();
|
||
|
||
private:
|
||
|
||
XRef *m_pXref; // Таблица Xref для даннthe xref table for this PDF file
|
||
Lexer *m_pLexer; // Входящий поток
|
||
bool m_bAllowStreams; // Будем ли парсить Stream Objects?
|
||
Object m_oBuffer1; // Два следующих объекта
|
||
Object m_oBuffer2; //
|
||
int m_nInlineImage; // Устанавливаем, когда сталкиваемся с Inline Image
|
||
};
|
||
}
|
||
|
||
#endif // _PDF_READER_PARSER_H
|
||
|