diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2018-07-11 18:58:42 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-07-11 18:58:42 +0000 |
commit | 8ac090c4a57bc27044adc7abe8143ce45388b021 (patch) | |
tree | 1e7edcced6de44e83e11b63578bc1f8b00399f34 /core/fpdfapi/page/cpdf_contentmark.h | |
parent | b165ffb64e59998ec6d5f76c82bd2fe53734b3cd (diff) | |
download | pdfium-8ac090c4a57bc27044adc7abe8143ce45388b021.tar.xz |
Split CPDF_ContentMark::AddMark() into three versions.
One version is for a mark without a dictionary. The second is for
a mark with a direct dictionary. The third is for a mark with
indirect properties.
Bug: pdfium:1118
Change-Id: Ice0ff11d5ba4eaf2ccdf57be49b9140ba5c9b159
Reviewed-on: https://pdfium-review.googlesource.com/37550
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_contentmark.h')
-rw-r--r-- | core/fpdfapi/page/cpdf_contentmark.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/core/fpdfapi/page/cpdf_contentmark.h b/core/fpdfapi/page/cpdf_contentmark.h index e0ae1bf549..b9b10b0a48 100644 --- a/core/fpdfapi/page/cpdf_contentmark.h +++ b/core/fpdfapi/page/cpdf_contentmark.h @@ -29,7 +29,9 @@ class CPDF_ContentMark { CPDF_ContentMarkItem* GetItem(size_t i); const CPDF_ContentMarkItem* GetItem(size_t i) const; - void AddMark(ByteString name, CPDF_Dictionary* pDict, bool bDirect); + void AddMark(ByteString name); + void AddMarkWithDirectDict(ByteString name, CPDF_Dictionary* pDict); + void AddMarkWithPropertiesDict(ByteString name, CPDF_Dictionary* pDict); void DeleteLastMark(); private: @@ -44,13 +46,17 @@ class CPDF_ContentMark { const CPDF_ContentMarkItem* GetItem(size_t index) const; int GetMarkedContentID() const; - void AddMark(ByteString name, CPDF_Dictionary* pDict, bool bDictNeedClone); + void AddMark(ByteString name); + void AddMarkWithDirectDict(ByteString name, CPDF_Dictionary* pDict); + void AddMarkWithPropertiesDict(ByteString name, CPDF_Dictionary* pDict); void DeleteLastMark(); private: std::vector<RetainPtr<CPDF_ContentMarkItem>> m_Marks; }; + void EnsureMarkDataExists(); + RetainPtr<MarkData> m_pMarkData; }; |