diff options
author | Nicolas Pena <npm@chromium.org> | 2017-05-15 14:49:44 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-05-15 19:23:54 +0000 |
commit | 4b78b18a87210d2d7550aa6c097f54ebf2c95e02 (patch) | |
tree | f04efca1ee7e0f2d8fb5752b8911fdb9fd0cac11 /core/fpdfapi/edit/cpdf_objectstream.h | |
parent | c4722a7a3b3274fb066c2aac4eb3717e648b3004 (diff) | |
download | pdfium-4b78b18a87210d2d7550aa6c097f54ebf2c95e02.tar.xz |
Remove unused flags from CPDF_Creator
The only user of CPDF_Creator is FPDF_Doc_Save, and it only uses flags 1
or 2 when calling Create. Thus, the other two flags will never be set.
Change-Id: Ib2eb0ce5585469c7749f0ab350855f1c6a2bba08
Reviewed-on: https://pdfium-review.googlesource.com/5491
Reviewed-by: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fpdfapi/edit/cpdf_objectstream.h')
-rw-r--r-- | core/fpdfapi/edit/cpdf_objectstream.h | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/core/fpdfapi/edit/cpdf_objectstream.h b/core/fpdfapi/edit/cpdf_objectstream.h deleted file mode 100644 index 5ad6ec8085..0000000000 --- a/core/fpdfapi/edit/cpdf_objectstream.h +++ /dev/null @@ -1,53 +0,0 @@ -// Copyright 2017 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_EDIT_CPDF_OBJECTSTREAM_H_ -#define CORE_FPDFAPI_EDIT_CPDF_OBJECTSTREAM_H_ - -#include <vector> - -#include "core/fxcrt/fx_basic.h" -#include "third_party/base/stl_util.h" - -class CPDF_Creator; -class CPDF_Object; - -class CPDF_ObjectStream { - public: - struct Item { - uint32_t objnum; - FX_STRSIZE offset; - }; - - CPDF_ObjectStream(); - ~CPDF_ObjectStream(); - - void Start(); - FX_FILESIZE End(CPDF_Creator* pCreator); - void CompressIndirectObject(uint32_t dwObjNum, const CPDF_Object* pObj); - void CompressIndirectObject(uint32_t dwObjNum, - const uint8_t* pBuffer, - uint32_t dwSize); - - bool IsNotFull() const; - int32_t ItemCount() const { return pdfium::CollectionSize<int32_t>(m_Items); } - void SetObjectNumber(uint32_t num) { m_dwObjNum = num; } - uint32_t GetObjectNumber() const { return m_dwObjNum; } - int32_t GetIndex() const { return m_index; } - void IncrementIndex() { m_index++; } - - uint32_t GetObjectNumberForItem(int index) const { - return m_Items[index].objnum; - } - - private: - std::vector<Item> m_Items; - CFX_ByteTextBuf m_Buffer; - uint32_t m_dwObjNum; - int32_t m_index; -}; - -#endif // CORE_FPDFAPI_EDIT_CPDF_OBJECTSTREAM_H_ |