summaryrefslogtreecommitdiff
path: root/core/fpdftext
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-10-10 23:17:03 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-10-10 23:17:03 +0000
commit673b90ad5b21a3d17e64ef65d7053d582920fcbe (patch)
treed113f769e004a52f3789f36f73d4f5d99098a9fa /core/fpdftext
parentfc41e77c97173592ea2abb88c3f6f4dc7c43349d (diff)
downloadpdfium-673b90ad5b21a3d17e64ef65d7053d582920fcbe.tar.xz
Rename CPDF_ContentMark to CPDF_ContentMarks.
Also change variable names and member names of this type. This better reflects the fact that this class contains all the marks in a page objects, not just one mark. Change-Id: I4fe3d2620e78cbe423f18634f19fa82530d7efe1 Reviewed-on: https://pdfium-review.googlesource.com/c/43813 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'core/fpdftext')
-rw-r--r--core/fpdftext/cpdf_textpage.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/core/fpdftext/cpdf_textpage.cpp b/core/fpdftext/cpdf_textpage.cpp
index 77eae4de75..259167b988 100644
--- a/core/fpdftext/cpdf_textpage.cpp
+++ b/core/fpdftext/cpdf_textpage.cpp
@@ -820,15 +820,15 @@ void CPDF_TextPage::ProcessTextObject(
FPDFText_MarkedContent CPDF_TextPage::PreMarkedContent(PDFTEXT_Obj Obj) {
CPDF_TextObject* pTextObj = Obj.m_pTextObj.Get();
- size_t nContentMark = pTextObj->m_ContentMark.CountItems();
- if (nContentMark == 0)
+ size_t nContentMarks = pTextObj->m_ContentMarks.CountItems();
+ if (nContentMarks == 0)
return FPDFText_MarkedContent::Pass;
WideString actText;
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);
+ for (size_t i = 0; i < nContentMarks; ++i) {
+ const CPDF_ContentMarkItem* item = pTextObj->m_ContentMarks.GetItem(i);
pDict = item->GetParam();
if (!pDict)
continue;
@@ -842,9 +842,9 @@ FPDFText_MarkedContent CPDF_TextPage::PreMarkedContent(PDFTEXT_Obj Obj) {
return FPDFText_MarkedContent::Pass;
if (m_pPreTextObj) {
- const CPDF_ContentMark& mark = m_pPreTextObj->m_ContentMark;
- if (mark.CountItems() == nContentMark &&
- mark.GetItem(nContentMark - 1)->GetParam() == pDict) {
+ const CPDF_ContentMarks& marks = m_pPreTextObj->m_ContentMarks;
+ if (marks.CountItems() == nContentMarks &&
+ marks.GetItem(nContentMarks - 1)->GetParam() == pDict) {
return FPDFText_MarkedContent::Done;
}
}
@@ -880,13 +880,13 @@ FPDFText_MarkedContent CPDF_TextPage::PreMarkedContent(PDFTEXT_Obj Obj) {
void CPDF_TextPage::ProcessMarkedContent(PDFTEXT_Obj Obj) {
CPDF_TextObject* pTextObj = Obj.m_pTextObj.Get();
- size_t nContentMark = pTextObj->m_ContentMark.CountItems();
- if (nContentMark == 0)
+ size_t nContentMarks = pTextObj->m_ContentMarks.CountItems();
+ if (nContentMarks == 0)
return;
WideString actText;
- for (size_t n = 0; n < nContentMark; ++n) {
- const CPDF_ContentMarkItem* item = pTextObj->m_ContentMark.GetItem(n);
+ for (size_t n = 0; n < nContentMarks; ++n) {
+ const CPDF_ContentMarkItem* item = pTextObj->m_ContentMarks.GetItem(n);
const CPDF_Dictionary* pDict = item->GetParam();
if (pDict)
actText = pDict->GetUnicodeTextFor("ActualText");