diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2018-06-05 16:19:11 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-06-05 16:19:11 +0000 |
commit | d3d8287e143daf12a602a919c120b4e0c656abf8 (patch) | |
tree | a616529626c6cc5c021cbc5e1309be0ab67108b3 /core/fpdfapi/page/cpdf_textobject.cpp | |
parent | eaba5af84597164281ddd972a5e98631b18d783b (diff) | |
download | pdfium-d3d8287e143daf12a602a919c120b4e0c656abf8.tar.xz |
Create m_ContentStream field in CPDF_PageObject.
Content streams are now split and can set nonzero values to identify
each parsed content stream.
Bug: pdfium:1051
Change-Id: Ia2cb1e0997db5264d468043af31f9b41e8d0d349
Reviewed-on: https://pdfium-review.googlesource.com/33591
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_textobject.cpp')
-rw-r--r-- | core/fpdfapi/page/cpdf_textobject.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/fpdfapi/page/cpdf_textobject.cpp b/core/fpdfapi/page/cpdf_textobject.cpp index 36a4722773..68d20b6598 100644 --- a/core/fpdfapi/page/cpdf_textobject.cpp +++ b/core/fpdfapi/page/cpdf_textobject.cpp @@ -18,7 +18,8 @@ CPDF_TextObjectItem::CPDF_TextObjectItem() : m_CharCode(0) {} CPDF_TextObjectItem::~CPDF_TextObjectItem() = default; -CPDF_TextObject::CPDF_TextObject() {} +CPDF_TextObject::CPDF_TextObject(int32_t content_stream) + : CPDF_PageObject(content_stream) {} CPDF_TextObject::~CPDF_TextObject() { // Move m_CharCodes to a local variable so it will be captured in crash dumps, @@ -100,7 +101,7 @@ void CPDF_TextObject::GetCharInfo(size_t index, } std::unique_ptr<CPDF_TextObject> CPDF_TextObject::Clone() const { - auto obj = pdfium::MakeUnique<CPDF_TextObject>(); + auto obj = pdfium::MakeUnique<CPDF_TextObject>(-1); obj->CopyData(this); obj->m_CharCodes = m_CharCodes; obj->m_CharPos = m_CharPos; |