Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 PDFium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
| 6 | |
| 7 #ifndef CORE_FPDFAPI_PARSER_CPDF_LINEARIZED_H_ | |
| 8 #define CORE_FPDFAPI_PARSER_CPDF_LINEARIZED_H_ | |
| 9 | |
| 10 #include <memory> | |
| 11 | |
| 12 #include "core/fxcrt/fx_memory.h" | |
| 13 #include "core/fxcrt/fx_stream.h" | |
| 14 | |
| 15 class CPDF_Dictionary; | |
| 16 class CPDF_Object; | |
| 17 | |
| 18 class CPDF_Linearized { | |
| 19 public: | |
| 20 ~CPDF_Linearized(); | |
| 21 static std::unique_ptr<CPDF_Linearized> CreateForObject( | |
| 22 std::unique_ptr<CPDF_Object, ReleaseDeleter<CPDF_Object>> pObj); | |
| 23 | |
| 24 bool IsValid() const; | |
|
Lei Zhang
2016/11/03 00:46:26
Ok, so now that you have IsValid(), can we make it
snake
2016/11/03 01:39:27
Done.
| |
| 25 | |
| 26 FX_FILESIZE GetFileSize() const { return m_szFileSize; } | |
| 27 uint32_t GetFirstPageNo() const { return m_dwFirstPageNo; } | |
| 28 FX_FILESIZE GetLastXRefOffset() const { return m_szLastXRefOffset; } | |
| 29 uint32_t GetPageCount() const { return m_PageCount; } | |
| 30 FX_FILESIZE GetFirstPageEndOffset() const { return m_szFirstPageEndOffset; } | |
| 31 uint32_t GetFirstPageObjNum() const { return m_FirstPageObjNum; } | |
| 32 | |
| 33 bool HasHintTable() const; | |
| 34 FX_FILESIZE GetHintStart() const { return m_szHintStart; } | |
| 35 FX_FILESIZE GetHintLength() const { return m_szHintLength; } | |
| 36 | |
| 37 private: | |
| 38 explicit CPDF_Linearized(const CPDF_Dictionary* pDict); | |
| 39 | |
| 40 FX_FILESIZE m_szFileSize = 0; | |
| 41 uint32_t m_dwFirstPageNo = 0; | |
| 42 FX_FILESIZE m_szLastXRefOffset = 0; | |
| 43 uint32_t m_PageCount = 0; | |
| 44 FX_FILESIZE m_szFirstPageEndOffset = 0; | |
| 45 uint32_t m_FirstPageObjNum = 0; | |
| 46 FX_FILESIZE m_szHintStart = 0; | |
| 47 FX_FILESIZE m_szHintLength = 0; | |
| 48 }; | |
| 49 | |
| 50 #endif // CORE_FPDFAPI_PARSER_CPDF_LINEARIZED_H_ | |
| OLD | NEW |