summaryrefslogtreecommitdiff
path: root/xfa
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2016-01-26 13:20:26 -0800
committerTom Sepez <tsepez@chromium.org>2016-01-26 13:20:26 -0800
commit8e5cd19d174f259bfda5f7a9699b08fdc4289b56 (patch)
tree6c2382c4cfe0475ecbfafc1af981dcaa0a801c35 /xfa
parentd834d55f902ccd18cba85f93ecf51e30c5e7e47b (diff)
downloadpdfium-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 'xfa')
-rw-r--r--xfa/src/fxfa/src/app/xfa_ffdoc.cpp7
-rw-r--r--xfa/src/fxfa/src/app/xfa_fontmgr.cpp2
2 files changed, 4 insertions, 5 deletions
diff --git a/xfa/src/fxfa/src/app/xfa_ffdoc.cpp b/xfa/src/fxfa/src/app/xfa_ffdoc.cpp
index 448e4cfc8e..1af7171529 100644
--- a/xfa/src/fxfa/src/app/xfa_ffdoc.cpp
+++ b/xfa/src/fxfa/src/app/xfa_ffdoc.cpp
@@ -233,9 +233,8 @@ FX_BOOL CXFA_FFDoc::OpenDoc(CPDF_Document* pPDFDoc) {
if (pElementXFA == NULL) {
return FALSE;
}
- int32_t iObjType = pElementXFA->GetType();
CFX_ArrayTemplate<CPDF_Stream*> xfaStreams;
- if (iObjType == PDFOBJ_ARRAY) {
+ if (pElementXFA->IsArray()) {
CPDF_Array* pXFAArray = (CPDF_Array*)pElementXFA;
FX_DWORD count = pXFAArray->GetCount() / 2;
for (FX_DWORD i = 0; i < count; i++) {
@@ -244,7 +243,7 @@ FX_BOOL CXFA_FFDoc::OpenDoc(CPDF_Document* pPDFDoc) {
xfaStreams.Add(pStream);
}
}
- } else if (iObjType == PDFOBJ_STREAM) {
+ } else if (pElementXFA->IsStream()) {
xfaStreams.Add((CPDF_Stream*)pElementXFA);
}
if (xfaStreams.GetSize() < 1) {
@@ -372,7 +371,7 @@ CFX_DIBitmap* CXFA_FFDoc::GetPDFNamedImage(const CFX_WideStringC& wsName,
}
}
#endif
- if (!pObject || pObject->GetType() != PDFOBJ_STREAM) {
+ if (!pObject || !pObject->IsStream()) {
return NULL;
}
if (!imageDIBDpi) {
diff --git a/xfa/src/fxfa/src/app/xfa_fontmgr.cpp b/xfa/src/fxfa/src/app/xfa_fontmgr.cpp
index 02f3d5e4b6..0c3f636dd2 100644
--- a/xfa/src/fxfa/src/app/xfa_fontmgr.cpp
+++ b/xfa/src/fxfa/src/app/xfa_fontmgr.cpp
@@ -1871,7 +1871,7 @@ IFX_Font* CXFA_PDFFontMgr::FindFont(CFX_ByteString strPsName,
continue;
}
CPDF_Object* pDirect = pObj->GetDirect();
- if (pDirect == NULL || pDirect->GetType() != PDFOBJ_DICTIONARY) {
+ if (!pDirect || !pDirect->IsDictionary()) {
return NULL;
}
CPDF_Dictionary* pFontDict = (CPDF_Dictionary*)pDirect;