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/fpdfapi/fpdf_edit | |
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/fpdfapi/fpdf_edit')
-rw-r--r-- | core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp | 2 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp | 36 |
2 files changed, 19 insertions, 19 deletions
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp index f1565cd9a2..a7df332337 100644 --- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp +++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp @@ -38,7 +38,7 @@ void CPDF_PageContentGenerator::GenerateContent() { CPDF_Dictionary* pPageDict = m_pPage->m_pFormDict; for (int i = 0; i < m_pageObjects.GetSize(); ++i) { CPDF_PageObject* pPageObj = m_pageObjects[i]; - if (!pPageObj || pPageObj->m_Type != PDFPAGE_IMAGE) { + if (!pPageObj || pPageObj->m_Type != CPDF_PageObject::IMAGE) { continue; } ProcessImage(buf, (CPDF_ImageObject*)pPageObj); diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp index f8e7cb86c3..8d0f6210d8 100644 --- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp +++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp @@ -32,14 +32,14 @@ int32_t PDF_CreatorAppendObject(const CPDF_Object* pObj, return 1; } switch (pObj->GetType()) { - case PDFOBJ_NULL: + case CPDF_Object::NULLOBJ: if (pFile->AppendString(" null") < 0) { return -1; } offset += 5; break; - case PDFOBJ_BOOLEAN: - case PDFOBJ_NUMBER: + case CPDF_Object::BOOLEAN: + case CPDF_Object::NUMBER: if (pFile->AppendString(" ") < 0) { return -1; } @@ -48,7 +48,7 @@ int32_t PDF_CreatorAppendObject(const CPDF_Object* pObj, } offset += len + 1; break; - case PDFOBJ_STRING: { + case CPDF_Object::STRING: { CFX_ByteString str = pObj->GetString(); FX_BOOL bHex = pObj->AsString()->IsHex(); if ((len = pFile->AppendString(PDF_EncodeString(str, bHex))) < 0) { @@ -57,7 +57,7 @@ int32_t PDF_CreatorAppendObject(const CPDF_Object* pObj, offset += len; break; } - case PDFOBJ_NAME: { + case CPDF_Object::NAME: { if (pFile->AppendString("/") < 0) { return -1; } @@ -68,7 +68,7 @@ int32_t PDF_CreatorAppendObject(const CPDF_Object* pObj, offset += len + 1; break; } - case PDFOBJ_REFERENCE: { + case CPDF_Object::REFERENCE: { if (pFile->AppendString(" ") < 0) return -1; if ((len = pFile->AppendDWord(pObj->AsReference()->GetRefObjNum())) < 0) @@ -78,7 +78,7 @@ int32_t PDF_CreatorAppendObject(const CPDF_Object* pObj, offset += len + 6; break; } - case PDFOBJ_ARRAY: { + case CPDF_Object::ARRAY: { if (pFile->AppendString("[") < 0) { return -1; } @@ -109,7 +109,7 @@ int32_t PDF_CreatorAppendObject(const CPDF_Object* pObj, offset += 1; break; } - case PDFOBJ_DICTIONARY: { + case CPDF_Object::DICTIONARY: { if (pFile->AppendString("<<") < 0) { return -1; } @@ -148,7 +148,7 @@ int32_t PDF_CreatorAppendObject(const CPDF_Object* pObj, offset += 2; break; } - case PDFOBJ_STREAM: { + case CPDF_Object::STREAM: { const CPDF_Stream* p = pObj->AsStream(); if (PDF_CreatorAppendObject(p->GetDict(), pFile, offset) < 0) { return -1; @@ -1109,14 +1109,14 @@ int32_t CPDF_Creator::WriteDirectObj(FX_DWORD objnum, return 1; } switch (pObj->GetType()) { - case PDFOBJ_NULL: + case CPDF_Object::NULLOBJ: if (m_File.AppendString(" null") < 0) { return -1; } m_Offset += 5; break; - case PDFOBJ_BOOLEAN: - case PDFOBJ_NUMBER: + case CPDF_Object::BOOLEAN: + case CPDF_Object::NUMBER: if (m_File.AppendString(" ") < 0) { return -1; } @@ -1125,7 +1125,7 @@ int32_t CPDF_Creator::WriteDirectObj(FX_DWORD objnum, } m_Offset += len + 1; break; - case PDFOBJ_STRING: { + case CPDF_Object::STRING: { CFX_ByteString str = pObj->GetString(); FX_BOOL bHex = pObj->AsString()->IsHex(); if (!m_pCryptoHandler || !bEncrypt) { @@ -1148,7 +1148,7 @@ int32_t CPDF_Creator::WriteDirectObj(FX_DWORD objnum, m_Offset += len; break; } - case PDFOBJ_STREAM: { + case CPDF_Object::STREAM: { CPDF_FlateEncoder encoder; encoder.Initialize(const_cast<CPDF_Stream*>(pObj->AsStream()), m_bCompress); @@ -1177,7 +1177,7 @@ int32_t CPDF_Creator::WriteDirectObj(FX_DWORD objnum, m_Offset += len; break; } - case PDFOBJ_NAME: { + case CPDF_Object::NAME: { if (m_File.AppendString("/") < 0) { return -1; } @@ -1188,7 +1188,7 @@ int32_t CPDF_Creator::WriteDirectObj(FX_DWORD objnum, m_Offset += len + 1; break; } - case PDFOBJ_REFERENCE: { + case CPDF_Object::REFERENCE: { if (m_File.AppendString(" ") < 0) return -1; if ((len = m_File.AppendDWord(pObj->AsReference()->GetRefObjNum())) < 0) @@ -1198,7 +1198,7 @@ int32_t CPDF_Creator::WriteDirectObj(FX_DWORD objnum, m_Offset += len + 5; break; } - case PDFOBJ_ARRAY: { + case CPDF_Object::ARRAY: { if (m_File.AppendString("[") < 0) { return -1; } @@ -1229,7 +1229,7 @@ int32_t CPDF_Creator::WriteDirectObj(FX_DWORD objnum, m_Offset += 1; break; } - case PDFOBJ_DICTIONARY: { + case CPDF_Object::DICTIONARY: { if (!m_pCryptoHandler || pObj == m_pEncryptDict) { return PDF_CreatorAppendObject(pObj, &m_File, m_Offset); } |