summaryrefslogtreecommitdiff
path: root/core/fpdfapi/edit/cpdf_objectstream.h
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-05-09 12:36:08 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-05-09 17:48:44 +0000
commita0b1954794b7a8a279ba00787628cc7f8d1419d9 (patch)
tree4556b78b9550dbb80baa52e0eee016395f223c4e /core/fpdfapi/edit/cpdf_objectstream.h
parente02b2bc896b0872ce1a9d0997946b07dc76b9f7b (diff)
downloadpdfium-a0b1954794b7a8a279ba00787628cc7f8d1419d9.tar.xz
Rename fpdf_edit_create.cpp to cpdf_creator.cpp
This Cl renames the fpdf_edit_create file to better match the cpdf_creator content. The CPDF_ObjectStream and CPDF_XRefStream code is moved out to their own .cpp files. Needed anonymous classes are split out as well. Change-Id: Ic83fb319ce28c816db82a4286e22032dc68811bc Reviewed-on: https://pdfium-review.googlesource.com/5171 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fpdfapi/edit/cpdf_objectstream.h')
-rw-r--r--core/fpdfapi/edit/cpdf_objectstream.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/fpdfapi/edit/cpdf_objectstream.h b/core/fpdfapi/edit/cpdf_objectstream.h
index 3e5c5a72a9..5ad6ec8085 100644
--- a/core/fpdfapi/edit/cpdf_objectstream.h
+++ b/core/fpdfapi/edit/cpdf_objectstream.h
@@ -10,6 +10,7 @@
#include <vector>
#include "core/fxcrt/fx_basic.h"
+#include "third_party/base/stl_util.h"
class CPDF_Creator;
class CPDF_Object;
@@ -31,6 +32,18 @@ class CPDF_ObjectStream {
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;