summaryrefslogtreecommitdiff
path: root/core/fpdftext
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdftext')
-rw-r--r--core/fpdftext/cpdf_textpage.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/core/fpdftext/cpdf_textpage.cpp b/core/fpdftext/cpdf_textpage.cpp
index 60e574558b..4c3196427a 100644
--- a/core/fpdftext/cpdf_textpage.cpp
+++ b/core/fpdftext/cpdf_textpage.cpp
@@ -838,9 +838,6 @@ void CPDF_TextPage::ProcessTextObject(
FPDFText_MarkedContent CPDF_TextPage::PreMarkedContent(PDFTEXT_Obj Obj) {
CPDF_TextObject* pTextObj = Obj.m_pTextObj.Get();
- if (!pTextObj->m_ContentMark.HasRef())
- return FPDFText_MarkedContent::Pass;
-
size_t nContentMark = pTextObj->m_ContentMark.CountItems();
if (nContentMark == 0)
return FPDFText_MarkedContent::Pass;
@@ -864,7 +861,7 @@ FPDFText_MarkedContent CPDF_TextPage::PreMarkedContent(PDFTEXT_Obj Obj) {
if (m_pPreTextObj) {
const CPDF_ContentMark& mark = m_pPreTextObj->m_ContentMark;
- if (mark.HasRef() && mark.CountItems() == nContentMark &&
+ if (mark.CountItems() == nContentMark &&
mark.GetItem(nContentMark - 1).GetParam() == pDict) {
return FPDFText_MarkedContent::Done;
}
@@ -900,15 +897,13 @@ FPDFText_MarkedContent CPDF_TextPage::PreMarkedContent(PDFTEXT_Obj Obj) {
void CPDF_TextPage::ProcessMarkedContent(PDFTEXT_Obj Obj) {
CPDF_TextObject* pTextObj = Obj.m_pTextObj.Get();
- if (!pTextObj->m_ContentMark.HasRef())
- return;
- int nContentMark = pTextObj->m_ContentMark.CountItems();
- if (nContentMark < 1)
+ size_t nContentMark = pTextObj->m_ContentMark.CountItems();
+ if (nContentMark == 0)
return;
WideString actText;
- for (int n = 0; n < nContentMark; n++) {
+ for (size_t n = 0; n < nContentMark; n++) {
const CPDF_ContentMarkItem& item = pTextObj->m_ContentMark.GetItem(n);
const CPDF_Dictionary* pDict = item.GetParam();
if (pDict)