Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(561)

Unified Diff: xfa/src/fxfa/src/app/xfa_ffdoc.cpp

Issue 1636503006: Merge to XFA: War on #defines, part 1. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Dircet -> Direct typo. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/src/javascript/Document.cpp ('k') | xfa/src/fxfa/src/app/xfa_fontmgr.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/src/fxfa/src/app/xfa_ffdoc.cpp
diff --git a/xfa/src/fxfa/src/app/xfa_ffdoc.cpp b/xfa/src/fxfa/src/app/xfa_ffdoc.cpp
index 448e4cfc8ebde5af48ee4ca29e61ee7cacdec3c8..1af717152951e52afc826e68d9c4f55c69b590a3 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) {
« no previous file with comments | « fpdfsdk/src/javascript/Document.cpp ('k') | xfa/src/fxfa/src/app/xfa_fontmgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698