diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2015-10-21 15:46:10 -0400 |
---|---|---|
committer | Dan Sinclair <dsinclair@chromium.org> | 2015-10-21 15:46:10 -0400 |
commit | 710c909117da4297e5a9508bedb306fc5c49eb36 (patch) | |
tree | 53c9bf4471ebe72977773ec8151b4ae44c3975bb /core/src/fpdfapi/fpdf_render | |
parent | 316eb864137a0b8eeb0d0d4d698ba83f4946a89c (diff) | |
download | pdfium-710c909117da4297e5a9508bedb306fc5c49eb36.tar.xz |
Merge to XFA: Add type cast definitions for CPDF_Name.
This Cl adds ToName, CPDF_Object::AsName and CPDF_Object::IsName and
updates the src to use them as needed.
BUG=pdfium:201
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1417823005 .
(cherry picked from commit 1c77edb7b34e03787605b7965784cea38ef9f1d7)
Review URL: https://codereview.chromium.org/1417033004 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_render')
-rw-r--r-- | core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp | 2 | ||||
-rw-r--r-- | core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp index e4afdd80c2..cdf2104f82 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_image.cpp @@ -406,7 +406,7 @@ FX_BOOL CPDF_ImageRenderer::StartRenderDIBSource() { m_pImageObject->m_pImage->GetStream()->GetDict()->GetElementValue( FX_BSTRC("Filter")); if (pFilters) { - if (pFilters->GetType() == PDFOBJ_NAME) { + if (pFilters->IsName()) { CFX_ByteStringC bsDecodeType = pFilters->GetConstString(); if (bsDecodeType == FX_BSTRC("DCTDecode") || bsDecodeType == FX_BSTRC("JPXDecode")) { diff --git a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp index c3029e0091..79b4bba162 100644 --- a/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp +++ b/core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp @@ -476,7 +476,7 @@ FX_BOOL CPDF_DIBSource::LoadColorInfo(CPDF_Dictionary* pFormResources, CPDF_Object* pFilter = m_pDict->GetElementValue(FX_BSTRC("Filter")); if (pFilter) { CFX_ByteString filter; - if (pFilter->GetType() == PDFOBJ_NAME) { + if (pFilter->IsName()) { filter = pFilter->GetString(); if (filter == FX_BSTRC("JPXDecode")) { m_bDoBpcCheck = FALSE; @@ -514,7 +514,7 @@ FX_BOOL CPDF_DIBSource::LoadColorInfo(CPDF_Dictionary* pFormResources, } m_Family = m_pColorSpace->GetFamily(); m_nComponents = m_pColorSpace->CountComponents(); - if (m_Family == PDFCS_ICCBASED && pCSObj->GetType() == PDFOBJ_NAME) { + if (m_Family == PDFCS_ICCBASED && pCSObj->IsName()) { CFX_ByteString cs = pCSObj->GetString(); if (cs == FX_BSTRC("DeviceGray")) { m_nComponents = 1; @@ -939,7 +939,7 @@ void CPDF_DIBSource::ValidateDictParam() { m_bpc = m_bpc_orig; CPDF_Object* pFilter = m_pDict->GetElementValue(FX_BSTRC("Filter")); if (pFilter) { - if (pFilter->GetType() == PDFOBJ_NAME) { + if (pFilter->IsName()) { CFX_ByteString filter = pFilter->GetString(); if (filter == FX_BSTRC("CCITTFaxDecode") || filter == FX_BSTRC("JBIG2Decode")) { |