20#ifndef INCLUDED_SDEXT_SOURCE_PDFIMPORT_INC_PDFPARSE_HXX
21#define INCLUDED_SDEXT_SOURCE_PDFIMPORT_INC_PDFPARSE_HXX
24#include <rtl/ustring.hxx>
25#include <rtl/string.hxx>
28#include <unordered_map>
41 virtual bool write(
const void* pBuf,
unsigned int nLen ) = 0;
43 virtual bool copyOrigBytes(
unsigned int nOrigOffset,
unsigned int nLen ) = 0;
44 virtual unsigned int readOrigBytes(
unsigned int nOrigOffset,
unsigned int nLen,
void* pBuf ) = 0;
169 void cloneSubElements( std::vector<std::unique_ptr<PDFEntry>>& rNewSubElements )
const;
186 typedef std::unordered_map<OString,PDFEntry*>
Map;
196 void insertValue(
const OString& rName, std::unique_ptr<PDFEntry> pValue );
229struct PDFFileImplData;
233 mutable std::unique_ptr<PDFFileImplData>
m_pData;
256 unsigned int nObject,
unsigned int nGeneration )
const;
295 static std::unique_ptr<PDFEntry>
read(
const char* pFileName );
297 static std::unique_ptr<PDFEntry>
read(
const char* pBuffer,
unsigned int nLen );
EmitContext(const PDFContainer *pTop=nullptr)
virtual bool copyOrigBytes(unsigned int nOrigOffset, unsigned int nLen)=0
virtual unsigned int readOrigBytes(unsigned int nOrigOffset, unsigned int nLen, void *pBuf)=0
virtual bool write(const void *pBuf, unsigned int nLen)=0
std::unique_ptr< EmitImplData > m_pImplData
virtual unsigned int getCurPos()=0
virtual bool emit(EmitContext &rWriteContext) const override
virtual ~PDFArray() override
virtual PDFEntry * clone() const override
virtual PDFEntry * clone() const override
virtual ~PDFBool() override
virtual bool emit(EmitContext &rWriteContext) const override
bool emitSubElements(EmitContext &rWriteContext) const
PDFObject * findObject(unsigned int nNumber, unsigned int nGeneration) const
void cloneSubElements(std::vector< std::unique_ptr< PDFEntry > > &rNewSubElements) const
PDFObject * findObject(PDFObjectRef const *pRef) const
std::vector< std::unique_ptr< PDFEntry > > m_aSubElements
virtual ~PDFContainer() override
std::unordered_map< OString, PDFEntry * > Map
void eraseValue(std::string_view rName)
void insertValue(const OString &rName, std::unique_ptr< PDFEntry > pValue)
virtual bool emit(EmitContext &rWriteContext) const override
virtual PDFEntry * clone() const override
virtual ~PDFDict() override
virtual bool emit(EmitContext &rWriteContext) const =0
static void setEmitData(EmitContext &rContext, EmitImplData *pNewEmitData)
virtual PDFEntry * clone() const =0
static EmitImplData * getEmitData(EmitContext const &rContext)
bool usesSupportedEncryptionFormat() const
virtual bool emit(EmitContext &rWriteContext) const override
bool setupDecryptionData(const OString &rPwd) const
bool decrypt(const sal_uInt8 *pInBuffer, sal_uInt32 nLen, sal_uInt8 *pOutBuffer, unsigned int nObject, unsigned int nGeneration) const
virtual ~PDFFile() override
std::unique_ptr< PDFFileImplData > m_pData
virtual PDFEntry * clone() const override
PDFFileImplData * impl_getData() const
virtual PDFEntry * clone() const override
virtual bool emit(EmitContext &rWriteContext) const override
OUString getFilteredName() const
virtual ~PDFName() override
virtual PDFEntry * clone() const override
virtual ~PDFNull() override
virtual bool emit(EmitContext &rWriteContext) const override
virtual PDFEntry * clone() const override
virtual ~PDFNumber() override
virtual bool emit(EmitContext &rWriteContext) const override
PDFObjectRef(unsigned int nNr, unsigned int nGen)
virtual PDFEntry * clone() const override
unsigned int m_nGeneration
virtual ~PDFObjectRef() override
virtual bool emit(EmitContext &rWriteContext) const override
unsigned int m_nGeneration
PDFObject(unsigned int nNr, unsigned int nGen)
virtual bool emit(EmitContext &rWriteContext) const override
virtual ~PDFObject() override
bool getDeflatedStream(std::unique_ptr< char[]> &rpStream, unsigned int *pBytes, const PDFContainer *pObjectContainer, EmitContext &rContext) const
void writeStream(EmitContext &rContext, const PDFFile *pPDFFile) const
virtual PDFEntry * clone() const override
virtual ~PDFPart() override
virtual bool emit(EmitContext &rWriteContext) const override
virtual PDFEntry * clone() const override
static std::unique_ptr< PDFEntry > read(const char *pFileName)
virtual bool emit(EmitContext &rWriteContext) const override
unsigned int getDictLength(const PDFContainer *pObjectContainer) const
PDFStream(unsigned int nBegin, unsigned int nEnd, PDFDict *pStreamDict)
virtual ~PDFStream() override
virtual PDFEntry * clone() const override
unsigned int m_nBeginOffset
unsigned int m_nEndOffset
virtual bool emit(EmitContext &rWriteContext) const override
virtual ~PDFString() override
PDFString(OString aString)
OString getFilteredString() const
virtual PDFEntry * clone() const override
virtual bool emit(EmitContext &rWriteContext) const override
virtual PDFEntry * clone() const override
virtual ~PDFTrailer() override
virtual ~PDFValue() override