diff options
author | Tom Sepez <tsepez@chromium.org> | 2016-01-26 13:20:26 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2016-01-26 13:20:26 -0800 |
commit | 8e5cd19d174f259bfda5f7a9699b08fdc4289b56 (patch) | |
tree | 6c2382c4cfe0475ecbfafc1af981dcaa0a801c35 /core/src/fpdftext | |
parent | d834d55f902ccd18cba85f93ecf51e30c5e7e47b (diff) | |
download | pdfium-8e5cd19d174f259bfda5f7a9699b08fdc4289b56.tar.xz |
Merge to XFA: War on #defines, part 1.
Contains additional XFA-specific changes.
Original Review URL: https://codereview.chromium.org/1632143002 .
(cherry picked from commit 66a9dc9dd65ed2b9c7ede448d046b770140f16d5)
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1636503006 .
Diffstat (limited to 'core/src/fpdftext')
-rw-r--r-- | core/src/fpdftext/fpdf_text.cpp | 4 | ||||
-rw-r--r-- | core/src/fpdftext/fpdf_text_int.cpp | 12 | ||||
-rw-r--r-- | core/src/fpdftext/fpdf_text_search.cpp | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/core/src/fpdftext/fpdf_text.cpp b/core/src/fpdftext/fpdf_text.cpp index 4aea797c39..3871d25177 100644 --- a/core/src/fpdftext/fpdf_text.cpp +++ b/core/src/fpdftext/fpdf_text.cpp @@ -48,7 +48,7 @@ CTextPage::~CTextPage() { } } void CTextPage::ProcessObject(CPDF_PageObject* pObject) { - if (pObject->m_Type != PDFPAGE_TEXT) { + if (pObject->m_Type != CPDF_PageObject::TEXT) { return; } CPDF_TextObject* pText = (CPDF_TextObject*)pObject; @@ -682,7 +682,7 @@ static void CheckRotate(CPDF_Page& page, CFX_FloatRect& page_bbox) { FX_POSITION pos = page.GetFirstObjectPosition(); while (pos) { CPDF_PageObject* pObj = page.GetNextObject(pos); - if (pObj->m_Type != PDFPAGE_TEXT) { + if (pObj->m_Type != CPDF_PageObject::TEXT) { continue; } total_count++; diff --git a/core/src/fpdftext/fpdf_text_int.cpp b/core/src/fpdftext/fpdf_text_int.cpp index ae26cbd252..55f736ee9c 100644 --- a/core/src/fpdftext/fpdf_text_int.cpp +++ b/core/src/fpdftext/fpdf_text_int.cpp @@ -771,7 +771,7 @@ int32_t CPDF_TextPage::FindTextlineFlowDirection() { if (NULL == pPageObj) { continue; } - if (PDFPAGE_TEXT != pPageObj->m_Type) { + if (CPDF_PageObject::TEXT != pPageObj->m_Type) { continue; } int32_t minH = @@ -860,11 +860,11 @@ void CPDF_TextPage::ProcessObject() { while (pos) { pPageObj = m_pPage->GetNextObject(pos); if (pPageObj) { - if (pPageObj->m_Type == PDFPAGE_TEXT) { + if (pPageObj->m_Type == CPDF_PageObject::TEXT) { CFX_Matrix matrix; ProcessTextObject((CPDF_TextObject*)pPageObj, matrix, pos); nCount++; - } else if (pPageObj->m_Type == PDFPAGE_FORM) { + } else if (pPageObj->m_Type == CPDF_PageObject::FORM) { CFX_Matrix formMatrix(1, 0, 0, 1, 0, 0); ProcessFormObject((CPDF_FormObject*)pPageObj, formMatrix); } @@ -895,9 +895,9 @@ void CPDF_TextPage::ProcessFormObject(CPDF_FormObject* pFormObj, while (pos) { pPageObj = pFormObj->m_pForm->GetNextObject(pos); if (pPageObj) { - if (pPageObj->m_Type == PDFPAGE_TEXT) { + if (pPageObj->m_Type == CPDF_PageObject::TEXT) { ProcessTextObject((CPDF_TextObject*)pPageObj, curFormMatrix, pos); - } else if (pPageObj->m_Type == PDFPAGE_FORM) { + } else if (pPageObj->m_Type == CPDF_PageObject::FORM) { ProcessFormObject((CPDF_FormObject*)pPageObj, curFormMatrix); } } @@ -1967,7 +1967,7 @@ FX_BOOL CPDF_TextPage::IsSameAsPreTextObject(CPDF_TextObject* pTextObj, if (pObj == pTextObj) { continue; } - if (pObj->m_Type != PDFPAGE_TEXT) { + if (pObj->m_Type != CPDF_PageObject::TEXT) { continue; } if (IsSameTextObject((CPDF_TextObject*)pObj, pTextObj)) { diff --git a/core/src/fpdftext/fpdf_text_search.cpp b/core/src/fpdftext/fpdf_text_search.cpp index de38a7f540..b77f9428cb 100644 --- a/core/src/fpdftext/fpdf_text_search.cpp +++ b/core/src/fpdftext/fpdf_text_search.cpp @@ -303,7 +303,7 @@ void GetTextStream_Unicode(CFX_WideTextBuf& buffer, FX_POSITION pos = pPage->GetFirstObjectPosition(); while (pos) { CPDF_PageObject* pObject = pPage->GetNextObject(pos); - if (pObject && pObject->m_Type == PDFPAGE_TEXT) + if (pObject && pObject->m_Type == CPDF_PageObject::TEXT) textstream.ProcessObject((CPDF_TextObject*)pObject, FALSE); } } @@ -321,7 +321,7 @@ CFX_WideString PDF_GetFirstTextLine_Unicode(CPDF_Document* pDoc, FX_POSITION pos = page.GetFirstObjectPosition(); while (pos) { CPDF_PageObject* pObject = page.GetNextObject(pos); - if (pObject->m_Type != PDFPAGE_TEXT) { + if (pObject->m_Type != CPDF_PageObject::TEXT) { continue; } if (textstream.ProcessObject((CPDF_TextObject*)pObject, TRUE)) { |