summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser/cpdf_dictionary.h
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-11-15 11:33:44 -0800
committerCommit bot <commit-bot@chromium.org>2016-11-15 11:33:44 -0800
commit70c4afd5c3c5c44cd24f814423a23a6ef05bba02 (patch)
treecbe593d0b6c0bfc6fd5038bf60a77a94e49c69c9 /core/fpdfapi/parser/cpdf_dictionary.h
parentf16f6b8b52277348f5d571b7641bb0bbd5239589 (diff)
downloadpdfium-70c4afd5c3c5c44cd24f814423a23a6ef05bba02.tar.xz
Make AddIndirectObject() take a unique_ptr.
Add convenience routines to create and add object in one step. Review-Url: https://codereview.chromium.org/2489283003
Diffstat (limited to 'core/fpdfapi/parser/cpdf_dictionary.h')
-rw-r--r--core/fpdfapi/parser/cpdf_dictionary.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/fpdfapi/parser/cpdf_dictionary.h b/core/fpdfapi/parser/cpdf_dictionary.h
index fffe03463c..ebfd7e92ee 100644
--- a/core/fpdfapi/parser/cpdf_dictionary.h
+++ b/core/fpdfapi/parser/cpdf_dictionary.h
@@ -61,6 +61,7 @@ class CPDF_Dictionary : public CPDF_Object {
// Set* functions invalidate iterators for the element with the key |key|.
void SetFor(const CFX_ByteString& key, CPDF_Object* pObj);
+ void SetBooleanFor(const CFX_ByteString& key, bool bValue);
void SetNameFor(const CFX_ByteString& key, const CFX_ByteString& name);
void SetStringFor(const CFX_ByteString& key, const CFX_ByteString& str);
void SetIntegerFor(const CFX_ByteString& key, int i);
@@ -68,9 +69,12 @@ class CPDF_Dictionary : public CPDF_Object {
void SetReferenceFor(const CFX_ByteString& key,
CPDF_IndirectObjectHolder* pDoc,
uint32_t objnum);
+ void SetReferenceFor(const CFX_ByteString& key,
+ CPDF_IndirectObjectHolder* pDoc,
+ CPDF_Object* pObj);
+
void SetRectFor(const CFX_ByteString& key, const CFX_FloatRect& rect);
void SetMatrixFor(const CFX_ByteString& key, const CFX_Matrix& matrix);
- void SetBooleanFor(const CFX_ByteString& key, bool bValue);
void ConvertToIndirectObjectFor(const CFX_ByteString& key,
CPDF_IndirectObjectHolder* pHolder);