diff options
author | dsinclair <dsinclair@chromium.org> | 2016-11-04 21:06:05 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-04 21:06:05 -0700 |
commit | 19cd7cc42700b844e6d9fc170a65bf7122d468b8 (patch) | |
tree | 127477b084005457579c599b2ec9eef0668a1479 /core/fpdfapi/parser/cpdf_linearized.h | |
parent | 71333dc57ac7e4cf7963c83333730b3882ab371f (diff) | |
download | pdfium-19cd7cc42700b844e6d9fc170a65bf7122d468b8.tar.xz |
Revert of Unify some code (patchset #14 id:260001 of https://codereview.chromium.org/2466023002/ )chromium/2912chromium/2911
Reason for revert:
Breaking the chrome roll. See https://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/331856
Original issue's description:
> Unify some code
>
> Move parsing of linearized header into separate CPDF_Linearized class.
>
> Committed: https://pdfium.googlesource.com/pdfium/+/71333dc57ac7e4cf7963c83333730b3882ab371f
TBR=thestig@chromium.org,brucedawson@chromium.org,art-snake@yandex-team.ru
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Review-Url: https://codereview.chromium.org/2474283005
Diffstat (limited to 'core/fpdfapi/parser/cpdf_linearized.h')
-rw-r--r-- | core/fpdfapi/parser/cpdf_linearized.h | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/core/fpdfapi/parser/cpdf_linearized.h b/core/fpdfapi/parser/cpdf_linearized.h deleted file mode 100644 index caf538e3fe..0000000000 --- a/core/fpdfapi/parser/cpdf_linearized.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2016 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_PARSER_CPDF_LINEARIZED_H_ -#define CORE_FPDFAPI_PARSER_CPDF_LINEARIZED_H_ - -#include <memory> - -#include "core/fxcrt/fx_memory.h" -#include "core/fxcrt/fx_stream.h" - -class CPDF_Dictionary; -class CPDF_Object; - -class CPDF_Linearized { - public: - ~CPDF_Linearized(); - static std::unique_ptr<CPDF_Linearized> CreateForObject( - std::unique_ptr<CPDF_Object> pObj); - - // Will only return values > 0. - FX_FILESIZE GetFileSize() const { return m_szFileSize; } - uint32_t GetFirstPageNo() const { return m_dwFirstPageNo; } - // Will only return values > 0. - FX_FILESIZE GetLastXRefOffset() const { return m_szLastXRefOffset; } - uint32_t GetPageCount() const { return m_PageCount; } - // Will only return values > 0. - FX_FILESIZE GetFirstPageEndOffset() const { return m_szFirstPageEndOffset; } - // Will only return values > 0. - uint32_t GetFirstPageObjNum() const { return m_FirstPageObjNum; } - - bool HasHintTable() const; - // Will only return values > 0. - FX_FILESIZE GetHintStart() const { return m_szHintStart; } - // Will only return values > 0. - FX_FILESIZE GetHintLength() const { return m_szHintLength; } - - protected: - explicit CPDF_Linearized(const CPDF_Dictionary* pDict); - - private: - FX_FILESIZE m_szFileSize = 0; - uint32_t m_dwFirstPageNo = 0; - FX_FILESIZE m_szLastXRefOffset = 0; - uint32_t m_PageCount = 0; - FX_FILESIZE m_szFirstPageEndOffset = 0; - uint32_t m_FirstPageObjNum = 0; - FX_FILESIZE m_szHintStart = 0; - FX_FILESIZE m_szHintLength = 0; -}; - -#endif // CORE_FPDFAPI_PARSER_CPDF_LINEARIZED_H_ |