summaryrefslogtreecommitdiff
path: root/core/fpdftext/cpdf_textpage.cpp
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-07-10 21:04:05 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-07-10 21:04:05 +0000
commit144107d3ca6ddd2724a460c4da4a20e6e1b7f1b7 (patch)
tree7fc11c898c7d5397f8b910d447eccfd04680f288 /core/fpdftext/cpdf_textpage.cpp
parent416cbeab1d93b1261dfb4584e0c8e47d9cd4720f (diff)
downloadpdfium-144107d3ca6ddd2724a460c4da4a20e6e1b7f1b7.tar.xz
Create API for adding content marks and setting their params.chromium/3488
This CL creates the following new functions in the public API: - FPDFPageObj_AddMark - FPDFPageObjMark_SetIntParam - FPDFPageObjMark_SetStringParam Bug: pdfium:1037 Change-Id: Icabf3fdd8e8153b9156bab807a3708d38a9365d8 Reviewed-on: https://pdfium-review.googlesource.com/37330 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdftext/cpdf_textpage.cpp')
-rw-r--r--core/fpdftext/cpdf_textpage.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/fpdftext/cpdf_textpage.cpp b/core/fpdftext/cpdf_textpage.cpp
index 4c3196427a..2894160437 100644
--- a/core/fpdftext/cpdf_textpage.cpp
+++ b/core/fpdftext/cpdf_textpage.cpp
@@ -846,8 +846,8 @@ FPDFText_MarkedContent CPDF_TextPage::PreMarkedContent(PDFTEXT_Obj Obj) {
bool bExist = false;
const CPDF_Dictionary* pDict = nullptr;
for (size_t i = 0; i < nContentMark; ++i) {
- const CPDF_ContentMarkItem& item = pTextObj->m_ContentMark.GetItem(i);
- pDict = item.GetParam();
+ const CPDF_ContentMarkItem* item = pTextObj->m_ContentMark.GetItem(i);
+ pDict = item->GetParam();
if (!pDict)
continue;
const CPDF_String* temp = ToString(pDict->GetObjectFor("ActualText"));
@@ -862,7 +862,7 @@ FPDFText_MarkedContent CPDF_TextPage::PreMarkedContent(PDFTEXT_Obj Obj) {
if (m_pPreTextObj) {
const CPDF_ContentMark& mark = m_pPreTextObj->m_ContentMark;
if (mark.CountItems() == nContentMark &&
- mark.GetItem(nContentMark - 1).GetParam() == pDict) {
+ mark.GetItem(nContentMark - 1)->GetParam() == pDict) {
return FPDFText_MarkedContent::Done;
}
}
@@ -904,8 +904,8 @@ void CPDF_TextPage::ProcessMarkedContent(PDFTEXT_Obj Obj) {
WideString actText;
for (size_t n = 0; n < nContentMark; n++) {
- const CPDF_ContentMarkItem& item = pTextObj->m_ContentMark.GetItem(n);
- const CPDF_Dictionary* pDict = item.GetParam();
+ const CPDF_ContentMarkItem* item = pTextObj->m_ContentMark.GetItem(n);
+ const CPDF_Dictionary* pDict = item->GetParam();
if (pDict)
actText = pDict->GetUnicodeTextFor("ActualText");
}