summaryrefslogtreecommitdiff
path: root/core/fpdfapi/edit/cpdf_xrefstream.h
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-05-15 14:49:44 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-05-15 19:23:54 +0000
commit4b78b18a87210d2d7550aa6c097f54ebf2c95e02 (patch)
treef04efca1ee7e0f2d8fb5752b8911fdb9fd0cac11 /core/fpdfapi/edit/cpdf_xrefstream.h
parentc4722a7a3b3274fb066c2aac4eb3717e648b3004 (diff)
downloadpdfium-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_xrefstream.h')
-rw-r--r--core/fpdfapi/edit/cpdf_xrefstream.h62
1 files changed, 0 insertions, 62 deletions
diff --git a/core/fpdfapi/edit/cpdf_xrefstream.h b/core/fpdfapi/edit/cpdf_xrefstream.h
deleted file mode 100644
index 33869c656a..0000000000
--- a/core/fpdfapi/edit/cpdf_xrefstream.h
+++ /dev/null
@@ -1,62 +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_XREFSTREAM_H_
-#define CORE_FPDFAPI_EDIT_CPDF_XREFSTREAM_H_
-
-#include <vector>
-
-#include "core/fpdfapi/edit/cpdf_objectstream.h"
-#include "core/fxcrt/fx_basic.h"
-
-class CPDF_Creator;
-class CPDF_Object;
-
-class CPDF_XRefStream {
- public:
- struct Index {
- uint32_t objnum;
- uint32_t count;
- };
-
- CPDF_XRefStream();
- ~CPDF_XRefStream();
-
- bool Start();
- bool CompressIndirectObject(uint32_t dwObjNum,
- const CPDF_Object* pObj,
- CPDF_Creator* pCreator);
- bool CompressIndirectObject(uint32_t dwObjNum,
- const uint8_t* pBuffer,
- uint32_t dwSize,
- CPDF_Creator* pCreator);
- bool End(CPDF_Creator* pCreator, bool bEOF);
- void AddObjectNumberToIndexArray(uint32_t objnum);
- bool EndXRefStream(CPDF_Creator* pCreator);
-
- FX_FILESIZE GetPreviousOffset() const { return m_PrevOffset; }
- void SetPreviousOffset(FX_FILESIZE offset) { m_PrevOffset = offset; }
-
- uint32_t CountIndexArrayItems() const {
- uint32_t size = 0;
- for (const auto& pair : m_IndexArray)
- size += pair.count;
- return size;
- }
-
- private:
- bool EndObjectStream(CPDF_Creator* pCreator, bool bEOF);
- bool GenerateXRefStream(CPDF_Creator* pCreator, bool bEOF);
-
- std::vector<Index> m_IndexArray;
- FX_FILESIZE m_PrevOffset;
- uint32_t m_dwTempObjNum;
- size_t m_iSeg;
- CPDF_ObjectStream m_ObjStream;
- CFX_ByteTextBuf m_Buffer;
-};
-
-#endif // CORE_FPDFAPI_EDIT_CPDF_XREFSTREAM_H_