diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2016-03-14 13:35:12 -0400 |
---|---|---|
committer | Dan Sinclair <dsinclair@chromium.org> | 2016-03-14 13:35:12 -0400 |
commit | 764ec513eecbebd12781bcc96ce81ed5e736ee92 (patch) | |
tree | 12763fde4be1f10ea1183d92185917b2b587e00b /core/fpdfapi/fpdf_edit/editint.h | |
parent | 97da97662417085774f75c26e535c6fbe70266ae (diff) | |
download | pdfium-764ec513eecbebd12781bcc96ce81ed5e736ee92.tar.xz |
Move core/src/ up to core/.
This CL moves the core/src/ files up to core/ and fixes up the include guards,
includes and build files.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1800523005 .
Diffstat (limited to 'core/fpdfapi/fpdf_edit/editint.h')
-rw-r--r-- | core/fpdfapi/fpdf_edit/editint.h | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/core/fpdfapi/fpdf_edit/editint.h b/core/fpdfapi/fpdf_edit/editint.h new file mode 100644 index 0000000000..2e4b0cc067 --- /dev/null +++ b/core/fpdfapi/fpdf_edit/editint.h @@ -0,0 +1,74 @@ +// Copyright 2014 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef CORE_FPDFAPI_FPDF_EDIT_EDITINT_H_ +#define CORE_FPDFAPI_FPDF_EDIT_EDITINT_H_ + +#include <vector> + +#include "core/include/fxcrt/fx_basic.h" +#include "core/include/fxcrt/fx_stream.h" +#include "core/include/fxcrt/fx_system.h" + +class CPDF_Creator; +class CPDF_Object; + +class CPDF_ObjectStream { + public: + CPDF_ObjectStream(); + + FX_BOOL Start(); + + int32_t CompressIndirectObject(FX_DWORD dwObjNum, const CPDF_Object* pObj); + int32_t CompressIndirectObject(FX_DWORD dwObjNum, + const uint8_t* pBuffer, + FX_DWORD dwSize); + + FX_FILESIZE End(CPDF_Creator* pCreator); + + CFX_DWordArray m_ObjNumArray; + + CFX_ByteTextBuf m_Buffer; + FX_DWORD m_dwObjNum; + int32_t m_index; + + protected: + CFX_DWordArray m_OffsetArray; +}; +class CPDF_XRefStream { + public: + struct Index { + FX_DWORD objnum; + FX_DWORD count; + }; + + CPDF_XRefStream(); + + FX_BOOL Start(); + int32_t CompressIndirectObject(FX_DWORD dwObjNum, + const CPDF_Object* pObj, + CPDF_Creator* pCreator); + int32_t CompressIndirectObject(FX_DWORD dwObjNum, + const uint8_t* pBuffer, + FX_DWORD dwSize, + CPDF_Creator* pCreator); + FX_BOOL End(CPDF_Creator* pCreator, FX_BOOL bEOF = FALSE); + void AddObjectNumberToIndexArray(FX_DWORD objnum); + FX_BOOL EndXRefStream(CPDF_Creator* pCreator); + + std::vector<Index> m_IndexArray; + FX_FILESIZE m_PrevOffset; + FX_DWORD m_dwTempObjNum; + + protected: + int32_t EndObjectStream(CPDF_Creator* pCreator, FX_BOOL bEOF = TRUE); + FX_BOOL GenerateXRefStream(CPDF_Creator* pCreator, FX_BOOL bEOF); + size_t m_iSeg; + CPDF_ObjectStream m_ObjStream; + CFX_ByteTextBuf m_Buffer; +}; + +#endif // CORE_FPDFAPI_FPDF_EDIT_EDITINT_H_ |