diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2018-06-12 20:27:35 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-06-12 20:27:35 +0000 |
commit | 6eb7939300d1bc7c31afd5086c1b93d4a7628481 (patch) | |
tree | cda239de969cb7a3c0477d9f8e67bf33b207b693 /core/fpdfapi/page/cpdf_streamcontentparser.h | |
parent | ef9fe9ed8a00be4a1788228cfa5df303e34d4d73 (diff) | |
download | pdfium-6eb7939300d1bc7c31afd5086c1b93d4a7628481.tar.xz |
Fill m_ContentStream field in CPDF_PageObject.
From the comment of CPDF_PageObject::GetContentStream():
"""
Get what content stream the object was parsed from in its page.
This number is the index of the content stream in the "Contents" array,
or 0 if there is a single content stream. If the object is newly
created, -1 is returned.
If the object is spread among more than one content stream, this is
the index of the last one.
"""
Bug: pdfium:1051
Change-Id: I9f7804af4f263dda0422e9542e025e3320ff7c31
Reviewed-on: https://pdfium-review.googlesource.com/34250
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_streamcontentparser.h')
-rw-r--r-- | core/fpdfapi/page/cpdf_streamcontentparser.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/fpdfapi/page/cpdf_streamcontentparser.h b/core/fpdfapi/page/cpdf_streamcontentparser.h index 438be024cc..adcb2a5b47 100644 --- a/core/fpdfapi/page/cpdf_streamcontentparser.h +++ b/core/fpdfapi/page/cpdf_streamcontentparser.h @@ -43,7 +43,10 @@ class CPDF_StreamContentParser { std::set<const uint8_t*>* parsedSet); ~CPDF_StreamContentParser(); - uint32_t Parse(const uint8_t* pData, uint32_t dwSize, uint32_t max_cost); + uint32_t Parse(const uint8_t* pData, + uint32_t dwSize, + uint32_t max_cost, + const std::vector<uint32_t>& stream_start_offsets); CPDF_PageObjectHolder* GetPageObjectHolder() const { return m_pObjectHolder.Get(); } @@ -127,6 +130,7 @@ class CPDF_StreamContentParser { std::vector<float> GetColors() const; std::vector<float> GetNamedColors() const; + int32_t GetCurrentStreamIndex(); void Handle_CloseFillStrokePath(); void Handle_FillStrokePath(); @@ -230,6 +234,7 @@ class CPDF_StreamContentParser { std::vector<std::unique_ptr<CPDF_AllStates>> m_StateStack; float m_Type3Data[6]; ContentParam m_ParamBuf[kParamBufSize]; + std::vector<uint32_t> m_StreamStartOffsets; }; #endif // CORE_FPDFAPI_PAGE_CPDF_STREAMCONTENTPARSER_H_ |